Browse Source

Move the Communities Servers exploration in a dedicated page

pull/970/head
Timothée Jaussoin 5 years ago
parent
commit
a414786032
  1. 1
      app/views/community.tpl
  2. 42
      app/views/explore.tpl
  3. 17
      app/widgets/Communities/communities.tpl
  4. 1
      app/widgets/Communities/locales.ini
  5. 2
      app/widgets/CommunitiesServers/communitiesservers.tpl
  6. 6
      public/theme/css/icon.css
  7. 2
      src/Movim/Route.php

1
app/views/community.tpl

@ -24,7 +24,6 @@
<div>
<?php $this->widget('CommunitiesServer'); ?>
</div>
<?php } else { ?>
<aside>
<?php $this->widget('CommunityData'); ?>

42
app/views/explore.tpl

@ -17,19 +17,33 @@
<main style="background-color: var(--movim-background)">
<div class="large">
<header>
<ul class="list middle">
<li>
<div>
<p class="center"><?php echo __('page.explore'); ?></p>
<p class="center line"><?php echo __('communities.empty_text'); ?></p>
</div>
</li>
</ul>
</header>
<?php $this->widget('Tabs');?>
<ul class="tabs" id="navtabs"></ul>
<?php $this->widget('Communities'); ?>
<?php $this->widget('CommunitiesServers'); ?>
<?php if (!empty($_GET['s']) && $_GET['s'] == 'servers') { ?>
<header>
<ul class="list middle">
<li>
<span class="primary icon active" onclick="history.back()">
<i class="material-icons">arrow_back</i>
</span>
<div>
<p class="center"><?php echo __('communities.servers'); ?></p>
<p class="center line"><?php echo __('communities.empty_text'); ?></p>
</div>
</li>
</ul>
</header>
<?php $this->widget('CommunitiesServers'); ?>
<?php } else { ?>
<header>
<ul class="list middle">
<li>
<div>
<p class="center"><?php echo __('page.explore'); ?></p>
<p class="center line"><?php echo __('communities.empty_text'); ?></p>
</div>
</li>
</ul>
</header>
<?php $this->widget('Communities'); ?>
<?php } ?>
</div>
</main>

17
app/widgets/Communities/communities.tpl

@ -1 +1,16 @@
<div id="communities" class="tabelem spin" title="{$c->__('button.discover')}" data-mobileicon="apps"></div>
<br />
<ul class="list flex middle active card">
<li class="block large" onclick="MovimUtils.redirect('{$c->route('explore', 'servers')}')">
<span class="primary icon">
<i class="material-icons">view_lists</i>
</span>
<span class="control icon">
<i class="material-icons">chevron_right</i>
</span>
<div>
<p>{$c->__('communities.servers')}</p>
<p>{$c->__('communities.servers_text')}</p>
</div>
</li>
</ul>
<div id="communities" class="spin"></div>

1
app/widgets/Communities/locales.ini

@ -3,6 +3,7 @@ empty_text = Discover, follow and share
counter = "%s communities"
search_server = Search for a new server
servers = Communities servers
servers_text = Discover the Communities by servers
disco = Communities server discovered
disco_error = "This server doesn’t exists"
interesting = Communities you might like

2
app/widgets/CommunitiesServers/communitiesservers.tpl

@ -1 +1 @@
<div id="communities_servers" class="tabelem spin" title="{$c->__('communities.servers')}" data-mobileicon="view_list"></div>
<div id="communities_servers" class="spin"></div>

6
public/theme/css/icon.css

@ -85,7 +85,8 @@ span.icon.bubble img:not(.emoji) {
border-radius: 5rem;
}
span.icon.bubble > i {
span.icon.bubble > i,
span.icon.bubble > a > i {
font-size: 3rem;
line-height: 5rem;
}
@ -110,7 +111,8 @@ ul.list li span.icon.small:not(.bubble) > i {
}
span.icon.small.bubble:first-letter,
span.icon.small.bubble > i {
span.icon.small.bubble > i,
span.icon.small.bubble > a > i {
font-size: 2.25rem;
line-height: 4rem;
}

2
src/Movim/Route.php

@ -27,7 +27,7 @@ class Route extends Base
'conf' => false,
'contact' => ['s'],
'disconnect' => ['err'],
'explore' => false,
'explore' => ['s'],
'feed' => ['s', 'n'],
'help' => false,
'infos' => false,

Loading…
Cancel
Save