~chipaca/unity-lens-video/custom-user-agent

« back to all changes in this revision

Viewing changes to templates/main/index.html

  • Committer: Janos Gyerik
  • Date: 2011-08-08 20:19:00 UTC
  • Revision ID: janos@axiom-20110808201900-rpq8pghds6gf8vnl
top 50 link now works

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
{% extends "base.html" %}
2
2
 
 
3
{% load nst %}
 
4
 
3
5
{% block pagetitle %}bashoneliners.com{% endblock %}
4
6
 
5
 
{% block pageheader %}bashoneliners.com{% endblock %}
6
 
 
7
 
{% block keywords %}bash, ksh, shell, script, one-liner, oneliner, tips, tricks, linux, unix, vote, rank, rss, open-source, django, python, bazaar, launchpad, collaborate{% endblock %}
8
 
 
9
 
{% block description %}A collection of practical or just pure awesome bash one-liners or shell script tips and tricks for GNU Linux, UNIX or BSD systems. Open, collaborative system, user friendly, with functions to contribute one-liners, request one-liners, search, rss feed, commenting, Open ID login. Open-source project, using Django, Python, jQuery, Bazaar, Launchpad, HTML5, Bootstrap from Twitter.{% endblock %}
 
7
{% block keywords %}{% endblock %}
 
8
 
 
9
{% block description %}{% endblock %}
10
10
 
11
11
{% block content %}
12
12
 
13
 
<p>Welcome to <strong>bashoneliners.com</strong>, a place for practical or just pure awesome bash <em>one-liners</em> or shell script tips and tricks for GNU Linux, UNIX or BSD systems.
14
 
You can post a bash one-liner to share it with the world,
15
 
or browse or search the one-liners contributed by others.</p>
16
 
 
17
 
<p>You can follow the latest bash one-liners via <a href="{% url oneliners.views.feeds %}">rss feeds</a> or on twitter <a href="https://twitter.com/#!/bashoneliners">@bashoneliners</a>.</p>
18
 
 
19
 
<h2>Tags</h2>
20
 
 
21
 
<ul class="nav nav-pills tags">
22
 
{% for tag in tagcloud %}
23
 
<li><a href="#">{{ tag.text }}</a></li>
 
13
<p>
 
14
O hi, we aim to collect here <strong>*good*</strong> bash/ksh oneliners.
 
15
We are in a very very early stage of development but we will progress rapidly.
 
16
</p>
 
17
 
 
18
<h3>Features in the making</h3>
 
19
 
 
20
<ul>
 
21
    <li>Create account, login. Members will be able to post oneliners.</li>
 
22
    <li>Vote on a oneliner. Members will be able to vote up or down a oneliner.</li>
 
23
    <li>Comment on a oneliner. Members will be able to comment on oneliners and make suggestions.</li>
 
24
</ul>
 
25
 
 
26
<p>If you would like to participate in the development or if you would like an early member access to contribute oneliners, please let us know!</p>
 
27
 
 
28
<h2>latest 50</h2>
 
29
 
 
30
{% for oneliner in oneliners %}
 
31
<div class="oneliner">
 
32
    <p class="author">
 
33
        @<span>{{ oneliner.hacker.username }}</span> 
 
34
        on <span>{{ oneliner.created_dt }}</span>
 
35
        #
 
36
        {{ oneliner.get_votes_up }} <img src="/media/icons/thumbsup.png"/>
 
37
        {{ oneliner.get_votes_down }} <img src="/media/icons/thumbsdown.png"/>
 
38
    </p>
 
39
 
 
40
    <pre>{% for line in oneliner.lines %}$ {{ line }}<br/>{% endfor %}</pre>
 
41
 
 
42
    <div class="summary">
 
43
        {{ oneliner.summary }}
 
44
    </div>
 
45
 
 
46
    {% if oneliner.explanation %}
 
47
    <div class="explanation">
 
48
        <h3>Explanation</h3>
 
49
        {{ oneliner.explanation|nst|safe }}
 
50
    </div>
 
51
    {% endif %}
 
52
 
 
53
    {% if oneliner.caveats %}
 
54
    <div class="caveats">
 
55
        <h3>Caveats</h3>
 
56
        {{ oneliner.caveats|nst|safe }}
 
57
    </div>
 
58
    {% endif %}
 
59
 
 
60
    <div class="eof">### EOF ###</div>
 
61
</div>
24
62
{% endfor %}
25
 
</ul>
26
 
 
27
 
<h2>One-Liners</h2>
28
 
 
29
 
{% include 'main/elements/oneliners_page.html' %}
30
 
 
31
 
{% endblock %}
32
 
 
33
 
{% block ready %}
34
 
        function search_by_tag(text) {
35
 
            var options = {
36
 
                url: '{% url oneliners.ajax.search_by_tag %}',
37
 
                type: 'get',
38
 
                data: { 
39
 
                    'text': text
40
 
                },
41
 
                success: search_success
42
 
            };
43
 
            $.ajax(options);
44
 
        }
45
 
 
46
 
        function search_success(html) {
47
 
            $('.oneliners').html($(html).html());
48
 
            $('.pagination').remove();
49
 
        }
50
 
 
51
 
        $('.tags a').click(function(e) {
52
 
            e.preventDefault();
53
 
            $('.tags li.active').removeClass('active');
54
 
            $(this).parent().addClass('active');
55
 
            search_by_tag($(this).text());
56
 
        });
57
63
 
58
64
{% endblock %}