Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 150 lines (115 sloc) 4.577 kb
5a8e6218 »
2012-11-04 trying out plone edit-this button
1 {% extends "!page.html" %}
2
2ea89b7e »
2012-11-04 added template config variables
3 {# To customize for your project, search and replace 'labibi' stuff.
4 You might also want to replace the UA- string for google analytics.
0602da55 »
2013-01-28 Update _templates/page.html
5
6 Set what you need in conf.py
2ea89b7e »
2012-11-04 added template config variables
7 #}
7753613b »
2012-11-04 fixed edit and google analytics stuff
8
0602da55 »
2013-01-28 Update _templates/page.html
9 {# set in conf.py: google_analytics_id = 'UA-36028965-1' #}
10 {# set in conf.py: disqus_shortname = 'labibi' #}
7753613b »
2012-11-04 fixed edit and google analytics stuff
11
0602da55 »
2013-01-28 Update _templates/page.html
12 {# set these in conf.py:
13 github_base_account = 'ctb'
14 github_project = 'labibi'
15 #}
7753613b »
2012-11-04 fixed edit and google analytics stuff
16
2ea89b7e »
2012-11-04 added template config variables
17 {##################################################}
18 {# for plone-derived "edit me" & Google analytics #}
19 {##################################################}
7753613b »
2012-11-04 fixed edit and google analytics stuff
20
21 {% block footer %}
22 {{ super() }}
23
2ea89b7e »
2012-11-04 added template config variables
24 {# Add plone-derived 'edit me' sticky note #}
0602da55 »
2013-01-28 Update _templates/page.html
25 {% if github_base_account %}
7753613b »
2012-11-04 fixed edit and google analytics stuff
26 <div id="editor-trap">
27 <h3>Edit this document!</h3>
28
29 <p>
30 This file can be edited directly through the Web. Anyone can
31 update and fix errors in this document with few clicks --
32 no downloads needed.
33 <p>
34
35 <ol>
36
37 <li>
38 Go to
2ea89b7e »
2012-11-04 added template config variables
39 <a href="https://github.com/{{ github_base_account }}/{{ github_project }}/blob/master/{{ pagename }}.rst">
7753613b »
2012-11-04 fixed edit and google analytics stuff
40 {{ title }}
41 </a> on GitHub.
42 </li>
43
44 <li>
45 <b>Edit</b> files using GitHub's text editor in your web browser (see the 'Edit' tab on the top right of the file)
46 </li>
47
48 <li>
49 Fill in the <b>Commit message</b> text box at the bottom of the page describing <i>why</i>
50 you made the changes. Press the <b>Propose file change</b> button next to it when done.
51 </li>
52
53 <li>
54 Then click <b>Send a pull request</b>.
55 </li>
56
57 <li>
2ea89b7e »
2012-11-04 added template config variables
58 Your changes are now queued for review under the project's <a href="https://github.com/{{ github_base_account }}/{{ github_project }}/pulls">Pull requests</a> tab on GitHub!
7753613b »
2012-11-04 fixed edit and google analytics stuff
59 </li>
60 </ol>
61
62 <p>
63 For an introduction to the documentation format please see <a href="http://docutils.sourceforge.net/docs/user/rst/quickstart.html">the reST primer</a>.
64 </p>
65
66 </div>
67
0602da55 »
2013-01-28 Update _templates/page.html
68 {% endif %}
69
7753613b »
2012-11-04 fixed edit and google analytics stuff
70 <script type="text/javascript">
71
72 var _gaq = _gaq || [];
2ea89b7e »
2012-11-04 added template config variables
73 _gaq.push(['_setAccount', {{ google_analytics_id }}]);
7753613b »
2012-11-04 fixed edit and google analytics stuff
74 _gaq.push(['_trackPageview']);
75
76 (function() {
77 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
78 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
79 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
80 })();
81
82 </script>
83
84 {% endblock %}
85
86 {#########################}
87 {# for disqus commenting #}
88 {#########################}
89
a3d3ebe8 »
2012-11-04 hacked page
90 {% macro comments() %}
91
92 <div id="disqus_thread"></div>
93 <script type="text/javascript">
94 /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
8276402e »
2012-11-05 properly inserted disqus_shortname in disqus code
95 var disqus_shortname = '{{ disqus_shortname }}'; // required: replace example with your forum shortname
a3d3ebe8 »
2012-11-04 hacked page
96
97 /* * * DON'T EDIT BELOW THIS LINE * * */
98 (function() {
99 var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
100 dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
101 (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
102 })();
103 </script>
104 <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
105 <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
106
107 {% endmacro %}
108
5a8e6218 »
2012-11-04 trying out plone edit-this button
109 {% block extrahead %}
7753613b »
2012-11-04 fixed edit and google analytics stuff
110
2ea89b7e »
2012-11-04 added template config variables
111 {% if github_base_account %}
112 <script src="{{ pathto('_static/labibi.js', 1) }}"></script>
113 {% else %}
114 <style type="text/css">
115 <!-- github-based editing disabled; set github_base_account
116 and github_project -->
117 #editor-trap.toggled {
118 display: none;
119 }
120 </style>
121 {% endif %}
122
123 {% if google_analytics_id %}
a3d3ebe8 »
2012-11-04 hacked page
124 <script type="text/javascript">
125 var _gaq = _gaq || [];
126 _gaq.push(['_setAccount', 'UA-16853172-1']);
127 _gaq.push(['_trackPageview']);
128
129 (function() {
130 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
131 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
132 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
133 })();
134 </script>
2ea89b7e »
2012-11-04 added template config variables
135 {% else %}
136 <!-- Google Analytics JS is disabled; set google_analytics_id -->
137 {% endif %}
5a8e6218 »
2012-11-04 trying out plone edit-this button
138 {% endblock %}
139
a3d3ebe8 »
2012-11-04 hacked page
140 {%- block body %}
141 {{ super() }}
142
2ea89b7e »
2012-11-04 added template config variables
143 {% if disqus_shortname %}
a3d3ebe8 »
2012-11-04 hacked page
144 {{ comments() }}
2ea89b7e »
2012-11-04 added template config variables
145 {% else %}
146 <!-- disqus commenting disabled; set disqus_shortname -->
147 {% endif %}
a3d3ebe8 »
2012-11-04 hacked page
148
149 {%- endblock %}
Something went wrong with that request. Please try again.