From fbf9e9d682e580dc2d020d23ecc173315327ec1e Mon Sep 17 00:00:00 2001
From: Andreas Gohr <gohr@cosmocode.de>
Date: Thu, 9 Mar 2017 16:15:10 +0100
Subject: [PATCH 01/25] integrate QC plugin (ajax branch)

This refactors the page-attribute area a bit and intergrates the new
ajax branch of the QC plugin. I'm not really happy about the included
file - it should probably be moved to our Template class instead.
---
 css/area_nav-breadcrumb.less      | 139 ------------------------------
 css/area_nav-page-attributes.less |  30 +++++++
 css/plugins/qc.less               |  28 +++++-
 js/plugins/do_tasks.js            |  94 ++++++++++----------
 js/plugins/qc.js                  |  37 ++++++++
 main.php                          |   3 +-
 script.js                         |   1 +
 style.ini                         |   1 +
 tpl/nav-page-attributes.php       |  57 ++++++++++++
 tpl/nav-page-quality-tasks.php    |  54 ------------
 10 files changed, 200 insertions(+), 244 deletions(-)
 create mode 100644 css/area_nav-page-attributes.less
 create mode 100644 js/plugins/qc.js
 create mode 100755 tpl/nav-page-attributes.php
 delete mode 100755 tpl/nav-page-quality-tasks.php

diff --git a/css/area_nav-breadcrumb.less b/css/area_nav-breadcrumb.less
index cd3f5b6..4376701 100755
--- a/css/area_nav-breadcrumb.less
+++ b/css/area_nav-breadcrumb.less
@@ -67,145 +67,6 @@
             padding: .1em .1em 0;
         }
     }
-
-
-/* + + + + +  icon list  + + + + + */
-    .page-attributes {
-        list-style: none;
-        float: right;
-        display: inline-block;
-        max-width: 30%;
-        margin: -.45em 0 0;
-        padding: 0;
-        @media @screen_max-xs{
-            max-width: 90%;
-        }
-
-        > li {
-            .btn-usertools-wrapper(); // uniform li
-            .btn-usertools-num();
-
-            float: left;
-
-            > strong,
-            > a {
-                display: block;
-                width: auto;
-                min-height: 2em;
-                border: 1px solid @color-border;
-                border-radius: @border-radius;
-                color: @color-nav;
-                text-align: center;
-                margin: 0;
-            }
-
-            .prefix {
-                .btn-prefix ();
-                .icon-clipboard();
-            }
-
-/* check !!! */
-            &.do_none {
-                position: relative;
-
-                strong {
-                    background-color: @color-site-bg;
-                }
-
-                .num {
-                    background-color: @color-border;
-                    color: @color-nav;
-                }
-            }
-/* end check !!! */
-
-            &.plugin__qc {
-                display: inline-block;
-                overflow: visible;
-                position: static;
-            }
-        } // li
-
-        a {
-            transition: @transition color, @transition background-color, @transition border-color;
-
-            &[aria-expanded="false"] + #plugin__qc__wrapper {
-                display: none;
-            }
-
-            &:hover,
-            &:active,
-            &:focus {
-                background-color: @button_color;
-                border-color: @button_background;
-                color: @button_background;
-
-                .prefix {
-                    color: @button_background;
-                }
-            }
-        }
-
-        #plugin__qc__wrapper {
-            position: absolute;
-            right: 0;
-            width: auto;
-            border: 0 none;
-            background: @background_page-header;
-            background: -webkit-linear-gradient(top, @background_page-header, @color-content-bg);
-            background: linear-gradient(top, @background_page-header, @color-content-bg);
-            box-shadow: @box-shadow-bottom;
-            z-index: 2000;
-
-            #plugin__qc__out{
-                h1 {
-                    font-size: @font-size-head3;
-                }
-
-                h2 {
-                    margin-top: 1.6em;
-                    font-size: @font-size-head5;
-                }
-                > h1,
-                > h2,
-                > p,
-                > dl,
-                > div {
-                    padding-left: 1rem;
-                    margin-left: 0;
-                }
-
-                > div p {
-                    padding-left: 0;
-                    margin-left: 0;
-                }
-            }
-
-            &[aria-hidden="false"] {
-                margin-top: .5rem;
-            }
-        }
-
-        #plugin__qc__icon {
-            display: none;
-        }
-
-        #plugin__qc__link {
-            position: relative;
-
-            .prefix {
-                .icon-emo-happy();
-
-                width: 100%;
-                font-size: @font-size-default;
-
-                &::before {
-                    width: 100%;
-                    margin: .1em 0 0;
-                }
-            }
-        }
-    }
 }
 
 
