From 36a733af8dee1de5a0f81f1efe70e96a435b6a17 Mon Sep 17 00:00:00 2001 From: Maryana Rozhankivska Date: Thu, 27 Feb 2014 16:11:37 +0200 Subject: [PATCH] some baggy theme fixes and enhancement: issue #479 --- themes/baggy/_display-mode.twig | 5 ++ themes/baggy/_head.twig | 1 + themes/baggy/css/main.css | 69 +++++++++++++++++- themes/baggy/home.twig | 4 ++ themes/baggy/img/baggy/blank.png | Bin 0 -> 141 bytes themes/baggy/img/baggy/down.png | Bin 0 -> 216 bytes themes/baggy/img/baggy/list.png | Bin 0 -> 201 bytes themes/baggy/img/baggy/table.png | Bin 0 -> 229 bytes themes/baggy/img/baggy/top.png | Bin 0 -> 212 bytes themes/baggy/js/init.js | 44 +++++++++--- themes/baggy/js/jquery.cookie.js | 117 +++++++++++++++++++++++++++++++ themes/default/_sorting.twig | 6 ++ themes/default/home.twig | 7 +- 13 files changed, 234 insertions(+), 19 deletions(-) create mode 100755 themes/baggy/_display-mode.twig mode change 100644 => 100755 themes/baggy/_head.twig mode change 100644 => 100755 themes/baggy/home.twig create mode 100755 themes/baggy/img/baggy/blank.png create mode 100644 themes/baggy/img/baggy/down.png create mode 100755 themes/baggy/img/baggy/list.png create mode 100755 themes/baggy/img/baggy/table.png create mode 100644 themes/baggy/img/baggy/top.png create mode 100755 themes/baggy/js/jquery.cookie.js create mode 100755 themes/default/_sorting.twig mode change 100644 => 100755 themes/default/home.twig diff --git a/themes/baggy/_display-mode.twig b/themes/baggy/_display-mode.twig new file mode 100755 index 0000000..31f7658 --- /dev/null +++ b/themes/baggy/_display-mode.twig @@ -0,0 +1,5 @@ +
+ + {% trans + +
diff --git a/themes/baggy/_head.twig b/themes/baggy/_head.twig old mode 100644 new mode 100755 index 206d5aa..1ea59ab --- a/themes/baggy/_head.twig +++ b/themes/baggy/_head.twig @@ -8,5 +8,6 @@ + diff --git a/themes/baggy/css/main.css b/themes/baggy/css/main.css index 3e128b0..0a8d2c7 100755 --- a/themes/baggy/css/main.css +++ b/themes/baggy/css/main.css @@ -177,7 +177,7 @@ h2:after { left: 0; text-align: right; background: #333; - padding-top: 9em; + padding-top: 9.5em; height: 100%; box-shadow:inset -4px 0 20px rgba(0,0,0,0.6); z-index: 10; @@ -188,6 +188,7 @@ h2:after { position: relative; z-index: 10; padding-right: 5%; + padding-bottom: 1em; } #links a { @@ -227,7 +228,7 @@ h2:after { #links li:last-child { position: fixed; bottom: 1em; - width: 10%; + width: 9em; } #links li:last-child a:before { @@ -237,6 +238,61 @@ h2:after { } +#sort { + padding: 0; + list-style-type: none; + opacity: 0.5; + display: inline-block; +} + +#sort li { + display: inline; + font-size: 0.9em; +} + +#sort li + li { + margin-left: 10px; +} + +#sort a { + padding: 2px 2px 0; + vertical-align: middle; +} + +#sort img { + vertical-align: baseline; +} +#sort img:hover { + cursor: pointer; +} + +#display-mode { + float: right; + vertical-align: middle; + margin-top: 10px; + margin-bottom: 10px; + opacity: 0.5; +} +#listmode { + width: 16px; + display: inline-block; + text-decoration: none; +} +#listmode a:hover { + opacity: 1; +} +.tablemode { + background-image: url("../img/baggy/table.png"); + background-repeat: no-repeat; + background-position: bottom; +} +.listmode { + background-image: url("../img/baggy/list.png"); + background-repeat: no-repeat; + background-position: bottom; +} + + /* ========================================================================== 2 = Layout ========================================================================== */ @@ -248,7 +304,7 @@ h2:after { footer { text-align: right; - position: fixed; + position: relative; bottom: 0; right: 5em; color: #999; @@ -731,6 +787,9 @@ blockquote { width: 100%; margin-left: 0; } + #display-mode { + display: none; + } } @media screen and (max-width: 500px) { @@ -820,4 +879,8 @@ blockquote { #article_toolbar a { padding: 0.3em 0.4em 0.2em; } + + #display-mode { + display: none; + } } diff --git a/themes/baggy/home.twig b/themes/baggy/home.twig old mode 100644 new mode 100755 index 4f9db06..5262c05 --- a/themes/baggy/home.twig +++ b/themes/baggy/home.twig @@ -18,6 +18,10 @@ {% if entries is empty %}

{% trans "No articles found." %}

{% else %} +
+ {% include '_display-mode.twig' %} + {% include '_sorting.twig' %} +
{% block pager %} {% if nb_results > 1 %}
diff --git a/themes/baggy/img/baggy/blank.png b/themes/baggy/img/baggy/blank.png new file mode 100755 index 0000000000000000000000000000000000000000..63e09844e139f9e1530537cf771608d1498c25bd GIT binary patch literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+JN+Wx;TbZ+)DcM|Gz!6YC~tElR?&j j6^x77c*K|)n0OeHXEDo0Cp|s}RLbD#>gTe~DWM4f(PJm; literal 0 HcmV?d00001 diff --git a/themes/baggy/img/baggy/down.png b/themes/baggy/img/baggy/down.png new file mode 100644 index 0000000000000000000000000000000000000000..b9d536a7cabbd3e404dc187a2e2844562e07fbb0 GIT binary patch literal 216 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`^F3W0LoEE?PEO==FyLvmWb|ti ze(+=mqxwU(J?goe&RPl9>t?28-`_sH?9-dar{uqIe_~&>_0>EEk>Z)9_6iqeGViTc z^Aiy5VB9F(AoP6klgQ`2?G1bfZ)zVYUGRwQr{u+U1~Gvk>j}PdLW+!!uI|vE{?M93 zQKaDFRbLtA4`*6C{{5;j&puSusi>m0O-3U|@y_N%E6M9q|4yz5?L5mlagv(gyMmSN QK&LWzy85}Sb4q9e0C^WwoB#j- literal 0 HcmV?d00001 diff --git a/themes/baggy/img/baggy/list.png b/themes/baggy/img/baggy/list.png new file mode 100755 index 0000000000000000000000000000000000000000..bd5aff5ae99ccc7aa59d0e166ba16817d7378d3d GIT binary patch literal 201 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmUzPnffIy#(?lOI#yL zg7ec#$`gxH85~pclTsBta}(23gHjVyDhp4h+5i$*k|AR$Xcyt_c_>U|K_!q5E$Cc{MywQO1o`KqoMGy85}Sb4q9e0N>_HPXGV_ literal 0 HcmV?d00001 diff --git a/themes/baggy/img/baggy/top.png b/themes/baggy/img/baggy/top.png new file mode 100644 index 0000000000000000000000000000000000000000..954a8c0acbb221eb20d04d6184d3317c9604adf6 GIT binary patch literal 212 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`vproLLoEE?PJYPi;K0-R-Yh}L z?7)+r11dQV@t4$c*ZUobpMJvm{%@_)>6edB)&AL*Wqe)zlJci}j4F4EGgNsM1rM|@ zE#&yfAbU^aW?|Gj?hdveA3Pq;Wz>Cn$btDHg9O{I3%rRuZ&Mg*G86 1 %} +
    +
  • {% trans {% trans "by date" %} {% trans
  • +
  • {% trans {% trans "by title" %} {% trans
  • +
+{% endif %} diff --git a/themes/default/home.twig b/themes/default/home.twig old mode 100644 new mode 100755 index 165fecc..bd5fc2d --- a/themes/default/home.twig +++ b/themes/default/home.twig @@ -12,12 +12,7 @@ {% include '_menu.twig' %} {% endblock %} {% block precontent %} - {% if entries|length > 1 %} -
    -
  • {% trans {% trans "by date" %} {% trans
  • -
  • {% trans {% trans "by title" %} {% trans
  • -
- {% endif %} + {% include '_sorting.twig' %} {% endblock %} {% block content %} {% if tag %}