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

« back to all changes in this revision

Viewing changes to templates/main/oneliners.html

  • Committer: Janos Gyerik
  • Date: 2011-09-16 19:06:37 UTC
  • Revision ID: janos@axiom-20110916190637-k9q2sfbzsol2if0a
show oneliners more compact, Explanation and limitations can be expanded with nice jquery toggle

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
                <pre>{% for line in oneliner.lines %}<span class="prompt">$ </span>{{ line }}<br/>{% endfor %}</pre>
27
27
 
28
 
                {% if oneliner.explanation %}
29
 
                <div class="explanation">
30
 
                    <h3>Explanation</h3>
31
 
                    {{ oneliner.explanation|nst|safe }}
32
 
                </div>
33
 
                {% endif %}
34
 
 
35
 
                {% if oneliner.caveats %}
36
 
                <div class="caveats">
37
 
                    <h3>Limitations</h3>
38
 
                    {{ oneliner.caveats|nst|safe }}
39
 
                </div>
40
 
                {% endif %}
41
 
 
42
 
                <div class="eof">EOF</div>
 
28
                {% if oneliner.explanation or oneliner.caveats %}
 
29
                <div class="details-trigger">Details...</div>
 
30
                {% endif %}
 
31
                <div class="details hidden">
 
32
                    {% if oneliner.explanation %}
 
33
                    <div class="explanation">
 
34
                        <h3>Explanation</h3>
 
35
                        {{ oneliner.explanation|nst|safe }}
 
36
                    </div>
 
37
                    {% endif %}
 
38
 
 
39
                    {% if oneliner.caveats %}
 
40
                    <div class="caveats">
 
41
                        <h3>Limitations</h3>
 
42
                        {{ oneliner.caveats|nst|safe }}
 
43
                    </div>
 
44
                    {% endif %}
 
45
 
 
46
                    <div class="hidden eof">EOF</div>
 
47
                </div>
43
48
            </td>
44
49
        </tr>
45
50
    </table>
48
53
<p class="message">No one-liners, yet.</p>
49
54
{% endfor %}
50
55
 
 
56
<script type="text/javascript">
 
57
    <!--
 
58
    $(document).ready(function() {
 
59
            $('.details-trigger').click(function() {
 
60
                $(this).toggleClass('details-trigger-active').next().toggle('slow');
 
61
            });
 
62
    });
 
63
    //-->
 
64
</script>