diff --git a/css/area_nav-page-attributes.less b/css/area_nav-page-attributes.less
new file mode 100644
index 0000000..228f667
--- /dev/null
+++ b/css/area_nav-page-attributes.less
@@ -0,0 +1,30 @@
+/**
+ * Page Attribute Icons in the breadcrumb bar
+ */
+.page-attributes {
+    list-style: none;
+    float: right;
+    display: inline-block;
+    max-width: 30%;
+    margin: -.45em 0 0;
+    padding: 0;
+    @media @screen_max-xs {
+        max-width: 90%;
+    }
+
+    > li {
+        .btn-usertools-wrapper(); // uniform li
+        .btn-usertools-num();
+
+        position: relative;
+        float: left;
+        display: block;
+        width: auto;
+        min-height: 2em;
+        border: 1px solid @color-border;
+        border-radius: @border-radius;
+        color: @color-nav;
+        text-align: center;
+        margin: 0;
+    }
+}
diff --git a/css/plugins/qc.less b/css/plugins/qc.less
index dff5a32..42c57a5 100644
--- a/css/plugins/qc.less
+++ b/css/plugins/qc.less
@@ -1,6 +1,26 @@
-#plugin__qc__wrapper{
-    font-size: @font-size-default;
-    p{
-        font-size: @font-size-default;
+/**
+ * Styles for the QC plugin
+ */
+
+// icon in page attributes
+.page-attributes .plugin_qc {
+    .qc_icon {
+        margin: 0;
+        width: 2em;
+        height: 2em;
+
+        svg {
+            margin-top: 0.1em;
+            margin-left: 0.1em;
+            width: 1.6em;
+            height: 1.6em;
+        }
     }
 }
+
+// output
+.qc-output {
+    font-size: 90%;
+    border-bottom: 1px solid @ini_border;
+}
+
diff --git a/js/plugins/do_tasks.js b/js/plugins/do_tasks.js
index 78a8f34..1ff8717 100755
--- a/js/plugins/do_tasks.js
+++ b/js/plugins/do_tasks.js
@@ -1,47 +1,49 @@
-( function( $, spc ) {
-
-    var togglePageAnalysis = function(){
-            var $this = $('.page-attributes').find('.plugin__qc');
-            try{
-                var $link = $this.find('#plugin__qc__link'),
-                    $container = $this.find('#plugin__qc__wrapper');
-
-                if($container.length < 1){
-                    $this.remove();
-                }else{
-                    $container.attr('aria-hidden','true');
-                    var $icon = $container.find('#plugin__qc__icon');
-                    $container.find('#plugin__qc__out').removeAttr('style');
-                    $link.on( 'click', function(e){
-                        e.preventDefault();
-                        $icon.trigger('click');
-                        var oldState = ($link.attr('aria-expanded')=== "true" );
-                        $container.attr('aria-hidden',oldState);
-                        $(this).attr('aria-expanded',!oldState);
-
-                    });
-
-                    if($container.length > 0){
-                        var num = $container.attr('data-errors');
-                        if(num){
-                            $link.find('.num').empty().append(num);
-                            $link.closest('li').removeClass('do_none');
-                        }
-                    }
-
-                }
-
-            }catch(err){
-                $this.remove();
-            }
-    };
-
-    $(function(){
-        togglePageAnalysis();
-    });
-
-} )( jQuery, spc );
-
-
-
+// FIXME figure out what this did and why
 
+// ( function( $, spc ) {
+//
+//     var togglePageAnalysis = function(){
+//             var $this = $('.page-attributes').find('.plugin__qc');
+//             try{
+//                 var $link = $this.find('#plugin__qc__link'),
+//                     $container = $this.find('#plugin__qc__wrapper');
+//
+//                 if($container.length < 1){
+//                     $this.remove();
+//                 }else{
+//                     $container.attr('aria-hidden','true');
+//                     var $icon = $container.find('#plugin__qc__icon');
+//                     $container.find('#plugin__qc__out').removeAttr('style');
+//                     $link.on( 'click', function(e){
+//                         e.preventDefault();
+//                         $icon.trigger('click');
+//                         var oldState = ($link.attr('aria-expanded')=== "true" );
+//                         $container.attr('aria-hidden',oldState);
+//                         $(this).attr('aria-expanded',!oldState);
+//
+//                     });
+//
+//                     if($container.length > 0){
+//                         var num = $container.attr('data-errors');
+//                         if(num){
+//                             $link.find('.num').empty().append(num);
+//                             $link.closest('li').removeClass('do_none');
+//                         }
+//                     }
+//
+//                 }
+//
+//             }catch(err){
+//                 $this.remove();
+//             }
+//     };
+//
+//     $(function(){
+//         togglePageAnalysis();
+//     });
+//
+// } )( jQuery, spc );
+//
+//
+//
+//
diff --git a/js/plugins/qc.js b/js/plugins/qc.js
new file mode 100644
index 0000000..65d795b
--- /dev/null
+++ b/js/plugins/qc.js
@@ -0,0 +1,37 @@
+/**
+ * Add custom QC functionality instead of using the plugin's mechanism
+ */
+jQuery(function () {
+    var $panel = jQuery('div.qc-output').hide();
+
+    // load summary
+    jQuery('.page-attributes .plugin_qc a').load(
+        DOKU_BASE + '/lib/exe/ajax.php',
+        {
+            call: 'plugin_qc_short',
+            id: JSINFO['id']
+        },
+        function () {
+            jQuery(this).find('span span').addClass('num');
+        }
+    ).click(function (e) {
+        e.preventDefault();
+
+        if ($panel.html() == '') {
+            // load output
+            $panel.load(
+                DOKU_BASE + '/lib/exe/ajax.php',
+                {
+                    call: 'plugin_qc_long',
+                    id: JSINFO['id']
+                },
+                function () {
+                    $panel.dw_show();
+                }
+            );
+        } else {
+            $panel.dw_toggle();
+        }
+    });
+
+});
diff --git a/main.php b/main.php
index 2934e3f..22fa813 100755
--- a/main.php
+++ b/main.php
@@ -230,7 +230,7 @@ $classWideContent = ($ACT === "show") ? "": "wide-content ";
 /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
 /* page quality / page tasks */
 /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
-                                include('tpl/nav-page-quality-tasks.php');
+                                include('tpl/nav-page-attributes.php');
                             ?>
 
                             <?php
@@ -266,6 +266,7 @@ $classWideContent = ($ACT === "show") ? "": "wide-content ";
                                 include('tpl/nav-meta-box.php'); ?>
                             </div>
 
+                            <div class="qc-output"></div>
 
                             <div class="msg-area"><?php html_msgarea();/*msg('Information.', 0);msg('Success', 1);msg('Notification', 2);msg('Fehler', -1);*/ ?></div>
                             <?php
diff --git a/script.js b/script.js
index 0636fe1..ed8b13e 100755
--- a/script.js
+++ b/script.js
@@ -2,6 +2,7 @@
 /* DOKUWIKI:include js/base/spc.js */
 
 /* DOKUWIKI:include js/plugins/do_tasks.js */
+/* DOKUWIKI:include js/plugins/qc.js */
 
 /* DOKUWIKI:include js/meta-box.js */
 /* DOKUWIKI:include js/sidebar.js */
diff --git a/style.ini b/style.ini
index d29dc7e..7319985 100755
--- a/style.ini
+++ b/style.ini
@@ -67,6 +67,7 @@ css/area_footer.less                  = all
 css/area_msg.less                     = all
 css/area_nav-direct.less              = all
 css/area_nav-breadcrumb.less          = all
+css/area_nav-page-attributes.less     = all
 css/area_nav-usertools.less           = all
 css/area_sidebar-search.less          = all
 css/area_nav-pagetools.less           = all
diff --git a/tpl/nav-page-attributes.php b/tpl/nav-page-attributes.php
new file mode 100755
index 0000000..0a7f0d2
--- /dev/null
+++ b/tpl/nav-page-attributes.php
@@ -0,0 +1,57 @@
+<?php
+if(!defined('DOKU_INC')) die();
+
+/** @var \helper_plugin_do $doPlugin */
+$doPlugin = plugin_load('helper', 'do');
+/** @var \helper_plugin_qc $qcPlugin */
+$qcPlugin = plugin_load('helper', 'qc');
+
+
+if($doPlugin !== null || $qcPlugin !== null) {
+    echo '<ul class="page-attributes">';
+}
+
+
+if($qcPlugin && $qcPlugin->shouldShow()) {
+    echo '<li class="plugin_qc"><a href="#">…</a></li>'; // filled by javascript
+}
+
+
+if($doPlugin !== null) {
+    $count = $doPlugin->getPageTaskCount();
+    $num = $count['count'];
+    $title = "";
+
+    if($num == 0) { // no tasks - does not exist do in plug-in
+        $class = "do_none";
+        $title = tpl_getLang('tasks_page_none');
+    } elseif($count['undone'] == 0) { // all tasks done
+        $class = 'do_done';
+        $title = $this->getLang('title_alldone');
+    } elseif($count['late'] == 0) { // open tasks but none late
+        $class = 'do_undone';
+        $title = sprintf($this->getLang('title_intime'), $count['undone']);
+    } else { // late tasks
+        $class = 'do_late';
+        $title = sprintf($this->getLang('title_late'), $count['undone'], $count['late']);
+    }
+    $markup = "<li class=\"plugin__do_pagetasks " . $class . "\" title=\"'.$title.'\"><strong><span class=\"prefix\">" . tpl_getLang('prefix_tasks_page') . " </span><span class=\"num\">" . $num . "</span></strong></li>";
+
+    echo $markup;
+}
+
+if($doPlugin !== null || $qcPlugin !== null) {
+    echo "</ul>";
+}
+
+
+
+/*
+
+
+$out = '<div class="plugin__do_pagetasks" title="' . $title . '"><span class="' . $class . '">';
+$out .= $count['undone'];
+$out .= '</span></div>';
+
+if($return) return $out;
+echo $out;*/
diff --git a/tpl/nav-page-quality-tasks.php b/tpl/nav-page-quality-tasks.php
deleted file mode 100755
index 2a1977c..0000000
--- a/tpl/nav-page-quality-tasks.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-    if (!defined('DOKU_INC')) die();
-?>
-
-<?php
-    /** @var \helper_plugin_do $doPlugin */
-    $doPlugin = plugin_load('helper','do');
-
-    /** @var \helper_plugin_qc $qc */
-    $qc = plugin_load('helper','qc');
-    if ($doPlugin !== null ||$qc ) {
-        echo "<ul class=\"page-attributes\">";
-    }
-    if ($qc) {
-        echo "<li class=\"plugin__qc do_none\"><a id=\"plugin__qc__link\" aria-expanded=\"false\" href=\"#plugin__qc__wrapper\"><span class=\"prefix\">".tpl_getLang('quality_trigger')."</span><span class=\"num\">0</span></strong></a>";
-        $qc->tplErrorCount();
-        echo "</li>";
-    }
-    if ($doPlugin !== null ) {
-        $count = $doPlugin->getPageTaskCount();
-        $num = $count['count'];
-        $title = "";
-
-        if($num == 0){ // no tasks - does not exist do in plug-in
-            $class = "do_none";
-            $title = tpl_getLang('tasks_page_none');
-        } elseif($count['undone'] == 0){ // all tasks done
-            $class = 'do_done';
-            $title = $this->getLang('title_alldone');
-        }elseif($count['late'] == 0) { // open tasks but none late
-            $class = 'do_undone';
-            $title = sprintf($this->getLang('title_intime'), $count['undone']);
-        } else { // late tasks
-            $class = 'do_late';
-            $title = sprintf($this->getLang('title_late'), $count['undone'], $count['late']);
-        }
-        $markup = "<li class=\"plugin__do_pagetasks ".$class."\" title=\"'.$title.'\"><strong><span class=\"prefix\">".tpl_getLang('prefix_tasks_page')." </span><span class=\"num\">".$num."</span></strong></li>";
-
-        echo $markup;
-    }
-
-    if ($doPlugin !== null ||$qc ) {
-        echo "</ul>";
-    }
-
-/*
-
-
-$out = '<div class="plugin__do_pagetasks" title="' . $title . '"><span class="' . $class . '">';
-$out .= $count['undone'];
-$out .= '</span></div>';
-
-if($return) return $out;
-echo $out;*/

From a94fc7a514a474778ffdc5e7e998f441ce1d2576 Mon Sep 17 00:00:00 2001
From: Andreas Gohr <gohr@cosmocode.de>
Date: Thu, 9 Mar 2017 16:16:19 +0100
Subject: [PATCH 02/25] give tabs a class for special styling

I nearly needed that but then didn't. but it might come in handy
---
 tpl/nav-meta-box.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tpl/nav-meta-box.php b/tpl/nav-meta-box.php
index 77328c5..abf95a3 100755
--- a/tpl/nav-meta-box.php
+++ b/tpl/nav-meta-box.php
@@ -9,7 +9,7 @@ $tabs = \dokuwiki\template\sprintdoc\Template::getInstance()->getMetaBoxTabs();
         <li class="a11y">&nbsp;</li>
         <?php
         foreach($tabs as $tab) {
-            echo '<li>';
+            echo '<li class="' . $tab['id'] . '">';
             echo '<a href="#' . $tab['id'] . '" aria-expanded="false">';
             echo '<span class="prefix">';
             echo $tab['label'];

From 80573eb8846ddd766f5554ac7ffc548113d92346 Mon Sep 17 00:00:00 2001
From: Andreas Gohr <gohr@cosmocode.de>
Date: Thu, 9 Mar 2017 16:18:15 +0100
Subject: [PATCH 03/25] do not break the C in CSS

Non-explicitly styled elements are supposed to inherit their parent's
font and colors!
---
 css/base.less | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/css/base.less b/css/base.less
index 9b9ed35..8198e74 100755
--- a/css/base.less
+++ b/css/base.less
@@ -433,18 +433,7 @@ nav > ul {
         padding: 0;
     }
 
-    html, body, div, span, applet, object, iframe,
-    h1, h2, h3, h4, h5, h6, p, blockquote,
-    a, abbr, acronym, address, big, cite, del, dfn, em, img, ins, kbd, q, s, samp,
-    small, strike, strong, sub, sup, tt, var,
-    b, u, i, center,
-    dl, dt, dd, ol, ul, li,
-    fieldset, form, label, legend,
-    table, caption, tbody, tfoot, thead, tr, th, td,
-    article, aside, canvas, details, embed,
-    figure, figcaption, footer, header,
-    menu, nav, output, ruby, section, summary,
-    time, mark, audio, video {
+    html, body {
         font-family: @font_family_screen;
         color: @ini_text;
     }

From 14353296bbf53a370646962d9d9d86ecda72c0bc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= <grosse@cosmocode.de>
Date: Thu, 30 Mar 2017 16:58:17 +0200
Subject: [PATCH 04/25] Copy'n'paste php boilerplate to detail.php

We need most of the html/php from the main.php for this view as well.
For lack of a better alternative I copied the relevant parts to this
file.

At some point we should consider if we either want to extend with
features or get rid of the detail.php

Known Issues
------------
- [ ] the pagetools are still wrong. These should be replaced once the
new pagetool-mechanism has been implemented (see SPR-837)

SPR-814
---
 detail.php | 174 +++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 169 insertions(+), 5 deletions(-)

diff --git a/detail.php b/detail.php
index f010711..6a1fd9e 100755
--- a/detail.php
+++ b/detail.php
@@ -28,17 +28,141 @@ header('X-UA-Compatible: IE=edge,chrome=1');
     <?php tpl_includeFile('meta.html') ?>
 </head>
 
-<body>
-    <div id="dokuwiki__detail" class="<?php echo tpl_classes(); ?>">
+<body id="dokuwiki__top" class="<?php echo tpl_classes(); ?> wide-content showSidebar">
+<div id="dokuwiki__site">
+    <?php include('tpl/nav-direct.php') ?>
+
+
+    <div class="page-wrapper <?php echo ($showSidebar) ? 'hasSidebar' : ''; ?>">
+        <?php
+        tpl_includeFile('header.html');
+        ?>
+
+        <div id="dokuwiki__header" class="header no-print">
+            <div class="container">
+                <div class="row">
+                    <div class="col-xs-12">
+                        <div class="claim main-sidebar">
+                            <?php if (tpl_getConf('logo') && file_exists(mediaFN(tpl_getConf('logo')))){
+
+                                /* upload your logo into the data/media folder (root of the media manager) and replace 'logo.png' in der template config accordingly: */
+                                include('tpl/main-sidebar-logo.php');
+                            } ?>
+                            <?php if ($conf['tagline']): ?>
+                                <p class="claim"><?php echo $conf['tagline'] ?></p>
+                            <?php endif ?>
+
+                        </div><!-- .headings -->
+                    </div><!-- .col -->
+                </div><!-- .row -->
+            </div><!-- .container -->
+        </div><!-- .header -->
+
+        <div class="sr-only nav-area-head">
+            <h5 class="sr-only" aria-level="1"><?php echo tpl_getLang('nav-area-head') ?></h5>
+        </div><!-- .nav-area-head -->
+
+        <div class="tools">
+            <div class="container">
+                <div class="row">
+                    <div class="col-xs-12">
+
+                        <div class="sidebarheader main-sidebar">
+                            <?php
+                            tpl_includeFile('sidebarheader.html')
+                            ?>
+                        </div><!-- .sidebarheader -->
+
+                        <div class="search main-sidebar">
+                            <?php
+                            include('tpl/main-sidebar-search.php');
+                            ?>
+                        </div><!-- .search -->
+
+                        <div id="dokuwiki__aside">
+                            <?php
+                            include('tpl/main-sidebar-nav.php');
+                            ?>
+                        </div><!-- .aside -->
+
+                    </div><!-- .col -->
+                </div><!-- .row -->
+            </div><!-- .container -->
+        </div><!-- .tools -->
+
+        <div class="top-header">
+            <div class="container">
+                <div class="row">
+                    <div class="col-xs-12">
+
+                        <?php
+                        $showTools = true;
+                        include('tpl/nav-usertools-buttons.php');
+                        tpl_includeFile('header.html');
+                        ?>
+
+                    </div><!-- .col -->
+                </div><!-- .row -->
+            </div><!-- .container -->
+        </div><!-- /top-header -->
+
+
+        <div id="dokuwiki__detail">
         <?php html_msgarea() ?>
 
+            <div class="content group">
+                <div class="container">
+                    <div class="row">
+                        <div class="col-xs-12">
+                            <div class="breadcrumbs" data-do="<?php echo $ACT?>">
+
+                                <div class="togglelink page_main-content">
+                                    <a href="#">&lt; &gt;<span class="sr-out"><?php echo tpl_getLang('a11y_sidebartoggle')?></span></a>
+                                </div>
+
+                                <h6 class="sr-only" role="heading" aria-level="2"><?php echo  tpl_getLang('head_menu_status')  ?></h6>
+
+                                <?php
+
+                                /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+                                /* page quality / page tasks */
+                                /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+                                include('tpl/nav-page-quality-tasks.php');
+                                ?>
+
+                                <?php
+                                /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+                                /* breadcrumb */
+                                /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+                                include('tpl/nav-breadcrumb.php');
+                                ?>
+
+                                <h6 class="sr-only" role="heading" aria-level="2"><?php echo  $lang['page_tools']  ?></h6>
+
+                                <?php
+
+
+                                /**
+                                 * FIXME implement proper pagetools as in https://www.dokuwiki.org/_detail/wiki:dokuwiki-128.png
+                                 * after the new svg-page-tool mechanism has been merged into master
+                                 *
+                                 * see https://cosmocode.jira.com/browse/SPR-837
+                                 */
+                                include('tpl/nav-page-tools.php');
+                                ?>
+
+                            </div>
+                            <div id="dokuwiki__content" class="page main-content">
+
+                                <div id="spr__meta-box"></div>
+
         <?php if($ERROR): print $ERROR; ?>
         <?php else: ?>
 
             <?php if($REV) echo p_locale_xhtml('showrev');?>
             <h1><?php echo hsc(tpl_img_getTag('IPTC.Headline', $IMG))?></h1>
 
-            <div class="content group">
+
                 <?php tpl_img(900, 700); /* the image; parameters: maximum width, maximum height (and more) */ ?>
 
                 <div class="img_detail">
@@ -80,14 +204,54 @@ header('X-UA-Compatible: IE=edge,chrome=1');
                     <?php endif; ?>
                     <?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw')); ?>
                 </div>
-            </div><!-- /.content -->
-
             <p class="back">
                 <?php tpl_action('mediaManager', 1) ?><br />
                 &larr; <?php tpl_action('img_backto', 1) ?>
             </p>
 
+                            </div><!-- .main-content -->
+                        </div><!-- .col -->
+                    </div><!-- .row -->
+                </div><!-- .container -->
+            </div><!-- /.content -->
+
+
         <?php endif; ?>
     </div>
+    </div><!-- /wrapper -->
+
+
+
+    <!-- ********** FOOTER ********** -->
+
+    <div id="dokuwiki__footer">
+        <div class="container">
+            <div class="row">
+                <div class="col-xs-12">
+
+                    <div class="main-footer">
+                        <p>
+                            <?php
+
+
+                            /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+                            /* copyright */
+                            /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+                            tpl_license($img = false, $imgonly = false, $return = false, $wrap = false);
+                            ?>
+                        </p>
+                    </div>
+
+                </div>
+            </div>
+        </div>
+    </div><!-- /footer -->
+
+
+    <?php tpl_includeFile('footer.html') ?>
+</div><!-- .dokuwiki__site -->
+
+<div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
+
 </body>
 </html>

From f2a0ea7b7df1ef33f18e553628b9b3af76a3d9f0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= <grosse@cosmocode.de>
Date: Fri, 31 Mar 2017 13:32:20 +0200
Subject: [PATCH 05/25] Show OSM iframe if image is geotagged

If the spatialhelper and the geophp plugins are available, then show a
iframe from open street map with the location of the photo.

SPR-814
---
 detail.php | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/detail.php b/detail.php
index 6a1fd9e..70ddd7c 100755
--- a/detail.php
+++ b/detail.php
@@ -169,7 +169,30 @@ header('X-UA-Compatible: IE=edge,chrome=1');
                     <h2><?php print nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h2>
 
                     <?php if(function_exists('tpl_img_meta')): ?>
-                        <?php tpl_img_meta(); ?>
+                        <?php
+                        tpl_img_meta();
+
+                        /** @var helper_plugin_spatialhelper_index $spatial */
+                        $spatial = plugin_load('helper', 'spatialhelper_index');
+                        if ($spatial && plugin_load('helper', 'geophp')) {
+                            global $IMG;
+                            $point = $spatial->getCoordsFromExif($IMG);
+                            if ($point) {
+                                $long = $point->getX();
+                                $lat = $point->getY();
+                                $latShort = round($lat,3);
+                                $longShort = round($long,3);
+
+                                $hrefOSM = "https://www.openstreetmap.org/?mlat=$lat&mlon=$long#map=18/$lat/$long";
+                                $srcOSM = 'https://www.openstreetmap.org/export/embed.html?bbox='.($long-0.004).','.($lat-0.002).','.($long+0.004).','.($lat+0.002).'&layer=mapnik&marker='.$lat.','.$long;
+                                echo '<dl>';
+                                echo '<dt title="Open Street Maps">OSM:</dt><dd>';
+                                echo '<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'.$srcOSM.'" style="border: 1px solid black"></iframe><br/><small><a href="'.$hrefOSM.'">View Larger Map</a></small>';
+                                echo '</dd>';
+                                echo '</dl>';
+                            }
+                        }
+                        ?>
                     <?php else: /* deprecated since Release 2014-05-05 */ ?>
                         <dl>
                             <?php

From ba5f92bc02323b15a023bd2ac7b7af8b284e0108 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= <grosse@cosmocode.de>
Date: Mon, 10 Apr 2017 13:43:43 +0200
Subject: [PATCH 06/25] Adjust to changed main html

---
 detail.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/detail.php b/detail.php
index 70ddd7c..5cce646 100755
--- a/detail.php
+++ b/detail.php
@@ -117,7 +117,7 @@ header('X-UA-Compatible: IE=edge,chrome=1');
                             <div class="breadcrumbs" data-do="<?php echo $ACT?>">
 
                                 <div class="togglelink page_main-content">
-                                    <a href="#">&lt; &gt;<span class="sr-out"><?php echo tpl_getLang('a11y_sidebartoggle')?></span></a>
+                                    <a href="#"><span class="sr-out"><?php echo tpl_getLang('a11y_sidebartoggle')?></span></a>
                                 </div>
 
                                 <h6 class="sr-only" role="heading" aria-level="2"><?php echo  tpl_getLang('head_menu_status')  ?></h6>

From 5c6ddbf8b29351dbab45fb87cd45106e942d7e06 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= <grosse@cosmocode.de>
Date: Mon, 10 Apr 2017 13:45:43 +0200
Subject: [PATCH 07/25] Use correct pagetools for details.php

SPR-814
---
 detail.php | 26 ++++++++++----------------
 1 file changed, 10 insertions(+), 16 deletions(-)

diff --git a/detail.php b/detail.php
index 5cce646..9aa119e 100755
--- a/detail.php
+++ b/detail.php
@@ -139,17 +139,16 @@ header('X-UA-Compatible: IE=edge,chrome=1');
 
                                 <h6 class="sr-only" role="heading" aria-level="2"><?php echo  $lang['page_tools']  ?></h6>
 
-                                <?php
-
-
-                                /**
-                                 * FIXME implement proper pagetools as in https://www.dokuwiki.org/_detail/wiki:dokuwiki-128.png
-                                 * after the new svg-page-tool mechanism has been merged into master
-                                 *
-                                 * see https://cosmocode.jira.com/browse/SPR-837
-                                 */
-                                include('tpl/nav-page-tools.php');
-                                ?>
+                                <nav id="dokuwiki__pagetools">
+                                    <div class="tools">
+                                        <ul>
+                                            <?php
+                                            echo '<li>' . dokuwiki\template\sprintdoc\tpl::pageToolAction('mediaManager') . '</li>';
+                                            echo '<li>' . dokuwiki\template\sprintdoc\tpl::pageToolAction('img_backto') . '</li>';
+                                            ?>
+                                        </ul>
+                                    </div>
+                                </nav>
 
                             </div>
                             <div id="dokuwiki__content" class="page main-content">
@@ -227,11 +226,6 @@ header('X-UA-Compatible: IE=edge,chrome=1');
                     <?php endif; ?>
                     <?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw')); ?>
                 </div>
-            <p class="back">
-                <?php tpl_action('mediaManager', 1) ?><br />
-                &larr; <?php tpl_action('img_backto', 1) ?>
-            </p>
-
                             </div><!-- .main-content -->
                         </div><!-- .col -->
                     </div><!-- .row -->

From 6f352bafb27d6b8a6819ca65a04198c78d30d566 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= <grosse@cosmocode.de>
Date: Mon, 10 Apr 2017 13:49:08 +0200
Subject: [PATCH 08/25] function tpl_img_meta reliably exists

---
 detail.php | 33 ---------------------------------
 1 file changed, 33 deletions(-)

diff --git a/detail.php b/detail.php
index 9aa119e..fdd2cbc 100755
--- a/detail.php
+++ b/detail.php
@@ -167,7 +167,6 @@ header('X-UA-Compatible: IE=edge,chrome=1');
                 <div class="img_detail">
                     <h2><?php print nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h2>
 
-                    <?php if(function_exists('tpl_img_meta')): ?>
                         <?php
                         tpl_img_meta();
 
@@ -192,38 +191,6 @@ header('X-UA-Compatible: IE=edge,chrome=1');
                             }
                         }
                         ?>
-                    <?php else: /* deprecated since Release 2014-05-05 */ ?>
-                        <dl>
-                            <?php
-                                $config_files = getConfigFiles('mediameta');
-                                foreach ($config_files as $config_file) {
-                                    if(@file_exists($config_file)) {
-                                        include($config_file);
-                                    }
-                                }
-
-                                foreach($fields as $key => $tag){
-                                    $t = array();
-                                    if (!empty($tag[0])) {
-                                        $t = array($tag[0]);
-                                    }
-                                    if(is_array($tag[3])) {
-                                        $t = array_merge($t,$tag[3]);
-                                    }
-                                    $value = tpl_img_getTag($t);
-                                    if ($value) {
-                                        echo '<dt>'.$lang[$tag[1]].':</dt><dd>';
-                                        if ($tag[2] == 'date') {
-                                            echo dformat($value);
-                                        } else {
-                                            echo hsc($value);
-                                        }
-                                        echo '</dd>';
-                                    }
-                                }
-                            ?>
-                        </dl>
-                    <?php endif; ?>
                     <?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw')); ?>
                 </div>
                             </div><!-- .main-content -->

From ecb77cc51cadc644f63b3cf5e3c2a7d1fb3c45a9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= <grosse@cosmocode.de>
Date: Mon, 10 Apr 2017 13:49:54 +0200
Subject: [PATCH 09/25] Fix indent and more style-issues in details.php

---
 detail.php | 103 ++++++++++++++++++++++++++++-------------------------
 1 file changed, 55 insertions(+), 48 deletions(-)

diff --git a/detail.php b/detail.php
index fdd2cbc..8c87871 100755
--- a/detail.php
+++ b/detail.php
@@ -9,21 +9,25 @@
  */
 
 // must be run from within DokuWiki
-if (!defined('DOKU_INC')) die();
+if (!defined('DOKU_INC')) {
+    die();
+}
 header('X-UA-Compatible: IE=edge,chrome=1');
 
 ?>
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang']?>"
- lang="<?php echo $conf['lang']?>" dir="<?php echo $lang['direction'] ?>" class="no-js">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang'] ?>"
+      lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js">
 <head>
-    <meta charset="UTF-8" />
+    <meta charset="UTF-8"/>
     <title>
-        <?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG))?>
-        [<?php echo strip_tags($conf['title'])?>]
+        <?php echo hsc(tpl_img_getTag('IPTC.Headline', $IMG)) ?>
+        [<?php echo strip_tags($conf['title']) ?>]
     </title>
