Browse Source

passage du theme elegant en 2.0 pour gerer les traductions d'articles

master
Victor 7 years ago
parent
commit
c1935ecab2
49 changed files with 2270 additions and 878 deletions
  1. +22
    -0
      theme/.gitignore
  2. +45
    -0
      theme/CONTRIBUTING.md
  3. +71
    -1
      theme/RELEASE_NOTES.md
  4. +212
    -27
      theme/THANKS.md
  5. +11
    -0
      theme/static/css/custom.css
  6. +606
    -0
      theme/static/css/elegant.css
  7. +71
    -0
      theme/static/css/pygments.css
  8. +0
    -69
      theme/static/css/solarizedlight.css
  9. +0
    -399
      theme/static/css/style.css
  10. BIN
      theme/static/tipuesearch/img/expand.png
  11. BIN
      theme/static/tipuesearch/img/link.png
  12. BIN
      theme/static/tipuesearch/img/search.png
  13. +64
    -66
      theme/static/tipuesearch/tipuesearch.css
  14. +383
    -0
      theme/static/tipuesearch/tipuesearch.js
  15. +3
    -3
      theme/static/tipuesearch/tipuesearch.min.js
  16. +1
    -1
      theme/static/tipuesearch/tipuesearch_set.js
  17. +4
    -4
      theme/templates/404.html
  18. +147
    -0
      theme/templates/_includes/_defaults.html
  19. +11
    -0
      theme/templates/_includes/analytics.html
  20. +20
    -4
      theme/templates/_includes/comments.html
  21. +60
    -0
      theme/templates/_includes/disqus_scripts.html
  22. +18
    -0
      theme/templates/_includes/favicon_links.html
  23. +13
    -0
      theme/templates/_includes/feeds.html
  24. +13
    -0
      theme/templates/_includes/feeds_categories.html
  25. +12
    -0
      theme/templates/_includes/feeds_tags.html
  26. +2
    -0
      theme/templates/_includes/footer.html
  27. +16
    -0
      theme/templates/_includes/last_updated.html
  28. +16
    -0
      theme/templates/_includes/mailchimp.html
  29. +4
    -0
      theme/templates/_includes/minify_css.html
  30. +4
    -0
      theme/templates/_includes/minify_tipuesearch.html
  31. +20
    -0
      theme/templates/_includes/multi_parts.html
  32. +19
    -0
      theme/templates/_includes/related_posts.html
  33. +22
    -0
      theme/templates/_includes/share_links.html
  34. +26
    -0
      theme/templates/_includes/smo_metadata.html
  35. +33
    -0
      theme/templates/_includes/social_links.html
  36. +19
    -0
      theme/templates/_includes/stat_counter.html
  37. +10
    -0
      theme/templates/_includes/translations.html
  38. +0
    -46
      theme/templates/analytics.html
  39. +43
    -9
      theme/templates/archives.html
  40. +44
    -81
      theme/templates/article.html
  41. +44
    -26
      theme/templates/base.html
  42. +29
    -7
      theme/templates/categories.html
  43. +0
    -18
      theme/templates/disqus_script_comment.html
  44. +0
    -12
      theme/templates/disqus_script_count.html
  45. +0
    -36
      theme/templates/feeds.html
  46. +62
    -14
      theme/templates/index.html
  47. +14
    -35
      theme/templates/page.html
  48. +25
    -11
      theme/templates/search.html
  49. +31
    -9
      theme/templates/tags.html

+ 22
- 0
theme/.gitignore View File

@ -0,0 +1,22 @@
# Generated by http://gitignore.io
### OSX ###
.DS_Store
.AppleDouble
.LSOverride
Icon
# Thumbnails
._*
# Files that might appear on external disk
.Spotlight-V100
.Trashes
### vim ###
.*.s[a-w][a-z]
*.un~
Session.vim
.netrwhist
*~

+ 45
- 0
theme/CONTRIBUTING.md View File

