From d86e9480e16ab0a8ece417c540a9a06a17872a4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20=C2=BBmo=2E=C2=AB=20Sauer?= Date: Wed, 25 Feb 2015 23:39:50 +0100 Subject: [PATCH] now with improve content include --- _config.yml | 4 ++++ _data/language.yml | 5 ++++- _includes/improve_content.html | 19 +++++++++++++++++++ _sass/_06_typography.scss | 10 ++++------ pages/changelog.md | 3 ++- pages/documentation.md | 9 +++++++++ 6 files changed, 42 insertions(+), 8 deletions(-) create mode 100644 _includes/improve_content.html diff --git a/_config.yml b/_config.yml index 6aaf422..c33495d 100644 --- a/_config.yml +++ b/_config.yml @@ -24,6 +24,10 @@ description: "»Feeling Responsive« is a responsive theme for Jekyll based on t url: "http://phlow.github.io/feeling-responsive" baseurl: "" +# This is for the editing function in _/includes/improve_content.html +# Leave it empty if your site is not on GitHub/GitHub Pages +improve_content: https://github.com/Phlow/feeling-responsive/edit/gh-pages + # This URL points directly to the images directory making # things easier to link to images in posts and templates. It needs a slash. # diff --git a/_data/language.yml b/_data/language.yml index c553d13..acfe882 100644 --- a/_data/language.yml +++ b/_data/language.yml @@ -17,4 +17,7 @@ if_you_are_not_redirected_automatically: "If you are not redirected automaticall click_here: "click here" next_post_in: "Next Post in" previous_post_in: "Previous Post in" -breadcrumb_start: "Start" \ No newline at end of file +breadcrumb_start: "Start" +edit: "Edit" +this_content_is_open_source: "This content is open source." +help_improve_it: "Help improve it" \ No newline at end of file diff --git a/_includes/improve_content.html b/_includes/improve_content.html new file mode 100644 index 0000000..586ca48 --- /dev/null +++ b/_includes/improve_content.html @@ -0,0 +1,19 @@ +{% comment %} +* +* If your content is on Jekyll you can use this include +* to automatically generate a »Edit on GitHub Link« to +* give people a possibility to improve your content. +* +{% endcomment %} +
+
+
+ {{ site.data.language.edit }} +

+ {{ site.data.language.this_content_is_open_source }} + {{ site.data.language.help_improve_it }}.

+
+
+
+ + diff --git a/_sass/_06_typography.scss b/_sass/_06_typography.scss index e84839d..69073ce 100644 --- a/_sass/_06_typography.scss +++ b/_sass/_06_typography.scss @@ -8,24 +8,22 @@ ------------------------------------------------------------------- */ a, -a:link { - color: $ci-1; -} +a:link {} a:visited { border-bottom: $grey-2; } a:hover { - color: darken( $ci-1, 10% ) ; + color: darken( $ci-1, 10% ); } a:focus { - color: lighten( $ci-1, 20% ) ; + color: lighten( $ci-1, 20% ); } a:active { - color: darken( $ci-1, 20% ) ; + color: darken( $ci-1, 20% ); } diff --git a/pages/changelog.md b/pages/changelog.md index 67dd331..3489390 100644 --- a/pages/changelog.md +++ b/pages/changelog.md @@ -8,7 +8,8 @@ header: permalink: "/changelog/" --- 2015-02-25 // Version 0.99.1 -: Added support for Google Analtics. Added `_include/next-previous-post-in-category.html` to generate links from one post in a category to another post in that same category. Example at the bottom of [Grid & Colors]({{ site.url }}/design/grid/#bottom). Added `noindex`-variable for search engine optimization ([read more](https://support.google.com/webmasters/answer/93710?hl=en)). Changed code for breadcrumb. +: Added support for Google Analtics. Added `_include/next-previous-post-in-category.html` to generate links from one post in a category to another post in that same category. Example at the bottom of [Grid & Colors]({{ site.url }}/design/grid/#bottom). Added `noindex`-variable for search engine optimization ([read more](https://support.google.com/webmasters/answer/93710?hl=en)). Changed code for breadcrumb. Added [Improve-Content-Include]({{ site.url }}/documentation/#improvecontenthtml). + 2015-02-19 // Version 0.99 : Yes! Now *Feeling Responsive* uses the built-in sass-support by Jekyll. Open `_sass` and dig deeper into customizing this theme using your colors, typography and so on... diff --git a/pages/documentation.md b/pages/documentation.md index f25d3f5..63ecfe4 100644 --- a/pages/documentation.md +++ b/pages/documentation.md @@ -20,6 +20,7 @@ header:
+{% include improve_content.html %} ## Different Page/Posts Formats {#formats} @@ -240,6 +241,13 @@ This include creates a next/previous link to a post of the same category using t ~~~ +### improve_content.html + +If your content is on Jekyll you can use this include to automatically generate a »Edit on GitHub Link« to give people a possibility to improve your content. Got the idea from [Ben Balters Blog](http://ben.balter.com/). + +~~~ +{% raw %}{% include improve_content.html %}{% endraw %} +~~~ [Up to table of contents](#toc) @@ -264,6 +272,7 @@ I only added one other javascript-module: [`backstretch`][3] by Scott Robbin. Th /foundation/js/jquery.backstretch.js' ~~~ +{% include improve_content.html %}