mirror of
https://github.com/kennethreitz-archive/www.gittip.com.git
synced 2026-06-21 15:50:59 +00:00
e4692a690d
The box that's front and center in the visual design has three levels for nav. Rather than classing all of these levels as "buttons" and distinguishing them as "tips," "nav," and the one-off "rip," now we class them all as "nav," and then use "level-1," etc. for the three levels.
176 lines
6.3 KiB
HTML
176 lines
6.3 KiB
HTML
{% extends base.html %}
|
|
|
|
{% block box %}
|
|
|
|
<table class="on-profile{% if participant.is_suspicious %} is-suspicious{% end %}">
|
|
<tr>
|
|
<td class="picture">
|
|
<a href="/{{ participant.id }}/"><img src="{{ participant.get_img_src(128) }}" /></a>
|
|
</td>
|
|
<td class="giving-receiving">
|
|
{% set g = giving = participant.get_dollars_giving() %}
|
|
{% set r = receiving = participant.get_dollars_receiving() %}
|
|
|
|
{% if g > r and not participant.anonymous %}
|
|
<h2 class="pad-sign">{{ participant.id }} gives</h2>
|
|
<div class="number">
|
|
{% if user == participant %}
|
|
$<span class="total-giving">{{ giving }}</span>
|
|
{% else %}
|
|
${{ giving }}
|
|
{% end %}
|
|
</div>
|
|
<div class="unit pad-sign">per
|
|
week{% if r > 0 %}, and receives ${{ receiving }}{% end %}
|
|
</div>
|
|
{% elif r > 0 %}
|
|
<h2 class="pad-sign">{{ participant.id }} receives</h2>
|
|
<div class="number">${{ receiving }}</div>
|
|
<div class="unit pad-sign">per
|
|
week{% if g > 0 %}, and gives
|
|
{% if participant.anonymous %}
|
|
anonymously
|
|
{% elif user == participant %}
|
|
$<span class="total-giving">{{ giving }}</span>
|
|
{% else %}
|
|
${{ giving }}
|
|
{% end %}
|
|
{% end %}
|
|
</div>
|
|
{% else %}
|
|
{% set age = participant.get_age_in_seconds() %}
|
|
<h2>{{ participant.id }}
|
|
{% if g > 0 %}
|
|
gives anonymously
|
|
{% elif age < 60 %}
|
|
just joined Gittip! :D
|
|
{% elif age < (60 * 60 * 24 * 7) %}
|
|
joined recently
|
|
{% else %}
|
|
is lurking
|
|
{% end %}
|
|
</h2>
|
|
{% end %}
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
{% if participant.id != user.id %}
|
|
<div class="nav level-1">
|
|
{% if locked %}
|
|
|
|
<div class="help with-padding">
|
|
This account has been locked by its owner.
|
|
</div>
|
|
|
|
{% elif user.ANON %}
|
|
|
|
<h2>Your Weekly Gift</h2>
|
|
{% for amount in AMOUNTS %}
|
|
<button class="tip-anon">${{ amount }}</button>
|
|
{% end %}
|
|
|
|
<div class="help with-padding">Sign in using
|
|
<a class="flash-me" href="{{ twitter.oauth_url(website, u'opt-in', path.decoded) }}">Twitter</a> or
|
|
<a href="{{ github.oauth_url(website, u'opt-in', path.decoded) }}">GitHub</a>
|
|
to give to <b>{{ participant.id }}</b>.</div>
|
|
|
|
{% else %}
|
|
|
|
{% set my_tip = user.get_tip_to(participant.id) %}
|
|
<h2>Your Weekly Gift</h2>
|
|
{% for amount in AMOUNTS %}
|
|
<button amount="{{ amount }}" tippee="{{ participant.id }}"
|
|
class="tip{{ ' selected' if amount == my_tip else '' }}">${{ amount }}</button>
|
|
{% end %}
|
|
{% if my_tip not in AMOUNTS %}
|
|
<span class="old-amount">
|
|
<button class="tip disabled selected">{{ my_tip }}</button>
|
|
<span class="old-amount-link">—
|
|
<a href="http://blog.gittip.com/post/26505682007/is-personal-funding-viable" target="_blank">old amount</a>!</span>
|
|
</span>
|
|
{% end %}
|
|
|
|
{% if user.last_bill_result is None %}
|
|
|
|
<div id="payment-prompt" class="help{% if my_tip > 0 %} needed{% end %}">
|
|
Back your gift with a <a href="/credit-card.html"
|
|
class="highlight">credit card</a> to make sure it goes
|
|
through!</div>
|
|
{% elif user.last_bill_result %}
|
|
<div id="payment-prompt" class="help really-needed">Fix your <a
|
|
href="/credit-card.html" class="highlight">credit
|
|
card</a> to make sure your gifts go through!</div>
|
|
{% end %}
|
|
|
|
{% end %}
|
|
</div>
|
|
{% end %}
|
|
|
|
{% block nav %}{% end %}
|
|
|
|
{% if participant.id == 'aaronsw' %}
|
|
<div class="nav level-3">
|
|
<a href="http://news.ycombinator.com/item?id=5046845">RIP :`(</a>
|
|
</div>
|
|
<!--
|
|
|
|
After following Aaron's career for a decade, I interacted with him for the
|
|
first time three days before he committed suicide:
|
|
|
|
https://twitter.com/aaronsw/status/288664016723791873
|
|
|
|
:`(
|
|
|
|
-->
|
|
{% end %}
|
|
|
|
{% if user.ADMIN %}
|
|
<label class="is-suspicious-knob" data-participant-id="{{ participant.id }}">
|
|
Suspicious
|
|
<input type="checkbox"
|
|
{% if participant.is_suspicious %}checked="true"{% end %} />
|
|
</label>
|
|
{% elif participant.is_suspicious %}
|
|
<div class="is-suspicious-indicator">Suspicious</div>
|
|
{% end %}
|
|
|
|
{% end %}
|
|
|
|
|
|
{% block body %}
|
|
|
|
<h2>Share</h2>
|
|
|
|
<!-- http://developers.facebook.com/docs/reference/plugins/like/ -->
|
|
<div id="fb-root"></div>
|
|
<script>(function(d, s, id) {
|
|
var js, fjs = d.getElementsByTagName(s)[0];
|
|
if (d.getElementById(id)) return;
|
|
js = d.createElement(s); js.id = id;
|
|
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
|
|
fjs.parentNode.insertBefore(js, fjs);
|
|
}(document, 'script', 'facebook-jssdk'));</script>
|
|
<div class="fb-like" data-send="false" data-width="120" data-show-faces="false"></div>
|
|
|
|
|
|
<!-- https://dev.twitter.com/docs/tweet-button -->
|
|
<a href="https://twitter.com/share"
|
|
class="twitter-share-button" data-lang="en"
|
|
data-text="I just tipped a hard-working genius with Gittip. You can too:"
|
|
data-url="https://www.gittip.com/">Tweet</a>
|
|
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
|
|
|
|
|
|
<!-- http://www.google.com/webmasters/+1/button/ -->
|
|
<g:plusone size="small" annotation="inline" width="120"></g:plusone>
|
|
<script type="text/javascript">
|
|
(function() {
|
|
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
|
|
po.src = 'https://apis.google.com/js/plusone.js';
|
|
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
|
|
})();
|
|
</script>
|
|
|
|
{% end %}
|