diff --git a/_config.yml b/_config.yml index 6f01e31..704fa6e 100644 --- a/_config.yml +++ b/_config.yml @@ -17,6 +17,8 @@ contact: anna.alberts@okfn.de googleanalytics: UA-48682838-7 +twitter_feed: 730706209104384000 + # Build settings markdown: kramdown diff --git a/_includes/aside.html b/_includes/aside.html index 722d2a1..e830f10 100644 --- a/_includes/aside.html +++ b/_includes/aside.html @@ -16,3 +16,10 @@

News

{% endfor %} {% endif %} + +{% if site.twitter_feed %} +
+

Twitter Feed

+
+
+{% endif %} diff --git a/_layouts/default.html b/_layouts/default.html index 91c4c28..c396629 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -6,7 +6,7 @@ - + {% include header.html %}
{{ content }} @@ -24,7 +24,7 @@
  • {{ subcategory.subtitle }}
  • {% endfor %} - + {% else %}
  • {{ item.title }} @@ -34,12 +34,29 @@ {% include social-links.html %} - + + {% if page.aside == true and site.twitter_feed %} + + + {% endif %} + {% if site.googleanalytics %} {% endif %} - \ No newline at end of file + diff --git a/_layouts/home.html b/_layouts/home.html index 35d6434..665ed28 100644 --- a/_layouts/home.html +++ b/_layouts/home.html @@ -1,6 +1,5 @@ --- layout: default -aside: true --- {% capture future_events %}{% for event in site.data.events %}{% if event.status == 'future' %}

    {{ event.title }}

    {{ event.description | truncate: 270 | markdownify }}Join us!@@{% endif %}{% endfor %}{% endcapture %} {% assign future_e = future_events | split:"@@" %} @@ -8,7 +7,6 @@ {% capture featured_events %}{% for event in site.data.events %}{% if event.status == 'featured' %}

    {{ event.title }}

    {{ event.description | truncate: 270 | markdownify }}Join us!@@{% endif %}{% endfor %}{% endcapture %} {% assign featured_e = featured_events | split:"@@" %} -
    -
    +
    - {% if layout.aside == true %} + {% if page.aside == true %} diff --git a/_sass/_global.scss b/_sass/_global.scss index c8b7ef9..dfcf0b1 100644 --- a/_sass/_global.scss +++ b/_sass/_global.scss @@ -57,7 +57,7 @@ picture { &.news-feed { div { padding-bottom: $small-spacing; - border-bottom: dotted 1px rgba($medium-gray, 0.5); + border-bottom: dotted 1px rgba($medium-gray, 0.3); h5 { font-size: 1.1em; @@ -73,9 +73,79 @@ picture { display: block; line-height: 1.3; margin-top: $small-spacing; + font-size: 0.8em; } } } + + &.twitter-feed { + font-size: 0.8em; + + li { + border-bottom: dotted 1px rgba($medium-gray, 0.3); + margin-bottom: $small-spacing/2; + padding-top: $small-spacing/2; + padding-left: 40px; + } + + .user { + + a { + color: inherit; + font-weight: bold; + + span { + &[data-scribe="element:screen_name"] { + color: rgba($medium-gray, 0.5); + font-weight: normal; + } + } + } + + img { + width: 32px; + margin-left: -40px; + float: left; + border-radius: 3px; + display: block; + margin-top: 3px; + } + } + + .tweet { + margin-bottom: $small-spacing/2; + word-break: break-word; + } + + .interact { + a { + display: inline-block; + @include hide-text; + width: 16px; + height: 16px; + background-size: auto 14px; + background-repeat: no-repeat; + background-position: center; + margin-right: $small-spacing; + opacity: 0.4; + + &.twitter_reply_icon { + background-image: url('../img/reply.svg'); + } + &.twitter_retweet_icon { + background-image: url('../img/retweet.svg'); + } + &.twitter_fav_icon { + background-image: url('../img/heart.svg'); + } + + &:hover { + opacity: 0.5; + } + } + } + + } } } } diff --git a/img/heart.svg b/img/heart.svg new file mode 100644 index 0000000..9c57e7b --- /dev/null +++ b/img/heart.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/img/reply.svg b/img/reply.svg new file mode 100644 index 0000000..dd6a26b --- /dev/null +++ b/img/reply.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/img/retweet.svg b/img/retweet.svg new file mode 100644 index 0000000..e9eca1e --- /dev/null +++ b/img/retweet.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/index.html b/index.html index 6a9c421..d696b8e 100644 --- a/index.html +++ b/index.html @@ -1,6 +1,7 @@ --- layout: home video: dJtx97kORFU +aside: true --- ## About the project diff --git a/js/vendor/twitterFetcher_min.js b/js/vendor/twitterFetcher_min.js new file mode 100644 index 0000000..3ecee86 --- /dev/null +++ b/js/vendor/twitterFetcher_min.js @@ -0,0 +1,23 @@ +/********************************************************************* +* #### Twitter Post Fetcher v16.0.2 #### +* Coded by Jason Mayes 2015. A present to all the developers out there. +* www.jasonmayes.com +* Please keep this disclaimer with my code if you use it. Thanks. :-) +* Got feedback or questions, ask here: +* http://www.jasonmayes.com/projects/twitterApi/ +* Github: https://github.com/jasonmayes/Twitter-Post-Fetcher +* Updates will be posted to this site. +*********************************************************************/ +(function(E,q){"function"===typeof define&&define.amd?define([],q):"object"===typeof exports?module.exports=q():q()})(this,function(){function E(a){if(null===t){for(var f=a.length,b=0,k=document.getElementById(F),g="
      ";b"+a[b]+"",b++;k.innerHTML=g+"
    "}else t(a)}function q(a){return a.replace(/]*>(.*?)<\/b>/gi,function(a,b){return b}).replace(/class="(?!(tco-hidden|tco-display|tco-ellipsis))+.*?"|data-query-source=".*?"|dir=".*?"|rel=".*?"/gi,"")}function G(a){a=a.getElementsByTagName("a"); +for(var f=a.length-1;0<=f;f--)a[f].setAttribute("target","_blank")}function l(a,f){for(var b=[],k=new RegExp("(^| )"+f+"( |$)"),g=a.getElementsByTagName("*"),h=0,d=g.length;h]*>)|(]*>)/g,"");u||(a.body=a.body.replace(/(]*>|(]*>))/g, +""));n||(a.body=a.body.replace(/(]*>)/g,""));var b=document.createElement("div");b.innerHTML=a.body;"undefined"===typeof b.getElementsByClassName&&(C=!1);a=[];var k=[],g=[],h=[],d=[],r=[],p=[],e=0;if(C)for(b=b.getElementsByClassName("timeline-Tweet");ef&&(a.splice(f,a.length-f),k.splice(f,k.length-f),g.splice(f,g.length-f),d.splice(f,d.length-f),h.splice(f,h.length-f),p.splice(f,p.length-f));var b=[],e=a.length,c=0;if(K)for(;c"),d+='

    '+q(a[c].innerHTML)+"

    ",A&&(d=J?d+('

    '+g[c].getAttribute("aria-label")+"

    "):d+('

    '+g[c].getAttribute("aria-label")+"

    "))):(n&&(d+='

    '+k[c].textContent+"

    "),d+='

    '+a[c].textContent+"

    ",A&&(d+='

    '+g[c].textContent+"

    "));I&&(d+='

    ");u&&void 0!==h[c]&&void 0!==y(h[c])&&(d+='
    Image from tweet
    ');u?b.push(d):!u&&a[c].textContent.length&& +b.push(d);c++}E(b);z=!1;0