Browse Source

add page title

main
ghost 3 years ago
parent
commit
7c51d89cae
  1. 7
      src/application/controller/people.php
  2. 1
      src/application/view/people.phtml
  3. 9
      src/public/css/template/default/app.css

7
src/application/controller/people.php

@ -6,6 +6,7 @@ if (!isset($_SESSION['userName'])) {
} }
$metaTitle = _('People | Twisterarmy Cloud'); $metaTitle = _('People | Twisterarmy Cloud');
$pageTitle = _('People');
// Load dependencies // Load dependencies
$metaStyles = [ $metaStyles = [
@ -29,7 +30,11 @@ if (isset($_GET['_route_'])) {
$route = explode('/', $_GET['_route_']); $route = explode('/', $_GET['_route_']);
if (isset($route[1])) { if (isset($route[1])) {
$_twister->follow($_SESSION['userName'], [filter::userName($route[1])]);
$userName = filter::userName($route[1]);
$_twister->follow($_SESSION['userName'], [$userName]);
$pageTitle = sprintf(_('@%s posts'), $userName);
} }
} }

1
src/application/view/people.phtml

@ -5,6 +5,7 @@
<?php include(PROJECT_DIR . '/application/controller/common/module/following.php') ?> <?php include(PROJECT_DIR . '/application/controller/common/module/following.php') ?>
</div> </div>
<div class="left"> <div class="left">
<h1><?php echo $pageTitle ?></h1>
<?php include(PROJECT_DIR . '/application/controller/common/module/feed.php') ?> <?php include(PROJECT_DIR . '/application/controller/common/module/feed.php') ?>
</div> </div>
</div> </div>

9
src/public/css/template/default/app.css

@ -17,7 +17,8 @@ a:active {
margin: 16px auto; margin: 16px auto;
padding: 0 16px; padding: 0 16px;
overflow: hidden; overflow: hidden;
position: relative position: relative;
margin-bottom: 64px
} }
.container > .right { .container > .right {
@ -30,6 +31,8 @@ a:active {
padding-right: 380px padding-right: 380px
} }
.container { .container > .left h1 {
margin-bottom: 64px font-size: 20px;
font-weight: normal;
height: 44px;
} }
Loading…
Cancel
Save