-    <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
-    <?php tpl_metaheaders()?>
-    <meta name="viewport" content="width=device-width,initial-scale=1" />
+    <script>(function (H) {
+            H.className = H.className.replace(/\bno-js\b/, 'js')
+        })(document.documentElement)</script>
+    <?php tpl_metaheaders() ?>
+    <meta name="viewport" content="width=device-width,initial-scale=1"/>
     <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
     <?php tpl_includeFile('meta.html') ?>
 </head>
@@ -43,7 +47,7 @@ header('X-UA-Compatible: IE=edge,chrome=1');
                 <div class="row">
                     <div class="col-xs-12">
                         <div class="claim main-sidebar">
-                            <?php if (tpl_getConf('logo') && file_exists(mediaFN(tpl_getConf('logo')))){
+                            <?php if (tpl_getConf('logo') && file_exists(mediaFN(tpl_getConf('logo')))) {
 
                                 /* upload your logo into the data/media folder (root of the media manager) and replace 'logo.png' in der template config accordingly: */
                                 include('tpl/main-sidebar-logo.php');
@@ -108,19 +112,21 @@ header('X-UA-Compatible: IE=edge,chrome=1');
 
 
         <div id="dokuwiki__detail">
-        <?php html_msgarea() ?>
+            <?php html_msgarea() ?>
 
             <div class="content group">
                 <div class="container">
                     <div class="row">
                         <div class="col-xs-12">
-                            <div class="breadcrumbs" data-do="<?php echo $ACT?>">
+                            <div class="breadcrumbs" data-do="<?php echo $ACT ?>">
 
                                 <div class="togglelink page_main-content">
-                                    <a href="#"><span class="sr-out"><?php echo tpl_getLang('a11y_sidebartoggle')?></span></a>
+                                    <a href="#"><span
+                                            class="sr-out"><?php echo tpl_getLang('a11y_sidebartoggle') ?></span></a>
                                 </div>
 
-                                <h6 class="sr-only" role="heading" aria-level="2"><?php echo  tpl_getLang('head_menu_status')  ?></h6>
+                                <h6 class="sr-only" role="heading"
+                                    aria-level="2"><?php echo tpl_getLang('head_menu_status') ?></h6>
 
                                 <?php
 
@@ -137,7 +143,7 @@ header('X-UA-Compatible: IE=edge,chrome=1');
                                 include('tpl/nav-breadcrumb.php');
                                 ?>
 
-                                <h6 class="sr-only" role="heading" aria-level="2"><?php echo  $lang['page_tools']  ?></h6>
+                                <h6 class="sr-only" role="heading" aria-level="2"><?php echo $lang['page_tools'] ?></h6>
 
                                 <nav id="dokuwiki__pagetools">
                                     <div class="tools">
@@ -155,44 +161,46 @@ header('X-UA-Compatible: IE=edge,chrome=1');
 
                                 <div id="spr__meta-box"></div>
 
-        <?php if($ERROR): print $ERROR; ?>
-        <?php else: ?>
+                                <?php if ($ERROR): print $ERROR; ?>
+                                <?php else: ?>
 
-            <?php if($REV) echo p_locale_xhtml('showrev');?>
-            <h1><?php echo hsc(tpl_img_getTag('IPTC.Headline', $IMG))?></h1>
+                                <?php if ($REV) {
+                                    echo p_locale_xhtml('showrev');
+                                } ?>
+                                <h1><?php echo hsc(tpl_img_getTag('IPTC.Headline', $IMG)) ?></h1>
 
 
-                <?php tpl_img(900, 700); /* the image; parameters: maximum width, maximum height (and more) */ ?>
+                                <?php tpl_img(900, 700); /* the image; parameters: maximum width, maximum height (and more) */ ?>
 
-                <div class="img_detail">
-                    <h2><?php print nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h2>
+                                <div class="img_detail">
+                                    <h2><?php print nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h2>
 
-                        <?php
-                        tpl_img_meta();
+                                    <?php
+                                    tpl_img_meta();
 
-                        /** @var helper_plugin_spatialhelper_index $spatial */
-                        $spatial = plugin_load('helper', 'spatialhelper_index');
-                        if ($spatial && plugin_load('helper', 'geophp')) {
-                            global $IMG;
-                            $point = $spatial->getCoordsFromExif($IMG);
-                            if ($point) {
-                                $long = $point->getX();
-                                $lat = $point->getY();
-                                $latShort = round($lat,3);
-                                $longShort = round($long,3);
+                                    /** @var helper_plugin_spatialhelper_index $spatial */
+                                    $spatial = plugin_load('helper', 'spatialhelper_index');
+                                    if ($spatial && plugin_load('helper', 'geophp')) {
+                                        global $IMG;
+                                        $point = $spatial->getCoordsFromExif($IMG);
+                                        if ($point) {
+                                            $long = $point->getX();
+                                            $lat = $point->getY();
+                                            $latShort = round($lat, 3);
+                                            $longShort = round($long, 3);
 
-                                $hrefOSM = "https://www.openstreetmap.org/?mlat=$lat&mlon=$long#map=18/$lat/$long";
-                                $srcOSM = 'https://www.openstreetmap.org/export/embed.html?bbox='.($long-0.004).','.($lat-0.002).','.($long+0.004).','.($lat+0.002).'&layer=mapnik&marker='.$lat.','.$long;
-                                echo '<dl>';
-                                echo '<dt title="Open Street Maps">OSM:</dt><dd>';
-                                echo '<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'.$srcOSM.'" style="border: 1px solid black"></iframe><br/><small><a href="'.$hrefOSM.'">View Larger Map</a></small>';
-                                echo '</dd>';
-                                echo '</dl>';
-                            }
-                        }
-                        ?>
-                    <?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw')); ?>
-                </div>
+                                            $hrefOSM = "https://www.openstreetmap.org/?mlat=$lat&mlon=$long#map=18/$lat/$long";
+                                            $srcOSM = 'https://www.openstreetmap.org/export/embed.html?bbox=' . ($long - 0.004) . ',' . ($lat - 0.002) . ',' . ($long + 0.004) . ',' . ($lat + 0.002) . '&layer=mapnik&marker=' . $lat . ',' . $long;
+                                            echo '<dl>';
+                                            echo '<dt title="Open Street Maps">OSM:</dt><dd>';
+                                            echo '<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="' . $srcOSM . '" style="border: 1px solid black"></iframe><br/><small><a href="' . $hrefOSM . '">View Larger Map</a></small>';
+                                            echo '</dd>';
+                                            echo '</dl>';
+                                        }
+                                    }
+                                    ?>
+                                    <?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw')); ?>
+                                </div>
                             </div><!-- .main-content -->
                         </div><!-- .col -->
                     </div><!-- .row -->
@@ -201,11 +209,10 @@ header('X-UA-Compatible: IE=edge,chrome=1');
 
 
         <?php endif; ?>
-    </div>
+        </div>
     </div><!-- /wrapper -->
 
 
-
     <!-- ********** FOOTER ********** -->
 
     <div id="dokuwiki__footer">

From e1c37e409cc404c96f18025a6a5e52220b15ea16 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= <grosse@cosmocode.de>
Date: Tue, 11 Apr 2017 11:20:40 +0200
Subject: [PATCH 10/25] Fix js errors by initializing JSINFO on details.php

SPR-814
---
 detail.php | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/detail.php b/detail.php
index 8c87871..faf5eef 100755
--- a/detail.php
+++ b/detail.php
@@ -14,6 +14,11 @@ if (!defined('DOKU_INC')) {
 }
 header('X-UA-Compatible: IE=edge,chrome=1');
 
+global $JSINFO;
+if (empty($JSINFO)) {
+    $JSINFO = array();
+}
+
 ?>
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang'] ?>"
       lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js">

From 2ac13e14316e4dcdcd92344027505d3695d158fc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jana=20Deutschla=CC=88nder?= <deutschlaender@cosmocode.de>
Date: Tue, 11 Apr 2017 12:53:03 +0200
Subject: [PATCH 11/25] SPR-814: style linked image

---
 css/template_detail.less | 64 ++++++++++++++++++++++++++++++++++++++++
 detail.php               |  6 ++--
 style.ini                |  4 ++-
 3 files changed, 70 insertions(+), 4 deletions(-)
 create mode 100644 css/template_detail.less

diff --git a/css/template_detail.less b/css/template_detail.less
new file mode 100644
index 0000000..b11c551
--- /dev/null
+++ b/css/template_detail.less
@@ -0,0 +1,64 @@
+/**
+ * This file provides the design styles for the the detail template
+ * (media details)
+ *
+ * @author Jana Deutschlaender <deutschlaender@cosmocode.de>
+ */
+#dokuwiki__detail {
+
+    // linked image
+    .img-link{
+
+        text-align: center;
+
+        a {
+            display: inline-block;
+            margin: 0 auto 1.4em;
+            position: relative;
+
+            img {
+                margin: 0;
+                display: block;
+                border: 1px dotted @ini_background;
+                position: relative;
+                z-index: 1;
+            }
+
+            &:hover,
+            &:focus,
+            &:active {
+                &:before{
+                    position: absolute;
+                    top: 0;
+                    left: 0;
+                    width: 100%;
+                    box-sizing: border-box;
+                    display: block;
+                    padding: @margin-small;
+
+                    z-index:2;
+                    background: @ini_button_background;
+                    color: @ini_button_color;
+                    content:attr(title);
+                }
+                img {
+                    border: 1px solid @ini_button_background;
+                }
+            }
+
+        }
+    }
+
+    // meta data
+    .img_detail {
+        /* vertical minus margin of .img-detail corresponds to the padding of .page  */
+        margin: @margin-default -(@margin-default);
+        @media @screen_max-md {
+            margin-right: -(@margin-default * 1.6);
+        }
+
+        @media @screen_max-xs {
+            margin-left: -(@margin-small);
+        }
+    }
+}
diff --git a/detail.php b/detail.php
index 8c87871..5768eb1 100755
--- a/detail.php
+++ b/detail.php
@@ -168,9 +168,9 @@ header('X-UA-Compatible: IE=edge,chrome=1');
                                     echo p_locale_xhtml('showrev');
                                 } ?>
                                 <h1><?php echo hsc(tpl_img_getTag('IPTC.Headline', $IMG)) ?></h1>
