limit feeds to 50 items and added image captions through a JS hack which

puts the alt content into a caption
This commit is contained in:
Marvin Steadfast 2015-04-14 10:51:34 +02:00
parent 3a9040a123
commit 0643ec95e1
7 changed files with 32 additions and 38 deletions

View File

@ -5,11 +5,7 @@ Category: Uncategorized
Tags: music, reunions, slowdive Tags: music, reunions, slowdive
Slug: slowdive-reunion Slug: slowdive-reunion
[caption id="attachment\_5574" align="alignnone" width="570"][![cc-by ![cc-by [Greg Neate](https://secure.flickr.com/photos/neate_photos/12528849325)]({filename}/images/slowdive.jpg)
Greg
![slowdive]({filename}/images/slowdive.jpg)
cc-by [Greg
Neate](https://secure.flickr.com/photos/neate_photos/12528849325)[/caption]
Slowdive spielen gerade Reunion-Shows??? Und so sehr wünsche ich mir Slowdive spielen gerade Reunion-Shows??? Und so sehr wünsche ich mir
eine von diesen zu besuchen. Slowdive sind für mich ja immer noch die eine von diesen zu besuchen. Slowdive sind für mich ja immer noch die

View File

@ -5,11 +5,7 @@ Category: Uncategorized
Tags: internetz, wikipedia Tags: internetz, wikipedia
Slug: wikipedia-zero Slug: wikipedia-zero
[caption id="attachment\_5119" align="alignnone" width="625"][![cc-by-sa ![cc-by-sa [Akapoor (WMF)](https://wikimediafoundation.org/wiki/File:Wikipedia_Zero_Logo.jpg)]({filename}/images/Wikipedia_Zero_Logo.jpg)
Akapoor
![Wikipedia_Zero_Logo]({filename}/images/Wikipedia_Zero_Logo.jpg)
cc-by-sa [Akapoor
(WMF)](https://wikimediafoundation.org/wiki/File:Wikipedia_Zero_Logo.jpg)[/caption]
Das die deutsche Wikipedia ein Admin-Kleingarten-Wächter-Problem hat, Das die deutsche Wikipedia ein Admin-Kleingarten-Wächter-Problem hat,
ist nichts neues. Trotzdem ist es eins dieser Projekte die das ist nichts neues. Trotzdem ist es eins dieser Projekte die das

View File

@ -5,9 +5,8 @@ Category: Uncategorized
Tags: art, johncage, xkcd Tags: art, johncage, xkcd
Slug: xkcd-und-john-cage Slug: xkcd-und-john-cage
[caption id="attachment\_4396" align="alignnone" width="712"][![cc-by-nc
![silence]({filename}/images/silence.png) ![cc-by-nc [XKCD](http://xkcd.com/1199/)]({filename}/images/silence.png)
cc-by-nc [XKCD](http://xkcd.com/1199/)[/caption]
XKCD widmetseinen heutigen Strip einer meiner liebsten Kunstarbeiten. XKCD widmetseinen heutigen Strip einer meiner liebsten Kunstarbeiten.
[433″](https://de.wikipedia.org/wiki/4%E2%80%B233%E2%80%B3) von John [433″](https://de.wikipedia.org/wiki/4%E2%80%B233%E2%80%B3) von John

View File

@ -21,9 +21,11 @@ LOCALE = "C"
DEFAULT_PAGINATION = 4 DEFAULT_PAGINATION = 4
DEFAULT_DATE = (2012, 3, 2, 14, 1, 1) DEFAULT_DATE = (2012, 3, 2, 14, 1, 1)
#FEED_ALL_ATOM = 'feeds/all.atom.xml' FEED_DOMAIN = SITEURL
FEED_ALL_ATOM = 'feed/index.html' FEED_MAX_ITEMS = 50
CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml' FEED_ALL_ATOM = 'feeds/all.atom.xml'
FEED_ATOM = 'feed/index.html'
#CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml'
# global metadata to all the contents # global metadata to all the contents
#DEFAULT_METADATA = (('yeah', 'it is'),) #DEFAULT_METADATA = (('yeah', 'it is'),)

View File

@ -42,6 +42,7 @@ section#content {
margin-top: 30px 0; margin-top: 30px 0;
float: right; float: right;
} }
#content img { #content img {
display: block; display: block;
margin-left: auto; margin-left: auto;
@ -49,6 +50,13 @@ section#content {
max-width: 90%; max-width: 90%;
} }
#content figcaption {
display: block;
margin-left: auto;
margin-right: auto;
max-width: 90%;
font-size: small;
}
/*SIDEBAR*/ /*SIDEBAR*/
#sidebar { #sidebar {

View File

@ -74,4 +74,16 @@
$(".videobox").fitVids(); $(".videobox").fitVids();
}); });
</script> </script>
<!-- image captions -->
<script>
$(document).ready(function() {
$("#content img").each(function() {
if($(this).attr("alt"))
$(this).wrap('<figure class="image"></figure>')
.after('<figcaption>'+$(this).attr("alt")+'</figcaption>');
});
});
</script>
{% endblock %} {% endblock %}

View File

@ -17,8 +17,8 @@
<!-- Feeds <!-- Feeds
================================================== --> ================================================== -->
{% if FEED_ALL_ATOM %} {% if FEED_ATOM %}
<link rel="alternate" type="application/atom+xml" href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" title="{{ SITENAME }} Full Atom Feed"> <link rel="alternate" type="application/atom+xml" href="{{ FEED_DOMAIN }}/{{ FEED_ATOM }}" title="{{ SITENAME }} Full Feed">
{% endif %} {% endif %}
<!-- Facebook Open Graph <!-- Facebook Open Graph
@ -79,7 +79,7 @@
{% if GITHUB_URL %} {% if GITHUB_URL %}
<a class="icon" href="{{ GITHUB_URL }}" title="GitHub"><i class="icon-github"></i></a> <a class="icon" href="{{ GITHUB_URL }}" title="GitHub"><i class="icon-github"></i></a>
{% endif %} {% endif %}
<a class="icon" href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" title="Subscribe (Atom)"><i class="icon-rss"></i></a> <a class="icon" href="{{ FEED_DOMAIN }}/{{ FEED_ATOM }}" title="Subscribe (Atom)"><i class="icon-rss"></i></a>
</div> <!-- social --> </div> <!-- social -->
<!-- <hr class="small" /> <!-- <hr class="small" />
<div class="nav"> <div class="nav">
@ -101,25 +101,6 @@
</div><!-- container --> </div><!-- container -->
<!-- Google Analytics -->
{% include "analytics.html" %}
<script type="text/javascript">
$("a").on('click', function(e) {
var url = $(this).attr("href");
if (e.currentTarget.host != window.location.host) {
_gaq.push(['_trackEvent', 'Outbound Links', e.currentTarget.host, url, 0]);
if (e.metaKey || e.ctrlKey) {
var newtab = true;
}
if (!newtab) {
e.preventDefault();
setTimeout('document.location = "' + url + '"', 100);
}
}
});
</script>
<!-- End Document <!-- End Document
================================================== --> ================================================== -->
</body> </body>