@ -0,0 +1,45 @@
Where do I start?
=================
See issues tagged with [Pull Request
Welcomed](https://github.com/talha131/pelican-elegant/issues?labels=Pull+Request+Welcomed).
I, @talha131, do not plan to work on these issues. You are more than welcome to
pick them up.
New Features and Styles
=======================
If you plan to add new features to the theme, please make sure
1. You set sensible defaults so that theme works out of the box, without
forcing user to set any variable
2. Your feature should not effect readability and reading experience
3. It should not be distracting for the reader
Follow the code style of the existing codebase
==============================================
1. Use single ('') rather than double ("") quotation marks for Jinja strings
1. In Jinja print statements, surround the variable with spaces inside curly
braces, for example `{{ foo.bar }}`
1. Use double ("") quotation marks around HTML attributes
1. End files with a newline
CSS Formatting Rules
--------------------
1. Font name's first letter should be capital
2. Add a space after comma
3. Declarations should be sorted alphabetically
4. Use a single space between the last selector and the opening brace that
begins the declaration block
5. Group together related classes and identities
6. Add a space after colon
7. Remove leading 0s
8. Remove unit specification after 0 values
9. Use three digit Hex notation for colors whereever possible
10. User hyphen `-` instead of underscore `_` in class and identity names
Refer to [Google's HTML/CSS Style
Guide](http://google-styleguide.googlecode.com/svn/trunk/htmlcssguide.xml) for
all other formatting rules.

+ 71
- 1
theme/RELEASE_NOTES.md View File

@ -1,8 +1,78 @@
Version 2.0 (under development)
===============================
* Link to your social profiles
* Upgraded to Twitter Bootstrap 2.3.2
* Upgraded to Tipue Search 3.1
* Support for `custom.css`
* [Stat Counter Analytics ](http://statcounter.com/) support
* Google Universal Analytics support
* Support for custom icons for social profiles
* Support for Pelican (>3.3) new metadata `modified`
* Support for Social Media Tags
* Support for Google Authorship
* Translations support
* `article.comments_intro` that overrides `COMMENTS_INTRO`. Now you can define
article specific comments introduction
* Add Disqus comments to Pages
* All customizable variables consolidated in a single `_defaults.html`, making
it easier for you to customize or even *localize* the theme
Performance
-----------
* Performance improvement- 4x faster output
* Reduce number of HTTP requests using `assets` plugin
* Shortcut icons, like favicon, are disabled by default. Set
`USE_SHORTCUT_ICONS` to true to enable it
Visual Style
------------
* Email newsletter subscriber form style matches rest of the theme
* Article images have a visible border
* Block quotes have a quote icon instead of a thick line on left
* Article's paragraph font size is bigger, for better readability
* Remove unnecessary padding in sidebar's tag list
* Archives page and recent posts on home page have better presentation
* Time stamps in categories and tags pages are justified
* Line number in code block is hidden on tablets and phones to save space for
content
* More sizes of image for Apple Touch icons
* Fixed: Nested lists have different font sizes
* Fixed: CSS style rules for literal block in reST is missing
* Fixed: Long lines in code block will wrap to next line
* Fixed: Code block will not play nice with line numbers
* Fixed: Subscribe button changes its size on smaller screens
* Fixed: Articles under tag heading on tags page are not sorted
* Fixed: URL scheme for blogs which are not published to the root folder
* Fixed: Footer is always under the fold even on smaller length web pages
* Fixed: Site Name and top navigation menu move to left on wide displays
* Fixed: Page link is not active in the navbar if `SAVE_PAGE_AS` is not set to
default
Plugins
-------
* Use `neighbor` plugin to show next and previous articles
* Use `assets` plugin to minify CSS and JS files
* Support for `share_post` plugin
* Support for `related_posts` plugin
* Support for `multi_part` plugin
Behaviour
---------
* Search results link open in the same window, which is consistent with
internet search engines
* Comments section message changes when user toggles it
* Fixed: Clicking Search button in 404.html does not trigger search
Version 1.3
===========
* Next and previous article navigation is placed below comments section so that article's content and comments appear together
* Article title and site name in `<title>` tag is separated by ` · ` which is cleaner and more subtle than ` - `
* Article title and site name in `<title>` tag is separated by ` · ` which is cleaner and more subtle than ` - `
* Subtitle of articles and pages is added in `<title>` tag along with main title
* Description meta tag on Home Page uses `SITE_DESCRIPTION`
* Bug fix: Expand comments section if URL points to a comment

+ 212
- 27
theme/THANKS.md View File

@ -1,54 +1,239 @@
Thanks to
=========
[tshepang](https://github.com/tshepang)
---------------------------------------
**Special Thanks** to [calfzhou](https://github.com/calfzhou) and
[tshepang](https://github.com/tshepang). They are always the first to report
issues, suggest improvements and submit patches. They have played a huge role
in making Elegant more elegant.
### Oct 4, 2013
[7rack](https://github.com/7rack)
---------------------------------
1. He [reported](https://github.com/talha131/pelican-elegant/issues/10) an issue with CSS style of links in an unordered lists.
1. He reported an
[issue](https://github.com/talha131/pelican-elegant/issues/118) with meta
tags which happens when article summary is auto-generated by Pelican
### Oct 1, 2013
[Alexis Métaireau](https://github.com/ametaireau)
-------------------------------------------------
1. He [reported](https://github.com/talha131/pelican-elegant/issues/6) that it is not possible to link to a Disqus comment.
1. He [helped](https://github.com/talha131/pelican-elegant/issues/81) in
resolving a performance issue
### Sep 29, 2013
[andreburgaud](https://github.com/andreburgaud)
-----------------------------------------------
1. He [reported](https://github.com/talha131/pelican-elegant/issues/5) hyperlink style compatibility issue on Chrome.
1. He [reported](https://github.com/talha131/pelican-elegant/issues/3) an issue with link style.
1. He [reported](https://github.com/talha131/pelican-elegant/issues/4) the bug that Disqus comment count is always zero.
1. He reported, investigated and submitted a
[patch](https://github.com/talha131/pelican-elegant/issues/110) for an issue
in the navbar
[yuex](https://github.com/yuex)
-------------------------------
[Andre](https://github.com/andreburgaud)
----------------------------------------
### Sep 15, 2013
1. He [reported and submitted a
patch](https://github.com/talha131/pelican-elegant/issues/108) to fix a bug
in 404.html
1. He submitted a [patch](https://github.com/talha131/pelican-elegant/pull/2) to the project.
[brechtm](https://github.com/brechtm)
-------------------------------------
[Melissa](https://github.com/meli-lewis)
----------------------------------------
### Sep 3, 2013
1. He [suggested](https://github.com/talha131/pelican-elegant/pull/40) the idea
of `custom.css`
1. She reported a [critical bug](https://github.com/talha131/pelican-elegant/issues/1).
[Brian Blais](http://web.bryant.edu/~bblais/)
---------------------------------------------
[John](http://twitter.com/BostonEnginerd)
-----------------------------------------
1. He suggested via email a solution to the
[problem](https://github.com/talha131/pelican-elegant/issues/98) of social
profiles whose icons are missing
[Brian Levin](https://github.com/bnice5000)
-------------------------------------------
### Sep 2, 2013
1. He [reported](https://github.com/talha131/pelican-elegant/issues/115) and
[fixed](https://github.com/talha131/pelican-elegant/pull/117) an issue in
search code
1. He suggested [an improvement](https://twitter.com/BostonEnginerd/status/374555593589002241) to the [Elegant project description](http://oncrashreboot.com/elegant-a-clean-theme-for-pelican-with-search-feature).
[calfzhou](https://github.com/calfzhou)
---------------------------------------
1. He [reported](https://github.com/talha131/pelican-elegant/issues/86) and
[fixed](https://github.com/talha131/pelican-elegant/pull/109) an issue with
the footer
1. He
[reported](https://github.com/talha131/pelican-elegant/commit/7b484dd611c2d05bc3b3249a756d1e076bfd0a1b#commitcomment-5149343)
an issue with code style
1. He
[reported](https://github.com/talha131/pelican-elegant/issues/95#issuecomment-33189738)
an issue with code style
1. He [suggested](https://github.com/talha131/pelican-elegant/issues/95)
integration with `multi_part` plugin
1. He
[suggested](https://github.com/talha131/pelican-elegant/issues/95#issuecomment-33091647)
setting title attribute in HTML anchor elements of `multi_part` code
1. He
[suggested](https://github.com/talha131/pelican-elegant/issues/95#issuecomment-41050831)
a solution to set title of `multi_part` widget in the sidebar
1. He [reported](https://github.com/talha131/pelican-elegant/issues/15) a bug
in social media optimizer code
1. He [suggested](https://github.com/talha131/pelican-elegant/issues/60) using
`_includes` folder
1. He [suggested](https://github.com/talha131/pelican-elegant/issues/63)
comments for Page template
1. He [reported](https://github.com/talha131/pelican-elegant/issues/72) an
issue with image margins
1. He [suggested](https://github.com/talha131/pelican-elegant/issues/73) to
close an issue regarding changing 3rd parties' code
1. He submitted a [pull
request](https://github.com/talha131/pelican-elegant/pull/66) to fix URL
scheme of categories and tags
1. He submitted a [pull
request](https://github.com/talha131/pelican-elegant/pull/65) to fix URL
scheme
1. He submitted a [pull
request](https://github.com/talha131/pelican-elegant/pull/62) to fix a typo
in CSS
1. He reported an
[issue](https://github.com/talha131/pelican-elegant/issues/64) in alignment
of All Posts
1. He gave [suggestions](https://github.com/talha131/pelican-elegant/issues/59)
on improving Archive, Tags, Categories and Home Page
1. He [reported](https://github.com/talha131/pelican-elegant/issues/58) that
line numbers in code block to do not always get displayed correctly
1. He [reported](https://github.com/talha131/pelican-elegant/issues/58) that
line numbers do not align vertically with code blocks
1. He [suggested](https://github.com/talha131/pelican-elegant/issues/58) fixed
width for line number column
1. He [suggested](https://github.com/talha131/pelican-elegant/issues/87)
article translation feature
1. He submitted a [pull
request](https://github.com/talha131/pelican-elegant/pull/88) to fix a
rendering issue in Internet Explorer
1. He [fixed](https://github.com/talha131/pelican-elegant/pull/119) and pointed
out HTML is not properly escaped
1. He
[reported](https://github.com/talha131/pelican-elegant/commit/e479ce72db916e7e21bc6ae63677221c8e290840#commitcomment-6284503)
that it is incorrect to rename `SITESUBTITLE` to `SITE_SUBTITLE`
[debiatan](https://github.com/debiatan)
---------------------------------------
1. He [submitted patch](https://github.com/talha131/pelican-elegant/pull/105)
to upgrade to Bootstrap 2.3.2
[if1live](https://github.com/if1live)
-------------------------------------
### Aug 31, 2013
1. His [pull request](https://github.com/getpelican/pelican-plugins/pull/68)
reminded me that I have forgotten to add template for Pages
1. His
[commit](https://github.com/if1live/pelican-elegant/commit/3da52903e94051fa771212149a10a271adc78264#commitcomment-3988674)
in the fork brought bug in the path of search.html to my notice
[Jed Brown](https://github.com/jedbrown)
----------------------------------------
1. His [pull request](https://github.com/getpelican/pelican-plugins/pull/68) reminded me that I have forgotten to add template for Pages
1. His [commit](https://github.com/if1live/pelican-elegant/commit/3da52903e94051fa771212149a10a271adc78264#commitcomment-3988674) in the fork brought bug in the path of search.html to my notice
1. He suggested via email integration with Latex
[Jérémie Astori](https://github.com/astorije)
---------------------------------------------
### Aug 30, 2013
1. He reported a [bug](https://botbot.me/freenode/pelican/msg/5577967/) in
search form
[John](http://twitter.com/BostonEnginerd)
-----------------------------------------
1. He suggested [an
improvement](https://twitter.com/BostonEnginerd/status/374555593589002241)
to the [Elegant project
description](http://oncrashreboot.com/pelican-elegant)
[kafran](https://github.com/kafran)
-----------------------------------
1. He [reported](https://github.com/talha131/pelican-elegant/issues/76) a
missing `</header>` tag
[Melissa](https://github.com/meli-lewis)
----------------------------------------
1. She reported a [critical
bug](https://github.com/talha131/pelican-elegant/issues/1) about
`RECENT_ARTICLES_COUNT`
[Rod Morehead](https://github.com/rmorehead)
--------------------------------------------
1. He submitted a [patch](https://github.com/talha131/pelican-elegant/pull/106)
[silverhook](https://github.com/silverhook)
-------------------------------------------
1. He [suggested](https://github.com/talha131/pelican-elegant/issues/98) a
solution to the problem of social profiles whose icons are missing
1. He [suggested](https://github.com/talha131/pelican-elegant/issues/101)
adding support for related articles plugin
1. He [helped](https://github.com/talha131/pelican-elegant/issues/102) in
fixing justification of timestamps issue
1. He [reported](https://github.com/talha131/pelican-elegant/issues/116) a bug
in social profiles widget
1. He
[suggested](https://github.com/talha131/pelican-elegant/issues/95#issuecomment-38347811)
to make label of multi-part plugin customisable
1. He
[suggested](https://github.com/talha131/pelican-elegant/issues/95#issuecomment-41032225)
a solution to set title of `multi_part` widget in the sidebar
[tshepang](https://github.com/tshepang)
---------------------------------------
1. He [reported](https://github.com/talha131/pelican-elegant/issues/81) an
issue with Elegant's performance
1. He [reported](https://github.com/talha131/pelican-elegant/issues/80) an
issue with fall back fonts
1. He [reported](https://github.com/talha131/pelican-elegant/issues/75) an
issue with page headers
1. He
[reported](https://github.com/talha131/pelican-elegant/issues/34#issuecomment-28151235)
a regression bug introduced in tags list
1. He gave [suggestions](https://github.com/talha131/pelican-elegant/issues/59)
on improving Archive, Tags, Categories and Home Page
1. He [reported](https://github.com/talha131/pelican-elegant/issues/50) an
issue with CSS style of nested lists
1. He [reported](https://github.com/talha131/pelican-elegant/issues/10) an
issue with CSS style of links in an unordered lists
1. He [reported](https://github.com/talha131/pelican-elegant/issues/34) that
articles list in tags page is not sorted at all. He helped a lot to
reproduce the issue and stayed persistent to get it fixed
1. He [reported](https://github.com/talha131/pelican-elegant/issues/6) that it
is not possible to link to a Disqus comment
1. He [reported](https://github.com/talha131/pelican-elegant/issues/8) that
code block auto wraps to next line
1. He [reported](https://github.com/talha131/pelican-elegant/issues/5)
hyperlink style compatibility issue on Chrome
1. He [reported](https://github.com/talha131/pelican-elegant/issues/3) an issue
with link style
1. He [reported](https://github.com/talha131/pelican-elegant/issues/4) the bug
that Disqus comment count is always zero
1. He [suggested](https://github.com/talha131/pelican-elegant/issues/7) that
comments accordion should have different text depending on its state
1. He [reported](https://github.com/talha131/pelican-elegant/issues/107) an
issue when publishing the site
[yuex 悟道洞穴人](https://github.com/yuex)
-------------------------------
1. He submitted a [patch](https://github.com/talha131/pelican-elegant/pull/2)
to the project
3rd Party Credits
=================
Elegant is standing on the shoulders of these giants.
1. [Tipue Search](http://www.tipue.com/search/)
1. [Bootstrap 2.3.2](http://getbootstrap.com/2.3.2/)
1. [Solarized Light theme](http://ethanschoonover.com/solarized) converted to
[Pelican Pygments](https://github.com/yuex/pelican-pygments-solarized-css)
by [yuex 悟道洞穴人](https://github.com/yuex)
1. He reported a [bug](https://botbot.me/freenode/pelican/msg/5577967/) in search form.

+ 11
- 0
theme/static/css/custom.css View File

@ -0,0 +1,11 @@
.table-of-content .toc {
font-size: 0.9em;
}
.article-content p{
font-size: 19px;
}
.article-content {
max-width: none !important;
}

+ 606
- 0
theme/static/css/elegant.css View File

@ -0,0 +1,606 @@
/* Base */
/* #push.height = -#content-sans-footer.margin-bottom = #footer.margin-top + ul.footer-content */
body,
html {
height: 100%;
}
#content-sans-footer {
min-height: 100%;
margin-bottom: -60px;
}
#push {
height: 60px;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: Baskerville, Garamond, Georgia, 'DejaVu Serif', 'Times New Roman', Times, Serif;
font-weight: normal;
}
h1 small, h1 a, h1 a:hover,
h2 small, h2 a, h2 a:hover,
h3 small, h3 a, h3 a:hover,
h4 small, h4 a, h4 a:hover,
h5 small, h5 a, h5 a:hover,
h6 small, h6 a, h6 a:hover {
color: inherit;
text-decoration: none;
}
a {
color: #3875d7;
}
hr {
border-width: 3px;
}
/* site title */
.site-name {
font-family: 'Monaco', 'Inconsolata', 'Andale Mono', 'Lucida Console', 'Bitstream Vera Sans Mono', 'Courier New', Courier, Monospace;
}
/* Top navigation menu */
.top-menu li a {
font-weight: bold;
}
/* Footer */
#footer {
border-top: 1px solid rgba(0, 0, 0, .2);
font: .8em Calibri, Tahoma, Arial, Sans-Serif;
margin: 15px 0 0 0;
padding: 0;
}
ul.footer-content {
list-style: none;
margin: -1px 0 0 0;
padding: 2px 5px 0;
display: table;
height: 45px;
width: 100%;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
ul.footer-content li {
padding-left: 5px;
display: table-cell;
vertical-align: middle;
height: 100%;
}
.elegant-power {
text-align: right;
}
.elegant-license {
text-align: left;
}
.elegant-subtitle {
text-align: left;
}
/* comment */
#comment-message,
#post-share-links:not(a) {
color: #6F6F6F;
text-shadow: 1px 1px 3px rgba(50, 50, 50, 0.15);
}
#post-share-links a{
text-shadow: 0 0;
}
.disqus-comment-count {
font-family: 'Trebuchet MS', Trebuchet, 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, Sans-Serif;
font-size: .9em;
}
#disqus_thread {
padding-left: 10px;
padding-right: 10px;
}
/* Syntax Highlight */
table {
table-layout: fixed;
width: 100%;
}
td {
vertical-align: top;
}
@media (max-width:979px) {
.linenos {
display:none !important;
}
}
.linenos {
width: 30px;
}
.linenos div pre {
text-align: right;
overflow: hidden;
}
pre {
overflow: auto;
white-space: pre;
word-break: normal;
word-wrap: normal;
}
td.code .highlight pre {
border-radius: 0 3px 3px 0;
}
td.code {
width: 100%;
}
.linenodiv pre {
background-color: #eee8d5;
border-radius: 3px 0 0 3px;
color: #657b83;
}
div.highlight {
margin-bottom: 20px;
}
/* Tags */
.list-of-tags {
font-family: 'Helvetica Neue', Helvetica, Arial, Sans-Serif;
list-style: none;
margin: 0;
overflow: hidden;
}
.list-of-tags li {
float: left;
line-height: 28px;
margin: 0;
}
.list-of-tags a {
background: #EEE;
border-radius: 3px;
color: #222;
margin: 2px;
padding: 3px 6px;
text-decoration: none;
}
.list-of-tags a span {
font-size: .8em;
vertical-align: super;
}
.tags-in-article li {
float: none;
line-height: 28px;
}
.tag-title {
font-family: 'Trebuchet MS', Trebuchet, 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, Sans-Serif;
}
.articles-in-tag li {
font: 1.1em/1.6em 'Trebuchet MS', Trebuchet, 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, Sans-Serif;
}
/* Article */
article p:not(#list-of-translations):not(#post-share-links) a,
article ol a,
blockquote a,
article div.article-content ul:not(.articles-timeline):not(.related-posts-list) a {
border-bottom: thin dashed #A9A9A9;
color: #000;
}
article p a:hover,
article ol a:hover,
article div.article-content ul:not(.articles-timeline) a:hover {
border-bottom: none;
text-decoration: none;
text-shadow: none;
}
.article-content, div.recent-posts p {
font: 1.2em/1.6em 'PT Serif', Georgia, 'Times New Roman', Times, Serif;
text-align: justify;
}
.article-content {
max-width: 50em;
}
.article-content p, div.recent-posts p {
font-size: inherit;
font-variant: normal;
line-height: 1.6em;
text-transform: none;
}
.article-content p {
margin: 20px 0;
}
.article-content blockquote {
border-left: 0;
margin: 20px 0 0 2em;
padding: 0 0 0 20px;
}
.article-content blockquote:before {
color: #646464;
content: '\f10d';
font: 18px FontAwesome;
font-style: normal;
font-weight: normal;
margin-left: -2em;
text-decoration: inherit;
position:absolute;
}
.article-content blockquote {
font-family: 'Helvetica Neue', Helvetica, Arial, Sans-Serif;
font-size: inherit;
font-variant: normal;
line-height: 1.7em;
text-transform: none;
font-weight: 300;
position:relative;
}
.article-content ul:not(.related-posts-list):not(.articles-timeline) {
font-size: inherit;
list-style-type: disc;
}
.article-content ul.related-posts-list {
list-style-type: square;
}
.article-content ol {
font-size: inherit;
list-style-type: decimal;
}
.article-content li {
line-height: 1.7em;
list-style-position: outside;
margin: 1px 0 1px 20px;
}
.article-content dl {
font-size: inherit;
list-style-position: outside;
list-style-type: decimal;
margin: 20px 0 20px 20px;
}
.article-content dd {
line-height: 1.7em;
margin: 1px 0 1px 20px;
padding: 3px 0;
}
.article-content dt {
font-size: inherit;
}
.page-header {
border-bottom: 1px solid #8f8686;
color: #8B0000;
margin: 10px 10px 20px;
padding: 5px;
}
.page-header h1 {
font-size: 3em;
font-weight: normal;
}
ul.articles-timeline {
list-style: none;
margin: 0;
padding-bottom: 30px;
}
ul.articles-timeline .next-article {
float: right;
margin: 0;
}
ul.articles-timeline .previous-article {
float: left;
margin: 0;
}
i.sidebar-social-links {
border-radius: 20%;
border: solid transparent 1px;
color: #A2A2A2;
font-size: 1.3em;
margin: 0;
padding: 1px;
text-align: center;
text-decoration: none;
width: 12%;
}
i.sidebar-social-links:hover {
background-color: #A2A2A2;
color: #fff;
}
i.fa-twitter:hover, i.fa-twitter-square:hover {
background-color: #00ACED;
}
i.fa-facebook:hover, i.fa-facebook-square:hover {
background-color: #3B5998;
}
i.fa-google-plus:hover, i.fa-google-plus-square:hover {
background-color: #D34836;
}
i.fa-adn:hover {
background-color: #49484D;
}
i.fa-envelope:hover {
background-color: #5E9EDA;
}
i.fa-github:hover, i.fa-github-square:hover, i.fa-github-alt:hover {
background-color: #000;
}
i.fa-flickr:hover {
background-color: #FF0084;
}
i.fa-youtube:hover, i.fa-youtube-square:hover, i.fa-youtube-play:hover {
background-color: #BC272F;
}
i.fa-linkedin:hover, i.fa-linkedin-square:hover {
background-color: #107FB9;
}
i.fa-gittip:hover {
background-color: #663300;
}
i.fa-rss:hover, i.fa-rss-square:hover {
background-color: #FF6600;
}
i.fa-bitbucket:hover, i.fa-bitbucket-square:hover {
background-color: #205081;
}
i.fa-stack-exchange:hover {
background-color: #3A7BC8;
}
ul.multi-parts-list a {
color: black;
}
ul.multi-parts-list a:hover {
text-decoration: none;
}
ul.multi-parts-list li.active-part {
font-style: italic;
}
.table-of-content .toc {
font-size: .7em;
}
.last-updated a {
color: #333;
}
.last-updated a:hover {
text-decoration: none;
}
.article-content img {
border: 2px solid #EEE;
padding: 5px;
}
p#post-share-links {
text-align: right;
}
/* Perma link in article */
h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
h4:hover > a.headerlink,
h5:hover > a.headerlink,
h6:hover > a.headerlink,
dt:hover > a.headerlink {
text-decoration: none;
visibility: visible;
}
a.headerlink {
color: grey;
padding-left: .5em;
visibility: hidden;
}
/* Categories */
.list-of-categories span {
font-size: .7em;
vertical-align: super;
}
a.list-of-categories {
text-decoration: none;
}
ul.list-articles-category {
list-style: none outside none;
margin: 0 0 0 5px;
}
ul.list-articles-category li time {
color: #8F8F8F;
display: inline-block;
font: .9em 'PT Sans', 'Helvetica Neue', Arial, Sans-Serif;
width: 7em;
}
a.category-link {
color: #333;
}
a.category-link:hover {
text-decoration: none;
}
a.list-of-categories {
font-family: 'Trebuchet MS', Trebuchet, 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, Sans-Serif;
font-size: 1.1em;
}
a.list-of-categories:hover {
background-color: #08c;
border-radius: 4px;
color: #FFF;
}
/* Archives */
ul.list-all-articles {
list-style: none;
margin: 0;
}
ul.list-all-articles li {
border-bottom: 1px dotted #000;
font-family: 'Trebuchet MS', Trebuchet, 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, Sans-Serif;
font-size: 1.1em;
padding: .3em 0;
overflow: auto;
}
ul.list-all-articles li time {
color: #AAA;
float: right;
font-family: 'PT Sans', 'Helvetica Neue', Arial, Sans-Serif;
font-size: .9em;
}
div.blog-archives h2 {
float: left;
position: relative;
margin:0;
}
div.blog-archives article, div.recent-posts article {
border-bottom: 1px dotted #AAA;
}
div.blog-archives article, div.recent-posts article {
font-size: 1.1em;
padding: .3em .2em;
position: relative;
overflow: auto;
}
div.blog-archives article {
margin-left: 6em;
}
div.blog-archives article.last-entry-of-year {
margin-bottom: 1em;
}
div.blog-archives time, div.recent-posts time {
float: right;
text-align: right;
}
div.blog-archives time, div.recent-posts time, div.recent-posts section {
color: #8F8F8F;
font: .9em 'PT Sans', 'Helvetica Neue', Arial, Sans-Serif;
}
div.recent-posts section a {
color: inherit;
padding-left: .3em;
}
div.recent-posts section a:hover {
border-bottom: 1px dashed;
text-decoration: none;
}
div.recent-posts time {
font-size: inherit;
}
div.recent-posts-time {
display: inline;
}
@media (max-width: 767px) {
div.blog-archives h2 {
float: none;
}
div.blog-archives article {
margin-left: 0;
padding-left: 0;
}
div.recent-posts time {
float: none;
}
div.recent-posts-time {
display: block;
}
ul.list-articles-category li time {
width: 100%;
}
}
/* MailChimp */
#mc-embed-signup {
font-family: inherit;
font-size: inherit;
margin: 10px 0;
}
#mc-embed-signup form {
display: block;
padding: 0;
position: relative;
text-align: left;
}
#mc-embed-signup input {
-moz-appearance: none;
-webkit-appearance: none;
border: 1px solid #999;
}
#mc-embed-signup input:focus {
border-color: #333;
}
#mc-embed-signup input.email {
display: block;
font-size: .9em;
margin: 0 4% 10px 0;
min-width: 130px;
padding: 8px 0;
text-indent: 5px;
width: 100%;
}
#mc-embed-signup input.button {
display: block;
margin: 0 0 10px 0;
min-width: 130px;
width: 100%;
}
#mc-embed-signup input[type='email'] {
height: 100%;
}
#mc-embed-signup .button {
background-color: #EEE;
border-radius: 4px;
border: 1px solid #D3D3D3;
clear: both;
color: #000;
cursor: pointer;
display: inline-block;
font-size: 1em;
font-weight: normal;
height: 32px;
line-height: 32px;
margin: 0 5px 10px 0;
padding: 0;
text-align: center;
text-decoration: none;
vertical-align: top;
white-space: nowrap;
width: auto;
}
#mc-embed-signup .button: hover {
background-color: #DFDFDF;
}
#mc-embed-signup .clear {
clear: none;
display: inline;
}
/* Index page */
#allposts {
color: #999;
float: right;
font-size: 75%;
font-weight: normal;
}
a#allposts:hover {
color: #333;
}
.proj-desc {
color: #999;
font: .9em 'PT Sans', 'Helvetica Neue', Arial, Sans-Serif;
}
/* reST specific rules*/
.literal {
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
background-color: #f7f7f9;
border-radius: 3px;
border: 1px solid #e1e1e8;
color: #d14;
font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
font-size: 12px;
padding: 2px 4px;
white-space: nowrap;
}
/* Helper CSS classes */
.amp {
font-family: 'Warnock Pro', 'Goudy Old Style', 'Palatino', 'Book Antiqua', Serif;
font-style: italic;
}
/* Use following classes to add floating images to your post */
div.figure, .article-content img {
text-align: center;
}
div.figure img {
width: 100%;
}
div.figure p.caption {
color: gray;
font-size: .6em;
margin: 0;
}
div.figure p.caption a {
border: none;
color: gray;
}
div.figure.align-right, .article-content img.align-right {
float: right;
margin-left: 1.5em;
}
div.figure.align-left, .article-content img.align-left {
float: left;
margin-right: 1.5em;
}

+ 71
- 0
theme/static/css/pygments.css View File

@ -0,0 +1,71 @@
/* Solarized Light Theme for code snippets */
.highlight, pre { background-color: #fdf6e3; color: #586e75 }
.highlight .c { color: #93a1a1 } /* Comment */
.highlight .err { color: #586e75 } /* Error */
.highlight .g { color: #586e75 } /* Generic */
.highlight .k { color: #859900 } /* Keyword */
.highlight .l { color: #586e75 } /* Literal */
.highlight .n { color: #586e75 } /* Name */
.highlight .o { color: #859900 } /* Operator */
.highlight .x { color: #cb4b16 } /* Other */
.highlight .p { color: #586e75 } /* Punctuation */
.highlight .cm { color: #93a1a1 } /* Comment.Multiline */
.highlight .cp { color: #859900 } /* Comment.Preproc */
.highlight .c1 { color: #93a1a1 } /* Comment.Single */
.highlight .cs { color: #859900 } /* Comment.Special */
.highlight .gd { color: #2aa198 } /* Generic.Deleted */
.highlight .ge { color: #586e75; font-style: italic } /* Generic.Emph */
.highlight .gr { color: #dc322f } /* Generic.Error */
.highlight .gh { color: #cb4b16 } /* Generic.Heading */
.highlight .gi { color: #859900 } /* Generic.Inserted */
.highlight .go { color: #586e75 } /* Generic.Output */
.highlight .gp { color: #586e75 } /* Generic.Prompt */
.highlight .gs { color: #586e75; font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #cb4b16 } /* Generic.Subheading */
.highlight .gt { color: #586e75 } /* Generic.Traceback */
.highlight .kc { color: #cb4b16 } /* Keyword.Constant */
.highlight .kd { color: #268bd2 } /* Keyword.Declaration */
.highlight .kn { color: #859900 } /* Keyword.Namespace */
.highlight .kp { color: #859900 } /* Keyword.Pseudo */
.highlight .kr { color: #268bd2 } /* Keyword.Reserved */
.highlight .kt { color: #dc322f } /* Keyword.Type */
.highlight .ld { color: #586e75 } /* Literal.Date */
.highlight .m { color: #2aa198 } /* Literal.Number */
.highlight .s { color: #2aa198 } /* Literal.String */
.highlight .na { color: #586e75 } /* Name.Attribute */
.highlight .nb { color: #B58900 } /* Name.Builtin */
.highlight .nc { color: #268bd2 } /* Name.Class */
.highlight .no { color: #cb4b16 } /* Name.Constant */
.highlight .nd { color: #268bd2 } /* Name.Decorator */
.highlight .ni { color: #cb4b16 } /* Name.Entity */
.highlight .ne { color: #cb4b16 } /* Name.Exception */
.highlight .nf { color: #268bd2 } /* Name.Function */
.highlight .nl { color: #586e75 } /* Name.Label */
.highlight .nn { color: #586e75 } /* Name.Namespace */
.highlight .nx { color: #586e75 } /* Name.Other */
.highlight .py { color: #586e75 } /* Name.Property */
.highlight .nt { color: #268bd2 } /* Name.Tag */
.highlight .nv { color: #268bd2 } /* Name.Variable */
.highlight .ow { color: #859900 } /* Operator.Word */
.highlight .w { color: #586e75 } /* Text.Whitespace */
.highlight .mf { color: #2aa198 } /* Literal.Number.Float */
.highlight .mh { color: #2aa198 } /* Literal.Number.Hex */
.highlight .mi { color: #2aa198 } /* Literal.Number.Integer */
.highlight .mo { color: #2aa198 } /* Literal.Number.Oct */
.highlight .sb { color: #93a1a1 } /* Literal.String.Backtick */
.highlight .sc { color: #2aa198 } /* Literal.String.Char */
.highlight .sd { color: #586e75 } /* Literal.String.Doc */
.highlight .s2 { color: #2aa198 } /* Literal.String.Double */
.highlight .se { color: #cb4b16 } /* Literal.String.Escape */
.highlight .sh { color: #586e75 } /* Literal.String.Heredoc */
.highlight .si { color: #2aa198 } /* Literal.String.Interpol */
.highlight .sx { color: #2aa198 } /* Literal.String.Other */
.highlight .sr { color: #dc322f } /* Literal.String.Regex */
.highlight .s1 { color: #2aa198 } /* Literal.String.Single */
.highlight .ss { color: #2aa198 } /* Literal.String.Symbol */
.highlight .bp { color: #268bd2 } /* Name.Builtin.Pseudo */
.highlight .vc { color: #268bd2 } /* Name.Variable.Class */
.highlight .vg { color: #268bd2 } /* Name.Variable.Global */
.highlight .vi { color: #268bd2 } /* Name.Variable.Instance */
.highlight .il { color: #2aa198 } /* Literal.Number.Integer.Long */

+ 0
- 69
theme/static/css/solarizedlight.css View File

@ -1,69 +0,0 @@
.hll { background-color: #ffffcc }
.c { color: #93a1a1; font-style: italic } /* Comment */
.err { color: #dc322f } /* Error */
.g { color: #657b83 } /* Generic */
.k { color: #859900 } /* Keyword */
.l { color: #657b83 } /* Literal */
.n { color: #586e75 } /* Name */
.o { color: #657b83 } /* Operator */
.x { color: #657b83 } /* Other */
.p { color: #657b83 } /* Punctuation */
.cm { color: #93a1a1; font-style: italic } /* Comment.Multiline */
.cp { color: #93a1a1; font-style: italic } /* Comment.Preproc */
.c1 { color: #93a1a1; font-style: italic } /* Comment.Single */
.cs { color: #93a1a1; font-style: italic } /* Comment.Special */
.gd { color: #657b83 } /* Generic.Deleted */
.ge { color: #657b83 } /* Generic.Emph */
.gr { color: #657b83 } /* Generic.Error */
.gh { color: #657b83 } /* Generic.Heading */
.gi { color: #657b83 } /* Generic.Inserted */
.go { color: #657b83 } /* Generic.Output */
.gp { color: #657b83 } /* Generic.Prompt */
.gs { color: #657b83 } /* Generic.Strong */
.gu { color: #657b83 } /* Generic.Subheading */
.gt { color: #657b83 } /* Generic.Traceback */
.kc { color: #859900 } /* Keyword.Constant */
.kd { color: #859900 } /* Keyword.Declaration */
.kn { color: #cb4b16 } /* Keyword.Namespace */
.kp { color: #cb4b16 } /* Keyword.Pseudo */
.kr { color: #859900 } /* Keyword.Reserved */
.kt { color: #859900 } /* Keyword.Type */
.ld { color: #657b83 } /* Literal.Date */
.m { color: #2aa198 } /* Literal.Number */
.s { color: #2aa198 } /* Literal.String */
.na { color: #657b83 } /* Name.Attribute */
.nb { color: #268bd2 } /* Name.Builtin */
.nc { color: #268bd2 } /* Name.Class */
.no { color: #b58900 } /* Name.Constant */
.nd { color: #cb4b16 } /* Name.Decorator */
.ni { color: #cb4b16 } /* Name.Entity */
.ne { color: #cb4b16 } /* Name.Exception */
.nf { color: #268bd2 } /* Name.Function */
.nl { color: #657b83 } /* Name.Label */
.nn { color: #b58900 } /* Name.Namespace */
.nx { color: #657b83 } /* Name.Other */
.py { color: #268bd2 } /* Name.Property */
.nt { color: #859900 } /* Name.Tag */
.nv { color: #cd4b16 } /* Name.Variable */
.ow { color: #859900 } /* Operator.Word */
.w { color: #fdf6e3 } /* Text.Whitespace */
.mf { color: #2aa198 } /* Literal.Number.Float */
.mh { color: #2aa198 } /* Literal.Number.Hex */
.mi { color: #2aa198 } /* Literal.Number.Integer */
.mo { color: #2aa198 } /* Literal.Number.Oct */
.sb { color: #2aa198 } /* Literal.String.Backtick */
.sc { color: #2aa198 } /* Literal.String.Char */
.sd { color: #2aa198 } /* Literal.String.Doc */
.s2 { color: #2aa198 } /* Literal.String.Double */
.se { color: #cb4b16 } /* Literal.String.Escape */
.sh { color: #2aa198 } /* Literal.String.Heredoc */
.si { color: #cb4b16 } /* Literal.String.Interpol */
.sx { color: #2aa198 } /* Literal.String.Other */
.sr { color: #2aa198 } /* Literal.String.Regex */
.s1 { color: #2aa198 } /* Literal.String.Single */
.ss { color: #2aa198 } /* Literal.String.Symbol */
.bp { color: #268bd2; font-weight: bold } /* Name.Builtin.Pseudo */
.vc { color: #268bd2 } /* Name.Variable.Class */
.vg { color: #268bd2 } /* Name.Variable.Global */
.vi { color: #268bd2 } /* Name.Variable.Instance */
.il { color: #2aa198 } /* Literal.Number.Integer.Long */

+ 0
- 399
theme/static/css/style.css View File

@ -1,399 +0,0 @@
body,html{
height:100%;
color: black;
}
h1, h2, h3, h4, h5, h5 {
font-family: Baskerville, Garamond, Georgia, "DejaVu Serif", "Times New Roman", Times, serif;
font-weight: normal;
}
#content-sans-footer{
min-height:100%;
}
/* site title */
.site-name {
font-family: "Monaco","Inconsolata","Andale Mono","Lucida Console","Bitstream Vera Sans Mono","Courier New",Courier,monospace;
}
/* footer */
div#footer {
margin:15px 0px;
border-top:1px solid rgba(0,0,0,0.2);
padding:2px 5px 0px 5px;
font-size:0.7em;
font-family:calibri,tahoma,arial,sans-serif;
}
ul.footer-content{
list-style:none;
padding:0px;
margin:0px;
}
ul.footer-content li {
padding-left:5px;
}
ul.footer-content li.elegant-power {
float:right;
}
ul.footer-content li.elegant-license {
float:left;
}
ul.footer-content li.elegant-subtitle{
float:left;
}
/* comment */
#comment-message {
font-family: "PT Serif", Georgia, Times, "Times New Roman", serif;
font-size: 1em;
color:gray;
}
a.disqus-comment-count {
font-family:'Trebuchet MS',Trebuchet,'Lucida Sans Unicode','Lucida Grande','Lucida Sans',Arial,sans-serif;
font-size: 0.9em;
}
div#disqus_thread {
padding-left:10px;
padding-right:10px;
}
/* Syntax Highlight */
.highlight pre {
background-color:rgb(253,246,227);
border-radius:3px 3px 3px 3px;
}
td.code .highlight pre {
border-radius:0px 3px 3px 0px;
}
td.code {
width:100%;
}
.linenodiv pre {
border-radius:3px 0px 0px 3px;
color:rgb(101,123,131);
background-color:rgb(238,232,213);
}
/* Tags */
.list-of-tags {
list-style:none;
margin:0;
padding:5px 0 ;
overflow:hidden;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.list-of-tags li {
line-height:28px;
float:left;
margin:0px;
}
.list-of-tags a {
padding: 3px 6px;
margin: 2px;
color: #222;
background:#EEE;
border-radius: 3px;
text-decoration:none;
}
.list-of-tags a span {
vertical-align: super;
font-size: 0.8em;
}
.tags-in-article li {
line-height:28px;
float:none;
}
h2.tag-title {
font-family:'Trebuchet MS',Trebuchet,'Lucida Sans Unicode','Lucida Grande','Lucida Sans',Arial,sans-serif;
}
ul.articles-in-tag li {
font-family:'Trebuchet MS',Trebuchet,'Lucida Sans Unicode','Lucida Grande','Lucida Sans',Arial,sans-serif;
font-size:1.1em;
}
/* Article */
article p a, article ol a, article div.article-content ul:not(.articles_timeline) a {
color:black;
border-bottom:thin dashed darkgray;
}
article p a:hover, article ol a:hover, article div.article-content ul:not(.articles_timeline) a:hover {
text-shadow:none;
text-decoration:none;
border-bottom:none;
}
.article-content {
text-align:justify;
/*max-width:50em;*/
font-family: "PT Serif", Georgia, Times, "Times New Roman", serif;
}
.article-content p{
font-variant: normal;
text-transform: none;
font-size: 19px;
line-height: 1.6em;
margin:20px 0px 20px 0px;
}
.article-content blockquote {
padding: 0px 0px 0px 20px;
margin: 20px 0px 20px 0px;
border-left: 5px solid rgb(100,100,100);
margin-left: 2em;
}
.article-content blockquote p {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-variant: normal;
text-transform: none;
font-size: 1.2em;
line-height: 1.7em;
}
.article-content ul {
list-style-type: circle;
font-size: 19px;
}
.article-content ol {
list-style-type: decimal;
font-size: 19px;
}
.article-content li {
margin:1px 0px 1px 20px;
list-style-position: outside;
}
.article-content dl {
list-style-type: decimal;
font-size: 1em;
list-style-position: outside;
margin:20px 0px 20px 20px;
}
.article-content dd {
margin:1px 0px 1px 20px;
padding:3px 0px 3px 0px;
}
.article-content dt {
font-size:1.3em;
}
.page_header h1 {
color:darkred;
padding: 5px 5px 15px 5px;
margin: 20px 0px 20px 0px;
border-bottom: 1px solid rgb(143, 134, 134);
font-size: 3em;
font-weight:normal;
}
.page_header h1 small {
color:rgb(143, 116, 116);
}
.page_header h1 a {
color:darkred;
}
.page_header h1 a:hover {
text-decoration:none;
}
ul.articles_timeline {
list-style:none;
margin:0px;
padding-bottom:30px;
}
ul.articles_timeline li.next_article {
float:right;
margin:0px;
}
ul.articles_timeline li.previous_article {
float:left;
margin:0px;
}
/* Categories */
.list-of-categories span {
vertical-align: super;
font-size: 0.7em;
}
a.list-of-categories {
text-decoration:none;
}
ul.list-articles-category {
list-style:none outside none;
margin:0px 0px 0px 5px;
}
ul.list-articles-category li span{
margin-right:10px;
color:#AAAAAA;
font-family:"PT Sans","Helvetica Neue",Arial,sans-serif;
font-size: 0.9em;
}
a.category-link {
color:rgb(51,51,51);
}
a.category-link:hover {
text-decoration:none;
}
a.list-of-categories {
font-size:1.1em;
font-family: 'Trebuchet MS',Trebuchet,'Lucida Sans Unicode','Lucida Grande','Lucida Sans',Arial,sans-serif;
}
a.list-of-categories:hover {
color:white;
background-color:rgb(0, 136, 204);
border-radius:4px;
}
/* Base CSS */
h2 a {
color:rgb(51,51,51);
}
h2 a:hover {
text-decoration:none;
color:rgb(51,51,51);
}
a {
color:rgb(56, 117, 215);
}
/* archives */
ul.list-all-articles {
list-style:none;
margin:0px;
}
ul.list-all-articles li {
border-bottom:1px dotted black;
padding:0.3em 0em;
font-size:1.1em;
font-family: 'Trebuchet MS',Trebuchet,'Lucida Sans Unicode','Lucida Grande','Lucida Sans',Arial,sans-serif;
}
ul.list-all-articles li time {
float:right;
color:#AAAAAA;
font-family:"PT Sans","Helvetica Neue",Arial,sans-serif;
font-size: 0.9em;
}
/* top menu */
ul.top-menu li a {
font-weight: bold;
}
/* MailChimp */
#mc_embed_signup {
font-size:inherit;
font-family:inherit;
margin:10px 0px;
}
#mc_embed_signup form {
padding:0px;
}
#mc_embed_signup input.button {
width: 100%
}
#mc_embed_signup input.email {
width:100%;
}
#mc_embed_signup .button {
font-size: 1.1em;
}
/* front page */
#allposts {
color:rgb(153, 153, 153);
font-size:75%;
float:right;
font-weight:normal;
}
.proj_desc {
color:#999999;
font-family:"PT Sans","Helvetica Neue",Arial,sans-serif;
font-size: 0.9em;
}
.amp {
font-family:"Warnock Pro", "Goudy Old Style","Palatino","Book Antiqua",serif;
font-style:italic;
}
img {
border: 1px solid #EEEEEE;
}
.table-of-content .toc {
font-size: 0.9em;
}
.last_updated a {
color: black;
border-bottom: thin dashed darkgray;
}
.last_updated a:hover {
text-shadow: none;
text-decoration: none;
border-bottom: medium none;
color: rgb(0, 85, 128);
}
a.headerlink {
visibility:hidden;
padding-left:0.5em;
color:grey;
}
h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
h4:hover > a.headerlink,
h5:hover > a.headerlink,
h6:hover > a.headerlink,
dt:hover > a.headerlink {
visibility: visible;
text-decoration:none;
}

BIN
theme/static/tipuesearch/img/expand.png View File

Before After
Width: 16  |  Height: 16  |  Size: 424 B

BIN
theme/static/tipuesearch/img/link.png View File

Before After
Width: 16  |  Height: 16  |  Size: 463 B

BIN
theme/static/tipuesearch/img/search.png View File

Before After
Width: 14  |  Height: 14  |  Size: 315 B

+ 64
- 66
theme/static/tipuesearch/tipuesearch.css View File

@ -1,136 +1,134 @@
/*
Tipue Search 3.0.1
Tipue Search 3.1
Copyright (c) 2013 Tipue
Tipue Search is released under the MIT License
http://www.tipue.com/search
*/
#tipue_search_content
{
clear: left;
max-width: 650px;
padding: 25px 0 13px 0;
margin: 0;
clear: left;
margin: 0;
max-width: 650px;
padding: 25px 0 13px 0;
}
#tipue_search_loading
{
padding-top: 60px;
background: #fff url('img/loader.gif') no-repeat left;
background: #fff url('img/loader.gif') no-repeat left;
padding-top: 60px;
}
#tipue_search_warning
{
font: 12px/1.6 'open sans', sans-serif;
color: #333;
margin: 7px 0;
color: #333;
font: 12px/1.6 'Helvetica Neue', Helvetica, 'Gill Sans', 'Gill Sans MT', Calibri, Arial, Sans-Serif;
margin: 7px 0;
}
#tipue_search_warning a
{
color: #3f72d8;
text-decoration: none;
color: #3f72d8;
text-decoration: none;
}
#tipue_search_warning a:hover
{
padding-bottom: 1px;
border-bottom: 1px solid #ccc;
border-bottom: 1px solid #ccc;
padding-bottom: 1px;
}
#tipue_search_results_count, #tipue_search_warning_head
{
color:darkred;
padding: 5px 5px 15px 5px;
margin: 20px 0px 20px 0px;
border-bottom: 1px solid rgb(143, 134, 134);
color: darkred;
font-family: Baskerville, Garamond, Georgia, "DejaVu Serif", "Times New Roman", Times, Serif;
font-size: 3em;
font-family: Baskerville, Garamond, Georgia, "DejaVu Serif", "Times New Roman", Times, serif;
font-weight: normal;
margin: 20px 0 20px 0;
padding: 5px 5px 15px 5px;
}
.tipue_search_content_title
{
font: 300 23px/1.6 'open sans', sans-serif;
font: 300 23px/1.6 'Helvetica Neue', Helveticaclass="o">, 'Gill Sans', 'Gill Sans MT', Calibri, Arial, Sans-Serif;
margin-top: 20px;
}
.tipue_search_content_title a
{
color: #3f72d8;
text-decoration: none;
color: #3f72d8;
text-decoration: none;
}
.tipue_search_content_title a:hover
{
padding-bottom: 1px;
border-bottom: 1px solid #ccc;
border-bottom: 1px solid #ccc;
padding-bottom: 1px;
}
.tipue_search_content_text
{
font-size: 1em;
line-height: 1.6em;
color: #333;
font-variant: normal;
text-transform: none;
padding: 13px 0;
font-family: Scala, Georgia,"DejaVu Serif","Times New Roman",Times,serif;
color: #333;
font-family: Scala, Georgia, "DejaVu Serif", "Times New Roman", Times, Serif;
font-size: 1em;
font-variant: normal;
line-height: 1.6em;
padding: 13px 0;
text-transform: none;
}
.tipue_search_content_text b {
color:#EF1D1D;
font-family:Garamond;
color: #EF1D1D;
font-family: Garamond;
font-size: 1.3em;
}
.tipue_search_content_loc
{
font: 300 13px/1.7 'open sans', sans-serif;
overflow: auto;
font: 300 13px/1.7 'Helvetica Neue', Helveticaclass="o">, 'Gill Sans', 'Gill Sans MT', Calibri, Arial, Sans-Serif;
overflow: auto;
}
.tipue_search_content_loc a
{
color: #555;
text-decoration: none;
color: #555;
text-decoration: none;
}
.tipue_search_content_loc a:hover
{
padding-bottom: 1px;
border-bottom: 1px solid #ccc;
border-bottom: 1px solid #ccc;
padding-bottom: 1px;
}
#tipue_search_foot
{
margin: 51px 0 21px 0;
margin: 51px 0 21px 0;
}
#tipue_search_foot_boxes
{
padding: 0;
margin: 0;
font: 12px/1 'open sans', sans-serif;
font: 12px/1 'Helvetica Neue', Helvetica, 'Gill Sans', 'Gill Sans MT', Calibri, Arial, Sans-Serif;
margin: 0;
padding: 0;
}
#tipue_search_foot_boxes li
{
list-style: none;
margin: 0;
padding: 0;
display: inline;
display: inline;
list-style: none;
margin: 0;
padding: 0;
}
#tipue_search_foot_boxes li a
{
padding: 7px 13px 8px 13px;
background-color: #f1f1f1;
border: 1px solid #dcdcdc;
border-radius: 1px;
color: #333;
margin-right: 7px;
text-decoration: none;
text-align: center;
background-color: #f1f1f1;
border-radius: 1px;
border: 1px solid #dcdcdc;
color: #333;
margin-right: 7px;
padding: 7px 13px 8px 13px;
text-align: center;
text-decoration: none;
}
#tipue_search_foot_boxes li.current
{
padding: 7px 13px 8px 13px;
background: #fff;
border: 1px solid #dcdcdc;
border-radius: 1px;
color: #333;
margin-right: 7px;
text-align: center;
background: #fff;
border-radius: 1px;
border: 1px solid #dcdcdc;
color: #333;
margin-right: 7px;
padding: 7px 13px 8px 13px;
text-align: center;
}
#tipue_search_foot_boxes li a:hover
{
border: 1px solid #ccc;
background-color: #f3f3f3;
background-color: #f3f3f3;
border: 1px solid #ccc;
}

+ 383
- 0
theme/static/tipuesearch/tipuesearch.js View File

@ -0,0 +1,383 @@
/*
Tipue Search 3.1
Copyright (c) 2013 Tipue
Tipue Search is released under the MIT License
http://www.tipue.com/search
*/
(function($) {
$.fn.tipuesearch = function(options) {
var set = $.extend( {
'show' : 7,
'newWindow' : false,
'showURL' : true,
'minimumLength' : 3,
'descriptiveWords' : 25,
'highlightTerms' : true,
'highlightEveryTerm' : false,
'mode' : 'static',
'liveDescription' : '*',
'liveContent' : '*',
'contentLocation' : 'tipuesearch/tipuesearch_content.json'
}, options);
return this.each(function() {
var tipuesearch_in = {
pages: []
};
$.ajaxSetup({
async: false
});
if (set.mode == 'live')
{
for (var i = 0; i < tipuesearch_pages.length; i++)
{
$.get(tipuesearch_pages[i], '',
function (html)
{
var cont = $(set.liveContent, html).text();
cont = cont.replace(/\s+/g, ' ');
var desc = $(set.liveDescription, html).text();
desc = desc.replace(/\s+/g, ' ');
var t_1 = html.toLowerCase().indexOf('<title>');
var t_2 = html.toLowerCase().indexOf('</title>', t_1 + 7);
if (t_1 != -1 && t_2 != -1)
{
var tit = html.slice(t_1 + 7, t_2);
}
else
{
var tit = 'No title';
}
tipuesearch_in.pages.push({
"title": tit,
"text": desc,
"tags": cont,
"loc": tipuesearch_pages[i]
});
}
);
}
}
if (set.mode == 'json')
{
$.getJSON(set.contentLocation,
function(json)
{
tipuesearch_in = $.extend({}, json);
}
);
}
if (set.mode == 'static')
{
tipuesearch_in = $.extend({}, tipuesearch);
}
var tipue_search_w = '';
if (set.newWindow)
{
tipue_search_w = ' target="_blank"';
}
function getURLP(name)
{
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20')) || null;
}
if (getURLP('q'))
{
$('#tipue_search_input').val(getURLP('q'));
getTipueSearch(0, true);
}
$('#tipue_search_button').click(function()
{
getTipueSearch(0, true);
});
$(this).keyup(function(event)
{
if(event.keyCode == '13')
{
getTipueSearch(0, true);
}
});
function getTipueSearch(start, replace)
{
$('#tipue_search_content').hide();
var out = '';
var results = '';
var show_replace = false;
var show_stop = false;
var d = $('#tipue_search_input').val().toLowerCase();
d = $.trim(d);
var d_w = d.split(' ');
d = '';
for (var i = 0; i < d_w.length; i++)
{
var a_w = true;
for (var f = 0; f < tipuesearch_stop_words.length; f++)
{
if (d_w[i] == tipuesearch_stop_words[f])
{
a_w = false;
show_stop = true;
}
}
if (a_w)
{
d = d + ' ' + d_w[i];
}
}
d = $.trim(d);
d_w = d.split(' ');
if (d.length >= set.minimumLength)
{
if (replace)
{
var d_r = d;
for (var i = 0; i < d_w.length; i++)
{
for (var f = 0; f < tipuesearch_replace.words.length; f++)
{
if (d_w[i] == tipuesearch_replace.words[f].word)
{
d = d.replace(d_w[i], tipuesearch_replace.words[f].replace_with);
show_replace = true;
}
}
}
d_w = d.split(' ');
}
var d_t = d;
for (var i = 0; i < d_w.length; i++)
{
for (var f = 0; f < tipuesearch_stem.words.length; f++)
{
if (d_w[i] == tipuesearch_stem.words[f].word)
{
d_t = d_t + ' ' + tipuesearch_stem.words[f].stem;
}
}
}
d_w = d_t.split(' ');
var c = 0;
found = new Array();
for (var i = 0; i < tipuesearch_in.pages.length; i++)
{
var score = 1000000000;
var s_t = tipuesearch_in.pages[i].text;
for (var f = 0; f < d_w.length; f++)
{
var pat = new RegExp(d_w[f], 'i');
if (tipuesearch_in.pages[i].title.search(pat) != -1)
{
score -= (200000 - i);
}
if (tipuesearch_in.pages[i].text.search(pat) != -1)
{
score -= (150000 - i);
}
if (set.highlightTerms)
{
if (set.highlightEveryTerm)
{
var patr = new RegExp('(' + d_w[f] + ')', 'gi');
}
else
{
var patr = new RegExp('(' + d_w[f] + ')', 'i');
}
s_t = s_t.replace(patr, "<b>$1</b>");
}
if (tipuesearch_in.pages[i].tags.search(pat) != -1)
{
score -= (100000 - i);
}
}
if (score < 1000000000)
{
found[c++] = score + '^' + tipuesearch_in.pages[i].title + '^' + s_t + '^' + tipuesearch_in.pages[i].loc;
}
}
if (c != 0)
{
if (show_replace == 1)
{
out += '<div id="tipue_search_warning_head">Showing results for ' + d + '</div>';
out += '<div id="tipue_search_warning">Search for <a href="javascript:void(0)" id="tipue_search_replaced">' + d_r + '</a></div>';
}
if (c == 1)
{
out += '<div id="tipue_search_results_count">1 result</div>';
}
else
{
c_c = c.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
out += '<div id="tipue_search_results_count">' + c_c + ' results</div>';
}
found.sort();
var l_o = 0;
for (var i = 0; i < found.length; i++)
{
var fo = found[i].split('^');
if (l_o >= start && l_o < set.show + start)
{
out += '<div class="tipue_search_content_title"><a href="' + fo[3] + '"' + tipue_search_w + '>' + fo[1] + '</a></div>';
var t = fo[2];
var t_d = '';
var t_w = t.split(' ');
if (t_w.length < set.descriptiveWords)
{
t_d = t;
}
else
{
for (var f = 0; f < set.descriptiveWords; f++)
{
t_d += t_w[f] + ' ';
}
}
t_d = $.trim(t_d);
if (t_d.charAt(t_d.length - 1) != '.')
{
t_d += ' ...';
}
out += '<div class="tipue_search_content_text">' + t_d + '</div>';
if (set.showURL)
{
out += '<div class="tipue_search_content_loc"><a href="' + fo[3] + '"' + tipue_search_w + '>' + fo[3] + '</a></div>';
}
}
l_o++;
}
if (c > set.show)
{
var pages = Math.ceil(c / set.show);
var page = (start / set.show);
out += '<div id="tipue_search_foot"><ul id="tipue_search_foot_boxes">';
if (start > 0)
{
out += '<li><a href="javascript:void(0)" class="tipue_search_foot_box" id="' + (start - set.show) + '_' + replace + '">&#171; Prev</a></li>';
}
if (page <= 2)
{
var p_b = pages;
if (pages > 3)
{
p_b = 3;
}
for (var f = 0; f < p_b; f++)
{
if (f == page)
{
out += '<li class="current">' + (f + 1) + '</li>';
}
else
{
out += '<li><a href="javascript:void(0)" class="tipue_search_foot_box" id="' + (f * set.show) + '_' + replace + '">' + (f + 1) + '</a></li>';
}
}
}
else
{
var p_b = pages + 2;
if (p_b > pages)
{
p_b = pages;
}
for (var f = page; f < p_b; f++)
{
if (f == page)
{
out += '<li class="current">' + (f + 1) + '</li>';
}
else
{
out += '<li><a href="javascript:void(0)" class="tipue_search_foot_box" id="' + (f * set.show) + '_' + replace + '">' + (f + 1) + '</a></li>';
}
}
}
if (page + 1 != pages)
{
out += '<li><a href="javascript:void(0)" class="tipue_search_foot_box" id="' + (start + set.show) + '_' + replace + '">Next &#187;</a></li>';
}
out += '</ul></div>';
}
}
else
{
out += '<div id="tipue_search_warning_head">Nothing found</div>';
}
}
else
{
if (show_stop)
{
out += '<div id="tipue_search_warning_head">Nothing found</div><div id="tipue_search_warning">Common words are largely ignored</div>';
}
else
{
out += '<div id="tipue_search_warning_head">Search too short</div>';
if (set.minimumLength == 1)
{
out += '<div id="tipue_search_warning">Should be one character or more</div>';
}
else
{
out += '<div id="tipue_search_warning">Should be ' + set.minimumLength + ' characters or more</div>';
}
}
}
$('#tipue_search_content').html(out);
$('#tipue_search_content').slideDown(200);
$('#tipue_search_replaced').click(function()
{
getTipueSearch(0, false);
});
$('.tipue_search_foot_box').click(function()
{
var id_v = $(this).attr('id');
var id_a = id_v.split('_');
getTipueSearch(parseInt(id_a[0]), id_a[1]);
});
}
});
};
})(jQuery);

+ 3
- 3
theme/static/tipuesearch/tipuesearch.min.js
File diff suppressed because it is too large
View File


+ 1
- 1
theme/static/tipuesearch/tipuesearch_set.js View File

@ -1,6 +1,6 @@
/*
Tipue Search 3.0.1
Tipue Search 3.1
Copyright (c) 2013 Tipue
Tipue Search is released under the MIT License
http://www.tipue.com/search

+ 4
- 4
theme/templates/404.html View File

@ -1,15 +1,15 @@
{% extends "base.html" %}
{% extends 'base.html' %}
{% block title %}
Page not found · {{ super() }}
{% endblock title %}
{% block head_description %}
Page does not exist at {{ SITENAME|striptags }} blog.
Page does not exist at {{ SITENAME|striptags|e }} blog.
{% endblock head_description %}
{% block content %}
<div class="row-fluid">
<header class="page_header span10 offset2">
<header class="page-header span10 offset2">
<h1>That page doesn't exist!</h1>
</header>
</div>
@ -22,7 +22,7 @@ Page does not exist at {{ SITENAME|striptags }} blog.
<div class="input-append">
<form action="{{ SITEURL }}/search.html" onsubmit="return validateForm(this.elements['q'].value)">
<input type="text" class="span12" placeholder="Search" name="q" id="tipue_search_input_404">
<button class="btn" type="button">Search</button>
<button class="btn" type="submit">Search</button>
</form>
</div>
</div>

+ 147
- 0
theme/templates/_includes/_defaults.html View File

@ -0,0 +1,147 @@
{# Label for the list of related posts #}
{% if not RELATED_POSTS_LABEL %}
{% set RELATED_POSTS_LABEL = 'Related Posts' %}
{% else %}
{% set RELATED_POSTS_LABEL = RELATED_POSTS_LABEL %}
{% endif %}
{# Label for the list of social profiles #}
{% if not SOCIAL_PROFILE_LABEL %}
{% set SOCIAL_PROFILE_LABEL = 'Contact' %}
{% else %}
{% set SOCIAL_PROFILE_LABEL = SOCIAL_PROFILE_LABEL %}
{% endif %}
{# Label for the Email subscription form #}
{% if not EMAIL_SUBSCRIPTION_LABEL %}
{% set EMAIL_SUBSCRIPTION_LABEL = 'Email Newsletter' %}
{% else %}
{% set EMAIL_SUBSCRIPTION_LABEL = EMAIL_SUBSCRIPTION_LABEL %}
{% endif %}
{# Placeholder text for Email field #}
{% if not EMAIL_FIELD_PLACEHOLDER %}
{% set EMAIL_FIELD_PLACEHOLDER = 'Enter your email...' %}
{% else %}
{% set EMAIL_FIELD_PLACEHOLDER = EMAIL_FIELD_PLACEHOLDER %}
{% endif %}
{# Subscribe button title #}
{% if not SUBSCRIBE_BUTTON_TITLE %}
{% set SUBSCRIBE_BUTTON_TITLE = 'Subscribe' %}
{% else %}
{% set SUBSCRIBE_BUTTON_TITLE = SUBSCRIBE_BUTTON_TITLE %}
{% endif %}
{# Count of recent articles to be shown on the home page #}
{% if not RECENT_ARTICLES_COUNT %}
{% set RECENT_ARTICLES_COUNT = 10 %}
{% else %}
{% set RECENT_ARTICLES_COUNT = RECENT_ARTICLES_COUNT %}
{% endif %}
{# Label to show before Share Post links #}
{% if not SHARE_POST_INTRO %}
{% set SHARE_POST_INTRO = 'Share on:' %}
{% else %}
{% set SHARE_POST_INTRO = SHARE_POST_INTRO %}
{% endif %}
{# Label to show before comments #}
{% if not COMMENTS_INTRO %}
{% set COMMENTS_INTRO = '' %}
{% else %}
{% set COMMENTS_INTRO = COMMENTS_INTRO %}
{% endif %}
{# Author's twitter handle. Used in Twitter card meta data #}
{% if not TWITTER_USERNAME %}
{% set TWITTER_USERNAME = '' %}
{% else %}
{% set TWITTER_USERNAME = TWITTER_USERNAME %}
{% endif %}
{# Author's Google Plus Profile URL. Used for Google Authorship #}
{% if not GOOGLE_PLUS_PROFILE_URL %}
{% set GOOGLE_PLUS_PROFILE_URL = '' %}
{% else %}
{% set GOOGLE_PLUS_PROFILE_URL = GOOGLE_PLUS_PROFILE_URL %}
{% endif %}
{# Thumbnail image to show when homepage is shared on social media. It also
serves as the default image for posts whose featured_image is not set. #}
{% if not FEATURED_IMAGE %}
{% set FEATURED_IMAGE = '' %}
{% else %}
{% set FEATURED_IMAGE = FEATURED_IMAGE %}
{% endif %}
{# License of your site that appears in the footer of every page #}
{% if not SITE_LICENSE %}
{% set SITE_LICENSE = '' %}
{% else %}
{% set SITE_LICENSE = SITE_LICENSE %}
{% endif %}
{# Description of your site. It is used in meta tags so it will appear in
search results and social media #}
{% if not SITE_DESCRIPTION %}
{% set SITE_DESCRIPTION = '' %}
{% else %}
{% set SITE_DESCRIPTION = SITE_DESCRIPTION %}
{% endif %}
{# Mailchimp form action URL. This value is mandatory, to show subscriber form
#}
{% if not MAILCHIMP_FORM_ACTION %} {% set MAILCHIMP_FORM_ACTION = '' %}
{% else %}
{% set MAILCHIMP_FORM_ACTION = MAILCHIMP_FORM_ACTION %}
{% endif %}
{# It is displayed along with the SITENAME in the footer of every page #}
{% if not SITESUBTITLE %}
{% set SITESUBTITLE = '' %}
{% else %}
{% set SITESUBTITLE = SITESUBTITLE %}
{% endif %}
{# Set it to True to display favicon and speed dial icon. Also make sure that
you have placed images in the appropriate directory and defined STATIC_PATHS
accordingly #}
{% if not USE_SHORTCUT_ICONS %}
{% set USE_SHORTCUT_ICONS = False %}
{% else %}
{% set USE_SHORTCUT_ICONS = USE_SHORTCUT_ICONS %}
{% endif %}
{# It is a dictionary with two keys: title, details. Value of each key is a
string. It is used to display About me section on the home page.
LANDING_PAGE_ABOUT = {'title': 'Talha Mansoor',
'details': '<p>I am a software developer. This blog is'
'my personal space in the cyber world!</p>'
}
#}
{% if not LANDING_PAGE_ABOUT %}
{% set LANDING_PAGE_ABOUT = '' %}
{% else %}
{% set LANDING_PAGE_ABOUT = LANDING_PAGE_ABOUT %}
{% endif %}
{# It is an array of dictionaries. Each distionary has three keys: name, url,
description.
PROJECTS = [{
'name': 'Logpad + Duration',
'url': 'https://github.com/talha131/logpad-plus-duration#logpad--duration',
'description': 'Vim plugin to emulate Windows Notepad logging feature,'
' and log duration of each entry'},
{'name': 'Elegant Theme for Pelican',
'url': 'http://oncrashreboot.com/pelican-elegant',
'description': 'A clean and distraction free theme, with search and a'
' lot more unique features, using Jinja2 and Bootstrap'}]
#}
{% if not PROJECTS %}
{% set PROJECTS = '' %}
{% else %}
{% set PROJECTS = PROJECTS %}
{% endif %}

+ 11
- 0
theme/templates/_includes/analytics.html View File

@ -0,0 +1,11 @@
{% if GOOGLE_ANALYTICS %}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{GOOGLE_ANALYTICS}}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}

theme/templates/comments.html → theme/templates/_includes/comments.html View File

@ -1,7 +1,13 @@
{% if DISQUS_SITENAME and SITEURL and article.status != "draft" %}
{% macro comments(article) %}
{% if DISQUS_SITENAME and SITEURL and article.status != 'draft' %}
<section>
{% if COMMENTS_INTRO %}
{% if article.comments_intro %}
<p id="comment-message">{{ article.comments_intro }} </p>
{% else %}
{% from '_includes/_defaults.html' import COMMENTS_INTRO with context %}
{%if COMMENTS_INTRO %}
<p id="comment-message">{{ COMMENTS_INTRO }} </p>
{% endif %}
{% endif %}
<div class="accordion" id="accordion2">
<div class="accordion-group">
@ -17,11 +23,21 @@
<div id="disqus_thread" class="accordion-body collapse">
<div class="accordion-inner">
<div class="comments">
{% include 'disqus_script_comment.html' %}
{% from '_includes/disqus_scripts.html' import disqus_comments_script with context %}
{{ disqus_comments_script(article) }}
</div>
</div>
</div>
</div>
</div>
</section>
{% endif %}
{% endif %}
{% endmacro %}
{% macro comments_script(article) %}
{% if DISQUS_SITENAME and SITEURL and article.status != 'draft' %}
{% from '_includes/disqus_scripts.html' import disqus_misc_scripts with context %}
{{ disqus_misc_scripts() }}
{% endif %}
{% endmacro %}

+ 60
- 0
theme/templates/_includes/disqus_scripts.html View File

@ -0,0 +1,60 @@
{% macro disqus_misc_scripts() %}
<script type="text/javascript">
var disqus_shortname = '{{ DISQUS_SITENAME }}';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
<script language="javascript" type="text/javascript">
function uncollapse() {
if (window.location.hash.match(/^#comment-\d+$/)) {
$('#disqus_thread').collapse('show');
}
}
</script>
<script type="text/javascript" language="JavaScript">
uncollapse();
window.onhashchange=function(){
if (window.location.hash.match(/^#comment-\d+$/))
window.location.reload(true);
}
</script>
<script>
$('#disqus_thread').on('shown', function () {
var link = document.getElementsByClassName('accordion-toggle');
var old_innerHTML = link[0].innerHTML;
$(link[0]).fadeOut(500, function() {
$(this).text('Click here to hide comments').fadeIn(500);
});
$('#disqus_thread').on('hidden', function () {
$(link[0]).fadeOut(500, function() {
$(this).text(old_innerHTML).fadeIn(500);
});
})
})
</script>
{% endmacro %}
{% macro disqus_comments_script(article) %}
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = '{{ DISQUS_SITENAME }}';
{% if article.disqus_identifier %}
var disqus_identifier = '{{ article.disqus_identifier }}';
{% else %}
var disqus_identifier = '{{ SITEURL }}/{{ article.url }}';
{% endif %}
var disqus_url = '{{ SITEURL }}/{{ article.url }}';
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
{% endmacro %}

+ 18
- 0
theme/templates/_includes/favicon_links.html View File

@ -0,0 +1,18 @@
{% from '_includes/_defaults.html' import USE_SHORTCUT_ICONS with context %}
{%if USE_SHORTCUT_ICONS == True %}
<link rel="shortcut icon" href="{{ SITEURL }}/theme/images/favicon.ico" type="image/x-icon" type="image/png" />
{# Opera Speed Dial Icon #}
{# See https://github.com/operasoftware/devopera-static-backup/blob/master/http/dev.opera.com/articles/view/opera-speed-dial-enhancements/index.html #}
<link rel="icon" href="{{ SITEURL }}/theme/images/apple-touch-icon-152x152.png" type="image/png" />
{# Safari on iOS #}
{# See https://developer.apple.com/library/ios/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html #}
<link rel="apple-touch-icon" href="{{ SITEURL }}/theme/images/apple-touch-icon.png" type="image/png" />
<link rel="apple-touch-icon" sizes="57x57" href="{{ SITEURL }}/theme/images/apple-touch-icon-57x57.png" type="image/png" />
<link rel="apple-touch-icon" sizes="72x72" href="{{ SITEURL }}/theme/images/apple-touch-icon-72x72.png" type="image/png" />
<link rel="apple-touch-icon" sizes="76x76" href="{{ SITEURL }}/theme/images/apple-touch-icon-76x76.png" type="image/png" />
<link rel="apple-touch-icon" sizes="114x114" href="{{ SITEURL }}/theme/images/apple-touch-icon-114x114.png" type="image/png" />
<link rel="apple-touch-icon" sizes="120x120" href="{{ SITEURL }}/theme/images/apple-touch-icon-120x120.png" type="image/png" />
<link rel="apple-touch-icon" sizes="144x144" href="{{ SITEURL }}/theme/images/apple-touch-icon-144x144.png" type="image/png" />
<link rel="apple-touch-icon" sizes="152x152" href="{{ SITEURL }}/theme/images/apple-touch-icon-152x152.png" type="image/png" />
{% endif %}

+ 13
- 0
theme/templates/_includes/feeds.html View File

@ -0,0 +1,13 @@
{% if FEED_ALL_ATOM %}
<link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags|e }} - Full Atom Feed" />
{% endif %}
{% if FEED_ALL_RSS %}
<link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME|striptags|e }} - Full RSS Feed" />
{% endif %}
{% if FEED_ATOM %}
<link href="{{ FEED_DOMAIN }}/{{ FEED_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags|e }} - Atom Feed" />
{% endif %}
{% if FEED_RSS %}
<link href="{{ FEED_DOMAIN }}/{{ FEED_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME|striptags|e }} - RSS Feed" />
{% endif %}

+ 13
- 0
theme/templates/_includes/feeds_categories.html View File

@ -0,0 +1,13 @@
{% if CATEGORY_FEED_ATOM %}
{% for category in categories %}
{% set cat_name = category[0].slug %}
<link href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_ATOM|format(cat_name) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags|e }} - {{category[0]}} Category Atom Feed" />
{% endfor %}
{% endif %}
{% if CATEGORY_FEED_RSS %}
{% for category in categories %}
{% set cat_name = category[0].slug %}
<link href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_RSS|format(cat_name) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags|e }} - {{category[0]}} Category RSS Feed" />
{% endfor %}
{% endif %}

+ 12
- 0
theme/templates/_includes/feeds_tags.html View File

@ -0,0 +1,12 @@
{% if TAG_FEED_ATOM %}
{% for tag in tags %}
{% set tag_name = tag[0].slug %}
<link href="{{ FEED_DOMAIN }}/{{ TAG_FEED_ATOM|format(tag_name) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags|e }} - {{tag[0]}} Tag Atom Feed" />
{% endfor %}
{% endif %}
{% if TAG_FEED_RSS %}
{% for tag in tags %}
{% set tag_name = tag[0].slug %}
<link href="{{ FEED_DOMAIN }}/{{ TAG_FEED_RSS|format(tag_name) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags|e }} - {{tag[0]}} Tag RSS Feed" />
{% endfor %}
{% endif %}

theme/templates/footer.html → theme/templates/_includes/footer.html View File

@ -1,9 +1,11 @@
<footer>
<div id="footer">
<ul class="footer-content">
{% from '_includes/_defaults.html' import SITESUBTITLE with context %}
{% if SITESUBTITLE %}
<li class="elegant-subtitle"><span class="site-name">{{ SITENAME }}</span> - {{ SITESUBTITLE }}</li>
{% endif %}
{% from '_includes/_defaults.html' import SITE_LICENSE with context %}
{% if SITE_LICENSE %}
<li class="elegant-license">{{ SITE_LICENSE }}</li>
{% endif %}

+ 16
- 0
theme/templates/_includes/last_updated.html View File

@ -0,0 +1,16 @@
{# Check which version of Pelican user is using.
If it is <=3.3 than modified is a string
If it is >3.3 than modified is a datetime object
#}
{% if article.locale_modified and article.modified %}
<h4>Last Updated</h4>
{% set day = article.modified.strftime('%d')|int %}
<time datetime="{{ article.modified.isoformat() }}">{{ article.modified.strftime('%b') }} {{ day }} {{- article.modified.strftime(', %Y') }}</time>
{% elif article.modified %}
<h4>Last Updated</h4>
<div class="last-updated">{{ article.modified }}</div>
{% endif %}

+ 16
- 0
theme/templates/_includes/mailchimp.html View File

@ -0,0 +1,16 @@
{% from '_includes/_defaults.html' import MAILCHIMP_FORM_ACTION with context %}
{% if MAILCHIMP_FORM_ACTION %}
{% from '_includes/_defaults.html' import EMAIL_SUBSCRIPTION_LABEL with context %}
{% from '_includes/_defaults.html' import EMAIL_FIELD_PLACEHOLDER with context %}
{% from '_includes/_defaults.html' import SUBSCRIBE_BUTTON_TITLE with context %}
<!-- Begin MailChimp Signup Form -->
<div id="mc-embed-signup">
<form action="{{ MAILCHIMP_FORM_ACTION }}" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<h4>{{ EMAIL_SUBSCRIPTION_LABEL }}</h4>
<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="{{ EMAIL_FIELD_PLACEHOLDER }}" required>
<div class="clear"><input type="submit" value="{{ SUBSCRIBE_BUTTON_TITLE }}" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
</form>
</div>
<!--End mc_embed_signup-->
{% endif %}

+ 4
- 0
theme/templates/_includes/minify_css.html View File

@ -0,0 +1,4 @@
{% assets filters="cssmin", output="css/style.min.css", "css/pygments.css", "tipuesearch/tipuesearch.css","css/elegant.css", "css/custom.css" %}
<link rel="stylesheet" href="{{ SITEURL }}/{{ ASSET_URL }}">
{% endassets %}

+ 4
- 0
theme/templates/_includes/minify_tipuesearch.html View File

@ -0,0 +1,4 @@
{% assets filters="rjsmin", output="tipuesearch/tipuesearch.packed.min.js", "tipuesearch/tipuesearch_set.js", "tipuesearch/tipuesearch.js" %}
<script type="text/javascript" src="{{ SITEURL }}/{{ ASSET_URL }}"></script>
{% endassets %}

+ 20
- 0
theme/templates/_includes/multi_parts.html View File

@ -0,0 +1,20 @@
{% if article.metadata.parts_articles %}
{%if SERIES_TITLE %}
<h4>{{ SERIES_TITLE }}</h4>
{% elif article.series_title %}
<h4>{{ article.series_title }}</h4>
{% else %}
<h4>{{ article.parts }}</h4>
{% endif %}
<ul class="multi-parts-list">
{% for part_article in article.metadata.parts_articles %}
<li {% if part_article == article %}class="active-part"{% endif %}>
{% if part_article != article %}
<a href="{{ SITEURL }}/{{ part_article.url }}" title="{{ part_article.title }}">Part {{loop.index}}</a>
{% else %}
Part {{loop.index}}
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}

+ 19
- 0
theme/templates/_includes/related_posts.html View File

@ -0,0 +1,19 @@
{% if article.related_posts %}
{% from '_includes/_defaults.html' import RELATED_POSTS_LABEL with context %}
<section>
<h2>{{ RELATED_POSTS_LABEL }}</h2>
<ul class="related-posts-list">
{% for related_post in article.related_posts|sort(attribute = 'date') %}
{% set v_title = related_post.title|striptags %}
{% set title = related_post.title|striptags|e %}
{%if related_post.subtitle %}
{% set title = title + ' - ' + related_post.subtitle|striptags|e %}
{% set v_title = v_title + ' ' + '<small>' + related_post.subtitle|striptags + '</small>' %}
{% endif %}
<li><a href="{{ SITEURL }}/{{ related_post.url }}" title="{{ title }}">{{ v_title }}</a></li>
{% endfor %}
</ul>
<hr />
</section>
{% endif %}

+ 22
- 0
theme/templates/_includes/share_links.html View File

@ -0,0 +1,22 @@
{% macro share_links(article) %}
{% if article.share_post and article.status != 'draft' %}
<section>
<p id="post-share-links">
{% if article.share_post_intro %}
{{ article.share_post_intro }}
{% else %}
{% from '_includes/_defaults.html' import SHARE_POST_INTRO with context %}
{{ SHARE_POST_INTRO }}
{% endif %}
<a href="{{article.share_post['twitter']}}" target="_blank" title="Share on Twitter">Twitter</a>
<a href="{{article.share_post['facebook']}}" target="_blank" title="Share on Facebook">Facebook</a>
<a href="{{article.share_post['google-plus']}}" target="_blank" title="Share on Google Plus">Google+</a>
<a href="{{article.share_post['email']}}" target="_blank" title="Share via Email">Email</a>
</p>
</section>
{% endif %}
{% endmacro %}

+ 26
- 0
theme/templates/_includes/smo_metadata.html View File

@ -0,0 +1,26 @@
{% macro smo_metadata(article) %}
<meta property="og:title" content="{{ article.title|striptags|e }} {%if article.subtitle %} - {{ article.subtitle|striptags|e }} {% endif %}"/>
<meta property="og:url" content="{{ SITEURL }}/{{ article.url }}" />
<meta property="og:description" content="{{article.summary|striptags|e}}" />
<meta property="og:site_name" content="{{ SITENAME|striptags|e }}" />
<meta property="og:article:author" content="{{ article.author }}" />
{% if article.date %}
<meta property="og:article:published_time" content="{{ article.date.isoformat() }}" />
{% endif %}
{% if article.locale_modified and article.modified %}
<meta property="" content="{{ article.modified.isoformat() }}" />
{% endif %}
<meta name="twitter:title" content="{{ article.title|striptags|e }} {%if article.subtitle %} - {{ article.subtitle|striptags|e }} {% endif %}">
<meta name="twitter:description" content="{{article.summary|striptags|e}}">
{% if article.featured_image %}
<meta property="og:image" content="{{article.featured_image}}" />
<meta name="twitter:image" content="{{article.featured_image}}" >
{% else %}
{% from '_includes/_defaults.html' import FEATURED_IMAGE with context %}
{% if FEATURED_IMAGE %}
<meta property="og:image" content="{{FEATURED_IMAGE}}" />
<meta name="twitter:image" content="{{FEATURED_IMAGE}}" >
{% endif %}
{% endif %}
{% endmacro %}

+ 33
- 0
theme/templates/_includes/social_links.html View File

@ -0,0 +1,33 @@
{% if SOCIAL %}
{% from '_includes/_defaults.html' import SOCIAL_PROFILE_LABEL with context %}
<h4>{{ SOCIAL_PROFILE_LABEL }}</h4>
{% for entry in SOCIAL %}
{% set f_entry = [] %}
{%for item in entry %}
{# first is for name #}
{% if loop.first %}
{% set link_title = 'My ' + item + ' Profile' %}
{% set link_icon = item.lower() %}
{% if item.lower() == 'email' %}
{% set link_title = 'My ' + item + ' Address' %}
{% set link_icon = 'envelope' %}
{% elif item.lower() == 'rss' %}
{% set link_title = 'Subscribe in a reader' %}
{% set link_icon = 'rss' %}
{% endif %}
{% if f_entry.insert(0, link_title) %}{% endif %}
{% if f_entry.insert(1, link_icon) %}{% endif %}
{% elif loop.index0 == 1 %}
{% set url = item|e %}
{% if f_entry.insert(2, url) %}{% endif %}
{% elif loop.index0 == 2 %}
{% set link_icon = item.lower() %}
{% if f_entry.pop(1) %}{% endif %}
{% if f_entry.insert(1, link_icon) %}{% endif %}
{% endif %}
{% endfor %}
<a href="{{f_entry[2]}}" title="{{f_entry[0]}}" class="sidebar-social-links" target="_blank">
<i class="fa fa-{{f_entry[1]}} sidebar-social-links"></i></a>
{% endfor %}
{% endif %}

+ 19
- 0
theme/templates/_includes/stat_counter.html View File

@ -0,0 +1,19 @@
{% if STAT_COUNTER_PROJECT and STAT_COUNTER_SECURITY %}
<!-- Start of StatCounter Code for Default Guide -->
<script type="text/javascript">
var sc_project={{ STAT_COUNTER_PROJECT }};
var sc_invisible=1;
var sc_security="{{ STAT_COUNTER_SECURITY }}";
var scJsHost = (("https:" == document.location.protocol) ?
"https://secure." : "http://www.");
document.write("<sc"+"ript type='text/javascript' src='" +
scJsHost+
"statcounter.com/counter/counter.js'></"+"script>");
</script>
<noscript><div class="statcounter"><a title="web analytics"
href="http://statcounter.com/" target="_blank"><img
class="statcounter"
src="http://c.statcounter.com/{{ STAT_COUNTER_PROJECT }}/0/{{ STAT_COUNTER_SECURITY }}/1/"
alt="web analytics"></a></div></noscript>
<!-- End of StatCounter Code for Default Guide -->
{% endif %}

+ 10
- 0
theme/templates/_includes/translations.html View File

@ -0,0 +1,10 @@
{% macro translations_for(article) %}
{% if article.translations %}
<p id="list-of-translations">
This post is also available in:
{% for translation in article.translations|sort(attribute = 'lang') %}
<a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a>{% if loop.index0 + 2 == loop.length %} and{% elif not loop.last %}, {% endif %}
{% endfor %}
</p>
{% endif %}
{% endmacro %}

+ 0
- 46
theme/templates/analytics.html View File

@ -1,46 +0,0 @@
{% if GOOGLE_ANALYTICS %}
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '{{GOOGLE_ANALYTICS}}']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = 'https://ssl.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
{% endif %}
{% if GAUGES %}
<script type="text/javascript">
var _gauges = _gauges || [];
(function() {
var t = document.createElement('script');
t.type = 'text/javascript';
t.async = true;
t.id = 'gauges-tracker';
t.setAttribute('data-site-id', '{{GAUGES}}');
t.src = '//secure.gaug.es/track.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(t, s);
})();
</script>
{% endif %}
{% if PIWIK_URL and PIWIK_SITE_ID %}
<script type="text/javascript">
{% if PIWIK_SSL_URL %}
var pkBaseURL = "{{ PIWIK_SSL_URL }}";
{% else %}
var pkBaseURL = "{{ PIWIK_URL }}";
{% endif %}
var _paq = _paq || [];
_paq.push(["trackPageView"]);
_paq.push(["enableLinkTracking"]);
(function() {
var u=(("https:" == document.location.protocol) ? "https" : "http")+"://"+pkBaseURL+"/";
_paq.push(["setTrackerUrl", u+"piwik.php"]);
_paq.push(["setSiteId", "{{ PIWIK_SITE_ID }}"]);
var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
g.defer=true; g.async=true; g.src=u+"tricktracktrock.js"; s.parentNode.insertBefore(g,s);
})();
</script>
{% endif %}

+ 43
- 9
theme/templates/archives.html View File

@ -1,28 +1,62 @@
{% extends "base.html" %}
{% extends 'base.html' %}
{% block title %}
All Posts · {{ super() }}
{% endblock title %}
{% block head_description %}
Full archives of {{ SITENAME|striptags }} blog.
Full archives of {{ SITENAME|striptags|e }} blog.
{% endblock head_description %}
{% block meta_tags_in_head %}
{{ super() }}
<meta property="og:title" content="All Posts · {{ SITENAME|striptags|e }}"/>
<meta name="twitter:title" content="All Posts · {{ SITENAME|striptags|e }}">
<meta property="og:url" content="{{ SITEURL }}/archives.html" />
<meta property="og:description" content="Full archives of {{ SITENAME|striptags|e }} blog" />
<meta name="twitter:description" content="Full archives of {{ SITENAME|striptags|e }} blog">
<meta property="og:site_name" content="{{ SITENAME|striptags|e }}" />
<meta property="og:article:author" content="{{ AUTHOR }}" />
{% from '_includes/_defaults.html' import FEATURED_IMAGE with context %}
{% if FEATURED_IMAGE %}
<meta property="og:image" content="{{FEATURED_IMAGE}}" />
<meta name="twitter:image" content="{{FEATURED_IMAGE}}" >
{% endif %}
{% endblock meta_tags_in_head %}
{% block content %}
<div class="row-fluid">
<header class="page_header span10 offset2">
<h1><a href="/archives.html">All Posts</a></h1>
<header class="page-header span10 offset2">
<h1><a href="{{ SITEURL }}/archives.html">All Posts</a></h1>
</header>
</div>
<div class="row-fluid">
<div class="span8 offset2">
<ul class="list-all-articles">
<div class="span10 offset2">
<div class="blog-archives">
{% set last_year = 0 %}
{% for article in dates %}
<li><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }} {%if article.subtitle %} <small> {{ article.subtitle }} </small> {% endif %} </a>
{% set year = article.date.strftime('%Y') %}
{%if last_year != year %}
<h2 id="{{year }}"><a href="#{{year}}">{{ year }}</a></h2>
{% set last_year = year %}
{% endif %}
{% set next_year = 0 %}
{% if not loop.last %}
{% set next = loop.index0 + 1 %}
{% set next_article = dates[next] %}
{% set next_year = next_article.date.strftime('%Y') %}
{% endif %}
{% if next_year != year %}
<article class="last-entry-of-year">
{% else %}
<article>
{% endif %}
<a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }} {%if article.subtitle %} <small> {{ article.subtitle }} </small> {% endif %} </a>
<time pubdate="pubdate" datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time>
</li>
</article>
{% endfor %}
</ul>
</div>
</div>
</div>

+ 44
- 81
theme/templates/article.html View File

@ -1,26 +1,30 @@
{% extends "base.html" %}
{% extends 'base.html' %}
{% import 'pcs/comments.html' as pcs with context %}
{% block title %}
{{ article.title }} {%if article.subtitle %} - {{ article.subtitle }} {% endif %} · {{ super() }}
{{ article.title|striptags|e }} {%if article.subtitle %} - {{ article.subtitle|striptags|e }} {% endif %} · {{ super() }}
{% endblock title %}
{% block head_description %}
{% if article.summary %}
{{ article.summary|striptags }}
{{ article.summary|striptags|e }}
{% endif %}
{% endblock head_description %}
{% block meta_tags_in_head %}
{{ super() }}
{% if article.tags or article.category or article.keywords %}
<meta name="keywords" content="{{ [article.tags|join(', '), article.category, article.keywords]|join(', ') }}" />
{% endif %}
{% from '_includes/smo_metadata.html' import smo_metadata with context %}
{{ smo_metadata(article) }}
{% endblock meta_tags_in_head %}
{% block content %}
<article>
<div class="row-fluid">
<header class="page_header span10 offset2">
<header class="page-header span10 offset2">
<h1><a href="{{ SITEURL }}/{{ article.url }}"> {{ article.title }} {%if article.subtitle %} <small> {{ article.subtitle }} </small> {% endif %} </a></h1>
</header>
</div>
@ -34,48 +38,46 @@
</nav>
</div>
<div class="span8 article-content">
{% else %}
{% else %}
<div class="span8 offset2 article-content">
{% endif %}
{% import '_includes/translations.html' as translations with context %}
{{ translations.translations_for(article) }}
{{ article.content }}
{% from '_includes/share_links.html' import share_links with context %}
{{ share_links(article) }}
{% from '_includes/comments.html' import comments with context %}
{{ comments(article) }}
{{ pcs.comments_quickstart("blog.victorhery", "victor-hery.com") }}
<aside>
<hr/>
{% for an_article in dates %}
{% if an_article.url == article.url %}
{% set index = loop.index0 %}
{% if not loop.first %}
{% set next_article = dates[index-1] %}
{% endif %}
{% if not loop.last %}
{% set previous_article = dates[index+1] %}
{% endif %}
{% include '_includes/related_posts.html' with context %}
{% if article.prev_article or article.next_article %}
<aside>
<nav>
<ul class="articles_timeline">
{% if previous_article %}
{% set ptitle = previous_article.title %}
{% set pv_title = ptitle %}
{%if previous_article.subtitle %}
{% set pv_title = ptitle + " " + "<small>" + previous_article.subtitle + "</small>" %}
{% set ptitle = ptitle + " - " + previous_article.subtitle %}
<ul class="articles-timeline">
{% if article.prev_article %}
{% set ptitle = article.prev_article.title|striptags|e %}
{% set pv_title = article.prev_article.title|striptags %}
{%if article.prev_article.subtitle %}
{% set pv_title = pv_title + ' ' + '<small>' + article.prev_article.subtitle|striptags + '</small>' %}
{% set ptitle = ptitle + ' - ' + article.prev_article.subtitle|e %}
{% endif %}
<li class="previous_article">« <a href="{{ SITEURL }}/{{ previous_article.url }}" title="Previous: {{ ptitle }}">{{ pv_title }}</a></li>
<li class="previous-article">« <a href="{{ SITEURL }}/{{ article.prev_article.url }}" title="Previous: {{ ptitle }}">{{ pv_title }}</a></li>
{% endif %}
{% if next_article %}
{% set ntitle = next_article.title %}
{% set nv_title = ntitle %}
{%if next_article.subtitle %}
{% set nv_title = ntitle + " " + "<small>" + next_article.subtitle + "</small>" %}
{% set ntitle = ntitle + " - " + next_article.subtitle %}
{% if article.next_article %}
{% set ntitle = article.next_article.title|striptags|e %}
{% set nv_title = article.next_article.title|striptags %}
{%if article.next_article.subtitle %}
{% set nv_title = nv_title + ' ' + '<small>' + article.next_article.subtitle|striptags + '</small>' %}
{% set ntitle = ntitle + ' - ' + article.next_article.subtitle|e %}
{% endif %}
<li class="next_article"><a href="{{ SITEURL }}/{{ next_article.url }}" title="Next: {{ ntitle }}">{{ nv_title }}</a> »</li>
<li class="next-article"><a href="{{ SITEURL }}/{{ article.next_article.url }}" title="Next: {{ ntitle }}">{{ nv_title }}</a> »</li>
{% endif %}
</ul>
</nav>
{% endif %}
{% endfor %}
</aside>
{% endif %}
</div>
<section>
<div class="span2" style="float:right;font-size:0.9em;">
@ -84,47 +86,25 @@
{% set day = article.date.strftime('%d')|int %}
<time pubdate="pubdate" datetime="{{ article.date.isoformat() }}">{{ article.date.strftime('%b') }} {{ day }} {{- article.date.strftime(', %Y') }}</time>
{% endif %}
{% if article.modified %}
<h4>Last Updated</h4>
<div class="last_updated">{{ article.modified }}</div>
{% endif %}
{% if article.category %}
{% include '_includes/last_updated.html' %}
{% include '_includes/multi_parts.html' %}
{% if article.category|trim|count > 0 %}
<h4>Category</h4>
<a class="category-link" href="/categories.html#{{ category|replace(' ', '-')|e }}-ref">{{ article.category }}</a>
<a class="category-link" href="{{ SITEURL }}/categories.html#{{ category.slug }}-ref">{{ article.category }}</a>
{% endif %}
{% if article.tags %}
{% if article.tags and article.tags[0]|trim|count > 0 %}
<h4>Tags</h4>
<ul class="list-of-tags tags-in-article">
{% for tag in article.tags|sort %}
<li><a href="/tags.html#{{ tag|replace(' ', '-')|e }}-ref">{{ tag }}
<li><a href="{{ SITEURL }}/tags.html#{{ tag.slug }}-ref">{{ tag }}
{% for aTag, tagged_articles in tags if aTag == tag %}
<span>{{ tagged_articles|count }}</span>
{% endfor %}</a></li>
{% endfor %}
</ul>
{% endif %}
{% if MAILCHIMP_FORM_ACTION %}
{% if not EMAIL_SUBSCRIPTION_LABEL %}
{% set EMAIL_SUBSCRIPTION_LABEL='Email Newsletter' %}
{% endif %}
{% if not SUBSCRIBE_BUTTON_TITLE %}
{% set SUBSCRIBE_BUTTON_TITLE='Subscribe' %}
{% endif %}
{% if not EMAIL_PLACEHOLDER %}
{% set EMAIL_PLACEHOLDER ='email address' %}
{% endif %}
<!-- Begin MailChimp Signup Form -->
<div id="mc_embed_signup">
<form action="{{ MAILCHIMP_FORM_ACTION }}" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<h4>{{ EMAIL_SUBSCRIPTION_LABEL }}</h4>
<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="{{ EMAIL_FIELD_PLACEHOLDER }}" required>
<div class="clear"><input type="submit" value="{{ SUBSCRIBE_BUTTON_TITLE }}" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
</form>
</div>
<!--End mc_embed_signup-->
{% endif %}
{% include '_includes/social_links.html' %}
{% include '_includes/mailchimp.html' %}
</div>
</section>
</div>
@ -133,23 +113,6 @@
{% block script %}
{{ super() }}
{% include 'disqus_script_count.html' %}
{% if DISQUS_SITENAME and SITEURL and article.status != "draft" %}
<script language="javascript" type="text/javascript">
function uncollapse() {
var hash_str = window.location.hash;
if (window.location.hash.match(/^#comment-\d+$/))
{
var hash_str = '#disqus_thread';
}
$(hash_str).collapse({
toggle: true
})
}
</script>
<script type="text/javascript" language="JavaScript">
uncollapse();
</script>
{% endif %}
{% from '_includes/comments.html' import comments_script with context %}
{{ comments_script(article) }}
{% endblock script %}

+ 44
- 26
theme/templates/base.html View File

@ -1,7 +1,8 @@
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% if article and article.author %}
<meta name="author" content="{{ article.author }}" />
@ -14,33 +15,46 @@
<meta name="copyright" content="{{ AUTHOR }}" />
{% endif %}
{% from '_includes/_defaults.html' import SITE_DESCRIPTION with context %}
{% if SITE_DESCRIPTION %}
<meta name="description" content="{% block head_description %}{{ SITE_DESCRIPTION }}{% endblock head_description %}" />
<meta name="description" content="{% block head_description %}{{ SITE_DESCRIPTION|e }}{% endblock head_description %}" />
{% endif %}
{% block meta_tags_in_head %}
{% from '_includes/_defaults.html' import GOOGLE_PLUS_PROFILE_URL with context %}
{% if GOOGLE_PLUS_PROFILE_URL %}
<link rel="author" href={{GOOGLE_PLUS_PROFILE_URL}} />
{% endif %}
{% from '_includes/_defaults.html' import TWITTER_USERNAME with context %}
{%if TWITTER_USERNAME %}
<meta name="twitter:creator" content="@{{TWITTER_USERNAME}}">
{% endif %}
<meta property="og:type" content="article" />
<meta name="twitter:card" content="summary">
{% endblock meta_tags_in_head %}
<title>{% block title %}{{ SITENAME|striptags }}{% endblock title %}</title>
<title>{% block title %}{{ SITENAME|striptags|e }}{% endblock title %}</title>
{% block head_links %}
<link href="https://cdn-images.mailchimp.com/embedcode/slim-081711.css" rel="stylesheet" type="text/css">
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/style.css" media="screen">
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/solarizedlight.css" media="screen">
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet">
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.1/css/font-awesome.css" rel="stylesheet">
{% if 'assets' in PLUGINS %}
{% include '_includes/minify_css.html' with context %}
{% else %}
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/pygments.css" media="screen">
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/tipuesearch/tipuesearch.css" media="screen">
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/elegant.css" media="screen">
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/custom.css" media="screen">
{% endif %}
{% endblock head_links %}
<link rel="shortcut icon" href="{{ SITEURL }}/theme/images/favicon.ico" type="image/x-icon" />
<link rel="apple-touch-icon" href="{{ SITEURL }}/theme/images/apple-touch-icon.png" />
<link rel="apple-touch-icon" sizes="57x57" href="{{ SITEURL }}/theme/images/apple-touch-icon-57x57.png" />
<link rel="apple-touch-icon" sizes="72x72" href="{{ SITEURL }}/theme/images/apple-touch-icon-72x72.png" />
<link rel="apple-touch-icon" sizes="114x114" href="{{ SITEURL }}/theme/images/apple-touch-icon-114x114.png" />
<link rel="apple-touch-icon" sizes="144x144" href="{{ SITEURL }}/theme/images/apple-touch-icon-144x144.png" />
<link rel="icon" href="{{ SITEURL }}/theme/images/apple-touch-icon-144x144.png" />
{% include 'feeds.html' %}
{% include 'analytics.html' %}
{% include '_includes/favicon_links.html' %}
{% block feed_links %}
{% include '_includes/feeds.html' %}
{% endblock feed_links %}
{% include '_includes/analytics.html' %}
</head>
<body>
<div id="content-sans-footer">
<div class="navbar navbar-static-top">
<div class="navbar-inner">
<div class="container">
<div class="container-fluid">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
@ -49,15 +63,15 @@
<a class="brand" href="{{ SITEURL }}/"><span class=site-name>{{ SITENAME }}</span></a>
<div class="nav-collapse collapse">
<ul class="nav pull-right top-menu">
<li {% if page_name == "index" %} class="active"{% endif %}><a href="{{ SITEURL }}">Home</a></li>
<li {% if page_name == 'index' %} class="active"{% endif %}><a href="{{ SITEURL }}">Home</a></li>
{% if DISPLAY_PAGES_ON_MENU %}
{% for page in pages %}
<li {% if output_file == page.url %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ page.url }}">{{ page.title }}</a></li>
{% for p in pages %}
<li {% if p == page %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li>
{% endfor %}
{% endif %}
<li {% if page_name == "categories" %} class="active"{% endif %}><a href="{{ SITEURL }}/categories.html">Categories</a></li>
<li {% if page_name == "tags" %} class="active"{% endif %}><a href="{{ SITEURL }}/tags.html">Tags</a></li>
<li {% if page_name == "archives" %} class="active"{% endif %}><a href="{{ SITEURL }}/archives.html">Archives</a></li>
<li {% if page_name == 'categories' %} class="active"{% endif %}><a href="{{ SITEURL }}/categories.html">Categories</a></li>
<li {% if page_name == 'tags' %} class="active"{% endif %}><a href="{{ SITEURL }}/tags.html">Tags</a></li>
<li {% if page_name == 'archives' %} class="active"{% endif %}><a href="{{ SITEURL }}/archives.html">Archives</a></li>
<li><form class="navbar-search" action="{{ SITEURL }}/search.html" onsubmit="return validateForm(this.elements['q'].value);"> <input type="text" class="search-query" placeholder="Search" name="q" id="tipue_search_input"></form></li>
</ul>
</div>
@ -74,11 +88,12 @@
<div class="span1"></div>
</div>
</div>
<div id="push"></div>
</div>
{% include 'footer.html' %}
{% include '_includes/footer.html' %}
{% block script %}
<script src="https://code.jquery.com/jquery.min.js"></script>
<script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/js/bootstrap.min.js"></script>
<script src="http://code.jquery.com/jquery.min.js"></script>
<script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script>
function validateForm(query)
{
@ -86,5 +101,8 @@
}
</script>
{% endblock script %}
{% include '_includes/stat_counter.html' %}
</body>
<!-- Theme: Elegant built for Pelican
License : http://oncrashreboot.com/pelican-elegant -->
</html>

+ 29
- 7
theme/templates/categories.html View File

@ -1,16 +1,38 @@
{% extends "base.html" %}
{% extends 'base.html' %}
{% block title %}
All Categories · {{ super() }}
{% endblock title %}
{% block head_description %}
All categories of the {{ SITENAME|striptags }} blog.
All categories of the {{ SITENAME|striptags|e }} blog.
{% endblock head_description %}
{% block meta_tags_in_head %}
{{ super() }}
<meta property="og:title" content="All Categories · {{ SITENAME|striptags|e }}"/>
<meta name="twitter:title" content="All Categories · {{ SITENAME|striptags|e }}">
<meta property="og:url" content="{{ SITEURL }}/categories.html" />
<meta property="og:description" content="All categories of the {{ SITENAME|striptags|e }} blog" />
<meta name="twitter:description" content="All categories of the {{ SITENAME|striptags|e }} blog">
<meta property="og:site_name" content="{{ SITENAME|striptags|e }}" />
<meta property="og:article:author" content="{{ AUTHOR }}" />
{% from '_includes/_defaults.html' import FEATURED_IMAGE with context %}
{% if FEATURED_IMAGE %}
<meta property="og:image" content="{{FEATURED_IMAGE}}" />
<meta name="twitter:image" content="{{FEATURED_IMAGE}}" >
{% endif %}
{% endblock meta_tags_in_head %}
{% block feed_links %}
{{ super() }}
{% include '_includes/feeds_categories.html' %}
{% endblock feed_links %}
{% block content %}
<div class="row-fluid">
<header class="page_header span10 offset2">
<h1><a href="/categories.html">All Categories</a></h1>
<header class="page-header span10 offset2">
<h1><a href="{{ SITEURL }}/categories.html">All Categories</a></h1>
</header>
</div>
@ -21,16 +43,16 @@ All categories of the {{ SITENAME|striptags }} blog.
{% for category, articles in categories %}
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle list-of-categories" data-toggle="collapse" data-parent="#accordion2" href="#{{ category|replace(' ', '-')|e }}-ref">
<a class="accordion-toggle list-of-categories" data-toggle="collapse" data-parent="#accordion2" href="#{{ category.slug }}-ref">
{% set num = articles|count %}
{{ category }}<span>{{ num }}</span>
</a>
</div>
<div id="{{ category|replace(' ', '-')|e }}-ref" class="accordion-body collapse">
<div id="{{ category.slug }}-ref" class="accordion-body collapse">
<div class="accordion-inner">
<ul class="list-articles-category">
{% for article in articles %}
<li><span><time pubdate="pubdate" datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time></span> <a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }} {%if article.subtitle %} <small> {{ article.subtitle }} </small> {% endif %} </a></li>
<li><time pubdate="pubdate" datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }} {%if article.subtitle %} <small> {{ article.subtitle }} </small> {% endif %} </a></li>
{% endfor %}
</ul>
</div>

+ 0
- 18
theme/templates/disqus_script_comment.html View File

@ -1,18 +0,0 @@
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = '{{ DISQUS_SITENAME }}';
{% if article.disqus_identifier %}
var disqus_identifier = '{{ article.disqus_identifier }}';
{% else %}
var disqus_identifier = '{{ SITEURL }}/{{ article.url }}';
{% endif %}
var disqus_url = '{{ SITEURL }}/{{ article.url }}';
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>

+ 0
- 12
theme/templates/disqus_script_count.html View File

@ -1,12 +0,0 @@
{% if DISQUS_SITENAME and SITEURL and article.status != "draft" %}
<script type="text/javascript">
var disqus_shortname = '{{ DISQUS_SITENAME }}';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
{% endif %}

+ 0
- 36
theme/templates/feeds.html View File

@ -1,36 +0,0 @@
{% if FEED_ALL_ATOM %}
<link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags }} - Full Atom Feed" />
{% endif %}
{% if FEED_ALL_RSS %}
<link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME|striptags }} - Full RSS Feed" />
{% endif %}
{% if FEED_ATOM %}
<link href="{{ FEED_DOMAIN }}/{{ FEED_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags }} - Atom Feed" />
{% endif %}
{% if FEED_RSS %}
<link href="{{ FEED_DOMAIN }}/{{ FEED_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME|striptags }} - RSS Feed" />
{% endif %}
{% if CATEGORY_FEED_ATOM %}
{% for category in categories %}
{% set cat_name = category[0]|replace(' ', '-') %}
<link href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_ATOM|format(cat_name) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags }} - {{category[0]}} Category Atom Feed" />
{% endfor %}
{% endif %}
{% if CATEGORY_FEED_RSS %}
{% for category in categories %}
{% set cat_name = category[0]|replace(' ', '-') %}
<link href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_RSS|format(cat_name) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags }} - {{category[0]}} Category RSS Feed" />
{% endfor %}
{% endif %}
{% if TAG_FEED_ATOM %}
{% for tag in tags %}
{% set tag_name = tag[0]|replace(' ', '-') %}
<link href="{{ FEED_DOMAIN }}/{{ TAG_FEED_ATOM|format(tag_name) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags }} - {{tag[0]}} Tag Atom Feed" />
{% endfor %}
{% endif %}
{% if TAG_FEED_RSS %}
{% for tag in tags %}
{% set tag_name = tag[0]|replace(' ', '-') %}
<link href="{{ FEED_DOMAIN }}/{{ TAG_FEED_RSS|format(tag_name) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags }} - {{tag[0]}} Tag RSS Feed" />
{% endfor %}
{% endif %}

+ 62
- 14
theme/templates/index.html View File

@ -1,20 +1,55 @@
{% extends "base.html" %}
{% extends 'base.html' %}
{% block title %}
{{ super() }}
{% endblock title %}
{% block meta_tags_in_head %}
{{ super() }}
{% from '_includes/_defaults.html' import LANDING_PAGE_ABOUT with context %}
{% if LANDING_PAGE_ABOUT and LANDING_PAGE_ABOUT.title %}
<meta property="og:title" content="{{ LANDING_PAGE_ABOUT.title|e }}"/>
<meta name="twitter:title" content="{{ LANDING_PAGE_ABOUT.title|e }}">
{% else %}
<meta property="og:title" content="{{ SITENAME|striptags|e }}"/>
<meta name="twitter:title" content="{{ SITENAME|striptags|e }}">
{% endif %}
<meta property="og:url" content="{{ SITEURL }}" />
{% from '_includes/_defaults.html' import SITE_DESCRIPTION with context %}
{% if SITE_DESCRIPTION %}
<meta property="og:description" content="{{SITE_DESCRIPTION|e}}" />
<meta name="twitter:description" content="{{SITE_DESCRIPTION|e}}">
{% endif %}
<meta property="og:site_name" content="{{ SITENAME|striptags|e }}" />
<meta property="og:article:author" content="{{ AUTHOR }}" />
{% from '_includes/_defaults.html' import FEATURED_IMAGE with context %}
{% if FEATURED_IMAGE %}
<meta property="og:image" content="{{FEATURED_IMAGE}}" />
<meta name="twitter:image" content="{{FEATURED_IMAGE}}" >
{% endif %}
{% endblock meta_tags_in_head %}
{% block content %}
{% from '_includes/_defaults.html' import LANDING_PAGE_ABOUT with context %}
{% from '_includes/_defaults.html' import PROJECTS with context %}
<div class="row-fluid">
{% if LANDING_PAGE_ABOUT and LANDING_PAGE_ABOUT.title %}
<header class="page_header span12">
{% set css_class = 'span10 offset2' %}
{% if PROJECTS and LANDING_PAGE_ABOUT %}
{% set css_class = 'span12' %}
{% endif %}
<header class="page-header {{css_class}}">
<h1><a href="{{ SITEURL }}">{{ LANDING_PAGE_ABOUT.title }}</a></h1>
</header>
{% endif %}
<div class="row-fluid">
{% if LANDING_PAGE_ABOUT and LANDING_PAGE_ABOUT.details %}
<div class="span8">
{% set css_class = 'span8 offset2' %}
{% if PROJECTS and LANDING_PAGE_ABOUT %}
{% set css_class = 'span8' %}
{% endif %}
<div class="{{css_class}}">
<header>
<h1 id="about-me">About me</h1>
</header>
@ -25,13 +60,18 @@
{% endif %}
{% if PROJECTS %}
<div class="span4">
{% set css_class = 'span8 offset2' %}
{% if PROJECTS and LANDING_PAGE_ABOUT %}
{% set css_class = 'span4' %}
{% endif %}
<div class="{{css_class}}">
<header>
<h1 id="my-projects">My Projects</h1>
</header>
{% for project in PROJECTS %}
<ul class="list-all-articles">
<li>
<a href="{{ project.url }}" title="{{ project.name }}">{{ project.name }}</a> <span class="proj_desc">{{ project.description }}</span>
<a href="{{ project.url }}" title="{{ project.name }}">{{ project.name }}</a> <span class="proj-desc">{{ project.description }}</span>
</li>
</ul>
{%endfor %}
@ -40,25 +80,33 @@
</div>
{% if articles %}
{% set css_class = 'span8 offset2' %}
{% if articles and PROJECTS and LANDING_PAGE_ABOUT %}
{% set css_class = 'span12' %}
{% endif %}
<div class="row-fluid">
<div class="span12">
<div class="{{css_class}}">
<header>
<h1 id="recent-posts">Recent Posts <a id="allposts" href="{{ SITEURL }}/archives.html">all posts</a></h1>
</header>
<div class="recent-posts">
{% for article in articles %}
{% if not RECENT_ARTICLES_COUNT %}
{% set RECENT_ARTICLES_COUNT = 10 %}
{% endif %}
{% from '_includes/_defaults.html' import RECENT_ARTICLES_COUNT with context %}
{% if loop.index0 < RECENT_ARTICLES_COUNT %}
<ul class="list-all-articles">
<li>
<a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }} {%if article.subtitle %} <small> {{ article.subtitle }} </small> {% endif %} </a>
<article>
<a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }} {%if article.subtitle %} <small> {{ article.subtitle }} </small> {% endif %} </a>
<section>
posted in
<a href="{{ SITEURL }}/categories.html#{{ article.category.slug }}-ref">{{ article.category }}</a>
<div class="recent-posts-time">
<time pubdate="pubdate" datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time>
</li>
</ul>
</div>
</section>
</article>
{% endif %}
{% endfor %}
</div>
</div>
</div>
{% endif %}
</div>

+ 14
- 35
theme/templates/page.html View File

@ -1,25 +1,29 @@
{% extends "base.html" %}
{% extends 'base.html' %}
{% block title %}
{{ page.title }} {%if page.subtitle %} - {{ page.subtitle }} {% endif %} · {{ super() }}
{{ page.title|striptags|e }} {%if page.subtitle %} - {{ page.subtitle|striptags|e }} {% endif %} · {{ super() }}
{% endblock title %}
{% block head_description %}
{% if page.summary %}
{{ page.summary|striptags }}
{{ page.summary|striptags|e }}
{% endif %}
{% endblock head_description %}
{% block meta_tags_in_head %}
{{ super() }}
{% if page.keywords %}
<meta name="keywords" content="{{ page.keywords }}" />
{% endif %}
{% from '_includes/smo_metadata.html' import smo_metadata with context %}
{{ smo_metadata(page) }}
{% endblock meta_tags_in_head %}
{% block content %}
<article>
<div class="row-fluid">
<header class="page_header span10 offset2">
<header class="page-header span10 offset2">
<h1><a href="{{ SITEURL }}/{{ page.url }}"> {{ page.title }} {%if page.subtitle %} <small> {{ page.subtitle }} </small> {% endif %} </a></h1>
</header>
</div>
@ -38,40 +42,13 @@
{% endif %}
{{ page.content }}
{% from '_includes/comments.html' import comments with context %}
{{ comments(page) }}
</div>
<section>
<div class="span2" style="float:right;font-size:0.9em;">
{% if page.date %}
<h4>Published</h4>
{% set day = page.date.strftime('%d')|int %}
<time pubdate="pubdate" datetime="{{ page.date.isoformat() }}">{{ page.date.strftime('%b') }} {{ day }} {{- page.date.strftime(', %Y') }}</time>
{% endif %}
{% if page.modified %}
<h4>Last Updated</h4>
<div class="last_updated">{{ page.modified }}</div>
{% endif %}
{% if MAILCHIMP_FORM_ACTION %}
{% if not EMAIL_SUBSCRIPTION_LABEL %}
{% set EMAIL_SUBSCRIPTION_LABEL='Email Newsletter' %}
{% endif %}
{% if not SUBSCRIBE_BUTTON_TITLE %}
{% set SUBSCRIBE_BUTTON_TITLE='Subscribe' %}
{% endif %}
{% if not EMAIL_PLACEHOLDER %}
{% set EMAIL_PLACEHOLDER ='email address' %}
{% endif %}
<!-- Begin MailChimp Signup Form -->
<div id="mc_embed_signup">
<form action="{{ MAILCHIMP_FORM_ACTION }}" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<h4>{{ EMAIL_SUBSCRIPTION_LABEL }}</h4>
<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="{{ EMAIL_FIELD_PLACEHOLDER }}" required>
<div class="clear"><input type="submit" value="{{ SUBSCRIBE_BUTTON_TITLE }}" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
</form>
</div>
<!--End mc_embed_signup-->
{% endif %}
{% include '_includes/social_links.html' %}
{% include '_includes/mailchimp.html' %}
</div>
</section>
</div>
@ -80,4 +57,6 @@
{% block script %}
{{ super() }}
{% from '_includes/comments.html' import comments_script with context %}
{{ comments_script(page) }}
{% endblock script %}

+ 25
- 11
theme/templates/search.html View File

@ -1,23 +1,37 @@
{% extends "base.html" %}
{% extends 'base.html' %}
{% block title %}
Search · {{ super() }}
{% endblock title %}
{% block head_links %}
{{ super() }}
<link href="https://fonts.googleapis.com/css?family=Lato:300,400|Open+Sans:300,400" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/tipuesearch/tipuesearch.css">
{% endblock head_links %}
{% block head_description %}
Search results for {{ SITENAME|striptags }} blog.
Search results for {{ SITENAME|striptags|e }} blog.
{% endblock head_description %}
{% block meta_tags_in_head %}
{{ super() }}
<meta property="og:title" content="Search · {{ SITENAME|striptags|e }}"/>
<meta name="twitter:title" content="Search · {{ SITENAME|striptags|e }}">
<meta property="og:url" content="{{ SITEURL }}/search.html" />
<meta property="og:description" content="Search results for {{ SITENAME|striptags|e }} blog" />
<meta name="twitter:description" content="Search results for {{ SITENAME|striptags|e }} blog">
<meta property="og:site_name" content="{{ SITENAME|striptags|e }}" />
<meta property="og:article:author" content="{{ AUTHOR }}" />
{% from '_includes/_defaults.html' import FEATURED_IMAGE with context %}
{% if FEATURED_IMAGE %}
<meta property="og:image" content="{{FEATURED_IMAGE}}" />
<meta name="twitter:image" content="{{FEATURED_IMAGE}}" >
{% endif %}
{% endblock meta_tags_in_head %}
{% block script %}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
{% if 'assets' in PLUGINS %}
{% include '_includes/minify_tipuesearch.html' with context %}
{% else %}
<script type="text/javascript" src="{{ SITEURL }}/theme/tipuesearch/tipuesearch_set.js"></script>
<script type="text/javascript" src="{{ SITEURL }}/theme/tipuesearch/tipuesearch.min.js"></script>
{% endif %}
<script>
$(document).ready(function() {
$('#tipue_search_input').tipuesearch({
@ -27,10 +41,10 @@ $(document).ready(function() {
'mode': 'live',
{% endif %}
'show': 10,
'newWindow': true,
'newWindow': false,
{# I cannot place following statements in the conditionals above because then Tipue Search fails to work. Possibly a bug in Tipue Search. #}
{% if 'tipue_search' in PLUGINS %}
'contentLocation': '{{ SITEURL }}/tipuesearch_content.json'
'contentLocation': 'tipuesearch_content.json'
{% else %}
'liveDescription': '.article-content'
{% endif %}

+ 31
- 9
theme/templates/tags.html View File

@ -1,17 +1,39 @@
{% extends "base.html" %}
{% extends 'base.html' %}
{% block title %}
All Tags · {{ super() }}
{% endblock title %}
{% block head_description %}
All tags used in the {{ SITENAME|striptags }} blog.
All tags used in the {{ SITENAME|striptags|e }} blog.
{% endblock head_description %}
{% block meta_tags_in_head %}
{{ super() }}
<meta property="og:title" content="All Tags · {{ SITENAME|striptags|e }}"/>
<meta name="twitter:title" content="All Tags · {{ SITENAME|striptags|e }}">
<meta property="og:url" content="{{ SITEURL }}/tags.html" />
<meta property="og:description" content="All tags used in the {{ SITENAME|striptags|e }} blog" />
<meta name="twitter:description" content="All tags used in the {{ SITENAME|striptags|e }} blog">
<meta property="og:site_name" content="{{ SITENAME|striptags|e }}" />
<meta property="og:article:author" content="{{ AUTHOR }}" />
{% from '_includes/_defaults.html' import FEATURED_IMAGE with context %}
{% if FEATURED_IMAGE %}
<meta property="og:image" content="{{FEATURED_IMAGE}}" />
<meta name="twitter:image" content="{{FEATURED_IMAGE}}" >
{% endif %}
{% endblock meta_tags_in_head %}
{% block feed_links %}
{{ super() }}
{% include '_includes/feeds_tags.html' %}
{% endblock feed_links %}
{% block content %}
<div class="row-fluid">
<header class="page_header span10 offset2">
<h1><a href="/tags.html">All Tags</a></h1>
<header class="page-header span10 offset2">
<h1><a href="{{ SITEURL }}/tags.html">All Tags</a></h1>
</header>
</div>
<div class="row-fluid">
@ -23,7 +45,7 @@ All tags used in the {{ SITENAME|striptags }} blog.
{% for tag, articles in tags|sort %}
<li>
{% set num = articles|count %}
<a href="/tags.html#{{ tag|replace(' ', '-')|e }}-ref">{{ tag }}<span>{{ num }}</span></a>
<a href="#{{ tag.slug }}-ref">{{ tag }}<span>{{ num }}</span></a>
</li>
{% endfor %}
</ul>
@ -33,10 +55,10 @@ All tags used in the {{ SITENAME|striptags }} blog.
<div class="row-fluid">
<div class="span8 offset2">
{% for tag, articles in tags|sort %}
<h2 id="{{ tag|replace(' ', '-')|e }}-ref" class="tag-title">{{ tag }}</h2>
<ul class="articles-in-tag">
{% for article in articles %}
<li><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }} {%if article.subtitle %} <small> {{ article.subtitle }} </small> {% endif %} </a></li>
<h2 id="{{ tag.slug }}-ref" class="tag-title">{{ tag }}</h2>
<ul class="articles-in-tag list-articles-category">
{% for article in articles|sort(reverse = true, attribute = 'date') %}
<li><time pubdate="pubdate" datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }} {%if article.subtitle %} <small> {{ article.subtitle }} </small> {% endif %} </a></li>
{% endfor %}
</ul>

Loading…
Cancel
Save