From f486457ba646717cfcabe23d3b85882e5f2b1c4c Mon Sep 17 00:00:00 2001 From: Bruno Vitorino Date: Mon, 13 Jun 2011 23:22:19 +0100 Subject: [PATCH 1/3] Javascript fix to truncate quote text in thumbnails. --- theme.html | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/theme.html b/theme.html index 90c8376..fee09f9 100644 --- a/theme.html +++ b/theme.html @@ -515,5 +515,19 @@

{lang:Following}:

//]]> {/block:IfDisqusShortname} + - \ No newline at end of file + From c692a6d37d67b295beff1a980a1db36447d8eeec Mon Sep 17 00:00:00 2001 From: Bruno Vitorino Date: Tue, 14 Jun 2011 22:11:33 +0100 Subject: [PATCH 2/3] Javascript fix to truncate the title of regular text posts in thumbnails. --- theme.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/theme.html b/theme.html index fee09f9..5a5802f 100644 --- a/theme.html +++ b/theme.html @@ -528,6 +528,18 @@

{lang:Following}:

) } ); + var text = $(".image.regular.rounded"); + text.each( + function(){ + $(this).find(".inner").each( + function(){ + var txt = $(this)[0].innerHTML; + txt = txt.substring(0, 160) + "..."; + $(this)[0].innerHTML = txt; + } + ) + } + ); From fc5c6a24d19d9e95931192016f8613fdad7c1a52 Mon Sep 17 00:00:00 2001 From: Bruno Vitorino Date: Thu, 28 Aug 2014 10:21:15 +0000 Subject: [PATCH 3/3] Moves js to the appropriate place --- magic.js | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/magic.js b/magic.js index 20dcbb2..8fc3605 100644 --- a/magic.js +++ b/magic.js @@ -53,6 +53,24 @@ function init () { $("#pages").removeClass("hide") } + var quotes = $(".image.quote.rounded"); + quotes.each(function() { + $(this).find(".inner").each(function(){ + var txt = $(this)[0].innerHTML; + txt = txt.substring(0, 160) + "..."; + $(this)[0].innerHTML = txt; + }) + }); + + var text = $(".image.regular.rounded"); + text.each(function() { + $(this).find(".inner").each(function() { + var txt = $(this)[0].innerHTML; + txt = txt.substring(0, 160) + "..."; + $(this)[0].innerHTML = txt; + }) + }); + add_credit() } // @@ -270,4 +288,4 @@ function add_credit() { } $(document).ready(init) -//$(document).load(loaded) \ No newline at end of file +//$(document).load(loaded)