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

Commit

Permalink
Clean up accounts on network pages (#289, #313)
Browse files Browse the repository at this point in the history
I CSS for the account listings, and I changed the markup correspondingly
on the profile page but not on network pages.
  • Loading branch information
chadwhitacre committed Nov 16, 2012
1 parent 4aaa0a8 commit df3955a
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 35 deletions.
41 changes: 23 additions & 18 deletions www/on/github/%login/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,24 +96,29 @@ <h2 class="first"><b>{{ username }}</b> has opted out of Gittip.</h2>

<h2 class="first"><b>{{ name }}</b> has not joined Gittip.</h2>

<p>Is this you?
{% if user.ANON %}
<ul id="accounts">
<li>
<img src="{{ userinfo.get('avatar_url', '/assets/%s/no-avatar.png' % __version__) }}" />
Are you <a href="{{ userinfo['html_url'] }}">{{ userinfo['login'] }}</a> from GitHub?<br />
<a href="{{ github.oauth_url(website, u'opt-in', username) }}">Click here</a> to opt in to Gittip.
</li>
</ul>
<a href="{{ github.oauth_url(website, u'opt-in', username) }}">Click here</a> to opt in to Gittip.
{% else %}
<ul id="accounts">
<li>
<img src="{{ userinfo.get('avatar_url', '/assets/%s/no-avatar.png' % __version__) }}" />
Are you <a href="{{ userinfo['html_url'] }}">{{ userinfo['login'] }}</a> from GitHub?<br />
You&rsquo;ll have to <a href="/sign-out.html">sign out</a> and sign back in to claim this account.
</li>
</ul>
{% end %}

You&rsquo;ll have to <a href="/sign-out.html">sign out</a> and sign back in to claim this account.
{% end %}</p>

<table id="accounts">
<tr>
<td class="account-type">
<img src="/assets/octocat.png" />
</td>
<td class="account-details">
<a href="{{ userinfo['html_url'] }}">
<img class="avatar"
src="{{ userinfo.get('avatar_url', '/assets/%s/no-avatar.png' % __version__) }}" />
{{ userinfo['login'] }}
{% if userinfo.get('name') %}({{ userinfo.get('name') }}){% end %}
</a>
<div class="account-type">GitHub</div>
</td>
</tr>
</table>

{% if nbackers == 0 %}
{% elif nbackers == 1 %}
Expand All @@ -128,12 +133,12 @@ <h3>There are {{ nbackers }} people ready to give.</h3>
{% if not user.ANON %}

<p>{{ 'But we' if nbackers > 0 else 'We' }} will never collect money on
behalf of {{ username }} until they ask us to.</p>
behalf of {{ username }} until they opt in.</p>

{% else %}

<p>{{ 'But we' if nbackers > 0 else 'We' }} will never collect money on
your behalf until you ask us to.</p>
your behalf until you opt in.</p>

<h3>Don&rsquo;t like what you see?</h3>

Expand Down
40 changes: 23 additions & 17 deletions www/on/twitter/%screen_name/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,23 +101,29 @@ <h2 class="first"><b>{{ username }}</b> has opted out of Gittip.</h2>

<h2 class="first"><b>{{ name }}</b> has not joined Gittip.</h2>

<p>Is this you?
{% if user.ANON %}
<ul id="accounts">
<li>
<img src="{{ userinfo.get('profile_image_url_https', '/assets/%s/no-avatar.png' % __version__) }}" />
Are you <a href="{{ userinfo['html_url'] }}">{{ userinfo['screen_name'] }}</a> from Twitter?<br />
<a href="{{ twitter.oauth_url(website, u'opt-in', username) }}">Click here</a> to opt in to Gittip.
</li>
</ul>
<a href="{{ twitter.oauth_url(website, u'opt-in', username) }}">Click here</a> to opt in to Gittip.
{% else %}
<ul id="accounts">
<li>
<img src="{{ userinfo.get('profile_image_url_https', '/assets/%s/no-avatar.png' % __version__) }}" />
Are you <a href="{{ userinfo['html_url'] }}">{{ userinfo['screen_name'] }}</a> from Twitter?<br />
You&rsquo;ll have to <a href="/sign-out.html">sign out</a> and sign back in to claim this account.
</li>
</ul>
{% end %}
You&rsquo;ll have to <a href="/sign-out.html">sign out</a> and sign back in to claim this account.
{% end %}</p>

<table id="accounts">
<tr>
<td class="account-type">
<img src="/assets/twitter.png" />
</td>
<td class="account-details">
<a href="{{ userinfo['html_url'] }}">
<img class="avatar"
src="{{ userinfo.get('profile_image_url_https', '/assets/%s/no-avatar.png' % __version__) }}" />
{{ userinfo['screen_name'] }}
{% if userinfo.get('name') %}({{ userinfo.get('name') }}){% end %}
</a>
<div class="account-type">Twitter</div>
</td>
</tr>
</table>


{% if nbackers == 0 %}
Expand All @@ -133,12 +139,12 @@ <h3>There are {{ nbackers }} people ready to give.</h3>
{% if not user.ANON %}

<p>{{ 'But we' if nbackers > 0 else 'We' }} will never collect money on
behalf of {{ username }} until they ask us to.</p>
behalf of {{ username }} until they opt in.</p>

{% else %}

<p>{{ 'But we' if nbackers > 0 else 'We' }} will never collect money on
your behalf until you ask us to.</p>
your behalf until you opt in.</p>

<h3>What is Gittip?</h3>

Expand Down

0 comments on commit df3955a

Please sign in to comment.