forked from simpleweb/rusic-theme-ideas
/
index.html.liquid
59 lines (52 loc) · 2.52 KB
/
index.html.liquid
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{% if space.ideas != empty %}
<div id="filters">
<span class="filter-label">Show:</span>
<ul>
<li><a href="/" class="all {% if filter == "own" %}{% else %}{% if sort == "like" %}{% else %}active{% endif %}{% endif %}" title="show all entries">All</a></li>
{% if current_user %}<li><a href="?filter=own" class="mine {% if filter == "own" %}active{% endif %}" title="show my entries">Mine</a></li>{% endif %}
<li><a href="?sort=like" class="popular {% if sort == "like" %}active{% endif %}" title="show popular entries">Popular</a></li>
</ul>
</div>
{% for idea in space.ideas %}
<!-- ENTRY -->
<div class="entry">
<h1 class="show">{{ idea.title }}</h1>
<div class="slide">
<div class="content">
{{ idea.content | markdown }}
</div>
<a href="{{idea.permalink}}" title="permalink for {{%idea.title%}}" class="btn">go to page for this idea</a>
</div>
{% if idea.interested_users != empty %}
<div class="interest">
<h3>people interested in this:</h3>
<ul class="interested-people">
{% for user in idea.interested_users %}
<li><a href="{{ user.profile_url }}" title="{{ user.nickname }}'s {{ user.provider }} profile"><img src="{{ user.image_url }}" alt="{{ user.nickname }}" width="40" height="40" class="avatar" /></a></li>
{% endfor %}
</ul>
</div>
{% endif %}
<div class="meta">
<img src="{{idea.user.image_url}}" alt="avatar for {{user.nickname}}" width="25" height="25" class="avatar" />
<span class="author">by {{ idea.user.nickname }} {{ idea.created_at | human_time_distance }} ago</span>
<div class="actions">
<ul>
<li class="first"><a href="{{ idea.like_link }}" data-method="post" class="action-like">like <strong>({{ idea.likes }})</strong></a></li>
<li class="last"><a href="{{ idea.permalink }}#comments" title="link to comments for {{idea.title}}" class="action-discuss">discuss <strong>({{ idea.comments_count }})</strong></a></li>
</ul>
</div>
</div>
<span class="comment-count"><a href="{{idea.like_link}}" data-method="post">{{ idea.likes }}</a><br /><span class="like-label">likes</span></span>
</div>
{% endfor %}
{% else %}
<div class="empty">
<h1>Nobody has posted anything here yet!</h1>
{% if current_user %}
<p>be the first to add an idea by using the 'add a new idea' button</p>
{% else %}
<p>login with twitter or facebook to be the first to add an idea</p>
{% endif %}
</div>
{% endif %}