diff --git a/theme/.gitignore b/theme/.gitignore new file mode 100644 index 0000000..a3668d4 --- /dev/null +++ b/theme/.gitignore @@ -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 +*~ diff --git a/theme/CONTRIBUTING.md b/theme/CONTRIBUTING.md new file mode 100644 index 0000000..8bdc908 --- /dev/null +++ b/theme/CONTRIBUTING.md @@ -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. diff --git a/theme/RELEASE_NOTES.md b/theme/RELEASE_NOTES.md index 57547ce..a674630 100644 --- a/theme/RELEASE_NOTES.md +++ b/theme/RELEASE_NOTES.md @@ -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 `` 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 diff --git a/theme/THANKS.md b/theme/THANKS.md index 87a3be7..d20daba 100644 --- a/theme/THANKS.md +++ b/theme/THANKS.md @@ -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. diff --git a/theme/static/css/custom.css b/theme/static/css/custom.css new file mode 100644 index 0000000..18b2397 --- /dev/null +++ b/theme/static/css/custom.css @@ -0,0 +1,11 @@ +.table-of-content .toc { + font-size: 0.9em; +} + +.article-content p{ + font-size: 19px; +} + +.article-content { + max-width: none !important; +} diff --git a/theme/static/css/elegant.css b/theme/static/css/elegant.css new file mode 100644 index 0000000..992418f --- /dev/null +++ b/theme/static/css/elegant.css @@ -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; +} + diff --git a/theme/static/css/pygments.css b/theme/static/css/pygments.css new file mode 100644 index 0000000..033ba22 --- /dev/null +++ b/theme/static/css/pygments.css @@ -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 */ diff --git a/theme/static/css/solarizedlight.css b/theme/static/css/solarizedlight.css deleted file mode 100644 index baf3744..0000000 --- a/theme/static/css/solarizedlight.css +++ /dev/null @@ -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 */ diff --git a/theme/static/css/style.css b/theme/static/css/style.css deleted file mode 100644 index 171bf78..0000000 --- a/theme/static/css/style.css +++ /dev/null @@ -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; -} diff --git a/theme/static/tipuesearch/img/expand.png b/theme/static/tipuesearch/img/expand.png deleted file mode 100644 index 21bb7b0..0000000 Binary files a/theme/static/tipuesearch/img/expand.png and /dev/null differ diff --git a/theme/static/tipuesearch/img/link.png b/theme/static/tipuesearch/img/link.png deleted file mode 100644 index d4e51c5..0000000 Binary files a/theme/static/tipuesearch/img/link.png and /dev/null differ diff --git a/theme/static/tipuesearch/img/search.png b/theme/static/tipuesearch/img/search.png new file mode 100644 index 0000000..9ab0f2c Binary files /dev/null and b/theme/static/tipuesearch/img/search.png differ diff --git a/theme/static/tipuesearch/tipuesearch.css b/theme/static/tipuesearch/tipuesearch.css index 615d8a8..bb03631 100644 --- a/theme/static/tipuesearch/tipuesearch.css +++ b/theme/static/tipuesearch/tipuesearch.css @@ -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', Helvetica, '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', Helvetica, '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; } + diff --git a/theme/static/tipuesearch/tipuesearch.js b/theme/static/tipuesearch/tipuesearch.js new file mode 100644 index 0000000..01c09f2 --- /dev/null +++ b/theme/static/tipuesearch/tipuesearch.js @@ -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('', 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, "$1"); + } + 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 += '
Showing results for ' + d + '
'; + out += '
Search for ' + d_r + '
'; + } + if (c == 1) + { + out += '
1 result
'; + } + else + { + c_c = c.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); + out += '
' + c_c + ' results
'; + } + + 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 += '
' + fo[1] + '
'; + + 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 += '
' + t_d + '
'; + + if (set.showURL) + { + out += '
' + fo[3] + '
'; + } + } + l_o++; + } + + if (c > set.show) + { + var pages = Math.ceil(c / set.show); + var page = (start / set.show); + out += '
'; + } + } + else + { + out += '
Nothing found
'; + } + } + else + { + if (show_stop) + { + out += '
Nothing found
Common words are largely ignored
'; + } + else + { + out += '
Search too short
'; + if (set.minimumLength == 1) + { + out += '
Should be one character or more
'; + } + else + { + out += '
Should be ' + set.minimumLength + ' characters or more
'; + } + } + } + + $('#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); + + + + diff --git a/theme/static/tipuesearch/tipuesearch.min.js b/theme/static/tipuesearch/tipuesearch.min.js index 6458659..bfc66f1 100644 --- a/theme/static/tipuesearch/tipuesearch.min.js +++ b/theme/static/tipuesearch/tipuesearch.min.js @@ -5,8 +5,8 @@ true)});function getTipueSearch(start,replace){$("#tipue_search_content").hide() 0;i$1")}if(tipuesearch_in.pages[i].tags.search(pat)!=-1)score-=1E5-i}if(score<1E9)found[c++]=score+"^"+tipuesearch_in.pages[i].title+"^"+s_t+"^"+tipuesearch_in.pages[i].loc}if(c!= 0){if(show_replace==1){out+='
Showing results for '+d+"
";out+='
Search for '+d_r+"
"}if(c==1)out+='
1 result
';else{c_c=c.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",");out+='
'+c_c+" results
"}found.sort();var l_o=0;for(var i=0;i= -start&&l_o"+fo[1]+"";var t=fo[2];var t_d="";var t_w=t.split(" ");if(t_w.length";if(set.showURL){t_url=fo[3];if(t_url.length>45)t_url=fo[3].substr(0,45)+" ...";out+='"}}l_o++}if(c>set.show){var pages=Math.ceil(c/set.show);var page=start/set.show;out+='
    ';if(start>0)out+='
  • Prev
  • ';if(page<=2){var p_b=pages;if(pages>3)p_b=3;for(var f=0;f'+(f+1)+"";else out+='
  • '+(f+1)+"
  • "}else{var p_b=page+3;if(p_b>pages)p_b=pages;for(var f=page;f'+(f+1)+"";else out+='
  • '+(f+1)+"
  • "}if(page+1!=pages)out+='
  • Next
  • ';out+="
"}}else out+='
Nothing found
'}else if(show_stop)out+= +start&&l_o"+fo[1]+"";var t=fo[2];var t_d="";var t_w=t.split(" ");if(t_w.length";if(set.showURL)out+='"}l_o++}if(c>set.show){var pages=Math.ceil(c/set.show);var page=start/set.show;out+='
    ';if(start>0)out+='
  • « Prev
  • ';if(page<=2){var p_b=pages;if(pages>3)p_b=3;for(var f=0;f'+(f+1)+"";else out+='
  • '+(f+1)+"
  • "}else{var p_b=pages+2;if(p_b>pages)p_b=pages;for(var f=page;f'+(f+1)+"";else out+='
  • '+(f+1)+"
  • "}if(page+1!=pages)out+='
  • Next »
  • ';out+="
"}}else out+='
Nothing found
'}else if(show_stop)out+= '
Nothing found
Common words are largely ignored
';else{out+='
Search too short
';if(set.minimumLength==1)out+='
Should be one character or more
';else out+='
Should be '+set.minimumLength+" characters or more
"}$("#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); diff --git a/theme/static/tipuesearch/tipuesearch_set.js b/theme/static/tipuesearch/tipuesearch_set.js index 1d9242b..077d80d 100644 --- a/theme/static/tipuesearch/tipuesearch_set.js +++ b/theme/static/tipuesearch/tipuesearch_set.js @@ -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 diff --git a/theme/templates/404.html b/theme/templates/404.html index 5d36dc4..97bc0df 100644 --- a/theme/templates/404.html +++ b/theme/templates/404.html @@ -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 %}
-
@@ -22,7 +22,7 @@ Page does not exist at {{ SITENAME|striptags }} blog.
- +
diff --git a/theme/templates/_includes/_defaults.html b/theme/templates/_includes/_defaults.html new file mode 100644 index 0000000..25939ee --- /dev/null +++ b/theme/templates/_includes/_defaults.html @@ -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': '

I am a software developer. This blog is' + 'my personal space in the cyber world!

' + } +#} +{% 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 %} + diff --git a/theme/templates/_includes/analytics.html b/theme/templates/_includes/analytics.html new file mode 100644 index 0000000..4ab2503 --- /dev/null +++ b/theme/templates/_includes/analytics.html @@ -0,0 +1,11 @@ +{% if GOOGLE_ANALYTICS %} + +{% endif %} + diff --git a/theme/templates/comments.html b/theme/templates/_includes/comments.html similarity index 50% rename from theme/templates/comments.html rename to theme/templates/_includes/comments.html index db5add2..e90effc 100644 --- a/theme/templates/comments.html +++ b/theme/templates/_includes/comments.html @@ -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' %}
-{% if COMMENTS_INTRO %} +{% if article.comments_intro %} +