-
-
-                                <?php tpl_img(900, 700); /* the image; parameters: maximum width, maximum height (and more) */ ?>
+                                <div class="img-link">
+                                    <?php tpl_img(900, 700); /* the image; parameters: maximum width, maximum height (and more) */ ?>
+                                </div>
 
                                 <div class="img_detail">
                                     <h2><?php print nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h2>
diff --git a/style.ini b/style.ini
index 1fd8b20..64e1480 100755
--- a/style.ini
+++ b/style.ini
@@ -72,7 +72,6 @@ css/area_nav-pagetools.less           = all
 css/area_nav-metabox.less             = all
 css/area_main-sidebar-nav.less        = all
 css/area_main-sidebar-content.less    = all
-;css/area_sidetools.less               = all
 css/area_main-content.less            = all
 css/area_main-content-secedit.less    = all
 css/area_togglelink.less              = all
@@ -80,7 +79,10 @@ css/area_forms.less                   = all
 css/area_search.less                  = all
 css/area_tabs.less                    = all
 
+; ____________ template styles _____________
+
 css/template_admin.less               = all
+css/template_detail.less              = all
 
 
 ; _____________  plugin styles _____________

From fa31b96cc4fcf7b1ac51920ced1fb7822903d1f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jana=20Deutschla=CC=88nder?= <deutschlaender@cosmocode.de>
Date: Wed, 12 Apr 2017 15:14:46 +0200
Subject: [PATCH 12/25] SPR-814: html5 instead of xhtml

