From 35a598df038259af2dc2f07c828b44d7dd1281b5 Mon Sep 17 00:00:00 2001 From: Frederic Hemberger Date: Mon, 17 Oct 2011 20:14:29 +0200 Subject: [PATCH] Adds support for Google+ widget, supports author information in search results, fixes #203 --- .themes/classic/sass/partials/_sidebar.scss | 1 + .../sass/partials/sidebar/_googleplus.scss | 26 +++++++++++++++++++ .../source/_includes/asides/googleplus.html | 11 ++++++++ _config.yml | 9 +++++-- 4 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 .themes/classic/sass/partials/sidebar/_googleplus.scss create mode 100644 .themes/classic/source/_includes/asides/googleplus.html diff --git a/.themes/classic/sass/partials/_sidebar.scss b/.themes/classic/sass/partials/_sidebar.scss index ac790e0..eec540b 100644 --- a/.themes/classic/sass/partials/_sidebar.scss +++ b/.themes/classic/sass/partials/_sidebar.scss @@ -1,4 +1,5 @@ @import "sidebar/base"; @import "sidebar/twitter"; +@import "sidebar/googleplus"; @import "sidebar/pinboard"; @import "sidebar/delicious"; diff --git a/.themes/classic/sass/partials/sidebar/_googleplus.scss b/.themes/classic/sass/partials/sidebar/_googleplus.scss new file mode 100644 index 0000000..c2a693e --- /dev/null +++ b/.themes/classic/sass/partials/sidebar/_googleplus.scss @@ -0,0 +1,26 @@ +.googleplus { + h1 { + -moz-box-shadow: none !important; + -webkit-box-shadow: none !important; + -o-box-shadow: none !important; + box-shadow: none !important; + border-bottom: 0px none !important; + } + a { + text-decoration: none; + white-space: normal !important; + line-height: 32px; + + img { + float: left; + margin-right: 0.5em; + border: 0 none; + } + } +} + +.googleplus-hidden { + position: absolute; + top: -1000em; + left: -1000em; +} diff --git a/.themes/classic/source/_includes/asides/googleplus.html b/.themes/classic/source/_includes/asides/googleplus.html new file mode 100644 index 0000000..00a0aa8 --- /dev/null +++ b/.themes/classic/source/_includes/asides/googleplus.html @@ -0,0 +1,11 @@ +{% if site.googleplus_user %} +
+

+ + + Google+ + +

+
+{% endif %} + diff --git a/_config.yml b/_config.yml index f90307a..9ab8361 100644 --- a/_config.yml +++ b/_config.yml @@ -38,7 +38,7 @@ titlecase: true # Converts page and post titles to tilecase # list each of the sidebar modules you want to include, in the order you want them to appear. # To add custom asides, create files in /source/_includes/custom/asides/ and add them to the list like 'custom/asides/custom_aside_name.html' -default_asides: [asides/recent_posts.html, asides/github.html, asides/twitter.html, asides/delicious.html, asides/pinboard.html] +default_asides: [asides/recent_posts.html, asides/github.html, asides/twitter.html, asides/delicious.html, asides/pinboard.html, asides/googleplus.html] # Each layout uses the default asides, but they can have their own asides instead. Simply uncomment the lines below # and add an array with the asides you want to use. @@ -64,10 +64,15 @@ twitter_follow_button: true twitter_show_follower_count: false twitter_tweet_button: true -# Google Plus +# Google +1 google_plus_one: true google_plus_one_size: medium +# Google Plus Profile +# Hidden: No visible button, just add author information to search results +googleplus_user: +googleplus_hidden: false + # Pinboard pinboard_user: pinboard_count: 3