Skip to content

Commit

Permalink
Merge pull request #37 from wikisource/page-titles
Browse files Browse the repository at this point in the history
Add page titles to most pages
  • Loading branch information
samwilson authored May 30, 2022
2 parents 4e9bd36 + f0f5d03 commit b00edd3
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 1 deletion.
1 change: 1 addition & 0 deletions i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

"stats-summary": "$1 {{PLURAL:$1|person|people}} have taken part in $2 {{PLURAL:$2|contest|contests}}.",

"all-contests": "All contests",
"create-contest": "Create contest",
"edit-contest": "Edit contest configuration",
"name-label": "Name:",
Expand Down
1 change: 1 addition & 0 deletions i18n/qqq.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"logged-in-as": "Informative sentence about the currently logged-in user. $1 is the username.",
"logout": "Link to log out.",
"stats-summary": "Summary sentence about the stats for the whole tool. $1 is the number of people; $2 is the number of contests.",
"all-contests": "Page title for the contest-list page.",
"create-contest": "Header text displayed above the contest-creation form.",
"edit-contest": "Header text displayed above the contest-editing form.",
"name-label": "Form label for the 'name' field.\n{{Identical|Name}}",
Expand Down
6 changes: 5 additions & 1 deletion templates/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ msg('app-title') }}</title>
<title>
{% block page_title %}
{% endblock %}
{{ msg('app-title') }}
</title>
{% block stylesheets %}
<link rel="stylesheet" href="//tools-static.wmflabs.org/cdnjs/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css" />
{% endblock %}
Expand Down
4 changes: 4 additions & 0 deletions templates/contests.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{% extends 'base.html.twig' %}

{% block page_title %}
{{ msg('all-contests') }} —
{% endblock %}

{% block main %}

<p>
Expand Down
4 changes: 4 additions & 0 deletions templates/contests_edit.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{% extends 'base.html.twig' %}

{% block page_title %}
{% if contest.id %}{{ msg('edit-contest') }}{% else %}{{ msg('create-contest') }}{% endif %} —
{% endblock %}

{% block main %}

<h2>
Expand Down
4 changes: 4 additions & 0 deletions templates/contests_view.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{% extends 'base.html.twig' %}

{% block page_title %}
{{ msg('contest', [contest.name]) }} —
{% endblock %}

{% block main %}

<h2>{{ msg('contest', [contest.name]) }}</h2>
Expand Down
4 changes: 4 additions & 0 deletions templates/contests_viewuser.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{% extends 'base.html.twig' %}

{% block page_title %}
{{ user.name }} — {{ msg('contest', [contest.name]) }} —
{% endblock %}

{% block main %}

<ol class="breadcrumb">
Expand Down

0 comments on commit b00edd3

Please sign in to comment.