From 13c2bb588e4792adbd5ff15232876ed6ceb7d896 Mon Sep 17 00:00:00 2001 From: Tom Giannattasio Date: Wed, 15 Aug 2012 15:59:46 -0400 Subject: [PATCH] added styles for main article, sidebar and breadcrumb --- common/static/images/wiki-icons.png | Bin 0 -> 2410 bytes lms/static/sass/course/wiki/_wiki.scss | 157 +++++++++++++++++- lms/templates/wiki/article.html | 15 +- lms/templates/wiki/includes/article_menu.html | 10 +- 4 files changed, 165 insertions(+), 17 deletions(-) create mode 100644 common/static/images/wiki-icons.png diff --git a/common/static/images/wiki-icons.png b/common/static/images/wiki-icons.png new file mode 100644 index 0000000000000000000000000000000000000000..52c6dbc66f547743dd6d5171e727ccd2fdd0fff6 GIT binary patch literal 2410 zcmbVOc~BF177iea3d$j;S4`y4A!jFnWC)NG0tUI!%#Jf5X-L43Ob!SNDjHpcpk{&` z4#*`dqoT_-pdd^QsK5wDL_`L39HodmDvE%JrL`RucmJ?vtG27Ve@DOfz3;u>_p17E zcvz6lGPh+g7|ezf%#4IaJoIE*Er#B|lxci92%`z5@gSTd;U|KT zAYYjNT@UC7gIS2g(c6^UxLYU!sRYe8*`U=D8RQLv`30zDd_gj(gvW!4;uI=kvb6&N z7YnI~I3gFzl`%k(ICz&FjM^0zE!dSTAPW%z{%}7v1p<(ONNz~XRl5($kX5J@DQHyn?};W1d~CZTWy3Xw#? z`@lb52q>Cdm_UhSvOmUxR#b#YsgzMLn6$JsbQ*w`$`dg-GMQ|`z~fPn1xk^gqU5Vl zDGKBQ0uxjSBI9yD0jDTF778jEM$MODaA+(>A~EIl z-ddrI1ph9_s@-1)G8sZ_C|l)X=ur4OnNopD0;VWA zOezBUf)3}}u%LL`(R8Yv4OC|946{d(k!+^y2UzvaK75+a} z!$4#(CVBjqTo$$<4VtE(#1Ab#wGWsA^^6>9j&Dn_GccHC5r;{OR*yU>Nv?@ut-3Z* zvb%-4F$A#jzL|555UigX={&b6fZ5$=G-K(UEOoJ7LUyJtl91!i++eqj)l8E_N2*-JNg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$+g7}&;rQRmK$-Ms!cXcl1~58xuO`C}-)D_lUn;V%D7#`T9A3X= zwy|h)2vBSX#{=)i4PCg{sUS|Fwug*lxJ?y>dJ#P1t^lwA;-}BFtE|-PP+LZlRlp2$7 zcjn1-OAU3!DPqZ~JFm`Vww4NV54j+PLaXM@wM9v{H|=V2$X&wl^fU=cs|D^>-DdNC z^N_oLb^XG_+RVYe0sVaZy6?PtMT>R~^ViL_1SUG^b*SFw$F0B%wZD%OJ${XmIxE?m zzCLR2QD}MOY>C|&ByiEi^QEM-s{h^V(Hw&+^B>}}m{R9>?J?chC^K@6rr^srg)dWc z%I4;VZ3SJUgm>MgtD4rd&K;;m7TXCl1F;v*s5A1f8#YBj#h*W{>om89fob=JAm-Rj Q)87w=6~;VI|91bs0W8$nYXATM literal 0 HcmV?d00001 diff --git a/lms/static/sass/course/wiki/_wiki.scss b/lms/static/sass/course/wiki/_wiki.scss index d31ee75721..7813158650 100644 --- a/lms/static/sass/course/wiki/_wiki.scss +++ b/lms/static/sass/course/wiki/_wiki.scss @@ -3,7 +3,7 @@ section.wiki { header { height: 33px; - margin-bottom: 50px; + margin-bottom: 36px; padding-bottom: 26px; border-bottom: 1px solid $light-gray; } @@ -27,13 +27,22 @@ section.wiki { .breadcrumb { list-style: none; padding-left: 0; - margin: 0; + margin: 0 0 0 flex-gutter(); li { float: left; margin-right: 10px; font-size: 0.9em; - line-height: 31px; + line-height: 31px; + + a { + display: inline-block; + max-width: 200px; + overflow: hidden; + height: 30px; + text-overflow: ellipsis; + white-space: nowrap; + } &:after { content: '›'; @@ -59,6 +68,7 @@ section.wiki { .global-functions { display: block; width: auto; + margin-right: flex-gutter(); } .add-article-btn { @@ -103,6 +113,10 @@ section.wiki { -----------------*/ + .article-wrapper { + + } + h1 { font-weight: bold; letter-spacing: 0; @@ -111,19 +125,79 @@ section.wiki { .main-article { float: left; width: flex-grid(9); + margin-left: flex-gutter(); + color: $base-font-color; h2 { + padding-bottom: 8px; + margin-bottom: 22px; + border-bottom: 1px solid $light-gray; + font-size: 1.33em; font-weight: bold; + color: $base-font-color; text-transform: none; letter-spacing: 0; - font-size: 1.33em; + } + + h3 { + margin-top: 40px; + margin-bottom: 20px; + font-weight: bold; + font-size: 1.1em; + } + + h4 { + + } + + h5 { + + } + + h6 { + + } + + ul { + font-size: inherit; + line-height: inherit; + color: inherit; + } + + li { + margin-bottom: 15px; } } + + + + /*----------------- + + Sidebar + + -----------------*/ + .article-functions { float: left; - width: flex-grid(2); + width: flex-grid(2) + flex-gutter(); margin-left: flex-grid(1); + + .timestamp { + margin: 4px 0 15px; + padding: 0 0 15px 5px; + border-bottom: 1px solid $light-gray; + + .label { + font-size: 0.7em; + color: #aaa; + text-transform: uppercase; + } + + .date { + font-size: 0.9em; + } + } } .nav-tabs { @@ -132,7 +206,78 @@ section.wiki { margin: 0; li { - margin-left: 20px; + &.active { + a { + color: $blue; + + .icon-view { + background-position: -25px 0; + } + + .icon-edit { + background-position: -25px -25px; + } + + .icon-changes { + background-position: -25px -49px; + } + + .icon-attachments { + background-position: -25px -73px; + } + + .icon-settings { + background-position: -25px -99px; + } + + &:hover { + background: none; + } + } + } + } + + a { + display: block; + padding: 2px 4px; + border-radius: 3px; + font-size: 0.9em; + line-height: 25px; + color: #8f8f8f; + + .icon { + float: left; + display: block; + width: 25px; + height: 25px; + margin-right: 3px; + background: url(../images/wiki-icons.png) no-repeat; + } + + .icon-view { + background-position: 0 0; + } + + .icon-edit { + background-position: 0 -25px; + } + + .icon-changes { + background-position: 0 -49px; + } + + .icon-attachments { + background-position: 0 -73px; + } + + .icon-settings { + background-position: 0 -99px; + } + + &:hover { + background-color: #f6f6f6; + text-decoration: none; + } } } diff --git a/lms/templates/wiki/article.html b/lms/templates/wiki/article.html index 5c72f9e177..b377ad284b 100644 --- a/lms/templates/wiki/article.html +++ b/lms/templates/wiki/article.html @@ -10,17 +10,20 @@ {% block wiki_contents %} -
+
+
-

{{ article.current_revision.title }}

-
+

{{ article.current_revision.title }}

{% block wiki_contents_tab %} {% wiki_render article %} - {% endblock %} -
+ {% endblock %}
+
+ {% trans "Last modified:" %}
+ {{ article.current_revision.modified }} +
@@ -32,5 +35,5 @@ {% endblock %} {% block footer_prepend %} -

{% trans "This article was last modified:" %} {{ article.current_revision.modified }}

+

{% trans "This article was last modified:" %} {{ article.current_revision.modified }}

{% endblock %} diff --git a/lms/templates/wiki/includes/article_menu.html b/lms/templates/wiki/includes/article_menu.html index fb01fd109d..33d1ba0cf9 100644 --- a/lms/templates/wiki/includes/article_menu.html +++ b/lms/templates/wiki/includes/article_menu.html @@ -10,26 +10,26 @@
  • - + {% trans "View" %}
  • - + {% trans "Edit" %}
  • - + {% trans "Changes" %}
  • {% for plugin in article_tabs %}
  • - + {{ plugin.article_tab.0 }}
  • @@ -38,7 +38,7 @@
  • {% if not user.is_anonymous %} - + {% trans "Settings" %} {% endif %}