---
 detail.php | 72 +++++++++++++++++++++++++++++++++++++-----------------
 1 file changed, 49 insertions(+), 23 deletions(-)

diff --git a/detail.php b/detail.php
index 25b09d5..d964f3d 100755
--- a/detail.php
+++ b/detail.php
@@ -1,17 +1,16 @@
 <!DOCTYPE html>
 <?php
 /**
- * DokuWiki Image Detail Page
+ * DokuWiki sprintDoc Detail Template
  *
- * @author   Andreas Gohr <andi@splitbrain.org>
- * @author   Anika Henke <anika@selfthinker.org>
+ * @link     FIXME
+ * @author   Jana Deutschlaender <deutschlaender@cosmocode.de>
+ * @author   Michael Grosse <grosse@cosmocode.de>
  * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
  */
+use dokuwiki\template\sprintdoc\Template;
 
-// must be run from within DokuWiki
-if (!defined('DOKU_INC')) {
-    die();
-}
+if (!defined('DOKU_INC')) die();                        /* must be run from within DokuWiki */
 header('X-UA-Compatible: IE=edge,chrome=1');
 
 global $JSINFO;
@@ -20,21 +19,44 @@ if (empty($JSINFO)) {
 }
 
 ?>
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang'] ?>"
-      lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js">
+<html class="edge no-js" lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>">
 <head>
