From ca2d0ea2a3c37d098f6ddadb7f1bf3e91bdebd17 Mon Sep 17 00:00:00 2001 From: Thomas Gautvedt Date: Wed, 5 Mar 2014 20:00:37 +0100 Subject: [PATCH 1/2] Tried making the wiki-head a bit more responsive. Fixing #797 --- files/static/less/wiki.less | 56 +++++++++++++++++++++++ templates/wiki/includes/article_menu.html | 53 +++++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 templates/wiki/includes/article_menu.html diff --git a/files/static/less/wiki.less b/files/static/less/wiki.less index 416322546..11f207935 100644 --- a/files/static/less/wiki.less +++ b/files/static/less/wiki.less @@ -21,6 +21,29 @@ resize: vertical; height: 600px; } + #article-menu { + border-bottom: none; + margin-bottom: 8px; + li { + padding-top: 0px; + a { + padding-bottom: 9px; + } + } + } + #article-breadcrumbs { + border-bottom: 1px solid #EEEEEE; + margin-bottom: 12px; + > div.pull-left { + margin-bottom: 9px; + margin-left: 0px !important; + margin-right: 10px; + } + .breadcrumb { + margin-bottom: 8px; + margin-right: 10px; + } + } } .navbar-fixed-top { .login-btn { @@ -33,4 +56,37 @@ .navbar-fixed-top { padding-left: 0px; padding-right: 0px; +} + +@media all and (max-width: 768px) { + #wiki { + #article-menu { + float: left !important; + margin-bottom: 7px; + li { + padding-top: 0px; + + a { + background-color: #5BC0DE; + border-color: #5BC0DE; + color: #FFFFFF; + margin-left: 10px; + padding-top: 13px; + padding-bottom: 11px; + margin-left: 0px; + margin-right: 10px; + } + span { + display: block; + } + span.hideme { + display: none; + } + } + li.active a { + background-color: #428BCA; + color: #fff; + } + } + } } \ No newline at end of file diff --git a/templates/wiki/includes/article_menu.html b/templates/wiki/includes/article_menu.html new file mode 100644 index 000000000..a9b2ec8dc --- /dev/null +++ b/templates/wiki/includes/article_menu.html @@ -0,0 +1,53 @@ +{% load i18n wiki_tags %}{% load url from future %} + +{% with selected_tab as selected %} + +
  • + {% if not user.is_anonymous %} + + + {% trans "Settings" %} + + {% endif %} +
  • + +{% for plugin in article_tabs %} +
  • + + + {{ plugin.article_tab.0 }} + +
  • +{% endfor %} + +
  • + + + {% trans "Changes" %} + +
  • + +{% if article|can_write:user and not article.current_revision.locked %} +
  • + + + {% trans "Edit" %} + +
  • +{% else %} +
  • + + + {% trans "View Source" %} + +
  • +{% endif %} + +
  • + + + {% trans "View" %} + +
  • + +{% endwith %} \ No newline at end of file From 9ab9da10cb6eac47f748528e93b651c34d447316 Mon Sep 17 00:00:00 2001 From: Thomas Gautvedt Date: Wed, 5 Mar 2014 20:00:37 +0100 Subject: [PATCH 2/2] Tried making the wiki-head a bit more responsive. Fixing #797 --- files/static/less/wiki.less | 58 ++++++++++++++++++++++- templates/wiki/includes/article_menu.html | 53 +++++++++++++++++++++ 2 files changed, 110 insertions(+), 1 deletion(-) create mode 100644 templates/wiki/includes/article_menu.html diff --git a/files/static/less/wiki.less b/files/static/less/wiki.less index 481b216f5..46d4fbd6c 100644 --- a/files/static/less/wiki.less +++ b/files/static/less/wiki.less @@ -62,6 +62,29 @@ width: auto; border: 0px; } + } + #article-menu { + border-bottom: none; + margin-bottom: 8px; + li { + padding-top: 0px; + a { + padding-bottom: 9px; + } + } + } + #article-breadcrumbs { + border-bottom: 1px solid #EEEEEE; + margin-bottom: 12px; + > div.pull-left { + margin-bottom: 9px; + margin-left: 0px !important; + margin-right: 10px; + } + .breadcrumb { + margin-bottom: 8px; + margin-right: 10px; + } } } .navbar-fixed-top { @@ -75,4 +98,37 @@ .navbar-fixed-top { padding-left: 0px; padding-right: 0px; -} \ No newline at end of file +} + +@media all and (max-width: 768px) { + #wiki { + #article-menu { + float: left !important; + margin-bottom: 7px; + li { + padding-top: 0px; + + a { + background-color: #5BC0DE; + border-color: #5BC0DE; + color: #FFFFFF; + margin-left: 10px; + padding-top: 13px; + padding-bottom: 11px; + margin-left: 0px; + margin-right: 10px; + } + span { + display: block; + } + span.hideme { + display: none; + } + } + li.active a { + background-color: #428BCA; + color: #fff; + } + } + } +} diff --git a/templates/wiki/includes/article_menu.html b/templates/wiki/includes/article_menu.html new file mode 100644 index 000000000..a9b2ec8dc --- /dev/null +++ b/templates/wiki/includes/article_menu.html @@ -0,0 +1,53 @@ +{% load i18n wiki_tags %}{% load url from future %} + +{% with selected_tab as selected %} + +
  • + {% if not user.is_anonymous %} + + + {% trans "Settings" %} + + {% endif %} +
  • + +{% for plugin in article_tabs %} +
  • + + + {{ plugin.article_tab.0 }} + +
  • +{% endfor %} + +
  • + + + {% trans "Changes" %} + +
  • + +{% if article|can_write:user and not article.current_revision.locked %} +
  • + + + {% trans "Edit" %} + +
  • +{% else %} +
  • + + + {% trans "View Source" %} + +
  • +{% endif %} + +
  • + + + {% trans "View" %} + +
  • + +{% endwith %} \ No newline at end of file