[Groonga-commit] droonga/droonga.org at b3a5b3a [gh-pages] Show social widgets in news posts view

Zurück zum Archiv-Index

Kouhei Sutou null+****@clear*****
Mon Dec 30 16:28:20 JST 2013


Kouhei Sutou	2013-12-30 16:28:20 +0900 (Mon, 30 Dec 2013)

  New Revision: b3a5b3a8268ebdbb7b89695bae37a205bdd31d44
  https://github.com/droonga/droonga.org/commit/b3a5b3a8268ebdbb7b89695bae37a205bdd31d44

  Message:
    Show social widgets in news posts view

  Added files:
    _includes/social_widgets.html
  Modified files:
    _includes/news_item.html
    _layouts/news_item.html
    css/droonga.css
    news/index.md

  Modified: _includes/news_item.html (+2 -0)
===================================================================
--- _includes/news_item.html    2013-12-30 16:14:11 +0900 (e2e3d33)
+++ _includes/news_item.html    2013-12-30 16:28:20 +0900 (884b16f)
@@ -9,4 +9,6 @@
     {{ post.date | date: '%Y-%m-%d' }}
   </div>
   {{ post.content }}
+
+  {% include social_widgets.html target=post %}
 </article>

  Added: _includes/social_widgets.html (+12 -0) 100644
===================================================================
--- /dev/null
+++ _includes/social_widgets.html    2013-12-30 16:28:20 +0900 (8b544d8)
@@ -0,0 +1,12 @@
+<div class="social-widgets">
+  <div class="inline-widgets">
+    <g:plusone href="{{ site.url }}{{ include.target.url }}" size="medium"></g:plusone>
+    <a href="http://twitter.com/share"
+       class="twitter-share-button"
+       data-lang="en"
+       data-via="groonga"
+       data-url="{{ site.url }}{{ include.target.url }}"
+       data-text="{{ include.target.title | escape }} ({{ include.target.date | date: '%Y-%m-%d' }})">Tweet</a>
+  </div>
+  <iframe src="//www.facebook.com/plugins/like.php?href={{ site.url }}{{ include.target.url | uri_escape }}&amp;layout=standard&amp;action=like&amp;show_faces=false&amp;share=false&amp;height=20&amp;appId" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:20px; width:100%" allowTransparency="true"></iframe>
+</div>

  Modified: _layouts/news_item.html (+1 -12)
===================================================================
--- _layouts/news_item.html    2013-12-30 16:14:11 +0900 (9d3daa9)
+++ _layouts/news_item.html    2013-12-30 16:28:20 +0900 (af38a5f)
@@ -11,16 +11,5 @@ layout: news
 
   {{ content }}
 
-  <div class="social-widgets">
-    <div class="inline-widgets">
-      <g:plusone href="{{ site.url }}{{ page.url }}" size="medium"></g:plusone>
-      <a href="http://twitter.com/share"
-         class="twitter-share-button"
-         data-lang="en"
-         data-via="groonga"
-         data-url="{{ site.url }}{{ page.url | cgi_escape }}"
-         data-text="{{ page.title | escape }} ({{ page.date | date: '%Y-%m-%d' }})">Tweet</a>
-    </div>
-    <iframe src="//www.facebook.com/plugins/like.php?href={{ site.url }}{{ page.url | uri_escape }}&amp;layout=standard&amp;action=like&amp;show_faces=false&amp;share=false&amp;height=20&amp;appId" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:20px; width:100%" allowTransparency="true"></iframe>
-  </div>
+  {% include social_widgets.html target=page %}
 </article>

  Modified: css/droonga.css (+5 -0)
===================================================================
--- css/droonga.css    2013-12-30 16:14:11 +0900 (5e3ea3a)
+++ css/droonga.css    2013-12-30 16:28:20 +0900 (6bffe67)
@@ -1 +1,6 @@
 body { padding-top: 70px; }
+
+div.social-widgets {
+  margin-top: 1em;
+  margin-bottom: 1em;
+}

  Modified: news/index.md (+1 -0)
===================================================================
--- news/index.md    2013-12-30 16:14:11 +0900 (97eb441)
+++ news/index.md    2013-12-30 16:28:20 +0900 (28ee720)
@@ -1,6 +1,7 @@
 ---
 title: News
 layout: default
+use_social_widgets: true
 ---
 
 {% for post in site.posts %}
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Zurück zum Archiv-Index