Skip to content

Commit

Permalink
fixed edit and google analytics stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
ctb committed Nov 4, 2012
1 parent c260e75 commit 7753613
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
79 changes: 79 additions & 0 deletions _templates/page.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,82 @@
{% extends "!page.html" %}

{###############################}
{# for plone-derived "edit me" #}
{###############################}

{#

Add Editor Help Pop Up HTML.

Enable Analytics tracking on the docs.

#}

{% block footer %}
{{ super() }}

<div id="editor-trap">
<h3>Edit this document!</h3>

<p>
This file can be edited directly through the Web. Anyone can
update and fix errors in this document with few clicks --
no downloads needed.
<p>

<ol>

<li>
Go to
<a href="https://github.com/ctb/labibi/blob/master/{{ pagename }}.rst">
{{ title }}
</a> on GitHub.
</li>

<li>
<b>Edit</b> files using GitHub's text editor in your web browser (see the 'Edit' tab on the top right of the file)
</li>

<li>
Fill in the <b>Commit message</b> text box at the bottom of the page describing <i>why</i>
you made the changes. Press the <b>Propose file change</b> button next to it when done.
</li>

<li>
Then click <b>Send a pull request</b>.
</li>

<li>
Your changes are now queued for review under the project's <a href="https://github.com/ctb/labibi/pulls">Pull requests</a> tab on Github!
</li>
</ol>

<p>
For an introduction to the documentation format please see <a href="http://docutils.sourceforge.net/docs/user/rst/quickstart.html">the reST primer</a>.
</p>

</div>

<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-36028965-1']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

</script>

{% endblock %}

{#########################}
{# for disqus commenting #}
{#########################}

{% macro comments() %}

<div id="disqus_thread"></div>
Expand All @@ -20,6 +97,8 @@
{% endmacro %}

{% block extrahead %}
<script src="{{ pathto('_static/labibi.js', 1) }}"></script>

<script type="text/javascript">

var _gaq = _gaq || [];
Expand Down
1 change: 1 addition & 0 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_style = 'labibi.css'

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
Expand Down

0 comments on commit 7753613

Please sign in to comment.