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'])) { @@ -6,6 +6,7 @@ if (!isset($_SESSION['userName'])) {
}
$metaTitle = _('People | Twisterarmy Cloud');
$pageTitle = _('People');
// Load dependencies
$metaStyles = [
@ -29,7 +30,11 @@ if (isset($_GET['_route_'])) { @@ -29,7 +30,11 @@ if (isset($_GET['_route_'])) {
$route = explode('/', $_GET['_route_']);
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 @@ @@ -5,6 +5,7 @@
<?php include(PROJECT_DIR . '/application/controller/common/module/following.php') ?>
</div>
<div class="left">
<h1><?php echo $pageTitle ?></h1>
<?php include(PROJECT_DIR . '/application/controller/common/module/feed.php') ?>
</div>
</div>

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

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