File: page.html

package info (click to toggle)
scoop 0.7.1.1-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,296 kB
  • sloc: python: 6,011; makefile: 117; sh: 10
file content (54 lines) | stat: -rw-r--r-- 1,837 bytes parent folder | download | duplicates (4)
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
{% extends "!page.html" %}

{% block extrahead %}
{{ super() }}
{% if not embedded %}<script type="text/javascript" src="{{ pathto('_static/copybutton.js', 1) }}"></script>{% endif %}
<script type="text/javascript">

  // Store editor pop-up help state in localStorage 
  // so it does not re-pop-up itself between page loads.
  // Do not even to pretend to support IE gracefully.
  (function($) {
    
    $(document).ready(function() {
        var box = $("#editor-trap");
        var klass = "toggled";
        var storageKey = "toggled";

        function toggle() {
            box.toggleClass(klass);
            // Store the toggle status in local storage as "has value string" or null
            window.localStorage.setItem(storageKey, box.hasClass(klass) ? "toggled" : "not-toggled");
        }

        box.click(toggle);

        // Check the persistent state of the editor pop-up
        // Note that localStorage does not necessarily support boolean values (ugh!)
        // http://stackoverflow.com/questions/3263161/cannot-set-boolean-values-in-localstorage
        var v = window.localStorage.getItem(storageKey); 
        if(v == "toggled" || !v) {
          box.addClass(klass);
        }

    });

  })(jQuery);
</script>
{% endblock %}

{% block rootrellink %}
    <li><a href="http://code.google.com/p/scoop/"><img src="{{ pathto('_static/logo.png', 1) }}" style="height: 30px; vertical-align: middle; padding-right: 1em;" /> Project Homepage</a>{{ reldelim1 }}</li>
	<li><a href="{{ pathto('index') }}">{{ shorttitle }}</a>{{ reldelim1 }}</li>
{% endblock %}


{% block footer %}
<div class="footer">
    &copy; Copyright {{ copyright|e }}.
    <br />
    Last updated on {{ last_updated|e }}.
    <br />
    Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version|e }}.
</div>
{% endblock %}