Merge branch 'sidebar'
This commit is contained in:
commit
0827820435
|
@ -9,4 +9,6 @@
|
|||
<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/main.css" | prepend: site.baseurl }}">
|
||||
<script src="/js/zepto.min.js"></script>
|
||||
<script src="/js/main.js"></script>
|
||||
</head>
|
||||
|
|
|
@ -6,9 +6,16 @@
|
|||
|
||||
{% include header.html %}
|
||||
|
||||
<div class="wrap">
|
||||
<div class="row wrap">
|
||||
<div class="col-md-8">
|
||||
{{ content }}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<h2>News</h2>
|
||||
<ul class="list-unstyled" id="news">
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include footer.html %}
|
||||
</body>
|
||||
|
|
22
js/main.js
Normal file
22
js/main.js
Normal 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
2
js/zepto.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue