1
0
Fork 0
forked from github/pelican

remove skribit support. fixes #154

This commit is contained in:
Alexis Metaireau 2011-08-11 23:50:04 +02:00
commit 4a6bf81b2e
7 changed files with 1 additions and 116 deletions

View file

@ -169,19 +169,3 @@ dates_pages La page actuelle d'articles, ordonnée par date
croissante.
page_name 'tag/`nom du tag`'.
=================== ===================================================
Inclure le script skribit
=========================
Pour pouvoir supporter les scripts skribit dans vos thèmes, vous devez
faire ceci :
* Copier `skribit_tab_script.html` et `skribit_widget_script.html` dans
votre dossier de templates.
* Ajouter {% include 'skribit_tab_script' %} dans votre <head> pour
ajouter le support de l'onglet de suggestions.
* Ajouter {% include 'skribit_widget_script' %} là où vous le souhaitez
pour ajouter le widget dans la sidebar.
Vous pouvez regarder le thème par défault (notmyidea) pour voir un
exemple de thème fonctionnel.

View file

@ -23,7 +23,7 @@ Pelican currently supports:
* publication of articles in various languages
* RSS/Atom feeds
* wordpress/dotclear or RSS imports
* integration with various tools: twitter/google analytics/skribit (optional)
* integration with various tools: twitter/google analytics (optional)
Why the name "Pelican" ?
========================

View file

@ -262,64 +262,6 @@ adding that in your configuration::
CSS_FILE = "wide.css"
Skribit
-------
Skribit has two ways to display suggestions : as a sidebar widget or as a
suggestions tab. You can choose one of the display by setting the SKRIBIT_TYPE
in your config.
* SKRIBIT_WIDGET_ID : the identifier of your blog.
All the customizations are done in the skribit web interface.
To retrieve your identifier from the code snippet, you can use this python code::
import re
regex = re.compile('.*http://assets.skribit.com/javascripts/SkribitWidget.\
js\?renderTo=writeSkribitHere&amp;blog=(.*)&amp;.*')
snippet = '''SNIPPET CONTENT'''
snippet = snippet.replace('\n', '')
identifier = regex.match(snippet).groups()[0]
Suggestion tab
--------------
The setting for suggestion tab's customizations are :
* SKRIBIT_TAB_COLOR
* SKRIBIT_TAB_DISTANCE_HORIZ
* SKRIBIT_TAB_DISTANCE_VERT
* SKRIBIT_TAB_PLACEMENT
The identifier is :
* SKRIBIT_TAB_SITENAME : the identifier of your blog
To retrieve your sitename from the code snippet, you can use this python code::
import re
regex = re.compile('.*http://skribit.com/lightbox/(.*)\',.*')
snippet = '''SNIPPET CONTENT'''
snippet = snippet.replace('\n', '')
identifier = regex.match(snippet).groups()[0]
Skribit settings
----------------
================================================ =====================================================
Setting name (default value) what does it do?
================================================ =====================================================
`SKRIBIT_TYPE` The type of skribit widget (TAB or WIDGET).
`SKRIBIT_TAB_COLOR` Tab color (#XXXXXX, default #333333).
`SKRIBIT_TAB_HORIZ` Tab Distance from Left (% or distance, default Null).
`SKRIBIT_TAB_VERT` Tab Distance from Top (% or distance, default 20%).
`SKRIBIT_TAB_PLACEMENT` Tab placement (Top, Bottom, Left or Right,
default LEFT).
`SKRIBIT_TAB_SITENAME` Tab identifier (See Skribit part below).
`SKRIBIT_WIDGET_ID` Widget identifier (See Skribit part below).
================================================ =====================================================
.. _pelican-themes: :doc:`pelican-themes`
Example settings

View file

@ -190,22 +190,6 @@ dates_page The current page of articles, ordered by date,
page_name 'tag/`tag_name`'. Useful for pagination links.
=================== ===================================================
Include skribit script
======================
In order to support skribit scripts in your themes, you must perform these
actions:
* Copy `skribit_tab_script.html` and `skribit_widget_script.html` in your
templates directory.
* Add {% include 'skribit_tab_script.html' %} in your <head> part in order to
support suggestions tab.
* Add {% include 'skribit_widget_script.html' %} where you want in order to
support sidebar widget.
You can take a look at notmyidea default theme for working example.
Inheritance
===========

View file

@ -9,8 +9,6 @@
<link href="{{ SITEURL }}/{{ FEED_RSS }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} RSS Feed" />
{% endif %}
{% include 'skribit_tab_script.html' %}
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
@ -54,7 +52,6 @@
</ul>
</div><!-- /.blogroll -->
{% endif %}
{% include 'skribit_widget_script.html' %}
{% if SOCIAL %}
<div class="social">
<h2>social</h2>

View file

@ -1,14 +0,0 @@
{% if SKRIBIT_TYPE and SKRIBIT_TYPE == 'TAB' and SKRIBIT_TAB_SITENAME %}
<link rel="stylesheet" type="text/css" media="screen" charset="utf-8" href="http://assets.skribit.com/stylesheets/SkribitSuggest.css"></link>
<style type="text/css" media="print" charset="utf-8">a#sk_tab{display:none !important;}</style>
<script src="http://assets.skribit.com/javascripts/SkribitSuggest.js" type="text/javascript"></script>
<script type="text/javascript" charset="utf-8">
var skribit_settings = {};
skribit_settings.placement = "{{ SKRIBIT_TAB_PLACEMENT or 'right' }}";
skribit_settings.color = "{{ SKRIBIT_TAB_COLOR or '#333333' }}";
skribit_settings.text_color = "{{ SKRIBIT_TAB_TEXT_COLOR or 'white' }}";
skribit_settings.distance_vert = "{{ SKRIBIT_TAB_VERT or '20%' }}";
skribit_settings.distance_horiz = "{{ SKRIBIT_TAB_HORIZ or '' }}";
SkribitSuggest.suggest('http://skribit.com/lightbox/{{ SKRIBIT_TAB_SITENAME }}', skribit_settings);
</script>
{% endif %}

View file

@ -1,8 +0,0 @@
{% if SKRIBIT_TYPE == 'WIDGET' and SKRIBIT_WIDGET_ID %}
<div id="writeSkribitHere"></div>
<script src="http://assets.skribit.com/javascripts/SkribitWidget.js?renderTo=writeSkribitHere&amp;blog={{ SKRIBIT_WIDGET_ID }}&amp;cnt=5"></script>
<noscript>Sorry, but the
<a href="http://skribit.com" title="Skribit - Cure Writer's Block">Skribit</a> widget only works on browsers with JavaScript support.
<a href="http://skribit.com/blogs/think-different-think-open" title="Skribit Suggestions for Think Different, Think Open">View suggestions for this blog here.</a>
</noscript>
{% endif %}