From 94221611c199eaaeca11098a11def2b910289fee Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Sat, 9 Jan 2016 08:32:39 -0800 Subject: [PATCH] rollup and roll down big posts. fix some button css --- css/template.css | 20 +++++++++++++++++++- js/funcs.js | 12 ++++++++++++ templates/layout.html | 2 +- templates/pages/categories.html | 2 +- templates/pages/news.html | 10 +++++++--- 5 files changed, 40 insertions(+), 6 deletions(-) diff --git a/css/template.css b/css/template.css index 29b185a..9fc9ff3 100644 --- a/css/template.css +++ b/css/template.css @@ -38,10 +38,28 @@ body { font-size: 12px; } -.post-preview { +.post-content { font-size: 12px; + min-height: 5em; + height: 5em; + overflow: hidden; + padding-bottom: 10px; } +.post-content blockquote { + font-size: 12px; + font-family: serif; +} + +.content-slider { + text-align: center; + font-weight: bold; + font-size: 16px; + border-radius: 3px; + padding: 0px; +} + + .post-delete, .post-edit { font-size: 12px; } \ No newline at end of file diff --git a/js/funcs.js b/js/funcs.js index ee35f1b..930acc0 100644 --- a/js/funcs.js +++ b/js/funcs.js @@ -42,4 +42,16 @@ $(document).ready( function () { form.submit(); } }); + + $(".content-slider").click(function (e) { + var contentDiv = $(this).parents('.news-row').find('.post-content'); + if (contentDiv.hasClass("state-up")) { + contentDiv.removeClass('state-up').addClass('state-down').animate({height: '100%'}); + $(this).html('^'); + } else { + contentDiv.removeClass('state-down').addClass('state-up').animate({height: '5em'}); + $(this).html('v'); + } + + }); }); diff --git a/templates/layout.html b/templates/layout.html index 1f299cd..36b107c 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -41,7 +41,7 @@