diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..17fbf6e8135fd4145f5f5f983e66d6bee1fd31b8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +__pycache__ +output +pelican.pid +*.pyc +srv.pid diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b592284040e0a22d81051002da1e52d2c527749b --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +# Pages personelles / blog pour le LIMOS avec [Pelican](http://docs.getpelican.com/en/stable/) + +Pelican est un outil permettant de générer des fichiers html static à partir de fichiers écrits en markdown + +## Installer les dépendances + +```bash +sudo pip install --editable . +``` + +## Lancer le serveur de prévisualisation + +```bash +bash develop_server.sh start +``` + +## Personnaliser +https://github.com/getpelican/pelican-themes/tree/master/pelican-bootstrap3 +https://help.farbox.com/pygments.html + +## Deployer diff --git a/content/extra/custom.css b/content/extra/custom.css index c7998420b2a3781b2a3be9d1006023189af29fc8..2bdd3d652e52c1358af8831872a533ad94ce2936 100644 --- a/content/extra/custom.css +++ b/content/extra/custom.css @@ -7,3 +7,32 @@ img { background-color: white; } +.nav img { + background-color: transparent; + height: 50px; + margin-top: 5px; + margin-right: 10px; +} +img.logo { + height: 50px; + margin-top: 5px; +} +.navbar-nav .input-group{ + margin-top: 7px; + margin-right: 7px; +} + +.search .input-group input { + + border-bottom-left-radius: 20px; + border-top-left-radius: 20px; +} + +.search .input-group span { + border-bottom-right-radius: 20px; + border-top-right-radius: 20px; +} + +ul.list-group-flush>li.list-group-item{ + border-bottom: 1px solid #DCE4EC; +} diff --git a/content/images/limos.png b/content/images/limos.png new file mode 100644 index 0000000000000000000000000000000000000000..bfd765d4f18fc986604440f1421b8b8fbae5e772 Binary files /dev/null and b/content/images/limos.png differ diff --git a/content/images/mazenovi.png b/content/images/mazenovi.png deleted file mode 100644 index 13008300eaa48049e984076f12cc808c06357196..0000000000000000000000000000000000000000 Binary files a/content/images/mazenovi.png and /dev/null differ diff --git a/content/images/wiener-norbert.jpg b/content/images/wiener-norbert.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f1724cb1adb60fc76b10e189dc07bc1e2820b120 Binary files /dev/null and b/content/images/wiener-norbert.jpg differ diff --git a/content/ispconfig/ansible-ispconfig.md b/content/ispconfig/ansible-ispconfig.md new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/content/ispconfig/git-kit-survie.md b/content/ispconfig/git-kit-survie.md new file mode 100644 index 0000000000000000000000000000000000000000..89656ad61389cba7d30174812624bf57fef200fd --- /dev/null +++ b/content/ispconfig/git-kit-survie.md @@ -0,0 +1,3 @@ +Title: Le kit de survie pour git +Date: 2017-05-03 10:20 +Tags: ispconfig, admin, www diff --git a/content/ispconfig/remote-api.md b/content/ispconfig/remote-api.md new file mode 100644 index 0000000000000000000000000000000000000000..4309bc9cb6681aecc9781472a0a6bb566566c0a4 --- /dev/null +++ b/content/ispconfig/remote-api.md @@ -0,0 +1,14 @@ +Title: Comment integragir avec l'API distante d'ispconfig +Date: 2017-05-03 10:20 +Tags: ispconfig, admin, www + +Ispconfig propose une API SOAP permettant d'exploiter toutes les fonctionnalités d'ipconfig pour la gesiton des hôtes virtuels, des mails, des DNS, des bases de données, etc ... + + +https://github.com/guru-digital/ispconfig-cli + +https://github.com/pemedina/ispconfig-cli + +https://git.ispconfig.org/ispconfig/ispconfig3 + +https://git.ispconfig.org/ispconfig/ispconfig3/tree/master/remoting_client diff --git a/content/ispconfig/utiliser-mod-auth-cas.md b/content/ispconfig/utiliser-mod-auth-cas.md new file mode 100644 index 0000000000000000000000000000000000000000..0f2799e92fe7cb2fbb5b7972582ed1d76b06c97d --- /dev/null +++ b/content/ispconfig/utiliser-mod-auth-cas.md @@ -0,0 +1,31 @@ +Title: Utiliser mod_auth_cas avec apache +Date: 2017-05-03 10:20 +Tags: ispconfig, admin, www + +Ispconfig propose une API SOAP permettant d'exploiter toutes les fonctionnalités d'ipconfig pour la gesiton des hôtes virtuels, des mails, des DNS, des bases de données, etc ... + + +sudo apt-get install libapache2-mod-auth-cas + +sudo service apache2 restart + +[Thu May 11 17:14:26.807324 2017] [:error] [pid 3398] MOD_AUTH_CAS: CASLoginURL or CASValidateURL not defined. + +sudo dpkg -L libapache2-mod-auth-cas + +/etc/apache2/mods-available/auth_cas.conf + +CASCookiePath /var/cache/apache2/mod_auth_cas/ +CASValidateServer On +CASLoginURL https://login.isima.fr/cas/login +CASValidateURL https://login.isima.fr/cas/serviceValidate + +dans le vhost + +<Directory {DOCROOT}> + AuthName 'Private' + AuthType CAS + Require valid-user +</Directory> + +voir requête LDAP + parmaètres réupérables pour credential diff --git a/content/keyboard-review.md b/content/keyboard-review.md deleted file mode 100644 index 24b51acc873926888538a09594b3050541c800ad..0000000000000000000000000000000000000000 --- a/content/keyboard-review.md +++ /dev/null @@ -1,6 +0,0 @@ -Title: My First Review -Date: 2010-12-03 10:20 -Category: Review -Tags: pipo, mollo - -Following is a review of my favorite mechanical keyboard. diff --git a/content/pages/doc.md b/content/pages/cours.md similarity index 64% rename from content/pages/doc.md rename to content/pages/cours.md index f745660bf6cc8b8003af6720bf410341a0f0da92..6bfc9b22f9c622f0e98e0664b53254dacae89ac5 100644 --- a/content/pages/doc.md +++ b/content/pages/cours.md @@ -1,4 +1,4 @@ -Title: My page +Title: <i class="fa fa-graduation-cap" aria-hidden="true"></i> Cours Date: 2010-12-30 10:25 Category: pipo Tags: pipo, mollo diff --git a/content/pages/moi.md b/content/pages/moi.md new file mode 100644 index 0000000000000000000000000000000000000000..4e1c42a17d2d3db2d454eff68b3da84c24d11b54 --- /dev/null +++ b/content/pages/moi.md @@ -0,0 +1,9 @@ +Title: <i class="fa fa-briefcase" aria-hidden="true"></i> À propos +Date: 2010-12-28 10:27 +Category: pipo +Tags: pipo, mollo + +## Following is a review of my favorite mechanical keyboard. + + + page diff --git a/content/pages/projets.md b/content/pages/projets.md new file mode 100644 index 0000000000000000000000000000000000000000..1c545c35a485d99ac6f6180e0e7c7a222b7001ea --- /dev/null +++ b/content/pages/projets.md @@ -0,0 +1,8 @@ +Title: <i class="fa fa-cogs" aria-hidden="true"></i> Projets +Date: 2010-12-12 10:25 + + + +## Following is a review of my favorite mechanical keyboard. + + page diff --git a/content/pages/recherche.md b/content/pages/recherche.md new file mode 100644 index 0000000000000000000000000000000000000000..1cde025f621b8bb3af977188b210cb3eb05814c4 --- /dev/null +++ b/content/pages/recherche.md @@ -0,0 +1,7 @@ +Title: <i class="fa fa-flask" aria-hidden="true"></i> Recherche +Date: 2010-12-29 10:26 +Category: pipo +Tags: pipo, mollo + +## Following is a review of my favorite mechanical keyboard. + page diff --git a/pelicanconf.py b/pelicanconf.py index 1cde4f12233c01fcc69a72cb60c38b4f8cc70780..5ca721fc5a94214fb31eaf492b2ddfab8c1f2cbf 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -1,16 +1,17 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals +import os -AUTHOR = 'm4z3->' -SITENAME = 'blog.m4z3.me' +AUTHOR = 'Vincent Mazenod' +SITENAME = 'Vincent Mazenod / ingénieur d\'études' SITEURL = '' +SITELOGO = 'images/mazenovi.png' +SITELOGO_SIZE = "50px" +FAVICON = 'images/favicon.ico' +# BANNER = 'images/mazenovi.png' +# BANNER_SUBTITLE = 'Si les noisettes rendaient aussi intelligent que la publicité nutella veut bien le laisser croire, ça ferait un bon moment que les écureils domineraient le monde!' -PATH = 'content' - -TIMEZONE = 'Europe/Paris' - -DEFAULT_LANG = 'fr' # Feed generation is usually not desired when developing FEED_ALL_ATOM = None @@ -21,63 +22,80 @@ AUTHOR_FEED_RSS = None # Blogroll LINKS = ( - ('Julien muetton', '#'), - ('william durand', '#'), - ('Taylordev', '#'), - ('Manuraynaud', '#'), - ('Romain Tartière', '#'), - ('Kevin Gomez', '#') + ( + 'user-circle', + 'Farouk Toumani', + 'http://www.isima.fr/~ftoumani/' + ), + ( + 'user-circle', + 'Pascal Lafourcade', + 'http://sancy.univ-bpclermont.fr/~lafourcade/' + ), + ( + 'user-circle', + 'Engelbert Mephu Nguifo', + 'http://ws.isima.fr/~mephu/' + ) ) # Social widget SOCIAL = ( - ('docs', 'http://doc.m4z3.me/'), - ('cv', 'http://cv.m4z3.me/'), - ('blog', 'http://blog.m4z3.me/'), - ('twitter', 'http://twitter.com/mazenovi'), - ('facebook', 'http://facebook.com/mazenovi'), - ('linkedin', 'http://linked-in.com/mazenovi'), - ('viadeo', 'http://facebook.com/mazenovi'), - ('gitlab', 'http://gitlab.com/mazenovi'), - ('github', 'http://github.com/mazenovi'), - ('soundcloud', 'http://soundcloud.com/mazenovi'), - ('mixcloud', 'http://mixcloud.com/mazenovi'), - ('deezer', 'http://deezer.com/mazenovi') + ( + 'gitlab', + 'gitlab.isima.fr', + 'https://gitlab.isima.fr/mazenovi' + ), + ( + 'github', + 'github', + 'https://github.com/mazenovi/' + ) ) -DEFAULT_PAGINATION = 10 +CC_LICENSE = "CC-BY-NC-ND" +# "CC-BY" (require attribution) +# "CC-BY-SA" (require ShareAlike) +# "CC-BY-ND" (NoDerivatives) +# "CC-BY-NC" (require attribution, no commercial reuse) +# "CC-BY-NC-SA" (require ShareAlike, no commercial reuse) +# "CC-BY-NC-ND" (NoDerivatives, no commercial reuse). +CC_LICENSE_DERIVATIVES = "ShareAlike" +# "yes" if permitted +# "no" if not permitted +# "ShareAlike" if derivatives must be shared under the same terms. +CC_LICENSE_COMMERCIAL = "no" +# "yes" if commercial reuse is permitted +# "no" otherwise. +# CUSTOM_LICENSE='Unless otherwise stated, all articles are published under' + +# 'the <a href="http://www.wtfpl.net/about/">WTFPL</a> license.'"" +# comment CC_* vars and uncommment CUSTOM LICENSE TO ENABLE IT -# Uncomment following line if you want document-relative URLs when developing -# RELATIVE_URLS = True +DISQUS_SITENAME = 'https://limos.isima.fr/~mazenod' -DISPLAY_CATEGORIES_ON_MENU = False -# https://github.com/getpelican/pelican-themes/tree/master/pelican-bootstrap3 -THEME = "/data/htdocs/pelican/themes/pelican-bootstrap3" -THEME_TEMPLATE_OVERRIDES = ['/data/htdocs/pelican/themes/custom_theme/templates'] -# EXTRA_TEMPLATES_PATHS = ['/data/htdocs/pelican/themes/custom_theme/templates'] -""" -THEME = "/data/htdocs/pelican/custom_theme" -THEMES = ( - # ordered templates - 'notmyidea', - 'default', - 'simple', - 'base', +DISPLAY_TAGS_ON_SIDEBAR = True +TAG_CLOUD_STEPS = 8 +TAG_CLOUD_MAX_ITEMS = 20 +TAG_CLOUD_BADGE = True - # prefixed loaded - ('!bootstrap3', 'notmyidea'), -) -THEME_TEMPLATE_OVERRIDES = ( - 'custom_theme/templates' -) -EXTRA_TEMPLATES_PATHS = ['custom_theme/templates'] -""" +DIRECT_TEMPLATES = ('index', 'categories', 'authors', 'archives', 'search') + + +# Vous ne devriez pas toucher à cette partie +# à moins que vous ne sachiez ce que vous faites ;) + +DEFAULT_PAGINATION = 10 +BOOTSTRAP_THEME = "flatly" +PATH = 'content' +TIMEZONE = 'Europe/Paris' +DISPLAY_CATEGORIES_ON_MENU = False +THEME = os.path.dirname(os.path.abspath(__file__)) + "/themes/limos" JINJA_ENVIRONMENT = {'extensions': ['jinja2.ext.i18n']} -PLUGIN_PATHS = ['/data/htdocs/pelican/plugins'] -PLUGINS = ['i18n_subsites','theme_template_overrides'] +PLUGIN_PATHS = [os.path.dirname(os.path.abspath(__file__)) + '/plugins'] +PLUGINS = ['i18n_subsites', 'tag_cloud', 'tipue_search'] +I18N_TEMPLATES_LANG = 'en' # https://bootswatch.com/ -BOOTSTRAP_THEME = "slate" SHOW_ARTICLE_AUTHOR = False SHOW_ARTICLE_CATEGORY = True SHOW_DATE_MODIFIED = True @@ -86,19 +104,14 @@ STATIC_PATHS = ['images', 'extra/custom.css'] EXTRA_PATH_METADATA = { 'extra/custom.css': {'path': 'static/custom.css'} } -# https://help.farbox.com/pygments.html PYGMENTS_STYLE = "monokai" USE_PAGER = True BOOTSTRAP_FLUID = False -SITELOGO = 'images/mazenovi.png' -SITELOGO_SIZE = "25px" DISPLAY_BREADCRUMBS = True DISPLAY_CATEGORY_IN_BREADCRUMBS = True DISPLAY_PAGES_ON_MENU = True BOOTSTRAP_NAVBAR_INVERSE = False -FAVICON = 'images/favicon.ico' +DEFAULT_LANG = 'fr' DISPLAY_ARTICLE_INFO_ON_INDEX = True -# BANNER = 'images/mazenovi.png' -# BANNER_SUBTITLE = 'Si les noisettes rendaient aussi intelligent que la publicité nutella veut bien le laisser croire, ça ferait un bon moment que les écureils domineraient le monde!' DISABLE_SIDEBAR_TITLE_ICONS = True PAGE_PATHS = ['pages'] diff --git a/plugins/i18n_subsites/__pycache__/__init__.cpython-35.pyc b/plugins/i18n_subsites/__pycache__/__init__.cpython-35.pyc index 45b007d4f8c65bba4c85e88c9884b087af6db09f..45dc22900b86c7c448fb437e7b39ce8b99015ca6 100644 Binary files a/plugins/i18n_subsites/__pycache__/__init__.cpython-35.pyc and b/plugins/i18n_subsites/__pycache__/__init__.cpython-35.pyc differ diff --git a/plugins/i18n_subsites/__pycache__/i18n_subsites.cpython-35.pyc b/plugins/i18n_subsites/__pycache__/i18n_subsites.cpython-35.pyc index 1f2a192600e71d85d1aac3ccafb210d61843d804..c286e218708577dd79b7d3ad853ca8174653e71d 100644 Binary files a/plugins/i18n_subsites/__pycache__/i18n_subsites.cpython-35.pyc and b/plugins/i18n_subsites/__pycache__/i18n_subsites.cpython-35.pyc differ diff --git a/plugins/tag_cloud/README.rst b/plugins/tag_cloud/README.rst new file mode 100644 index 0000000000000000000000000000000000000000..39b9dd041aefce5a5332900237b9ce0c6c525b2b --- /dev/null +++ b/plugins/tag_cloud/README.rst @@ -0,0 +1,98 @@ +tag_cloud +========= + +This plugin generates a tag-cloud. + +Installation +------------ + +In order to use to use this plugin, you have to edit(*) or create(+) the following files:: + + blog/ + ├── pelicanconf.py * + ├── content + ├── plugins + + │ └── tag_cloud.py + + └── themes + └── mytheme + ├── templates + │ └── base.html * + └── static + └── css + └── style.css * + +In **pelicanconf.py** you have to activate the plugin:: + + PLUGIN_PATHS = ["plugins"] + PLUGINS = ["tag_cloud"] + +Into your **plugins** folder, you should add tag_cloud.py (from this repository). + +In your theme files, you should change **base.html** to apply formats (and sizes) defined in **style.css**, as specified in "Settings", below. + +Settings +-------- + +================================================ ===================================================== +Setting name (followed by default value) What does it do? +================================================ ===================================================== +``TAG_CLOUD_STEPS = 4`` Count of different font sizes in the tag + cloud. +``TAG_CLOUD_MAX_ITEMS = 100`` Maximum number of tags in the cloud. +``TAG_CLOUD_SORTING = 'random'`` The tag cloud ordering scheme. Valid values: + random, alphabetically, alphabetically-rev, size and + size-rev +``TAG_CLOUD_BADGE = True`` Optionnal setting : can bring **badges**, which mean + say : display the number of each tags present + on all articles. +================================================ ===================================================== + +The default theme does not include a tag cloud, but it is pretty easy to add one:: + + <ul class="tagcloud"> + {% for tag in tag_cloud %} + <li class="tag-{{ tag.1 }}"> + <a href="{{ SITEURL }}/{{ tag.0.url }}"> + {{ tag.0 }} + {% if TAG_CLOUD_BADGE %} + <span class="badge">{{ tag.2 }}</span> + {% endif %} + </a> + </li> + {% endfor %} + </ul> + +You should then also define CSS styles with appropriate classes (tag-1 to tag-N, +where N matches ``TAG_CLOUD_STEPS``), tag-1 being the most frequent, and +define a ``ul.tagcloud`` class with appropriate list-style to create the cloud. +You should copy/paste this **badge** CSS rule ``ul.tagcloud .list-group-item <span>.badge`` +if you're using ``TAG_CLOUD_BADGE`` setting. (this rule, potentially long , is suggested to avoid +conflicts with CSS libs as twitter Bootstrap) + +For example:: + + ul.tagcloud { + list-style: none; + padding: 0; + } + + ul.tagcloud li { + display: inline-block; + } + + li.tag-1 { + font-size: 150%; + } + + li.tag-2 { + font-size: 120%; + } + + ... + + ul.tagcloud .list-group-item <span>.badge { + background-color: grey; + color: white; + } + +By default the tags in the cloud are sorted randomly, but if you prefers to have it alphabetically use the `alphabetically` (ascending) and `alphabetically-rev` (descending). Also is possible to sort the tags by it's size (number of articles with this specific tag) using the values `size` (ascending) and `size-rev` (descending). \ No newline at end of file diff --git a/plugins/tag_cloud/__init__.py b/plugins/tag_cloud/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a7004f504c8bb1f1c168b97633231099752a0f56 --- /dev/null +++ b/plugins/tag_cloud/__init__.py @@ -0,0 +1,2 @@ +from .tag_cloud import * + diff --git a/plugins/tag_cloud/tag_cloud.py b/plugins/tag_cloud/tag_cloud.py new file mode 100644 index 0000000000000000000000000000000000000000..8a3bcf93582105a400808141844ef42fb8f7255c --- /dev/null +++ b/plugins/tag_cloud/tag_cloud.py @@ -0,0 +1,89 @@ +''' +tag_cloud +=================================== + +This plugin generates a tag cloud from available tags +''' +from __future__ import unicode_literals + +from collections import defaultdict +from operator import itemgetter + +import logging +import math +import random + +from pelican import signals + +logger = logging.getLogger(__name__) + + +def set_default_settings(settings): + settings.setdefault('TAG_CLOUD_STEPS', 4) + settings.setdefault('TAG_CLOUD_MAX_ITEMS', 100) + settings.setdefault('TAG_CLOUD_SORTING', 'random') + settings.setdefault('TAG_CLOUD_BADGE', False) + + +def init_default_config(pelican): + from pelican.settings import DEFAULT_CONFIG + set_default_settings(DEFAULT_CONFIG) + if(pelican): + set_default_settings(pelican.settings) + + +def generate_tag_cloud(generator): + tag_cloud = defaultdict(int) + for article in generator.articles: + for tag in getattr(article, 'tags', []): + tag_cloud[tag] += 1 + + tag_cloud = sorted(tag_cloud.items(), key=itemgetter(1), reverse=True) + tag_cloud = tag_cloud[:generator.settings.get('TAG_CLOUD_MAX_ITEMS')] + + tags = list(map(itemgetter(1), tag_cloud)) + if tags: + max_count = max(tags) + steps = generator.settings.get('TAG_CLOUD_STEPS') + + # calculate word sizes + def generate_tag(tag, count): + tag = ( + tag, + int(math.floor(steps - (steps - 1) * math.log(count) + / (math.log(max_count)or 1))) + ) + if generator.settings.get('TAG_CLOUD_BADGE'): + tag += (count,) + return tag + + tag_cloud = [ + generate_tag(tag, count) + for tag, count in tag_cloud + ] + + sorting = generator.settings.get('TAG_CLOUD_SORTING') + + if sorting == 'alphabetically': + tag_cloud.sort(key=lambda elem: elem[0].name) + elif sorting == 'alphabetically-rev': + tag_cloud.sort(key=lambda elem: elem[0].name, reverse=True) + elif sorting == 'size': + tag_cloud.sort(key=lambda elem: elem[1]) + elif sorting == 'size-rev': + tag_cloud.sort(key=lambda elem: elem[1], reverse=True) + elif sorting == 'random': + random.shuffle(tag_cloud) + else: + logger.warning("setting for TAG_CLOUD_SORTING not recognized: %s, " + "falling back to 'random'", sorting) + random.shuffle(tag_cloud) + + # make available in context + generator.tag_cloud = tag_cloud + generator._update_context(['tag_cloud']) + + +def register(): + signals.initialized.connect(init_default_config) + signals.article_generator_finalized.connect(generate_tag_cloud) diff --git a/plugins/tag_cloud/test_data/article_1.md b/plugins/tag_cloud/test_data/article_1.md new file mode 100644 index 0000000000000000000000000000000000000000..bb44efefdcbfd8eb718ccc36eeaa2cc4796b621f --- /dev/null +++ b/plugins/tag_cloud/test_data/article_1.md @@ -0,0 +1,4 @@ +Title: Article1 +tags: fun, pelican, plugins + +content, yeah! \ No newline at end of file diff --git a/plugins/tag_cloud/test_data/article_2.md b/plugins/tag_cloud/test_data/article_2.md new file mode 100644 index 0000000000000000000000000000000000000000..74dbb6346f3acce2570ba870e4656b13727f8375 --- /dev/null +++ b/plugins/tag_cloud/test_data/article_2.md @@ -0,0 +1,5 @@ +Title: Article2 +tags: pelican, plugins, python + +content2, yeah! + diff --git a/plugins/tag_cloud/test_data/article_3.md b/plugins/tag_cloud/test_data/article_3.md new file mode 100644 index 0000000000000000000000000000000000000000..bc0cd5aa1f9ff807ceec20bf7a10aa5d3362c920 --- /dev/null +++ b/plugins/tag_cloud/test_data/article_3.md @@ -0,0 +1,5 @@ +Title: Article3 +tags: pelican, plugins + +content3, yeah! + diff --git a/plugins/tag_cloud/test_data/article_4.md b/plugins/tag_cloud/test_data/article_4.md new file mode 100644 index 0000000000000000000000000000000000000000..9a3132062427e4420ce692b7e5722a1be0d6ab2f --- /dev/null +++ b/plugins/tag_cloud/test_data/article_4.md @@ -0,0 +1,5 @@ +Title: Article4 +tags: pelican, fun + +content4, yeah! + diff --git a/plugins/tag_cloud/test_data/article_5.md b/plugins/tag_cloud/test_data/article_5.md new file mode 100644 index 0000000000000000000000000000000000000000..1d3f2ffa72d378575489bf9c01674859ecef514a --- /dev/null +++ b/plugins/tag_cloud/test_data/article_5.md @@ -0,0 +1,5 @@ +Title: Article5 +tags: plugins, pelican, fun + +content5, yeah! + diff --git a/plugins/tag_cloud/test_tag_cloud.py b/plugins/tag_cloud/test_tag_cloud.py new file mode 100644 index 0000000000000000000000000000000000000000..210c15fe2993845e0179f71b4dd51d4265bbcc03 --- /dev/null +++ b/plugins/tag_cloud/test_tag_cloud.py @@ -0,0 +1,103 @@ +import unittest +import os +import six +import tag_cloud + +from pelican.generators import ArticlesGenerator +from pelican.tests.support import get_settings +from pelican.urlwrappers import Tag + +CUR_DIR = os.path.dirname(__file__) +CONTENT_DIR = os.path.join(CUR_DIR, 'test_data') + + +class TestTagCloudGeneration(unittest.TestCase): + + @classmethod + def setUpClass(cls): + cls._settings = get_settings(filenames={}) + cls._settings['DEFAULT_CATEGORY'] = 'Default' + cls._settings['DEFAULT_DATE'] = (1970, 1, 1) + cls._settings['READERS'] = {'asc': None} + cls._settings['CACHE_CONTENT'] = False + tag_cloud.set_default_settings(cls._settings) + + cls.generator = ArticlesGenerator( + context=cls._settings.copy(), settings=cls._settings, + path=CONTENT_DIR, theme=cls._settings['THEME'], output_path=None) + cls.generator.generate_context() + + def test_tag_cloud_random(self): + self.generator.settings['TAG_CLOUD_STEPS'] = 10 + self.generator.settings['TAG_CLOUD_BADGE'] = False + tag_cloud.generate_tag_cloud(self.generator) + expected = [ + (Tag('pelican', self._settings), 1), + (Tag('plugins', self._settings), 2), + (Tag('fun', self._settings), 3), + (Tag('python', self._settings), 10) + ] + six.assertCountEqual(self, self.generator.tag_cloud, expected) + + def test_tag_cloud_badge(self): + self.generator.settings['TAG_CLOUD_STEPS'] = 10 + self.generator.settings['TAG_CLOUD_BADGE'] = True + tag_cloud.generate_tag_cloud(self.generator) + expected = [ + (Tag('pelican', self._settings), 1, 5), + (Tag('plugins', self._settings), 2, 4), + (Tag('fun', self._settings), 3, 3), + (Tag('python', self._settings), 10, 1) + ] + six.assertCountEqual(self, self.generator.tag_cloud, expected) + + def test_tag_cloud_alphabetical(self): + self.generator.settings['TAG_CLOUD_STEPS'] = 10 + self.generator.settings['TAG_CLOUD_SORTING'] = 'alphabetically' + tag_cloud.generate_tag_cloud(self.generator) + expected = [ + (Tag('fun', self._settings), 3), + (Tag('pelican', self._settings), 1), + (Tag('plugins', self._settings), 2), + (Tag('python', self._settings), 10) + ] + self.assertEqual(self.generator.tag_cloud, expected) + + def test_tag_cloud_alphabetical_rev(self): + self.generator.settings['TAG_CLOUD_STEPS'] = 10 + self.generator.settings['TAG_CLOUD_SORTING'] = 'alphabetically-rev' + tag_cloud.generate_tag_cloud(self.generator) + expected = [ + (Tag('python', self._settings), 10), + (Tag('plugins', self._settings), 2), + (Tag('pelican', self._settings), 1), + (Tag('fun', self._settings), 3) + ] + self.assertEqual(self.generator.tag_cloud, expected) + + def test_tag_cloud_size(self): + self.generator.settings['TAG_CLOUD_STEPS'] = 10 + self.generator.settings['TAG_CLOUD_SORTING'] = 'size' + tag_cloud.generate_tag_cloud(self.generator) + expected = [ + (Tag('pelican', self._settings), 1), + (Tag('plugins', self._settings), 2), + (Tag('fun', self._settings), 3), + (Tag('python', self._settings), 10) + ] + self.assertEqual(self.generator.tag_cloud, expected) + + def test_tag_cloud_size_rev(self): + self.generator.settings['TAG_CLOUD_STEPS'] = 10 + self.generator.settings['TAG_CLOUD_SORTING'] = 'size-rev' + tag_cloud.generate_tag_cloud(self.generator) + expected = [ + (Tag('python', self._settings), 10), + (Tag('fun', self._settings), 3), + (Tag('plugins', self._settings), 2), + (Tag('pelican', self._settings), 1) + ] + self.assertEqual(self.generator.tag_cloud, expected) + +if __name__ == "__main__": + unittest.main() diff --git a/plugins/tipue_search/README.md b/plugins/tipue_search/README.md new file mode 100644 index 0000000000000000000000000000000000000000..1a2d615130304098151058e4ae22707e368fd2b5 --- /dev/null +++ b/plugins/tipue_search/README.md @@ -0,0 +1,67 @@ +Tipue Search +============ + +A Pelican plugin to serialize generated HTML to JSON that can be used by jQuery plugin - Tipue Search. + +Copyright (c) Talha Mansoor + +Author | Talha Mansoor +----------------|----- +Author Email | talha131@gmail.com +Author Homepage | http://onCrashReboot.com +Github Account | https://github.com/talha131 + +Why do you need it? +=================== + +Static sites do not offer search feature out of the box. [Tipue Search](http://www.tipue.com/search/) +is a jQuery plugin that search the static site without using any third party service, like DuckDuckGo or Google. + +Tipue Search offers 4 search modes. Its [JSON search mode](http://www.tipue.com/search/docs/json/) is the best search mode +especially for large sites. + +Tipue's JSON search mode requires the textual content of site in JSON format. + +Requirements +============ + +Tipue Search requires BeautifulSoup. + +```bash +pip install beautifulsoup4 +``` + +How Tipue Search works +========================= + +Tipue Search serializes the generated HTML into JSON. Format of JSON is as follows + +```python +{ + "pages": [ + { + "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur sodales ligula in libero.", + "tags": "Example Category", + "url" : "http://oncrashreboot.com/plugin-example.html", + "title": "Everything you want to know about Lorem Ipsum" + }, + { + "text": "Sed dignissim lacinia nunc. Curabitur tortor. Pellentesque nibh. Aenean quam. In scelerisque sem at dolor. Maecenas mattis. Sed convallis tristique sem. Proin ut ligula vel nunc egestas porttitor. Morbi lectus risus, iaculis vel, suscipit quis, luctus non, massa. Fusce ac turpis quis ligula lacinia aliquet. Mauris ipsum. Nulla metus metus, ullamcorper vel, tincidunt sed, euismod in, nibh.", + "tags": "Example Category", + "url" : "http://oncrashreboot.com/plugin-example-2.html", + "title": "Review of the book Lorem Ipsum" + } + ] +} +``` + +JSON is written to file `tipuesearch_content.json` which is created in the root of `output` directory. + +How to use +========== + +To utilize JSON Search mode, your theme needs to have Tipue Search properly configured in it. [Official documentation](http://www.tipue.com/search/docs/#json) has the required details. + +Pelican [Elegant Theme](https://github.com/talha131/pelican-elegant) and [Plumage +theme](https://github.com/kdeldycke/plumage) have Tipue Search configured. You can view their +code to understand the configuration. diff --git a/plugins/tipue_search/__init__.py b/plugins/tipue_search/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ebd6c0612d02b358eb48ae9ff6005c9ce28aef72 --- /dev/null +++ b/plugins/tipue_search/__init__.py @@ -0,0 +1 @@ +from .tipue_search import * diff --git a/plugins/tipue_search/tipue_search.py b/plugins/tipue_search/tipue_search.py new file mode 100644 index 0000000000000000000000000000000000000000..4ea2e9fcfbc913c3c7af350f58e597880bff3ba5 --- /dev/null +++ b/plugins/tipue_search/tipue_search.py @@ -0,0 +1,105 @@ +# -*- coding: utf-8 -*- +""" +Tipue Search +============ + +A Pelican plugin to serialize generated HTML to JSON +that can be used by jQuery plugin - Tipue Search. + +Copyright (c) Talha Mansoor +""" + +from __future__ import unicode_literals + +import os.path +import json +from bs4 import BeautifulSoup +from codecs import open +try: + from urlparse import urljoin +except ImportError: + from urllib.parse import urljoin + +from pelican import signals + + +class Tipue_Search_JSON_Generator(object): + + def __init__(self, context, settings, path, theme, output_path, *null): + + self.output_path = output_path + self.context = context + self.siteurl = settings.get('SITEURL') + self.tpages = settings.get('TEMPLATE_PAGES') + self.output_path = output_path + self.json_nodes = [] + + + def create_json_node(self, page): + + if getattr(page, 'status', 'published') != 'published': + return + + soup_title = BeautifulSoup(page.title.replace(' ', ' '), 'html.parser') + page_title = soup_title.get_text(' ', strip=True).replace('“', '"').replace('â€', '"').replace('’', "'").replace('^', '^') + + soup_text = BeautifulSoup(page.content, 'html.parser') + page_text = soup_text.get_text(' ', strip=True).replace('“', '"').replace('â€', '"').replace('’', "'").replace('¶', ' ').replace('^', '^') + page_text = ' '.join(page_text.split()) + + page_category = page.category.name if getattr(page, 'category', 'None') != 'None' else '' + + page_url = page.url if page.url else '.' + + node = {'title': page_title, + 'text': page_text, + 'tags': page_category, + 'url': page_url} + + self.json_nodes.append(node) + + + def create_tpage_node(self, srclink): + + srcfile = open(os.path.join(self.output_path, self.tpages[srclink]), encoding='utf-8') + soup = BeautifulSoup(srcfile, 'html.parser') + page_title = soup.title.string if soup.title is not None else '' + page_text = soup.get_text() + + # Should set default category? + page_category = '' + page_url = urljoin(self.siteurl, self.tpages[srclink]) + + node = {'title': page_title, + 'text': page_text, + 'tags': page_category, + 'url': page_url} + + self.json_nodes.append(node) + + + def generate_output(self, writer): + path = os.path.join(self.output_path, 'tipuesearch_content.json') + + pages = self.context['pages'] + self.context['articles'] + + for article in self.context['articles']: + pages += article.translations + + for srclink in self.tpages: + self.create_tpage_node(srclink) + + for page in pages: + self.create_json_node(page) + root_node = {'pages': self.json_nodes} + + with open(path, 'w', encoding='utf-8') as fd: + json.dump(root_node, fd, separators=(',', ':'), ensure_ascii=False) + + +def get_generators(generators): + return Tipue_Search_JSON_Generator + + +def register(): + signals.get_generators.connect(get_generators) diff --git a/setup.py b/setup.py new file mode 100644 index 0000000000000000000000000000000000000000..6973db1be7b6dc9e7353b36e933508deb883980e --- /dev/null +++ b/setup.py @@ -0,0 +1,12 @@ +from setuptools import setup + +setup( + name='blog-limos', + version='1.0', + include_package_data=True, + install_requires=[ + 'pelican', + 'markdown', + 'beautifulsoup4' + ] +) diff --git a/themes/pelican-bootstrap3/AUTHORS.md b/themes/limos/AUTHORS.md similarity index 100% rename from themes/pelican-bootstrap3/AUTHORS.md rename to themes/limos/AUTHORS.md diff --git a/themes/pelican-bootstrap3/CONTRIBUTING.md b/themes/limos/CONTRIBUTING.md similarity index 100% rename from themes/pelican-bootstrap3/CONTRIBUTING.md rename to themes/limos/CONTRIBUTING.md diff --git a/themes/pelican-bootstrap3/EXAMPLES.md b/themes/limos/EXAMPLES.md similarity index 100% rename from themes/pelican-bootstrap3/EXAMPLES.md rename to themes/limos/EXAMPLES.md diff --git a/themes/pelican-bootstrap3/LICENSE b/themes/limos/LICENSE similarity index 100% rename from themes/pelican-bootstrap3/LICENSE rename to themes/limos/LICENSE diff --git a/themes/pelican-bootstrap3/Makefile b/themes/limos/Makefile similarity index 100% rename from themes/pelican-bootstrap3/Makefile rename to themes/limos/Makefile diff --git a/themes/pelican-bootstrap3/README.md b/themes/limos/README.md similarity index 100% rename from themes/pelican-bootstrap3/README.md rename to themes/limos/README.md diff --git a/themes/pelican-bootstrap3/babel.cfg b/themes/limos/babel.cfg similarity index 100% rename from themes/pelican-bootstrap3/babel.cfg rename to themes/limos/babel.cfg diff --git a/themes/pelican-bootstrap3/messages.pot b/themes/limos/messages.pot similarity index 100% rename from themes/pelican-bootstrap3/messages.pot rename to themes/limos/messages.pot diff --git a/themes/pelican-bootstrap3/screenshot-article.png b/themes/limos/screenshot-article.png similarity index 100% rename from themes/pelican-bootstrap3/screenshot-article.png rename to themes/limos/screenshot-article.png diff --git a/themes/pelican-bootstrap3/screenshot.png b/themes/limos/screenshot.png similarity index 100% rename from themes/pelican-bootstrap3/screenshot.png rename to themes/limos/screenshot.png diff --git a/themes/pelican-bootstrap3/static/css/bootstrap.amelia.min.css b/themes/limos/static/css/bootstrap.amelia.min.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/bootstrap.amelia.min.css rename to themes/limos/static/css/bootstrap.amelia.min.css diff --git a/themes/pelican-bootstrap3/static/css/bootstrap.cerulean.min.css b/themes/limos/static/css/bootstrap.cerulean.min.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/bootstrap.cerulean.min.css rename to themes/limos/static/css/bootstrap.cerulean.min.css diff --git a/themes/pelican-bootstrap3/static/css/bootstrap.cosmo.min.css b/themes/limos/static/css/bootstrap.cosmo.min.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/bootstrap.cosmo.min.css rename to themes/limos/static/css/bootstrap.cosmo.min.css diff --git a/themes/pelican-bootstrap3/static/css/bootstrap.cupid.min.css b/themes/limos/static/css/bootstrap.cupid.min.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/bootstrap.cupid.min.css rename to themes/limos/static/css/bootstrap.cupid.min.css diff --git a/themes/pelican-bootstrap3/static/css/bootstrap.custom.min.css b/themes/limos/static/css/bootstrap.custom.min.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/bootstrap.custom.min.css rename to themes/limos/static/css/bootstrap.custom.min.css diff --git a/themes/pelican-bootstrap3/static/css/bootstrap.cyborg.min.css b/themes/limos/static/css/bootstrap.cyborg.min.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/bootstrap.cyborg.min.css rename to themes/limos/static/css/bootstrap.cyborg.min.css diff --git a/themes/pelican-bootstrap3/static/css/bootstrap.darkly.min.css b/themes/limos/static/css/bootstrap.darkly.min.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/bootstrap.darkly.min.css rename to themes/limos/static/css/bootstrap.darkly.min.css diff --git a/themes/pelican-bootstrap3/static/css/bootstrap.flatly.min.css b/themes/limos/static/css/bootstrap.flatly.min.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/bootstrap.flatly.min.css rename to themes/limos/static/css/bootstrap.flatly.min.css diff --git a/themes/pelican-bootstrap3/static/css/bootstrap.journal.min.css b/themes/limos/static/css/bootstrap.journal.min.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/bootstrap.journal.min.css rename to themes/limos/static/css/bootstrap.journal.min.css diff --git a/themes/pelican-bootstrap3/static/css/bootstrap.lumen.min.css b/themes/limos/static/css/bootstrap.lumen.min.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/bootstrap.lumen.min.css rename to themes/limos/static/css/bootstrap.lumen.min.css diff --git a/themes/pelican-bootstrap3/static/css/bootstrap.min.css b/themes/limos/static/css/bootstrap.min.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/bootstrap.min.css rename to themes/limos/static/css/bootstrap.min.css diff --git a/themes/pelican-bootstrap3/static/css/bootstrap.paper.min.css b/themes/limos/static/css/bootstrap.paper.min.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/bootstrap.paper.min.css rename to themes/limos/static/css/bootstrap.paper.min.css diff --git a/themes/pelican-bootstrap3/static/css/bootstrap.readable-old.min.css b/themes/limos/static/css/bootstrap.readable-old.min.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/bootstrap.readable-old.min.css rename to themes/limos/static/css/bootstrap.readable-old.min.css diff --git a/themes/pelican-bootstrap3/static/css/bootstrap.readable.min.css b/themes/limos/static/css/bootstrap.readable.min.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/bootstrap.readable.min.css rename to themes/limos/static/css/bootstrap.readable.min.css diff --git a/themes/pelican-bootstrap3/static/css/bootstrap.sandstone.min.css b/themes/limos/static/css/bootstrap.sandstone.min.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/bootstrap.sandstone.min.css rename to themes/limos/static/css/bootstrap.sandstone.min.css diff --git a/themes/pelican-bootstrap3/static/css/bootstrap.shamrock.min.css b/themes/limos/static/css/bootstrap.shamrock.min.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/bootstrap.shamrock.min.css rename to themes/limos/static/css/bootstrap.shamrock.min.css diff --git a/themes/pelican-bootstrap3/static/css/bootstrap.simplex.min.css b/themes/limos/static/css/bootstrap.simplex.min.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/bootstrap.simplex.min.css rename to themes/limos/static/css/bootstrap.simplex.min.css diff --git a/themes/pelican-bootstrap3/static/css/bootstrap.slate.min.css b/themes/limos/static/css/bootstrap.slate.min.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/bootstrap.slate.min.css rename to themes/limos/static/css/bootstrap.slate.min.css diff --git a/themes/pelican-bootstrap3/static/css/bootstrap.spacelab.min.css b/themes/limos/static/css/bootstrap.spacelab.min.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/bootstrap.spacelab.min.css rename to themes/limos/static/css/bootstrap.spacelab.min.css diff --git a/themes/pelican-bootstrap3/static/css/bootstrap.superhero.min.css b/themes/limos/static/css/bootstrap.superhero.min.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/bootstrap.superhero.min.css rename to themes/limos/static/css/bootstrap.superhero.min.css diff --git a/themes/pelican-bootstrap3/static/css/bootstrap.united.min.css b/themes/limos/static/css/bootstrap.united.min.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/bootstrap.united.min.css rename to themes/limos/static/css/bootstrap.united.min.css diff --git a/themes/pelican-bootstrap3/static/css/bootstrap.yeti.min.css b/themes/limos/static/css/bootstrap.yeti.min.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/bootstrap.yeti.min.css rename to themes/limos/static/css/bootstrap.yeti.min.css diff --git a/themes/pelican-bootstrap3/static/css/font-awesome.css b/themes/limos/static/css/font-awesome.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/font-awesome.css rename to themes/limos/static/css/font-awesome.css diff --git a/themes/pelican-bootstrap3/static/css/font-awesome.css.map b/themes/limos/static/css/font-awesome.css.map similarity index 100% rename from themes/pelican-bootstrap3/static/css/font-awesome.css.map rename to themes/limos/static/css/font-awesome.css.map diff --git a/themes/pelican-bootstrap3/static/css/font-awesome.min.css b/themes/limos/static/css/font-awesome.min.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/font-awesome.min.css rename to themes/limos/static/css/font-awesome.min.css diff --git a/themes/pelican-bootstrap3/static/css/html4css1.css b/themes/limos/static/css/html4css1.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/html4css1.css rename to themes/limos/static/css/html4css1.css diff --git a/themes/pelican-bootstrap3/static/css/pygments/autumn.css b/themes/limos/static/css/pygments/autumn.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/pygments/autumn.css rename to themes/limos/static/css/pygments/autumn.css diff --git a/themes/pelican-bootstrap3/static/css/pygments/borland.css b/themes/limos/static/css/pygments/borland.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/pygments/borland.css rename to themes/limos/static/css/pygments/borland.css diff --git a/themes/pelican-bootstrap3/static/css/pygments/bw.css b/themes/limos/static/css/pygments/bw.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/pygments/bw.css rename to themes/limos/static/css/pygments/bw.css diff --git a/themes/pelican-bootstrap3/static/css/pygments/colorful.css b/themes/limos/static/css/pygments/colorful.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/pygments/colorful.css rename to themes/limos/static/css/pygments/colorful.css diff --git a/themes/pelican-bootstrap3/static/css/pygments/default.css b/themes/limos/static/css/pygments/default.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/pygments/default.css rename to themes/limos/static/css/pygments/default.css diff --git a/themes/pelican-bootstrap3/static/css/pygments/emacs.css b/themes/limos/static/css/pygments/emacs.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/pygments/emacs.css rename to themes/limos/static/css/pygments/emacs.css diff --git a/themes/pelican-bootstrap3/static/css/pygments/friendly.css b/themes/limos/static/css/pygments/friendly.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/pygments/friendly.css rename to themes/limos/static/css/pygments/friendly.css diff --git a/themes/pelican-bootstrap3/static/css/pygments/fruity.css b/themes/limos/static/css/pygments/fruity.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/pygments/fruity.css rename to themes/limos/static/css/pygments/fruity.css diff --git a/themes/pelican-bootstrap3/static/css/pygments/github.css b/themes/limos/static/css/pygments/github.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/pygments/github.css rename to themes/limos/static/css/pygments/github.css diff --git a/themes/pelican-bootstrap3/static/css/pygments/igor.css b/themes/limos/static/css/pygments/igor.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/pygments/igor.css rename to themes/limos/static/css/pygments/igor.css diff --git a/themes/pelican-bootstrap3/static/css/pygments/manni.css b/themes/limos/static/css/pygments/manni.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/pygments/manni.css rename to themes/limos/static/css/pygments/manni.css diff --git a/themes/pelican-bootstrap3/static/css/pygments/monokai.css b/themes/limos/static/css/pygments/monokai.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/pygments/monokai.css rename to themes/limos/static/css/pygments/monokai.css diff --git a/themes/pelican-bootstrap3/static/css/pygments/murphy.css b/themes/limos/static/css/pygments/murphy.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/pygments/murphy.css rename to themes/limos/static/css/pygments/murphy.css diff --git a/themes/pelican-bootstrap3/static/css/pygments/native.css b/themes/limos/static/css/pygments/native.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/pygments/native.css rename to themes/limos/static/css/pygments/native.css diff --git a/themes/pelican-bootstrap3/static/css/pygments/paraiso-dark.css b/themes/limos/static/css/pygments/paraiso-dark.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/pygments/paraiso-dark.css rename to themes/limos/static/css/pygments/paraiso-dark.css diff --git a/themes/pelican-bootstrap3/static/css/pygments/paraiso-light.css b/themes/limos/static/css/pygments/paraiso-light.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/pygments/paraiso-light.css rename to themes/limos/static/css/pygments/paraiso-light.css diff --git a/themes/pelican-bootstrap3/static/css/pygments/pastie.css b/themes/limos/static/css/pygments/pastie.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/pygments/pastie.css rename to themes/limos/static/css/pygments/pastie.css diff --git a/themes/pelican-bootstrap3/static/css/pygments/perldoc.css b/themes/limos/static/css/pygments/perldoc.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/pygments/perldoc.css rename to themes/limos/static/css/pygments/perldoc.css diff --git a/themes/pelican-bootstrap3/static/css/pygments/rrt.css b/themes/limos/static/css/pygments/rrt.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/pygments/rrt.css rename to themes/limos/static/css/pygments/rrt.css diff --git a/themes/pelican-bootstrap3/static/css/pygments/solarizeddark.css b/themes/limos/static/css/pygments/solarizeddark.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/pygments/solarizeddark.css rename to themes/limos/static/css/pygments/solarizeddark.css diff --git a/themes/pelican-bootstrap3/static/css/pygments/solarizedlight.css b/themes/limos/static/css/pygments/solarizedlight.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/pygments/solarizedlight.css rename to themes/limos/static/css/pygments/solarizedlight.css diff --git a/themes/pelican-bootstrap3/static/css/pygments/tango.css b/themes/limos/static/css/pygments/tango.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/pygments/tango.css rename to themes/limos/static/css/pygments/tango.css diff --git a/themes/pelican-bootstrap3/static/css/pygments/trac.css b/themes/limos/static/css/pygments/trac.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/pygments/trac.css rename to themes/limos/static/css/pygments/trac.css diff --git a/themes/pelican-bootstrap3/static/css/pygments/vim.css b/themes/limos/static/css/pygments/vim.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/pygments/vim.css rename to themes/limos/static/css/pygments/vim.css diff --git a/themes/pelican-bootstrap3/static/css/pygments/vs.css b/themes/limos/static/css/pygments/vs.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/pygments/vs.css rename to themes/limos/static/css/pygments/vs.css diff --git a/themes/pelican-bootstrap3/static/css/pygments/xcode.css b/themes/limos/static/css/pygments/xcode.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/pygments/xcode.css rename to themes/limos/static/css/pygments/xcode.css diff --git a/themes/pelican-bootstrap3/static/css/pygments/zenburn.css b/themes/limos/static/css/pygments/zenburn.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/pygments/zenburn.css rename to themes/limos/static/css/pygments/zenburn.css diff --git a/themes/pelican-bootstrap3/static/css/shariff/shariff.min.css b/themes/limos/static/css/shariff/shariff.min.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/shariff/shariff.min.css rename to themes/limos/static/css/shariff/shariff.min.css diff --git a/themes/pelican-bootstrap3/static/css/style.css b/themes/limos/static/css/style.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/style.css rename to themes/limos/static/css/style.css diff --git a/themes/pelican-bootstrap3/static/css/typogrify.css b/themes/limos/static/css/typogrify.css similarity index 100% rename from themes/pelican-bootstrap3/static/css/typogrify.css rename to themes/limos/static/css/typogrify.css diff --git a/themes/pelican-bootstrap3/static/fonts/FontAwesome.otf b/themes/limos/static/fonts/FontAwesome.otf similarity index 100% rename from themes/pelican-bootstrap3/static/fonts/FontAwesome.otf rename to themes/limos/static/fonts/FontAwesome.otf diff --git a/themes/pelican-bootstrap3/static/fonts/fontawesome-webfont.eot b/themes/limos/static/fonts/fontawesome-webfont.eot similarity index 100% rename from themes/pelican-bootstrap3/static/fonts/fontawesome-webfont.eot rename to themes/limos/static/fonts/fontawesome-webfont.eot diff --git a/themes/pelican-bootstrap3/static/fonts/fontawesome-webfont.svg b/themes/limos/static/fonts/fontawesome-webfont.svg similarity index 100% rename from themes/pelican-bootstrap3/static/fonts/fontawesome-webfont.svg rename to themes/limos/static/fonts/fontawesome-webfont.svg diff --git a/themes/pelican-bootstrap3/static/fonts/fontawesome-webfont.ttf b/themes/limos/static/fonts/fontawesome-webfont.ttf similarity index 100% rename from themes/pelican-bootstrap3/static/fonts/fontawesome-webfont.ttf rename to themes/limos/static/fonts/fontawesome-webfont.ttf diff --git a/themes/pelican-bootstrap3/static/fonts/fontawesome-webfont.woff b/themes/limos/static/fonts/fontawesome-webfont.woff similarity index 100% rename from themes/pelican-bootstrap3/static/fonts/fontawesome-webfont.woff rename to themes/limos/static/fonts/fontawesome-webfont.woff diff --git a/themes/pelican-bootstrap3/static/fonts/fontawesome-webfont.woff2 b/themes/limos/static/fonts/fontawesome-webfont.woff2 similarity index 100% rename from themes/pelican-bootstrap3/static/fonts/fontawesome-webfont.woff2 rename to themes/limos/static/fonts/fontawesome-webfont.woff2 diff --git a/themes/pelican-bootstrap3/static/fonts/glyphicons-halflings-regular.eot b/themes/limos/static/fonts/glyphicons-halflings-regular.eot similarity index 100% rename from themes/pelican-bootstrap3/static/fonts/glyphicons-halflings-regular.eot rename to themes/limos/static/fonts/glyphicons-halflings-regular.eot diff --git a/themes/pelican-bootstrap3/static/fonts/glyphicons-halflings-regular.svg b/themes/limos/static/fonts/glyphicons-halflings-regular.svg similarity index 100% rename from themes/pelican-bootstrap3/static/fonts/glyphicons-halflings-regular.svg rename to themes/limos/static/fonts/glyphicons-halflings-regular.svg diff --git a/themes/pelican-bootstrap3/static/fonts/glyphicons-halflings-regular.ttf b/themes/limos/static/fonts/glyphicons-halflings-regular.ttf similarity index 100% rename from themes/pelican-bootstrap3/static/fonts/glyphicons-halflings-regular.ttf rename to themes/limos/static/fonts/glyphicons-halflings-regular.ttf diff --git a/themes/pelican-bootstrap3/static/fonts/glyphicons-halflings-regular.woff b/themes/limos/static/fonts/glyphicons-halflings-regular.woff similarity index 100% rename from themes/pelican-bootstrap3/static/fonts/glyphicons-halflings-regular.woff rename to themes/limos/static/fonts/glyphicons-halflings-regular.woff diff --git a/themes/pelican-bootstrap3/static/fonts/glyphicons-halflings-regular.woff2 b/themes/limos/static/fonts/glyphicons-halflings-regular.woff2 similarity index 100% rename from themes/pelican-bootstrap3/static/fonts/glyphicons-halflings-regular.woff2 rename to themes/limos/static/fonts/glyphicons-halflings-regular.woff2 diff --git a/themes/pelican-bootstrap3/static/js/bodypadding.js b/themes/limos/static/js/bodypadding.js similarity index 100% rename from themes/pelican-bootstrap3/static/js/bodypadding.js rename to themes/limos/static/js/bodypadding.js diff --git a/themes/pelican-bootstrap3/static/js/bootstrap.min.js b/themes/limos/static/js/bootstrap.min.js similarity index 100% rename from themes/pelican-bootstrap3/static/js/bootstrap.min.js rename to themes/limos/static/js/bootstrap.min.js diff --git a/themes/pelican-bootstrap3/static/js/github.js b/themes/limos/static/js/github.js similarity index 100% rename from themes/pelican-bootstrap3/static/js/github.js rename to themes/limos/static/js/github.js diff --git a/themes/pelican-bootstrap3/static/js/jXHR.js b/themes/limos/static/js/jXHR.js similarity index 100% rename from themes/pelican-bootstrap3/static/js/jXHR.js rename to themes/limos/static/js/jXHR.js diff --git a/themes/pelican-bootstrap3/static/js/jquery.min.js b/themes/limos/static/js/jquery.min.js similarity index 100% rename from themes/pelican-bootstrap3/static/js/jquery.min.js rename to themes/limos/static/js/jquery.min.js diff --git a/themes/pelican-bootstrap3/static/js/respond.min.js b/themes/limos/static/js/respond.min.js similarity index 100% rename from themes/pelican-bootstrap3/static/js/respond.min.js rename to themes/limos/static/js/respond.min.js diff --git a/themes/pelican-bootstrap3/static/js/shariff.min.js b/themes/limos/static/js/shariff.min.js similarity index 100% rename from themes/pelican-bootstrap3/static/js/shariff.min.js rename to themes/limos/static/js/shariff.min.js diff --git a/themes/pelican-bootstrap3/static/tipuesearch/img/search.png b/themes/limos/static/tipuesearch/img/search.png similarity index 100% rename from themes/pelican-bootstrap3/static/tipuesearch/img/search.png rename to themes/limos/static/tipuesearch/img/search.png diff --git a/themes/pelican-bootstrap3/static/tipuesearch/tipuesearch.css b/themes/limos/static/tipuesearch/tipuesearch.css similarity index 100% rename from themes/pelican-bootstrap3/static/tipuesearch/tipuesearch.css rename to themes/limos/static/tipuesearch/tipuesearch.css diff --git a/themes/pelican-bootstrap3/static/tipuesearch/tipuesearch.js b/themes/limos/static/tipuesearch/tipuesearch.js similarity index 100% rename from themes/pelican-bootstrap3/static/tipuesearch/tipuesearch.js rename to themes/limos/static/tipuesearch/tipuesearch.js diff --git a/themes/pelican-bootstrap3/static/tipuesearch/tipuesearch.min.js b/themes/limos/static/tipuesearch/tipuesearch.min.js similarity index 100% rename from themes/pelican-bootstrap3/static/tipuesearch/tipuesearch.min.js rename to themes/limos/static/tipuesearch/tipuesearch.min.js diff --git a/themes/pelican-bootstrap3/static/tipuesearch/tipuesearch_content.js b/themes/limos/static/tipuesearch/tipuesearch_content.js similarity index 100% rename from themes/pelican-bootstrap3/static/tipuesearch/tipuesearch_content.js rename to themes/limos/static/tipuesearch/tipuesearch_content.js diff --git a/themes/pelican-bootstrap3/static/tipuesearch/tipuesearch_set.js b/themes/limos/static/tipuesearch/tipuesearch_set.js similarity index 100% rename from themes/pelican-bootstrap3/static/tipuesearch/tipuesearch_set.js rename to themes/limos/static/tipuesearch/tipuesearch_set.js diff --git a/themes/pelican-bootstrap3/templates/archives.html b/themes/limos/templates/archives.html similarity index 100% rename from themes/pelican-bootstrap3/templates/archives.html rename to themes/limos/templates/archives.html diff --git a/themes/pelican-bootstrap3/templates/article.html b/themes/limos/templates/article.html similarity index 100% rename from themes/pelican-bootstrap3/templates/article.html rename to themes/limos/templates/article.html diff --git a/themes/pelican-bootstrap3/templates/article_list.html b/themes/limos/templates/article_list.html similarity index 100% rename from themes/pelican-bootstrap3/templates/article_list.html rename to themes/limos/templates/article_list.html diff --git a/themes/pelican-bootstrap3/templates/author.html b/themes/limos/templates/author.html similarity index 100% rename from themes/pelican-bootstrap3/templates/author.html rename to themes/limos/templates/author.html diff --git a/themes/pelican-bootstrap3/templates/authors.html b/themes/limos/templates/authors.html similarity index 100% rename from themes/pelican-bootstrap3/templates/authors.html rename to themes/limos/templates/authors.html diff --git a/themes/pelican-bootstrap3/templates/base.html b/themes/limos/templates/base.html similarity index 93% rename from themes/pelican-bootstrap3/templates/base.html rename to themes/limos/templates/base.html index 195934be80477b7d6683eafda17ee7f7d72a0b9b..92b84dee34f08a1e72dc04ddd96d27c580c0e3b8 100644 --- a/themes/pelican-bootstrap3/templates/base.html +++ b/themes/limos/templates/base.html @@ -113,13 +113,13 @@ <span class="icon-bar"></span> </button> {% endif %} + {% if SITELOGO %}<img class="logo img-responsive img-circle pull-left gap-right" src="{{ SITEURL }}/{{ SITELOGO }}" width="{{ SITELOGO_SIZE }}"/> {% endif %} <a href="{{ SITEURL }}/" class="navbar-brand"> - {% if SITELOGO %}<img class="img-responsive pull-left gap-right" src="{{ SITEURL }}/{{ SITELOGO }}" width="{{ SITELOGO_SIZE }}"/> {% endif %} {% if not HIDE_SITENAME %}{{ SITENAME }}{% endif %} </a> </div> <div class="collapse navbar-collapse navbar-ex1-collapse"> - <ul class="nav navbar-nav"> + <ul class="nav navbar-nav navbar-right"> {% for title, link in MENUITEMS %} <li><a href="{{ link }}">{{ title }}</a></li> {% endfor %} @@ -142,18 +142,11 @@ </li> {% endfor %} {% endif %} - </ul> - <ul class="nav navbar-nav navbar-right"> - {% if 'tipue_search' in PLUGINS %} - <li><span> - <form class="navbar-search" action="{{ SEARCH_URL | default('/search.html') }}"> - <input type="text" class="search-query" placeholder="Search" name="q" id="tipue_search_input" required> - </form></span> - </li> - {% endif %} + {% if ARCHIVES_SAVE_AS %} <li><a href="{{ SITEURL }}/{{ ARCHIVES_URL | default('archives.html') }}"><i class="fa fa-th-list"></i><span class="icon-label">{{ _('Archives') }}</span></a></li> {% endif %} + <li><img src="{{ SITEURL }}/images/limos.png"></li> </ul> </div> <!-- /.navbar-collapse --> diff --git a/themes/pelican-bootstrap3/templates/categories.html b/themes/limos/templates/categories.html similarity index 100% rename from themes/pelican-bootstrap3/templates/categories.html rename to themes/limos/templates/categories.html diff --git a/themes/pelican-bootstrap3/templates/category.html b/themes/limos/templates/category.html similarity index 100% rename from themes/pelican-bootstrap3/templates/category.html rename to themes/limos/templates/category.html diff --git a/themes/pelican-bootstrap3/templates/includes/aboutme.html b/themes/limos/templates/includes/aboutme.html similarity index 100% rename from themes/pelican-bootstrap3/templates/includes/aboutme.html rename to themes/limos/templates/includes/aboutme.html diff --git a/themes/pelican-bootstrap3/templates/includes/addthis.html b/themes/limos/templates/includes/addthis.html similarity index 100% rename from themes/pelican-bootstrap3/templates/includes/addthis.html rename to themes/limos/templates/includes/addthis.html diff --git a/themes/pelican-bootstrap3/templates/includes/article_info.html b/themes/limos/templates/includes/article_info.html similarity index 100% rename from themes/pelican-bootstrap3/templates/includes/article_info.html rename to themes/limos/templates/includes/article_info.html diff --git a/themes/pelican-bootstrap3/templates/includes/banner.html b/themes/limos/templates/includes/banner.html similarity index 100% rename from themes/pelican-bootstrap3/templates/includes/banner.html rename to themes/limos/templates/includes/banner.html diff --git a/themes/pelican-bootstrap3/templates/includes/cc-license.html b/themes/limos/templates/includes/cc-license.html similarity index 100% rename from themes/pelican-bootstrap3/templates/includes/cc-license.html rename to themes/limos/templates/includes/cc-license.html diff --git a/themes/pelican-bootstrap3/templates/includes/comment_count.html b/themes/limos/templates/includes/comment_count.html similarity index 100% rename from themes/pelican-bootstrap3/templates/includes/comment_count.html rename to themes/limos/templates/includes/comment_count.html diff --git a/themes/pelican-bootstrap3/templates/includes/comments.html b/themes/limos/templates/includes/comments.html similarity index 100% rename from themes/pelican-bootstrap3/templates/includes/comments.html rename to themes/limos/templates/includes/comments.html diff --git a/themes/pelican-bootstrap3/templates/includes/disqus_script.html b/themes/limos/templates/includes/disqus_script.html similarity index 100% rename from themes/pelican-bootstrap3/templates/includes/disqus_script.html rename to themes/limos/templates/includes/disqus_script.html diff --git a/themes/pelican-bootstrap3/templates/includes/footer.html b/themes/limos/templates/includes/footer.html similarity index 79% rename from themes/pelican-bootstrap3/templates/includes/footer.html rename to themes/limos/templates/includes/footer.html index ec0f258aa7f665f4553a9f37c98e4f040ee2708b..2eec4f0ef95976caa38aa08f86dfa35213dd974a 100644 --- a/themes/pelican-bootstrap3/templates/includes/footer.html +++ b/themes/limos/templates/includes/footer.html @@ -12,9 +12,6 @@ {% set copy_date = '' %} {% endif %} <div class="col-xs-10">© {{ copy_date }} {{ AUTHOR }} - · {{ _('Powered by') }} <a href="https://github.com/getpelican/pelican-themes/tree/master/pelican-bootstrap3" target="_blank">pelican-bootstrap3</a>, - <a href="http://docs.getpelican.com/" target="_blank">Pelican</a>, - <a href="http://getbootstrap.com" target="_blank">Bootstrap</a> {%- if CC_LICENSE or CC_LICENSE_DERIVATIVES or CC_LICENSE_COMMERCIAL %} {% from 'includes/cc-license.html' import cc_license_mark %} <p><small>{{ cc_license_mark(cc_name=CC_LICENSE,derivatives=CC_LICENSE_DERIVATIVES,commercial=CC_LICENSE_COMMERCIAL,attr_markup=CC_ATTR_MARKUP,attr_props={'title':SITENAME,'name':article.author if article else AUTHOR,'url':SITEURL,'lang':DEFAULT_LANG}) }}</small></p> diff --git a/themes/pelican-bootstrap3/templates/includes/ga.html b/themes/limos/templates/includes/ga.html similarity index 100% rename from themes/pelican-bootstrap3/templates/includes/ga.html rename to themes/limos/templates/includes/ga.html diff --git a/themes/pelican-bootstrap3/templates/includes/liquid_tags_nb_footer.html b/themes/limos/templates/includes/liquid_tags_nb_footer.html similarity index 100% rename from themes/pelican-bootstrap3/templates/includes/liquid_tags_nb_footer.html rename to themes/limos/templates/includes/liquid_tags_nb_footer.html diff --git a/themes/pelican-bootstrap3/templates/includes/liquid_tags_nb_header.html b/themes/limos/templates/includes/liquid_tags_nb_header.html similarity index 100% rename from themes/pelican-bootstrap3/templates/includes/liquid_tags_nb_header.html rename to themes/limos/templates/includes/liquid_tags_nb_header.html diff --git a/themes/pelican-bootstrap3/templates/includes/minify_tipuesearch.html b/themes/limos/templates/includes/minify_tipuesearch.html similarity index 100% rename from themes/pelican-bootstrap3/templates/includes/minify_tipuesearch.html rename to themes/limos/templates/includes/minify_tipuesearch.html diff --git a/themes/pelican-bootstrap3/templates/includes/pagination.html b/themes/limos/templates/includes/pagination.html similarity index 100% rename from themes/pelican-bootstrap3/templates/includes/pagination.html rename to themes/limos/templates/includes/pagination.html diff --git a/themes/pelican-bootstrap3/templates/includes/piwik.html b/themes/limos/templates/includes/piwik.html similarity index 100% rename from themes/pelican-bootstrap3/templates/includes/piwik.html rename to themes/limos/templates/includes/piwik.html diff --git a/themes/pelican-bootstrap3/templates/includes/related-posts.html b/themes/limos/templates/includes/related-posts.html similarity index 100% rename from themes/pelican-bootstrap3/templates/includes/related-posts.html rename to themes/limos/templates/includes/related-posts.html diff --git a/themes/pelican-bootstrap3/templates/includes/series.html b/themes/limos/templates/includes/series.html similarity index 100% rename from themes/pelican-bootstrap3/templates/includes/series.html rename to themes/limos/templates/includes/series.html diff --git a/themes/pelican-bootstrap3/templates/includes/shariff.html b/themes/limos/templates/includes/shariff.html similarity index 100% rename from themes/pelican-bootstrap3/templates/includes/shariff.html rename to themes/limos/templates/includes/shariff.html diff --git a/themes/pelican-bootstrap3/templates/includes/sidebar.html b/themes/limos/templates/includes/sidebar.html similarity index 93% rename from themes/pelican-bootstrap3/templates/includes/sidebar.html rename to themes/limos/templates/includes/sidebar.html index 7772ff82ab844318e432432701559bddc95df94e..055906f0b80acc8bf64b83e4c929febee5b59bdc 100644 --- a/themes/pelican-bootstrap3/templates/includes/sidebar.html +++ b/themes/limos/templates/includes/sidebar.html @@ -1,6 +1,7 @@ <!-- Sidebar --> <section class="well well-sm"> <ul class="list-group list-group-flush"> + {% include 'includes/sidebar/search.html' %} {% include 'includes/sidebar/optional_top.html' ignore missing %} {% include 'includes/sidebar/social.html' %} {% include 'includes/sidebar/recent_posts.html' %} diff --git a/themes/pelican-bootstrap3/templates/includes/sidebar/article-li.html b/themes/limos/templates/includes/sidebar/article-li.html similarity index 100% rename from themes/pelican-bootstrap3/templates/includes/sidebar/article-li.html rename to themes/limos/templates/includes/sidebar/article-li.html diff --git a/themes/pelican-bootstrap3/templates/includes/sidebar/categories.html b/themes/limos/templates/includes/sidebar/categories.html similarity index 100% rename from themes/pelican-bootstrap3/templates/includes/sidebar/categories.html rename to themes/limos/templates/includes/sidebar/categories.html diff --git a/themes/pelican-bootstrap3/templates/includes/sidebar/github-js.html b/themes/limos/templates/includes/sidebar/github-js.html similarity index 100% rename from themes/pelican-bootstrap3/templates/includes/sidebar/github-js.html rename to themes/limos/templates/includes/sidebar/github-js.html diff --git a/themes/pelican-bootstrap3/templates/includes/sidebar/github.html b/themes/limos/templates/includes/sidebar/github.html similarity index 100% rename from themes/pelican-bootstrap3/templates/includes/sidebar/github.html rename to themes/limos/templates/includes/sidebar/github.html diff --git a/themes/pelican-bootstrap3/templates/includes/sidebar/images.html b/themes/limos/templates/includes/sidebar/images.html similarity index 100% rename from themes/pelican-bootstrap3/templates/includes/sidebar/images.html rename to themes/limos/templates/includes/sidebar/images.html diff --git a/themes/limos/templates/includes/sidebar/links.html b/themes/limos/templates/includes/sidebar/links.html new file mode 100644 index 0000000000000000000000000000000000000000..ed4e90b853cea7086b595902bf313b969f339ae2 --- /dev/null +++ b/themes/limos/templates/includes/sidebar/links.html @@ -0,0 +1,17 @@ +{% if LINKS %} + {% from 'includes/sidebar/macros.jinja' import title %} + +<!-- Sidebar/Links --> +<li class="list-group-item"> + <h4> + <i class="fa fa-link" aria-hidden="true"></i> + {{ title(_('Links'), DISABLE_SIDEBAR_TITLE_ICONS, icon='external-link-square') }} + </h4> + <ul class="list-group" id="links"> + {% for icon, name, link in LINKS %} + <li class="list-group-item"><a href="{{ link }}"><i class="fa fa-{{ icon }}"></i> {{ name }}</a></li> + {% endfor %} + </ul> +</li> +<!-- End Sidebar/Links --> +{% endif %} diff --git a/themes/pelican-bootstrap3/templates/includes/sidebar/macros.jinja b/themes/limos/templates/includes/sidebar/macros.jinja similarity index 100% rename from themes/pelican-bootstrap3/templates/includes/sidebar/macros.jinja rename to themes/limos/templates/includes/sidebar/macros.jinja diff --git a/themes/pelican-bootstrap3/templates/includes/sidebar/recent_posts.html b/themes/limos/templates/includes/sidebar/recent_posts.html similarity index 100% rename from themes/pelican-bootstrap3/templates/includes/sidebar/recent_posts.html rename to themes/limos/templates/includes/sidebar/recent_posts.html diff --git a/themes/limos/templates/includes/sidebar/search.html b/themes/limos/templates/includes/sidebar/search.html new file mode 100644 index 0000000000000000000000000000000000000000..5f0c6f1f14e1a0e22562976c3a72d0f1b4d8b9b5 --- /dev/null +++ b/themes/limos/templates/includes/sidebar/search.html @@ -0,0 +1,8 @@ +{% if 'tipue_search' in PLUGINS %} + <li class="list-group-item search"> + <div class="input-group"> + <input type="text" class="form-control" placeholder="{{ _('Search') }}"> + <span class="input-group-addon"><i class="fa fa-search" aria-hidden="true"></i></span> + </div> + </li> +{% endif %} diff --git a/themes/pelican-bootstrap3/templates/includes/sidebar/series.html b/themes/limos/templates/includes/sidebar/series.html similarity index 100% rename from themes/pelican-bootstrap3/templates/includes/sidebar/series.html rename to themes/limos/templates/includes/sidebar/series.html diff --git a/themes/limos/templates/includes/sidebar/social.html b/themes/limos/templates/includes/sidebar/social.html new file mode 100644 index 0000000000000000000000000000000000000000..cd1da444e698eda17f2e05916518acb410321b8e --- /dev/null +++ b/themes/limos/templates/includes/sidebar/social.html @@ -0,0 +1,17 @@ +{% if SOCIAL %} + {% from 'includes/sidebar/macros.jinja' import title %} + +<!-- Sidebar/Social --> +<li class="list-group-item"> + <h4> + <i class="fa fa-user-circle-o" aria-hidden="true"></i> + {{ title(_('Social'), DISABLE_SIDEBAR_TITLE_ICONS) }} + </h4> + <ul class="list-group" id="social"> + {% for icon, name, link in SOCIAL %} + <li class="list-group-item"><a href="{{ link }}"><i class="fa fa-{{ icon }}"></i> {{ name }}</a></li> + {% endfor %} + </ul> +</li> +<!-- End Sidebar/Social --> +{% endif %} diff --git a/themes/pelican-bootstrap3/templates/includes/sidebar/tag_cloud.html b/themes/limos/templates/includes/sidebar/tag_cloud.html similarity index 69% rename from themes/pelican-bootstrap3/templates/includes/sidebar/tag_cloud.html rename to themes/limos/templates/includes/sidebar/tag_cloud.html index 147432a9d284e0301b38379eee6ee9dad06d3407..3beb2a48935c4f2e3648f9b95d10e62756573585 100644 --- a/themes/pelican-bootstrap3/templates/includes/sidebar/tag_cloud.html +++ b/themes/limos/templates/includes/sidebar/tag_cloud.html @@ -12,12 +12,18 @@ <!-- Sidebar/Tag Cloud --> <li class="list-group-item"> - <a href="{{ SITEURL }}/{{ TAGS_URL }}"><h4>{{ title(_('Tags'), DISABLE_SIDEBAR_TITLE_ICONS, icon='tags') }}</h4></a> + <a href="{{ SITEURL }}/{{ TAGS_URL }}"> + <h4> + <i class="fa fa-tags" aria-hidden="true"></i> + {{ title(_('Tags'), DISABLE_SIDEBAR_TITLE_ICONS, icon='tags') }} + </h4> + </a> <ul class="list-group {% if DISPLAY_TAGS_INLINE %}list-inline tagcloud{% endif %}" id="tags"> {% for tag in tags %} <li class="list-group-item tag-{{ tag.1 }}"> <a href="{{ SITEURL }}/{{ tag.0.url }}"> - {{- tag.0 -}} + <i class="fa fa-tag" aria-hidden="true"></i> {{- tag.0 -}} + <span class="badge">{{- tag.2 -}}</span> </a> </li> {% endfor %} diff --git a/themes/pelican-bootstrap3/templates/includes/sidebar/twitter_timeline.html b/themes/limos/templates/includes/sidebar/twitter_timeline.html similarity index 100% rename from themes/pelican-bootstrap3/templates/includes/sidebar/twitter_timeline.html rename to themes/limos/templates/includes/sidebar/twitter_timeline.html diff --git a/themes/pelican-bootstrap3/templates/includes/taglist.html b/themes/limos/templates/includes/taglist.html similarity index 100% rename from themes/pelican-bootstrap3/templates/includes/taglist.html rename to themes/limos/templates/includes/taglist.html diff --git a/themes/pelican-bootstrap3/templates/includes/translations.html b/themes/limos/templates/includes/translations.html similarity index 100% rename from themes/pelican-bootstrap3/templates/includes/translations.html rename to themes/limos/templates/includes/translations.html diff --git a/themes/pelican-bootstrap3/templates/includes/twitter_cards.html b/themes/limos/templates/includes/twitter_cards.html similarity index 100% rename from themes/pelican-bootstrap3/templates/includes/twitter_cards.html rename to themes/limos/templates/includes/twitter_cards.html diff --git a/themes/pelican-bootstrap3/templates/index.html b/themes/limos/templates/index.html similarity index 100% rename from themes/pelican-bootstrap3/templates/index.html rename to themes/limos/templates/index.html diff --git a/themes/pelican-bootstrap3/templates/page.html b/themes/limos/templates/page.html similarity index 100% rename from themes/pelican-bootstrap3/templates/page.html rename to themes/limos/templates/page.html diff --git a/themes/pelican-bootstrap3/templates/search.html b/themes/limos/templates/search.html similarity index 100% rename from themes/pelican-bootstrap3/templates/search.html rename to themes/limos/templates/search.html diff --git a/themes/pelican-bootstrap3/templates/tag.html b/themes/limos/templates/tag.html similarity index 100% rename from themes/pelican-bootstrap3/templates/tag.html rename to themes/limos/templates/tag.html diff --git a/themes/pelican-bootstrap3/templates/tags.html b/themes/limos/templates/tags.html similarity index 100% rename from themes/pelican-bootstrap3/templates/tags.html rename to themes/limos/templates/tags.html diff --git a/themes/pelican-bootstrap3/translations/ca/LC_MESSAGES/messages.mo b/themes/limos/translations/ca/LC_MESSAGES/messages.mo similarity index 100% rename from themes/pelican-bootstrap3/translations/ca/LC_MESSAGES/messages.mo rename to themes/limos/translations/ca/LC_MESSAGES/messages.mo diff --git a/themes/pelican-bootstrap3/translations/ca/LC_MESSAGES/messages.po b/themes/limos/translations/ca/LC_MESSAGES/messages.po similarity index 100% rename from themes/pelican-bootstrap3/translations/ca/LC_MESSAGES/messages.po rename to themes/limos/translations/ca/LC_MESSAGES/messages.po diff --git a/themes/pelican-bootstrap3/translations/de/LC_MESSAGES/messages.mo b/themes/limos/translations/de/LC_MESSAGES/messages.mo similarity index 100% rename from themes/pelican-bootstrap3/translations/de/LC_MESSAGES/messages.mo rename to themes/limos/translations/de/LC_MESSAGES/messages.mo diff --git a/themes/pelican-bootstrap3/translations/de/LC_MESSAGES/messages.po b/themes/limos/translations/de/LC_MESSAGES/messages.po similarity index 100% rename from themes/pelican-bootstrap3/translations/de/LC_MESSAGES/messages.po rename to themes/limos/translations/de/LC_MESSAGES/messages.po diff --git a/themes/pelican-bootstrap3/translations/fr/LC_MESSAGES/messages.mo b/themes/limos/translations/fr/LC_MESSAGES/messages.mo similarity index 100% rename from themes/pelican-bootstrap3/translations/fr/LC_MESSAGES/messages.mo rename to themes/limos/translations/fr/LC_MESSAGES/messages.mo diff --git a/themes/pelican-bootstrap3/translations/fr/LC_MESSAGES/messages.po b/themes/limos/translations/fr/LC_MESSAGES/messages.po similarity index 100% rename from themes/pelican-bootstrap3/translations/fr/LC_MESSAGES/messages.po rename to themes/limos/translations/fr/LC_MESSAGES/messages.po diff --git a/themes/pelican-bootstrap3/templates/includes/sidebar/links.html b/themes/pelican-bootstrap3/templates/includes/sidebar/links.html deleted file mode 100644 index 179b1a3245720fb73d462a1591295ea95bdc7cfc..0000000000000000000000000000000000000000 --- a/themes/pelican-bootstrap3/templates/includes/sidebar/links.html +++ /dev/null @@ -1,16 +0,0 @@ -{% if LINKS %} - {% from 'includes/sidebar/macros.jinja' import title %} - -<!-- Sidebar/Links --> -<li class="list-group-item"> - <h4>{{ title(_('Links'), DISABLE_SIDEBAR_TITLE_ICONS, icon='external-link-square') }}</h4> - <ul class="list-group" id="links"> - {% for name, link in LINKS %} - <li class="list-group-item"> - <a href="{{ link }}" target="_blank">{{ name }}</a> - </li> - {% endfor %} - </ul> -</li> -<!-- End Sidebar/Links --> -{% endif %} diff --git a/themes/pelican-bootstrap3/templates/includes/sidebar/social.html b/themes/pelican-bootstrap3/templates/includes/sidebar/social.html deleted file mode 100644 index 3b768db522afc48b5c6f87b36f2c21e1d18872f6..0000000000000000000000000000000000000000 --- a/themes/pelican-bootstrap3/templates/includes/sidebar/social.html +++ /dev/null @@ -1,24 +0,0 @@ -{% if SOCIAL %} - {% from 'includes/sidebar/macros.jinja' import title %} - -<!-- Sidebar/Social --> -<li class="list-group-item"> - <h4>{{ title(_('Social'), DISABLE_SIDEBAR_TITLE_ICONS) }}</h4> - <ul class="list-group" id="social"> - {% for s in SOCIAL %} - {% if s[2] %} - {% set name_sanitized = s[2]|lower|replace('+','-plus')|replace(' ','-') %} - {% else %} - {% set name_sanitized = s[0]|lower|replace('+','-plus')|replace(' ','-') %} - {% endif %} - {% if name_sanitized in ['flickr', 'slideshare', 'instagram', 'spotify', 'stack-overflow', 'weibo', 'line-chart', 'home', 'user', 'users', 'envelope', 'envelope-o', 'stack-exchange', 'hacker-news'] %} - {% set iconattributes = '"fa fa-' ~ name_sanitized ~ ' fa-lg"' %} - {% else %} - {% set iconattributes = '"fa fa-' ~ name_sanitized ~ '-square fa-lg"' %} - {% endif %} - <li class="list-group-item"><a href="{{ s[1] }}"><i class={{ iconattributes }}></i> {{ s[0] }}</a></li> - {% endfor %} - </ul> -</li> -<!-- End Sidebar/Social --> -{% endif %}