Skip to content

Commit

Permalink
apply privacy settings to Donate pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Changaco committed May 31, 2016
1 parent 1dc5466 commit fbf6e90
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 16 deletions.
9 changes: 9 additions & 0 deletions templates/profile-base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
% extends "templates/base.html"

% block head_early
% set nofollow = ['nofollow'] if participant.profile_nofollow else []
% set noindex = ['noindex'] if participant.profile_noindex or 'amount' in request.qs else []
% if nofollow or noindex
<meta name="robots" content="{{ ','.join(noindex + nofollow) }}" />
% endif
% endblock
10 changes: 1 addition & 9 deletions templates/profile.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
% extends "templates/base.html"
% extends "templates/profile-base.html"
% from 'templates/profile-box.html' import profile_box_full with context

% block head_early
% set nofollow = ['nofollow'] if participant.profile_nofollow else []
% set noindex = ['noindex'] if participant.profile_noindex else []
% if nofollow or noindex
<meta name="robots" content="{{ ','.join(noindex + nofollow) }}" />
% endif
% endblock

% block before_content
{% block profile_btn %}{% endblock %}
<div class="row">
Expand Down
8 changes: 1 addition & 7 deletions www/%username/donate.spt
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,12 @@ participant = get_participant(state, restrict=False)
title = _("Donate to {0}", participant.username)

[---] text/html
% extends "templates/base.html"
% extends "templates/profile-base.html"

% from 'templates/elsewhere.html' import account_elsewhere with context
% from 'templates/profile-goal-bar.html' import profile_goal_bar with context
% from 'templates/your-tip.html' import tip_form with context

% block head_early
% if 'amount' in request.qs
<meta name="robots" content="noindex" />
% endif
% endblock

{% block heading %}{% endblock %}

% block content
Expand Down

0 comments on commit fbf6e90

Please sign in to comment.