Merge branch 'sidebar'

This commit is contained in:
kpcyrd 2014-09-10 17:06:35 +02:00
commit 0827820435
4 changed files with 35 additions and 2 deletions

View file

@ -9,4 +9,6 @@
<link rel="stylesheet" href="{{ "/css/bootstrap.css" | prepend: site.baseurl }}"> <link rel="stylesheet" href="{{ "/css/bootstrap.css" | prepend: site.baseurl }}">
<link rel="stylesheet" href="{{ "/css/font-awesome.css" | prepend: site.baseurl }}"> <link rel="stylesheet" href="{{ "/css/font-awesome.css" | prepend: site.baseurl }}">
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}"> <link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
<script src="/js/zepto.min.js"></script>
<script src="/js/main.js"></script>
</head> </head>

View file

@ -6,8 +6,15 @@
{% include header.html %} {% include header.html %}
<div class="wrap"> <div class="row wrap">
{{ content }} <div class="col-md-8">
{{ content }}
</div>
<div class="col-md-4">
<h2>News</h2>
<ul class="list-unstyled" id="news">
</ul>
</div>
</div> </div>
{% include footer.html %} {% include footer.html %}

22
js/main.js Normal file
View file

@ -0,0 +1,22 @@
var rss = [
'hamburg.freifunk.net'
];
$(document).ready(function() {
rss.forEach(function(feed) {
$.get('/feeds/' + feed + '.rss', function(data) {
$(data).find('.entry').forEach(function(entry) {
var a = $(entry).find('a');
var title = a.text();
var link = a.attr('href');
var text = $(entry).children('.feedEntryContent').text();
var item = $('<a>')
.attr('href', link)
.attr('target', '_blank')
.text(title);
$('#news').append($('<li>').append(item));
});
});
});
});

2
js/zepto.min.js vendored Normal file

File diff suppressed because one or more lines are too long