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 `
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' %}{{ article.comments_intro }}
+{% else %} + {% from '_includes/_defaults.html' import COMMENTS_INTRO with context %} + {%if COMMENTS_INTRO %}{{ COMMENTS_INTRO }}
+ {% endif %} {% endif %}