home » zplus/freepost.git
Author zPlus <-> 2016-03-18 06:43:02
Committer zPlus <-> 2016-03-18 06:43:02
Commit e2f14f5 (patch)
Tree b12a319
Parent(s)

Add title to pages


commits diff: 2f81ebe..e2f14f5
6 files changed, 15 insertions, 5 deletionsdownload


Diffstat
-rw-r--r-- about.php 4
-rw-r--r-- login.php 4
-rw-r--r-- post.php 1
-rw-r--r-- submit.php 4
-rw-r--r-- template/header.twig 2
-rw-r--r-- user.php 5

Diff options
View
Side
Whitespace
Context lines
Inter-hunk lines
+3/-1 M   about.php
index 2fd349d..9c3a2af
old size: 114B - new size: 151B
@@ -4,4 +4,6 @@ require_once 'session.php';
4 4 require_once 'twig.php';
5 5
6 6 // Render template
7 - echo $twig->render ('about.twig');
7 > \ No newline at end of file
7 + echo $twig->render (
8 + 'about.twig',
9 + array ('title' => 'About'));
9 < \ No newline at end of file

+3/-1 M   login.php
index 770dbf5..70d7baf
old size: 3K - new size: 3K
@@ -96,5 +96,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST')
96 96 // Render template
97 97 echo $twig->render (
98 98 'login.twig',
99 - array('feedback' => isset ($feedback) ? $feedback : ''));
99 + array(
100 + 'title' => 'Login',
101 + 'feedback' => isset ($feedback) ? $feedback : ''));
100 102

+1/-0 M   post.php
index a029aee..0af8ae7
old size: 1K - new size: 1K
@@ -65,6 +65,7 @@ $comments = $db->get_post_comments ($post['id']);
65 65 echo $twig->render (
66 66 'post.twig',
67 67 array(
68 + 'title' => $post['title'],
68 69 'post' => $post,
69 70 'comments' => $comments,
70 71 'votes' => $votes));

+3/-1 M   submit.php
index 03447cc..6f905c0
old size: 887B - new size: 925B
@@ -42,4 +42,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST')
42 42 }
43 43
44 44 // Render template
45 - echo $twig->render ('submit.twig');
45 + echo $twig->render (
46 + 'submit.twig',
47 + array ('title' => 'Submit'));

+1/-1 M   template/header.twig
index cfe3738..196ab07
old size: 2K - new size: 2K
@@ -8,7 +8,7 @@
8 8 <link href="css/bootstrap-theme.min.css" rel="stylesheet">
9 9 <link href="css/freepost.css" rel="stylesheet">
10 10
11 - <title>freepost</title>
11 + <title>{{ title is defined ? title ~ ' - ' }}freepost</title>
12 12 </head>
13 13
14 14 <body>

+4/-1 M   user.php
index 6dca4a6..3feb93e
old size: 1K - new size: 1K
@@ -52,11 +52,14 @@ if (isset ($_GET['username']))
52 52 echo $twig->render (
53 53 'user.twig',
54 54 array (
55 + 'title' => $user['username'],
55 56 'profile' => 'public',
56 57 'other_user' => $user));
57 58 } else {
58 59 // Show private page
59 60 echo $twig->render (
60 61 'user.twig',
61 - array ('profile' => 'private'));
62 + array (
63 + 'title' => Session::get_username (),
64 + 'profile' => 'private'));
62 65 }
62 65 = \ No newline at end of file