Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Clean up titles on profile subpages
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed Nov 17, 2014
1 parent 1323b1a commit f767617
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 22 deletions.
8 changes: 0 additions & 8 deletions scss/responsiveness.scss
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,6 @@
font-size: 14px;
}

#hero {
font-size: 15px;
h1 {
font-size: 36px;
padding: 36px 0 18px;
}
}

.homepage {
span { white-space: normal; }
display: block;
Expand Down
2 changes: 1 addition & 1 deletion templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
{% block head_early %}{% endblock %}
<title>{% if title %}{{ title|e }} - {% endif %}Gratipay</title>
<title>{% if title %}{% if subhead %}{{ subhead|e }} - {% endif %}{{ title|e }} - {% endif %}Gratipay</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="{{ website.asset('gratipay.css') }}" type="text/css">
<link rel="apple-touch-icon-precomposed" href="{{ website.asset('touch/icon-60x60.png') }}">
Expand Down
2 changes: 1 addition & 1 deletion www/%username/account/close.spt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from gratipay.utils import get_participant
[---]
participant = get_participant(request, restrict=True)
hero = "Close Account"
title = participant.username # used in the title tag
subhead = _("Close Account")
username = participant.username # used in footer shared with on/$platform/
# pages

Expand Down
4 changes: 2 additions & 2 deletions www/%username/account/index.html.spt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ from cgi import escape
[-----------------------------------------------------------------------------]

participant = get_participant(request, restrict=True)
hero = _("Account")
title = participant.username # used in the title tag
title = participant.username
subhead = _("Account")
username = participant.username # used in footer shared with on/$platform/
# pages
locked = False
Expand Down
4 changes: 2 additions & 2 deletions www/%username/events/index.html.spt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ db = website.db
[-----------------------------------------------------------------------------]

participant = get_participant(request, restrict=True)
hero = "Events"
title = "%s - %s" % (participant.username, hero)
title = participant.username
subhead = "Events"
locked = False

SQL = """
Expand Down
4 changes: 2 additions & 2 deletions www/%username/giving/index.html.spt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ from gratipay.utils import get_participant
participant = get_participant(request, restrict=True)
tips, total, unclaimed_tips, unclaimed_total = \
participant.get_giving_for_profile()
hero = _("Giving")
title = "%s - %s" % (participant.username, hero)
title = participant.username
subhead = "Giving"
locked = False
cancelled_tips = [x for x in tips if x.amount == 0][:10]
ncancelled_tips = len(cancelled_tips)
Expand Down
4 changes: 2 additions & 2 deletions www/%username/history/index.html.spt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ from gratipay.utils.history import iter_payday_events

participant = get_participant(request, restrict=True)
events = iter_payday_events(website.db, participant)
hero = _("History")
title = "%s - %s" % (participant.username, hero)
title = participant.username
subhead = _("History")
locked = False
subpath = 'history/' if user.ADMIN else ''
admin_override = user.ADMIN and (participant != user.participant or 'override' in qs)
Expand Down
1 change: 0 additions & 1 deletion www/%username/index.html.spt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ def _clip(text, n):
participant = get_participant(request, restrict=False)
locked = False
tip_or_pledge = "tip"
hero = _("Profile")
title = participant.username # used in the title tag
username = participant.username # used in footer shared with on/$platform/
# pages
Expand Down
2 changes: 1 addition & 1 deletion www/%username/members/index.html.spt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ if not team.show_as_team(user):
request.redirect('../')
locked = False
tip_or_pledge = "tip"
hero = _("Team Members")
title = team.username # used in the title tag
subhead = _("Team Members")
username = team.username # used in footer shared with on/%platform/ pages

[-----------------------------------------------------------------------------]
Expand Down
4 changes: 2 additions & 2 deletions www/%username/widgets/index.html.spt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ from gratipay.utils import get_participant
[-----------------------------------------------------------------------------]

participant = get_participant(request, restrict=True)
hero = _("Widgets")
title = "%s - %s" % (participant.username, hero)
title = participant.username
subhead = _("Widgets")
locked = False

[-----------------------------------------------------------------------------]
Expand Down

0 comments on commit f767617

Please sign in to comment.