-    <meta charset="UTF-8"/>
-    <title>
-        <?php echo hsc(tpl_img_getTag('IPTC.Headline', $IMG)) ?>
-        [<?php echo strip_tags($conf['title']) ?>]
-    </title>
-    <script>(function (H) {
-            H.className = H.className.replace(/\bno-js\b/, 'js')
-        })(document.documentElement)</script>
-    <?php tpl_metaheaders() ?>
-    <meta name="viewport" content="width=device-width,initial-scale=1"/>
-    <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
-    <?php tpl_includeFile('meta.html') ?>
+<?php
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+/* meta and link relations */
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+?>
+<meta charset="utf-8" />
+<meta name="viewport" content="width=device-width, initial-scale=1.0" />
+<?php tpl_metaheaders() ?>
+<?php
+
+
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+/* page title */
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+?>
+<title><?php echo hsc(tpl_img_getTag('IPTC.Headline', $IMG)) ?> [<?php echo strip_tags($conf['title']) ?>]</title>
+
+<script type="text/javascript">(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
+<?php
+
+
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+/* favicons */
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+?>
+<?php
+include('tpl/favicon_tiles.php');
+?>
+<?php
+
+
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+/* Include Hook: meta.html */
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+?>
+<?php tpl_includeFile('meta.html') ?>
 </head>
 
 <body id="dokuwiki__top" class="<?php echo tpl_classes(); ?> wide-content showSidebar">
@@ -177,8 +199,12 @@ if (empty($JSINFO)) {
                                     <?php tpl_img(900, 700); /* the image; parameters: maximum width, maximum height (and more) */ ?>
                                 </div>
 
-                                <div class="img_detail">
-                                    <h2><?php print nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h2>
+                                <div class="img_detail"><?php
+                                    $simple_title = hsc(tpl_img_getTag('simple.title'));
+                                    if(strlen($simple_title) > 0) { ?>
+                                    <h2><?php print nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h2><?php
+                                    }
+                                    ?>
 
                                     <?php
                                     tpl_img_meta();

From a21c6f8785ac4967f21ffe25bb28652e3383f951 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jana=20Deutschla=CC=88nder?= <deutschlaender@cosmocode.de>
Date: Thu, 13 Apr 2017 12:44:53 +0200
Subject: [PATCH 13/25] SPR-869: debug for wiki in root

---
 css/area_nav-page-attributes.less | 25 +++++++++++++++++++++++++
 js/plugins/qc.js                  |  4 ++--
 2 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/css/area_nav-page-attributes.less b/css/area_nav-page-attributes.less
index eb9d612..6cfa847 100644
--- a/css/area_nav-page-attributes.less
+++ b/css/area_nav-page-attributes.less
@@ -12,6 +12,13 @@
         max-width: 90%;
     }
 
+    li.plugin_qc .qc_icon svg {
+        margin-left: 0;
+        margin-top: 0.2em;
+        width: 1.5em;
+        height: 1.5em;
+    }
+
     > li {
         .btn-usertools-wrapper(); // uniform li
         .btn-usertools-num();
@@ -26,6 +33,24 @@
         text-align: center;
         margin: 0 .25rem;
 
+        a {
+            display: block;
+            width: auto;
+            min-height: 26px;
+            &:hover, &:focus, &:active {
+                background-color: @ini_nav_menu_hover_color;
+                border-color: @ini_nav_menu_hover_color;
+                color: @ini_nav_menu_hover_bg;
+                span.qc_icon {
+                    &.qc_bad, &.qc_meh, &.qc_good {
+                        fill: @ini_nav_menu_hover_bg;
+                        color: @ini_nav_menu_hover_bg;
+                    }
+                }
+
+            }
+        }
+
         .prefix {
             .btn-prefix ();
             .icon-clipboard();
diff --git a/js/plugins/qc.js b/js/plugins/qc.js
index 65d795b..5a0de75 100644
--- a/js/plugins/qc.js
+++ b/js/plugins/qc.js
@@ -6,7 +6,7 @@ jQuery(function () {
 
     // load summary
     jQuery('.page-attributes .plugin_qc a').load(
-        DOKU_BASE + '/lib/exe/ajax.php',
+        DOKU_BASE + 'lib/exe/ajax.php',
         {
             call: 'plugin_qc_short',
             id: JSINFO['id']
@@ -20,7 +20,7 @@ jQuery(function () {
         if ($panel.html() == '') {
             // load output
             $panel.load(
-                DOKU_BASE + '/lib/exe/ajax.php',
+                DOKU_BASE + 'lib/exe/ajax.php',
                 {
                     call: 'plugin_qc_long',
                     id: JSINFO['id']

From 9161dde6469491dc934c9c23d730ad0eb9f2a7a9 Mon Sep 17 00:00:00 2001
From: Silke Pisulla <pisulla@cosmocode.de>
Date: Thu, 13 Apr 2017 15:29:36 +0200
Subject: [PATCH 14/25] SPR-869: QC Plugin icon qs

---
 css/area_nav-page-attributes.less | 41 +++++++++++++++++--------------
 css/base_mixins.less              |  4 +--
 css/plugins/qc.less               | 10 +++++---
 3 files changed, 31 insertions(+), 24 deletions(-)

diff --git a/css/area_nav-page-attributes.less b/css/area_nav-page-attributes.less
index 6cfa847..f433a32 100644
--- a/css/area_nav-page-attributes.less
+++ b/css/area_nav-page-attributes.less
@@ -1,6 +1,10 @@
 /**
  * Page Attribute Icons in the breadcrumb bar
  */
+
+
+/* + + + + +  icons in breadcrumb area  + + + + + */
+
 .page-attributes {
     list-style: none;
     float: right;
@@ -8,17 +12,11 @@
     max-width: 30%;
     margin: -.45em 0 0;
     padding: 0;
+
     @media @screen_max-xs {
         max-width: 90%;
     }
 
-    li.plugin_qc .qc_icon svg {
-        margin-left: 0;
-        margin-top: 0.2em;
-        width: 1.5em;
-        height: 1.5em;
-    }
-
     > li {
         .btn-usertools-wrapper(); // uniform li
         .btn-usertools-num();
@@ -28,26 +26,34 @@
         display: block;
         width: auto;
         min-height: @toggle-size;
-        border: 1px solid @wikiicons-border;
-        border-radius: @ini_default_border_radius;
         text-align: center;
         margin: 0 .25rem;
 
+        strong {
+            display: block;
+            min-height: 1.64rem;
+            border: 1px solid @wikiicons-border;
+            border-radius: @ini_default_border_radius;
+        }
+
         a {
             display: block;
             width: auto;
-            min-height: 26px;
-            &:hover, &:focus, &:active {
+            min-height: 1.64rem;
+            border: 1px solid @wikiicons-border;
+            border-radius: @ini_default_border_radius;
+
+            &:hover,
+            &:focus,
+            &:active {
                 background-color: @ini_nav_menu_hover_color;
                 border-color: @ini_nav_menu_hover_color;
                 color: @ini_nav_menu_hover_bg;
-                span.qc_icon {
-                    &.qc_bad, &.qc_meh, &.qc_good {
-                        fill: @ini_nav_menu_hover_bg;
-                        color: @ini_nav_menu_hover_bg;
-                    }
-                }
 
+                span {
+                    fill: @ini_nav_menu_hover_bg;
+                    color: @ini_nav_menu_hover_bg;
+                }
             }
         }
 
@@ -59,6 +65,5 @@
             font-size: 1.2rem;
             line-height: 1;
         }
-
     }
 }
diff --git a/css/base_mixins.less b/css/base_mixins.less
index 82a5291..f287552 100755
--- a/css/base_mixins.less
+++ b/css/base_mixins.less
@@ -200,7 +200,7 @@
     font-size: @font-size-default;
 
     @media @screen_min-xxlg {
-        margin-top: .25rem;
+        margin-top: .22rem;
     }
 
     @media @screen_max-xxlg {
@@ -208,7 +208,7 @@
     }
 
     @media @screen_max-md {
-        margin-top: .25rem;
+        margin-top: .2rem;
     }
 }
 
diff --git a/css/plugins/qc.less b/css/plugins/qc.less
index df44e98..71d3167 100644
--- a/css/plugins/qc.less
+++ b/css/plugins/qc.less
@@ -2,23 +2,25 @@
  * Styles for the QC plugin
  */
 
-// icon in page attributes
+
+/* + + + + +  icon in page attributes3  + + + + + */
+
 .page-attributes .plugin_qc {
     .qc_icon {
         margin: 0;
 
         svg {
-            margin-top: 0.1em;
-            margin-left: 0.1em;
+            margin-top: .1em;
             width: 1.6em;
             height: 1.6em;
+            font-size: (@font-size-small - .06);
         }
     }
 }
 
+
 // output
 .qc-output {
     font-size: 90%;
     border-bottom: 1px solid @ini_border;
 }
-

From b457c328a9a6b6ccd9bb3fdb0e76e30bbb4ca958 Mon Sep 17 00:00:00 2001
From: Silke Pisulla <pisulla@cosmocode.de>
Date: Thu, 13 Apr 2017 15:35:03 +0200
Subject: [PATCH 15/25] SPR-908: QS - wiki-icons

---
 css/area_nav-page-attributes.less | 4 ++++
 css/plugins/do_tasks.less         | 1 -
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/css/area_nav-page-attributes.less b/css/area_nav-page-attributes.less
index f433a32..a04dfa6 100644
--- a/css/area_nav-page-attributes.less
+++ b/css/area_nav-page-attributes.less
@@ -65,5 +65,9 @@
             font-size: 1.2rem;
             line-height: 1;
         }
+
+        .num {
+            top: -.6em;
+        }
     }
 }
diff --git a/css/plugins/do_tasks.less b/css/plugins/do_tasks.less
index 261f5de..6b66253 100755
--- a/css/plugins/do_tasks.less
+++ b/css/plugins/do_tasks.less
@@ -19,7 +19,6 @@ ul.page-attributes {
             }
 
             .num {
-                margin-top: 1px;
                 background-color: @noopentasks-border; // fix
                 color: @noopentasks-color; // fix
             }

From 4134f067dfee5c2cc8a0097b00bfd428b2946213 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= <grosse@cosmocode.de>
Date: Wed, 19 Apr 2017 11:52:48 +0200
Subject: [PATCH 16/25] Use favicons for square logos

Since our current approach is to crop non-square logos, we should try all
square logos first.

Since favicons are usually small, we prefer them for the shortcut icon.
However since wiki:logo-square.png is usually larger, it is more
suitable for downscaling, so it should be preferred over favicons, which
would need to be upscaled.

SPR-928
---
 tpl/favicon_tiles.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tpl/favicon_tiles.php b/tpl/favicon_tiles.php
index a29b2e3..ebd8d8a 100755
--- a/tpl/favicon_tiles.php
+++ b/tpl/favicon_tiles.php
@@ -17,7 +17,7 @@ echo Template::getResizedImgTag(
     'link',
     array(
         'rel' => 'shortcut icon',
-        'href' => array('wiki:favicon.ico', 'wiki:favicon.png')
+        'href' => array('wiki:favicon.ico', 'wiki:favicon.png', 'wiki:logo-square.png')
     ),
     0, 0 // no scaling
 );
@@ -29,7 +29,7 @@ foreach(array(57, 60, 72, 76, 114, 120, 144, 152, 180) as $size) {
         array(
             'rel' => 'apple-touch-icon',
             'sizes' => $size . 'x' . $size,
-            'href' => array('wiki:logo-' . $size . 'x' . $size . '.png', 'wiki:logo-square.png', 'wiki:logo.png')
+            'href' => array('wiki:logo-' . $size . 'x' . $size . '.png', 'wiki:logo-square.png', 'wiki:favicon.ico', 'wiki:favicon.png', 'wiki:logo.png'),
         ),
         $size, $size
     );
@@ -42,7 +42,7 @@ foreach(array(32, 96, 192) as $size) {
         array(
             'rel' => 'icon',
             'sizes' => $size . 'x' . $size,
-            'href' => array('wiki:logo-' . $size . 'x' . $size . '.png', 'wiki:logo-square.png', 'wiki:logo.png')
+            'href' => array('wiki:logo-' . $size . 'x' . $size . '.png', 'wiki:logo-square.png', 'wiki:favicon.ico', 'wiki:favicon.png', 'wiki:logo.png')
         ),
         $size, $size
     );
@@ -54,7 +54,7 @@ foreach(array(70, 310) as $size) {
         'meta',
         array(
             'name' => 'msapplication-square' . $size . 'x' . $size . 'logo',
-            'content' => array('wiki:logo-' . $size . 'x' . $size . '.png', 'wiki:logo-square.png', 'wiki:logo.png')
+            'content' => array('wiki:logo-' . $size . 'x' . $size . '.png', 'wiki:logo-square.png', 'wiki:favicon.ico', 'wiki:favicon.png', 'wiki:logo.png'),
         ),
         $size, $size
     );

From e8d58fb55be094623b563540e67d899511883d10 Mon Sep 17 00:00:00 2001
From: Silke Pisulla <pisulla@cosmocode.de>
Date: Wed, 19 Apr 2017 11:52:59 +0200
Subject: [PATCH 17/25] SPR-869: QC Plugin output + icon in breadcrumb

---
 css/area_nav-page-attributes.less |  4 +++-
 css/base_mixins.less              |  6 +++---
 css/plugins/qc.less               | 16 +++++++++++++---
 3 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/css/area_nav-page-attributes.less b/css/area_nav-page-attributes.less
index a04dfa6..b7ab433 100644
--- a/css/area_nav-page-attributes.less
+++ b/css/area_nav-page-attributes.less
@@ -40,8 +40,10 @@
             display: block;
             width: auto;
             min-height: 1.64rem;
+            background-color: @ini_nav_menu_hover_bg;
             border: 1px solid @wikiicons-border;
             border-radius: @ini_default_border_radius;
+            transition: @transition background-color, @transition border-color, @transition color;
 
             &:hover,
             &:focus,
@@ -58,7 +60,7 @@
         }
 
         .prefix {
-            .btn-prefix ();
+            .btn-prefix(.26rem);
             .icon-clipboard();
 
             display: block;
diff --git a/css/base_mixins.less b/css/base_mixins.less
index f287552..4f7428b 100755
--- a/css/base_mixins.less
+++ b/css/base_mixins.less
@@ -175,7 +175,7 @@
     }
 }
 
-.btn-usertools-num () {
+.btn-usertools-num() {
     .num {
         position: absolute;
         right: -.4rem;
@@ -192,7 +192,7 @@
     }
 }
 
-.btn-prefix () {
+.btn-prefix(@margin-top:.3rem) {
     .fontello();
     .hide-text-show-before();
 
@@ -204,7 +204,7 @@
     }
 
     @media @screen_max-xxlg {
-        margin-top: .3rem;
+        margin-top: @margin-top;
     }
 
     @media @screen_max-md {
diff --git a/css/plugins/qc.less b/css/plugins/qc.less
index 71d3167..3119ed8 100644
--- a/css/plugins/qc.less
+++ b/css/plugins/qc.less
@@ -3,7 +3,7 @@
  */
 
 
-/* + + + + +  icon in page attributes3  + + + + + */
+/* + + + + +  icon in breadcrumb  + + + + + */
 
 .page-attributes .plugin_qc {
     .qc_icon {
@@ -19,8 +19,18 @@
 }
 
 
-// output
+/* + + + + +  slideout output  + + + + + */
 .qc-output {
+    min-width: 100%;
+    width: auto;
     font-size: 90%;
-    border-bottom: 1px solid @ini_border;
+    box-shadow: @box-shadow-bottom;
+    margin: -(@page_padding-top) -(@margin-default) 0;
+
+    .qc_icon {
+        background-color: #fff;
+        border-radius: @fix_border-radius;
+        vertical-align: top;
+        padding: .1rem;
+    }
 }

From f078e012ce4e55da1e38efc240aae2d34a2dace4 Mon Sep 17 00:00:00 2001
From: Silke Pisulla <pisulla@cosmocode.de>
Date: Wed, 19 Apr 2017 12:59:06 +0200
Subject: [PATCH 18/25] SPR-869: QC Plugin output responsive

---
 css/plugins/qc.less | 43 ++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 42 insertions(+), 1 deletion(-)

diff --git a/css/plugins/qc.less b/css/plugins/qc.less
index 3119ed8..1365b82 100644
--- a/css/plugins/qc.less
+++ b/css/plugins/qc.less
@@ -25,7 +25,48 @@
     width: auto;
     font-size: 90%;
     box-shadow: @box-shadow-bottom;
-    margin: -(@page_padding-top) -(@margin-default) 0;
+    margin-bottom: 0;
+
+    @media @screen_min-xxs {
+        margin-top: -(@page_padding-top);
+        margin-right: -(@margin-default);
+        margin-left: -(@margin-default);
+        padding-left: @margin-default;
+        padding-right: @margin-default;
+    }
+
+    @media @screen_max-md {
+        margin-top: -(@page_padding-top + 2);
+        margin-right: -(@margin-default * 1.6);
+        margin-left: -(@margin-default);
+        padding-top: @margin-default;
+    }
+
+    @media @screen_max-xxs {
+        margin-left: -(@margin-small);
+        padding-left: @margin-small;
+        padding-right: @margin-default;
+    }
+
+    div,
+    p {
+        margin-left: 0;
+    }
+
+    dl {
+        dt,
+        dd {
+            @media @screen_max-xxs {
+                float: none;
+                display: inline-block;
+                width: 49%;
+                max-width: 10em;
+                vertical-align: top;
+                margin-left: 0;
+                padding-bottom: @small-spacing;
+            }
+        }
+    }
 
     .qc_icon {
         background-color: #fff;

From 401950068f61a711e5371fd1d08c13b1a288881c Mon Sep 17 00:00:00 2001
From: Silke Pisulla <pisulla@cosmocode.de>
Date: Wed, 19 Apr 2017 13:04:37 +0200
Subject: [PATCH 19/25] SPR-869: QC Plugin output responsive

---
 css/plugins/qc.less | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/css/plugins/qc.less b/css/plugins/qc.less
index 1365b82..35476c6 100644
--- a/css/plugins/qc.less
+++ b/css/plugins/qc.less
@@ -28,7 +28,7 @@
     margin-bottom: 0;
 
     @media @screen_min-xxs {
-        margin-top: -(@page_padding-top);
+        margin-top: -(@margin-default + 1);
         margin-right: -(@margin-default);
         margin-left: -(@margin-default);
         padding-left: @margin-default;
@@ -56,6 +56,8 @@
     dl {
         dt,
         dd {
+            padding-bottom: @small-spacing;
+
             @media @screen_max-xxs {
                 float: none;
                 display: inline-block;
@@ -63,7 +65,6 @@
                 max-width: 10em;
                 vertical-align: top;
                 margin-left: 0;
-                padding-bottom: @small-spacing;
             }
         }
     }

From 58aee1016a9f6ed968fb0c9eb5e1d267a2317b16 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jana=20Deutschla=CC=88nder?= <deutschlaender@cosmocode.de>
Date: Wed, 19 Apr 2017 15:21:55 +0200
Subject: [PATCH 20/25] SPR-814: detail template

---
 css/template_detail.less       |  58 ++++++++++-
 detail.php                     | 176 ++++++++++++++++++++++++++-------
 lang/de/lang.php               |   3 +
 lang/de/settings.php           |   5 +-
 lang/en/lang.php               |   3 +
 lang/en/settings.php           |   5 +-
 tpl/nav-page-quality-tasks.php |   2 +-
 7 files changed, 204 insertions(+), 48 deletions(-)

diff --git a/css/template_detail.less b/css/template_detail.less
index b11c551..f11cfcf 100644
--- a/css/template_detail.less
+++ b/css/template_detail.less
@@ -50,15 +50,71 @@
     }
 
     // meta data
-    .img_detail {
+    div.img_detail {
         /* vertical minus margin of .img-detail corresponds to the padding of .page  */
         margin: @margin-default -(@margin-default);
+
+        border: solid @ini_border_light;
+        border-width: 1px 0;
+        background-color: @ini_background_page_header;
+        h1, h2, h3, h4, h5, h6, p{
+            padding-left: @margin-default;
+            padding-right: @margin-default;
+        }
+
+        dl {
+            display: -webkit-flex;
+            display: -ms-flexbox;
+            display: flex;
+            flex-direction: row;
+            -ms-flex-direction: row;
+            flex-wrap: wrap;
+            -ms-flex-wrap: wrap;
+            width: 100%;
+
+            dt, dd {
+                box-sizing: border-box;
+                margin: .2em 0;
+                padding: (@small-spacing * 2) @small-spacing;
+            }
+
+            dt {
+                width: 33.3%;
+                background-color: @ini_highlight;
+                color: @ini_highlight_text;
+
+            }
+            dd {
+                width: 66.6%;
+                padding-left: (@small-spacing * 2);
+            }
+
+        }
+        .os-map {
+            p {
+                text-align: right;
+            }
+            iframe {
+                padding: 0;
+                margin: 0;
+                border: solid @ini_button_background;
+                border-width: 1px 0;
+            }
+        }
+
         @media @screen_max-md {
             margin-right: -(@margin-default * 1.6);
+            h1, h2, h3, h4, h5, h6, p {
+                padding-right: (@margin-default * 1.6);
+            }
         }
 
         @media @screen_max-xs {
             margin-left: -(@margin-small);
+            h1, h2, h3, h4, h5, h6, p {
+                padding-left: @margin-small;
+            }
         }
+
     }
 }
diff --git a/detail.php b/detail.php
index d964f3d..0250f6f 100755
--- a/detail.php
+++ b/detail.php
@@ -61,12 +61,24 @@ include('tpl/favicon_tiles.php');
 
 <body id="dokuwiki__top" class="<?php echo tpl_classes(); ?> wide-content showSidebar">
 <div id="dokuwiki__site">
+    <?php
+
+
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+/* template Include: tpl/nav-direct */
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+    ?>
     <?php include('tpl/nav-direct.php') ?>
 
 
     <div class="page-wrapper <?php echo ($showSidebar) ? 'hasSidebar' : ''; ?>">
         <?php
-        tpl_includeFile('header.html');
+
+
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+/* Include Hook: header.html */
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+            tpl_includeFile('header.html');
         ?>
 
         <div id="dokuwiki__header" class="header no-print">
@@ -76,19 +88,57 @@ include('tpl/favicon_tiles.php');
                         <div class="claim main-sidebar">
                             <?php if (tpl_getConf('logo') && file_exists(mediaFN(tpl_getConf('logo')))) {
 
-                                /* upload your logo into the data/media folder (root of the media manager) and replace 'logo.png' in der template config accordingly: */
+
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+/* Logo */
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+/* upload your logo into the data/media folder (root of the media manager) and replace 'logo.png' in der template config accordingly: */
                                 include('tpl/main-sidebar-logo.php');
                             } ?>
-                            <?php if ($conf['tagline']): ?>
-                                <p class="claim"><?php echo $conf['tagline'] ?></p>
-                            <?php endif ?>
+                            <div class="main-title">
+                                <?php if ($conf['title']):
+
+
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+/* Wiki Title Mobile */
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ ?>
+                                    <p class="title mobile-only"><?php echo $conf['title'] ?></p>
+                                <?php endif ?>
+                            </div><!-- .main-title -->
 
                         </div><!-- .headings -->
                     </div><!-- .col -->
+                    <div class="col-xs-12">
+                        <div class="main-title desktop-only">
+                            <?php if ($conf['title']):
+
+
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+/* Wiki Title Desktop */
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ ?>
+                                <p class="title"><?php echo $conf['title'] ?></p>
+                            <?php endif ?>
+                            <?php if ($conf['tagline']):
+
+
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+/* Wiki Tagline Desktop */
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ ?>
+                                <p class="claim"><?php echo $conf['tagline'] ?></p>
+                            <?php endif ?>
+                        </div><!-- .main-title -->
+                    </div><!-- .col -->
+
                 </div><!-- .row -->
             </div><!-- .container -->
         </div><!-- .header -->
+        <?php
 
+
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+/* headline menu area (Accessibility ) */
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+        ?>
         <div class="sr-only nav-area-head">
             <h5 class="sr-only" aria-level="1"><?php echo tpl_getLang('nav-area-head') ?></h5>
         </div><!-- .nav-area-head -->
@@ -98,20 +148,37 @@ include('tpl/favicon_tiles.php');
                 <div class="row">
                     <div class="col-xs-12">
 
-                        <div class="sidebarheader main-sidebar">
-                            <?php
-                            tpl_includeFile('sidebarheader.html')
-                            ?>
-                        </div><!-- .sidebarheader -->
 
                         <div class="search main-sidebar">
                             <?php
+
+
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+/* search form */
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
                             include('tpl/main-sidebar-search.php');
                             ?>
                         </div><!-- .search -->
 
+                        <div class="sidebarheader main-sidebar">
+                            <?php
+
+
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+/* Include Hook: sidebarheader.html */
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+                            tpl_includeFile('sidebarheader.html')
+                            ?>
+                        </div><!-- .sidebarheader -->
+
+
                         <div id="dokuwiki__aside">
                             <?php
+
+
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+/* sidebar */
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
                             include('tpl/main-sidebar-nav.php');
                             ?>
                         </div><!-- .aside -->
@@ -127,8 +194,18 @@ include('tpl/favicon_tiles.php');
                     <div class="col-xs-12">
 
                         <?php
+
+
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+/* User Tools but no MagicMatcher Bar */
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
                         $showTools = true;
                         include('tpl/nav-usertools-buttons.php');
+
+
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+/* Include Hook: header.html */
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
                         tpl_includeFile('header.html');
                         ?>
 
@@ -139,7 +216,8 @@ include('tpl/favicon_tiles.php');
 
 
         <div id="dokuwiki__detail">
-            <?php html_msgarea() ?>
+
+            <?php tpl_flush(); /* flush the output buffer */ ?>
 
             <div class="content group">
                 <div class="container">
@@ -148,30 +226,28 @@ include('tpl/favicon_tiles.php');
                             <div class="breadcrumbs" data-do="<?php echo $ACT ?>">
 
                                 <div class="togglelink page_main-content">
-                                    <a href="#"><span
-                                            class="sr-out"><?php echo tpl_getLang('a11y_sidebartoggle') ?></span></a>
+                                    <a href="#"><span class="sr-out"><?php echo tpl_getLang('a11y_sidebartoggle') ?></span></a>
                                 </div>
 
-                                <h6 class="sr-only" role="heading"
-                                    aria-level="2"><?php echo tpl_getLang('head_menu_status') ?></h6>
+                                <h6 class="sr-only" role="heading" aria-level="2"><?php echo tpl_getLang('head_menu_status') ?></h6>
 
                                 <?php
 
-                                /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
-                                /* page quality / page tasks */
-                                /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
-                                include('tpl/nav-page-quality-tasks.php');
-                                ?>
 
-                                <?php
-                                /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
-                                /* breadcrumb */
-                                /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+/* breadcrumb */
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
                                 include('tpl/nav-breadcrumb.php');
                                 ?>
 
                                 <h6 class="sr-only" role="heading" aria-level="2"><?php echo $lang['page_tools'] ?></h6>
 
+                                <?php
+
+
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+/* page tools */
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ ?>
                                 <nav id="dokuwiki__pagetools">
                                     <div class="tools">
                                         <ul>
@@ -187,6 +263,8 @@ include('tpl/favicon_tiles.php');
                             <div id="dokuwiki__content" class="page main-content">
 
                                 <div id="spr__meta-box"></div>
+                                <div class="msg-area"><?php html_msgarea();/*msg('Information.', 0);msg('Success', 1);msg('Notification', 2);msg('Fehler', -1);*/ ?></div>
+
 
                                 <?php if ($ERROR): print $ERROR; ?>
                                 <?php else: ?>
@@ -194,22 +272,45 @@ include('tpl/favicon_tiles.php');
                                 <?php if ($REV) {
                                     echo p_locale_xhtml('showrev');
                                 } ?>
+
                                 <h1><?php echo hsc(tpl_img_getTag('IPTC.Headline', $IMG)) ?></h1>
+                                <?php
+
+
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+/* image */
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+                                ?>
                                 <div class="img-link">
                                     <?php tpl_img(900, 700); /* the image; parameters: maximum width, maximum height (and more) */ ?>
                                 </div>
+                                <?php
 
-                                <div class="img_detail"><?php
-                                    $simple_title = hsc(tpl_img_getTag('simple.title'));
-                                    if(strlen($simple_title) > 0) { ?>
-                                    <h2><?php print nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h2><?php
-                                    }
+
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+/* meta data of image */
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+                                ?>
+                                <div class="img_detail">
+                                    <?php
+                                        $simple_title = hsc(tpl_img_getTag('simple.title'));
+                                        if(strlen($simple_title) > 0) {
+                                    ?>
+                                    <h2><?php print nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h2>
+                                    <?php
+                                        }
                                     ?>
 
                                     <?php
                                     tpl_img_meta();
 
-                                    /** @var helper_plugin_spatialhelper_index $spatial */
+
+
+
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+/* open street maps if geo data is available */
+/** @var helper_plugin_spatialhelper_index $spatial */
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
                                     $spatial = plugin_load('helper', 'spatialhelper_index');
                                     if ($spatial && plugin_load('helper', 'geophp')) {
                                         global $IMG;
@@ -222,11 +323,10 @@ include('tpl/favicon_tiles.php');
 
                                             $hrefOSM = "https://www.openstreetmap.org/?mlat=$lat&mlon=$long#map=18/$lat/$long";
                                             $srcOSM = 'https://www.openstreetmap.org/export/embed.html?bbox=' . ($long - 0.004) . ',' . ($lat - 0.002) . ',' . ($long + 0.004) . ',' . ($lat + 0.002) . '&layer=mapnik&marker=' . $lat . ',' . $long;
-                                            echo '<dl>';
-                                            echo '<dt title="Open Street Maps">OSM:</dt><dd>';
-                                            echo '<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="' . $srcOSM . '" style="border: 1px solid black"></iframe><br/><small><a href="' . $hrefOSM . '">View Larger Map</a></small>';
-                                            echo '</dd>';
-                                            echo '</dl>';
+                                            echo '<div class="os-map">';
+                                            echo '<h4 lang="en">OSM (Open Street Maps):</h4>';
+                                            echo '<iframe width="100%" height="350" frameborder="0" src="' . $srcOSM . '"></iframe><br/><p><a class="button" target="_blank" title="' . tpl_getLang('osm_zoom_link_title') . '" href="' . $hrefOSM . '">' . tpl_getLang('osm_zoom_link_text') . '</a></p>';
+                                            echo '</div>';
                                         }
                                     }
                                     ?>
@@ -256,9 +356,9 @@ include('tpl/favicon_tiles.php');
                             <?php
 
 
-                            /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
-                            /* copyright */
-                            /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
+/* copyright */
+/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
                             tpl_license($img = false, $imgonly = false, $return = false, $wrap = false);
                             ?>
                         </p>
diff --git a/lang/de/lang.php b/lang/de/lang.php
index 2de4372..18a606e 100755
--- a/lang/de/lang.php
+++ b/lang/de/lang.php
@@ -43,6 +43,9 @@ $lang['discussion']                 = 'Diskussion';
 $lang['back_to_article']            = 'Zurück zum Artikel';
 $lang['userpage']                   = 'Benutzer-Seite';
 
+$lang['osm_zoom_link_text']         = 'größere Karte anzeigen';
+$lang['osm_zoom_link_title']        = 'externer Link - öffnet in neuem Fenster';
+
 
 /**
  * colors
diff --git a/lang/de/settings.php b/lang/de/settings.php
index e6430be..50b4b4d 100755
--- a/lang/de/settings.php
+++ b/lang/de/settings.php
@@ -4,7 +4,4 @@
  *
  */
 
-$lang['discussionPage']   = 'Diskussion-Seite (leer lassen, um Funktion zu deaktivieren)';
-$lang['userPage']         = 'Benutzer seite (leer lassen, um Funktion zu deaktivieren)';
-$lang['hideTools']        = 'Tools abschalten, wenn der Benutzer nicht angemeldet ist?';
-$lang['user_ns']          = 'Ort an dem Nutzerseiten gespeichert werden';
+
diff --git a/lang/en/lang.php b/lang/en/lang.php
index f634485..7ebd219 100755
--- a/lang/en/lang.php
+++ b/lang/en/lang.php
@@ -44,6 +44,9 @@ $lang['discussion']                 = 'Discussion';
 $lang['back_to_article']            = 'Back to article';
 $lang['userpage']                   = 'User page';
 
+$lang['osm_zoom_link_text']         = 'view larger map';
+$lang['osm_zoom_link_title']        = 'external link opens new window';
+
 
 /**
  * colors
diff --git a/lang/en/settings.php b/lang/en/settings.php
index 4e9d810..8808b3e 100755
--- a/lang/en/settings.php
+++ b/lang/en/settings.php
@@ -4,7 +4,4 @@
  *
  */
 
-$lang['discussionPage']   = 'Discussion page (leave empty to disable discussions)';
-$lang['userPage']         = 'User page (leave empty to disable user pages)';
-$lang['hideTools']        = 'Hide tools when not logged in?';
-$lang['user_ns']          = 'Where to store user pages.';
+
diff --git a/tpl/nav-page-quality-tasks.php b/tpl/nav-page-quality-tasks.php
index 2a1977c..1a14ccf 100755
--- a/tpl/nav-page-quality-tasks.php
+++ b/tpl/nav-page-quality-tasks.php
@@ -13,7 +13,7 @@
     }
     if ($qc) {
         echo "<li class=\"plugin__qc do_none\"><a id=\"plugin__qc__link\" aria-expanded=\"false\" href=\"#plugin__qc__wrapper\"><span class=\"prefix\">".tpl_getLang('quality_trigger')."</span><span class=\"num\">0</span></strong></a>";
-        $qc->tplErrorCount();
+        //$qc->tplErrorCount();
         echo "</li>";
     }
     if ($doPlugin !== null ) {

From 76f57064618e1a918bcb67c3c7455a754f513152 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jana=20Deutschla=CC=88nder?= <deutschlaender@cosmocode.de>
Date: Wed, 19 Apr 2017 15:24:25 +0200
Subject: [PATCH 21/25] SPR-814: detail template bugfix meta data in webkit

---
 css/template_detail.less | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/css/template_detail.less b/css/template_detail.less
index f11cfcf..5e129e9 100644
--- a/css/template_detail.less
+++ b/css/template_detail.less
@@ -63,13 +63,19 @@
         }
 
         dl {
+            display: flex;
             display: -webkit-flex;
             display: -ms-flexbox;
-            display: flex;
+
+
             flex-direction: row;
+            -webkit-flex-direction: row;
             -ms-flex-direction: row;
+
             flex-wrap: wrap;
+            -webkit-flex-wrap: wrap;
             -ms-flex-wrap: wrap;
+            
             width: 100%;
 
             dt, dd {

From 571fa3c684d7ea805540e8ea78b207f9419f341c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jana=20Deutschla=CC=88nder?= <deutschlaender@cosmocode.de>
Date: Wed, 19 Apr 2017 15:33:47 +0200
Subject: [PATCH 22/25] SPR-814: remove comment

---
 tpl/nav-page-quality-tasks.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tpl/nav-page-quality-tasks.php b/tpl/nav-page-quality-tasks.php
index 1a14ccf..2a1977c 100755
--- a/tpl/nav-page-quality-tasks.php
+++ b/tpl/nav-page-quality-tasks.php
@@ -13,7 +13,7 @@
     }
     if ($qc) {
         echo "<li class=\"plugin__qc do_none\"><a id=\"plugin__qc__link\" aria-expanded=\"false\" href=\"#plugin__qc__wrapper\"><span class=\"prefix\">".tpl_getLang('quality_trigger')."</span><span class=\"num\">0</span></strong></a>";
-        //$qc->tplErrorCount();
+        $qc->tplErrorCount();
         echo "</li>";
     }
     if ($doPlugin !== null ) {

From c6f48ce933f880195ad03a5be47d8a75b53a1810 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jana=20Deutschla=CC=88nder?= <deutschlaender@cosmocode.de>
Date: Wed, 19 Apr 2017 15:36:44 +0200
Subject: [PATCH 23/25] SPR-814: remove comment

---
 css/template_detail.less | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/css/template_detail.less b/css/template_detail.less
index 5e129e9..8a80cd9 100644
--- a/css/template_detail.less
+++ b/css/template_detail.less
@@ -75,7 +75,7 @@
             flex-wrap: wrap;
             -webkit-flex-wrap: wrap;
             -ms-flex-wrap: wrap;
-            
+
             width: 100%;
 
             dt, dd {

From 16a4631324e3bf90f3c6a81a7d1316a9a719a459 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jana=20Deutschla=CC=88nder?= <deutschlaender@cosmocode.de>
Date: Wed, 19 Apr 2017 15:51:32 +0200
Subject: [PATCH 24/25] SPR-814: detail template local merges

---
 css/template_detail.less | 4 ++++
 detail.php               | 4 +++-
 lang/de/lang.php         | 1 +
 lang/en/lang.php         | 1 +
 4 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/css/template_detail.less b/css/template_detail.less
index 8a80cd9..b335ec3 100644
--- a/css/template_detail.less
+++ b/css/template_detail.less
@@ -62,6 +62,10 @@
             padding-right: @margin-default;
         }
 
+        > h4 {
+            padding-top: (@margin-default / 2);
+        }
+
         dl {
             display: flex;
             display: -webkit-flex;
diff --git a/detail.php b/detail.php
index 0250f6f..86f18a6 100755
--- a/detail.php
+++ b/detail.php
@@ -296,8 +296,10 @@ include('tpl/favicon_tiles.php');
                                         $simple_title = hsc(tpl_img_getTag('simple.title'));
                                         if(strlen($simple_title) > 0) {
                                     ?>
-                                    <h2><?php print nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h2>
+                                    <h4><?php print nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h4>
                                     <?php
+                                        } else {
+                                            echo '<h4>' . tpl_getLang('meta_data') . '</h4>';
                                         }
                                     ?>
 
diff --git a/lang/de/lang.php b/lang/de/lang.php
index 18a606e..77a8751 100755
--- a/lang/de/lang.php
+++ b/lang/de/lang.php
@@ -43,6 +43,7 @@ $lang['discussion']                 = 'Diskussion';
 $lang['back_to_article']            = 'Zurück zum Artikel';
 $lang['userpage']                   = 'Benutzer-Seite';
 
+$lang['meta_data']                  = 'Meta Daten des Bildes';
 $lang['osm_zoom_link_text']         = 'größere Karte anzeigen';
 $lang['osm_zoom_link_title']        = 'externer Link - öffnet in neuem Fenster';
 
diff --git a/lang/en/lang.php b/lang/en/lang.php
index 7ebd219..3b01cd1 100755
--- a/lang/en/lang.php
+++ b/lang/en/lang.php
@@ -44,6 +44,7 @@ $lang['discussion']                 = 'Discussion';
 $lang['back_to_article']            = 'Back to article';
 $lang['userpage']                   = 'User page';
 
+$lang['meta_data']                  = 'Meta Data';
 $lang['osm_zoom_link_text']         = 'view larger map';
 $lang['osm_zoom_link_title']        = 'external link opens new window';
 

From 2b368d03e69d938c137310c4638f1b056ea89c1c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jana=20Deutschla=CC=88nder?= <deutschlaender@cosmocode.de>
Date: Wed, 19 Apr 2017 16:13:20 +0200
Subject: [PATCH 25/25] SPR-869: headline hierarchies did not match font-sizes

---
 css/plugins/qc.less | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/css/plugins/qc.less b/css/plugins/qc.less
index 35476c6..25688b9 100644
--- a/css/plugins/qc.less
+++ b/css/plugins/qc.less
@@ -27,6 +27,17 @@
     box-shadow: @box-shadow-bottom;
     margin-bottom: 0;
 
+    h2 {
+        font-size: 1.3rem;
+    }
+    h3 {
+         font-size: 1.1rem;
+    }
+    h4, h5, h6 {
+        font-size: 1rem;
+    }
+
+
     @media @screen_min-xxs {
         margin-top: -(@margin-default + 1);
         margin-right: -(@margin-default);