{{ article.comments_intro }}

+{% else %} + {% from '_includes/_defaults.html' import COMMENTS_INTRO with context %} + {%if COMMENTS_INTRO %}

{{ COMMENTS_INTRO }}

+ {% endif %} {% endif %}
@@ -17,11 +23,21 @@
- {% include 'disqus_script_comment.html' %} + {% from '_includes/disqus_scripts.html' import disqus_comments_script with context %} + {{ disqus_comments_script(article) }}
-{% 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 %} + diff --git a/theme/templates/_includes/disqus_scripts.html b/theme/templates/_includes/disqus_scripts.html new file mode 100644 index 0000000..3127cc4 --- /dev/null +++ b/theme/templates/_includes/disqus_scripts.html @@ -0,0 +1,60 @@ +{% macro disqus_misc_scripts() %} + + + + +{% endmacro %} + +{% macro disqus_comments_script(article) %} +
+ + +comments powered by Disqus +{% endmacro %} diff --git a/theme/templates/_includes/favicon_links.html b/theme/templates/_includes/favicon_links.html new file mode 100644 index 0000000..effc411 --- /dev/null +++ b/theme/templates/_includes/favicon_links.html @@ -0,0 +1,18 @@ +{% from '_includes/_defaults.html' import USE_SHORTCUT_ICONS with context %} +{%if USE_SHORTCUT_ICONS == True %} + + {# 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 #} + + {# Safari on iOS #} + {# See https://developer.apple.com/library/ios/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html #} + + + + + + + + +{% endif %} + diff --git a/theme/templates/_includes/feeds.html b/theme/templates/_includes/feeds.html new file mode 100644 index 0000000..72c1f67 --- /dev/null +++ b/theme/templates/_includes/feeds.html @@ -0,0 +1,13 @@ +{% if FEED_ALL_ATOM %} + +{% endif %} +{% if FEED_ALL_RSS %} + +{% endif %} +{% if FEED_ATOM %} + +{% endif %} +{% if FEED_RSS %} + +{% endif %} + diff --git a/theme/templates/_includes/feeds_categories.html b/theme/templates/_includes/feeds_categories.html new file mode 100644 index 0000000..287b5e7 --- /dev/null +++ b/theme/templates/_includes/feeds_categories.html @@ -0,0 +1,13 @@ +{% if CATEGORY_FEED_ATOM %} + {% for category in categories %} + {% set cat_name = category[0].slug %} + + {% endfor %} +{% endif %} +{% if CATEGORY_FEED_RSS %} + {% for category in categories %} + {% set cat_name = category[0].slug %} + + {% endfor %} +{% endif %} + diff --git a/theme/templates/_includes/feeds_tags.html b/theme/templates/_includes/feeds_tags.html new file mode 100644 index 0000000..4c6ab2a --- /dev/null +++ b/theme/templates/_includes/feeds_tags.html @@ -0,0 +1,12 @@ +{% if TAG_FEED_ATOM %} + {% for tag in tags %} + {% set tag_name = tag[0].slug %} + + {% endfor %} +{% endif %} +{% if TAG_FEED_RSS %} + {% for tag in tags %} + {% set tag_name = tag[0].slug %} + + {% endfor %} +{% endif %} diff --git a/theme/templates/footer.html b/theme/templates/_includes/footer.html similarity index 80% rename from theme/templates/footer.html rename to theme/templates/_includes/footer.html index a683dde..4c36d5c 100644 --- a/theme/templates/footer.html +++ b/theme/templates/_includes/footer.html @@ -1,9 +1,11 @@