diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 907c2a1..0bc03db 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,5 +1,15 @@
sprintdoc-farm:
environment: sprintdoc-farm
+ tags:
+ - locally
+ only:
+ - live
+ script:
+ - fab deploy
+
+
+cosmocode-farm:
+ environment: cosmocode-farm
tags:
- locally
only:
diff --git a/Template.php b/Template.php
index f1f71f4..e221821 100644
--- a/Template.php
+++ b/Template.php
@@ -17,6 +17,7 @@ class Template {
protected $plugins = array(
'sqlite' => null,
'tagging' => null,
+ 'magicmatcher' => null,
);
/**
@@ -35,6 +36,36 @@ class Template {
*/
protected function __construct() {
$this->initializePlugins();
+
+ /** @var \Doku_Event_Handler */
+ global $EVENT_HANDLER;
+ $EVENT_HANDLER->register_hook('PLUGIN_TPLINC_LOCATIONS_SET', 'BEFORE', $this, 'registerIncludes');
+ }
+
+ /**
+ * Makes include position info available to the tplinc plugin
+ *
+ * @param \Doku_Event $event
+ */
+ public function registerIncludes(\Doku_Event $event) {
+ $event->data['footer'] = 'Footer below the page content';
+ }
+
+ /**
+ * Get the content to include from the tplinc plugin
+ *
+ * prefix and postfix are only added when there actually is any content
+ *
+ * @param string $location
+ * @param string $pre prepend this before the content
+ * @param string $post append this to the content
+ * @return string
+ */
+ public function getInclude($location, $pre = '', $post = '') {
+ if(!$this->plugins['tplinc']) return '';
+ $content = $this->plugins['tplinc']->renderIncludes($location);
+ if($content === '') return '';
+ return $pre . $content . $post;
}
/**
@@ -44,7 +75,9 @@ class Template {
$this->plugins['sqlite'] = plugin_load('helper', 'sqlite');
if($this->plugins['sqlite']) {
$this->plugins['tagging'] = plugin_load('helper', 'tagging');
+ $this->plugins['magicmatcher'] = plugin_load('syntax', 'magicmatcher_issuelist');
}
+ $this->plugins['tplinc'] = plugin_load('helper', 'tplinc');
}
/**
@@ -75,7 +108,14 @@ class Template {
);
}
- // fixme add magicmatcher info
+ if ($this->plugins['magicmatcher']) {
+ $tabs[] = array(
+ 'id' => 'spr__tab-issues',
+ 'label' => tpl_getLang('tab_issues'),
+ 'tab' => $this->plugins['magicmatcher']->getIssueListHTML(),
+ 'count' => $this->plugins['magicmatcher']->getCountIssues(),
+ );
+ }
return $tabs;
}
diff --git a/css/area_footer.less b/css/area_footer.less
index cd49dcc..d1f887d 100755
--- a/css/area_footer.less
+++ b/css/area_footer.less
@@ -26,6 +26,7 @@
z-index: 2;
box-sizing: border-box;
background-color: @color-site-bg;
+
}
p {
font-size: @font-size-default;
diff --git a/css/area_main-sidebar-nav.less b/css/area_main-sidebar-nav.less
index 997efc0..35133f7 100755
--- a/css/area_main-sidebar-nav.less
+++ b/css/area_main-sidebar-nav.less
@@ -16,7 +16,6 @@
a.nav {
font-size: @font-size-head6;
margin: 0 0 @font-size-head6;
-
cursor: pointer;
font-weight: normal;
margin-left: (@menu-margin * -1); // moves the toggles back to the left
@@ -27,7 +26,9 @@
height: @icon-size + @margin-small;
display: flex;
+ display: -ms-flexbox;
flex-direction: row;
+ -ms-flex-direction: row;
align-items: center;
span {
@@ -108,28 +109,62 @@
#dokuwiki__aside {
display: none;
}
+
// show when toggled
- #dokuwiki__aside.show {
- display: block;
+ body.show-mobile-sidebar {
- position: absolute;
- left: 0;
- z-index: 200; // above all
+ #dokuwiki__aside {
+ display: block;
+
+ position: absolute;
+ left: 1.25rem;//left margin of content container
+ z-index: 200; // above all
+ box-shadow: @box-shadow-right-bottom;
+ min-width: 45%;
+ max-width: 90%;
+ height: auto;
+
+ &:after{
+ content: "";
+ position: absolute;
+ top: 0;
+ left:0;
+ bottom:0;
+ right:0;
+ width: 100%;
+ height: 100%;
+ background: @ini_background;
+ background: -webkit-linear-gradient(left, @ini_background, @color-content-bg);
+ background: linear-gradient(left, @ini_background, @color-content-bg);
+
+ z-index: 0;
+ }
+
+ > nav{
+ position: relative;
+ //display: block;
+ z-index: 2;
+ &:first-child{
+ margin-top: 1.2rem;
+ }
+ }
+
+ a.nav {
+ border-radius: 0;
+ border-right-width: 0;
+ border-left-width: 0;
+ }
+ .nav-panel,
+ a.nav{
+ padding-right: .8em;
+ }
+ }
- border-right: @ini_border 1px solid;
- box-shadow: @box-shadow;;
-
- max-width: 100%;
- min-width: 45%;
- height: 100%;
-
- background-color: @ini_background;
}
+
}
-
-
// FIXME check if the stuff below is still relevant
/* + + + + + + + + + + + + + + + + + + + + + + + + + + */
@@ -158,7 +193,6 @@
}
}
-
}
/* + + + + + + + + + + + + + + + + + + + + + + + + + + */
diff --git a/css/area_nav-breadcrumb.less b/css/area_nav-breadcrumb.less
index 32835e0..cd3f5b6 100755
--- a/css/area_nav-breadcrumb.less
+++ b/css/area_nav-breadcrumb.less
@@ -151,7 +151,10 @@
right: 0;
width: auto;
border: 0 none;
- background: @color-site-bg;
+ 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{
diff --git a/css/base.less b/css/base.less
index 84a8874..9b9ed35 100755
--- a/css/base.less
+++ b/css/base.less
@@ -34,6 +34,8 @@
@box-shadow-offset: __box_shadow_offset__;
@box-shadow: __box_shadow__;
@box-shadow-colored: __box_shadow_colored__;
+@box-shadow-right-bottom:__box_shadow_right_bottom__;
+@box-shadow-bottom: __box_shadow_bottom__;
@th_background: __background_alt__;
diff --git a/css/base_structure.less b/css/base_structure.less
index b7bcae2..8daf866 100755
--- a/css/base_structure.less
+++ b/css/base_structure.less
@@ -245,3 +245,30 @@
}
}
}
+
+@media @screen_max-xxs{
+ @mobileMargin: 4px;
+ .container{
+ margin: 0 @mobileMargin;
+ }
+ body.show-mobile-sidebar #dokuwiki__aside{
+ left: @mobileMargin;
+ }
+ #dokuwiki__usertools{
+ right: @mobileMargin;
+ }
+ #dokuwiki__footer{
+ .main-footer{
+ > *{
+ padding-left: 2rem;
+ padding-right: 2rem;
+ }
+
+ }
+ }
+ .page-footer{
+
+ }
+
+}
+
diff --git a/css/plugins/magic-matcher.less b/css/plugins/magic-matcher.less
index 84035fc..6366c45 100755
--- a/css/plugins/magic-matcher.less
+++ b/css/plugins/magic-matcher.less
@@ -76,6 +76,16 @@
}
}
+
+/* + + + + + in meta box + + + + + */
+#spr__tab-issues {
+ ul.mmissuelist {
+ padding-left: 0;
+ margin-top: 1rem;
+ }
+}
+
+
/* + + + + + in content + + + + + */
a.jiralink {
font-size: @font-size-default;
diff --git a/css/plugins/struct.less b/css/plugins/struct.less
index ccff3f3..34f8512 100755
--- a/css/plugins/struct.less
+++ b/css/plugins/struct.less
@@ -45,3 +45,7 @@
margin-top: -.5rem;
}
}
+
+.dokuwiki .struct_inlineditor {
+ z-index: 3;
+}
diff --git a/detail.php b/detail.php
index 21dda38..f010711 100755
--- a/detail.php
+++ b/detail.php
@@ -1,3 +1,4 @@
+
+?>
@@ -28,7 +29,6 @@ header('X-UA-Compatible: IE=edge,chrome=1');
-
@@ -89,6 +89,5 @@ header('X-UA-Compatible: IE=edge,chrome=1');
-
diff --git a/js/breadcrumb.js b/js/breadcrumb.js
index 4041fab..510c837 100644
--- a/js/breadcrumb.js
+++ b/js/breadcrumb.js
@@ -2,14 +2,14 @@
* Sets up the breadcrumb behaviour (adds do / ACT status information)
*/
jQuery(function () {
- const $breadcrumb = jQuery('.breadcrumbs');
+ var $breadcrumb = jQuery('.breadcrumbs');
if (!$breadcrumb.length) return;
/**
* add ACT status to breadcrumb (if not show)
*
*/
- const mode = $breadcrumb.attr('data-do');
+ var mode = $breadcrumb.attr('data-do');
if(mode && mode.indexOf('show') !== 0){
var markup = ' : ' + mode + '';
$breadcrumb.find('p').append(markup);
diff --git a/js/meta-box.js b/js/meta-box.js
index 432146e..1b540cf 100755
--- a/js/meta-box.js
+++ b/js/meta-box.js
@@ -1,5 +1,5 @@
jQuery(function () {
- const $metaBox = jQuery('#spr__meta-box');
+ var $metaBox = jQuery('#spr__meta-box');
if (!$metaBox.length) return;
/**
@@ -10,8 +10,8 @@ jQuery(function () {
*/
$metaBox.on('click', '.meta-tabs a', function (e) {
e.preventDefault();
- const $tab = jQuery(this);
- const isopen = $tab.attr('aria-expanded') === 'true';
+ var $tab = jQuery(this),
+ isopen = $tab.attr('aria-expanded') === 'true';
// disable all existing tabs
$metaBox.find('.meta-tabs li')
diff --git a/js/sidebar.js b/js/sidebar.js
index 3d60b44..c7d1104 100644
--- a/js/sidebar.js
+++ b/js/sidebar.js
@@ -2,163 +2,165 @@
* Sets up the sidebar behaviour
*/
jQuery(function () {
- const $nav = jQuery('#dokuwiki__aside');
+ var $nav = jQuery('#dokuwiki__aside');
if (!$nav.length) return;
- /**
- * closes sidebar
- */
- const setWideContent = function () {
- $nav.find('div.nav-panel').hide(); // close all panels
- jQuery('body').addClass('wide-content');
- };
+ /**
+ * closes sidebar
+ */
+ var setWideContent = function () {
+ $nav.find('div.nav-panel').hide(); // close all panels
+ jQuery('body').addClass('wide-content');
+ },
- /**
- * opens the sidebar
- */
- const setDefaultContent = function () {
- jQuery('body').removeClass('wide-content');
+ /**
+ * opens the sidebar
+ */
+ setDefaultContent = function () {
+ jQuery('body').removeClass('wide-content');
- };
+ },
- /**
- * Accessibility helper, focuses the first link witih the given element
- *
- * @param {jQuery} $elem
- */
- const focusFirstSubLink = function ($elem) {
- $elem.find('a').first().focus();
- };
+ /**
+ * Accessibility helper, focuses the first link witih the given element
+ *
+ * @param {jQuery} $elem
+ */
+ focusFirstSubLink = function ($elem) {
+ $elem.find('a').first().focus();
+ },
- /**
- * Toggle a navigation panel
- *
- * @param {jQuery} $toggler The h6 toggler
- */
- const toggleNav = function ($toggler) {
- const $panel = $toggler.next('div.nav-panel');
- const isOpen = $panel.is(':visible');
- // open sidebar on interaction
- setDefaultContent();
- // toggle the panel, focus first link after opening
- $panel.dw_toggle(!isOpen, function () {
- if (!isOpen) {
- focusFirstSubLink($panel);
- }
- });
- };
-
- /**
- * Initialize the content navigation
- *
- * It mangles the sidebar content and handles inline Icon configuration
- */
- const initContentNav = function () {
- const $main = $nav.find('nav.nav-main');
- if (!$main.length) return;
-
- const ELEMENT = 'h1,h2,h3,h4,h5'; // FIXME move to config
- const $elements = $main.find(ELEMENT);
- $elements.each(function () {
- const $me = jQuery(this);
-
- // prepare text and the optional icon
- const data = $me.text().split('@', 2);
- const text = data[0].trim();
- const $icon = jQuery('')
- .text(text.substr(0, 1).toUpperCase() + text.substr(1, 1).toLowerCase())
- .wrapInner('');
- if (data[1]) {
- const src = data[1].trim();
- $icon.load(DOKU_BASE + 'lib/tpl/sprintdoc/svg.php?svg=' + src + '&e=1'); // directly embed
- }
-
- // make the new toggler
- const $toggler = jQuery('')
- .addClass('nav')
- .attr('href', '#')
- .attr('role', 'heading')
- .attr('aria-level', '2')
- .text(text)
- .wrapInner('')
- .prepend($icon)
- ;
-
- // wrap all following siblings til the next element in a wrapper
- const $wrap = jQuery('')
- .addClass('nav-panel');
- const $sibs = $me.nextAll();
- for (let i = 0; i < $sibs.length; i++) {
- const $sib = jQuery($sibs[i]);
- if ($sib.is(ELEMENT)) break;
- $sib.detach().appendTo($wrap);
- }
- $wrap.insertAfter($me);
-
- // replace element with toggler
- $me.replaceWith($toggler);
- });
- };
-
- /**
- * Initialize the open/close toggling of menu entries
- */
- const initMenuHandling = function () {
- $nav.on('click', 'a.nav', function (e) {
- toggleNav(jQuery(this));
- e.preventDefault();
- });
- };
-
- /**
- * Make sure the content area is always as high as the sidebar
- */
- const initContentMinHeight = function () {
- const $sidebar = jQuery('.page-wrapper').find('> .tools').find('.col-xs-12');
- if ($sidebar.length == 1) {
- const num = parseFloat($sidebar.height());
- if (!isNaN(num)) {
- jQuery('#dokuwiki__content').css('minHeight', num + 100);
- }
- }
- };
-
- /**
- * Initialize the sidebar handle behaviour
- */
- const initSidebarToggling = function () {
- const $toggler = jQuery('.togglelink.page_main-content').find('a');
- $toggler.click(function (e) {
- e.preventDefault();
- if (jQuery('body').hasClass('wide-content')) {
- setDefaultContent();
- } else {
- setWideContent();
- }
- });
- };
-
- /**
- * Show sidebar when accessing the search
- */
- const initSearchToggling = function () {
- jQuery('.toggleSearch').find('a').click(function (e) {
+ /**
+ * Toggle a navigation panel
+ *
+ * @param {jQuery} $toggler The h6 toggler
+ */
+ toggleNav = function ($toggler) {
+ var $panel = $toggler.next('div.nav-panel');
+ var isOpen = $panel.is(':visible');
+ // open sidebar on interaction
setDefaultContent();
- e.preventDefault();
- jQuery('#qsearch__in').focus();
- });
+ // toggle the panel, focus first link after opening
+ $panel.dw_toggle(!isOpen, function () {
+ if (!isOpen) {
+ focusFirstSubLink($panel);
+ }
+ });
+ },
- };
+ /**
+ * Initialize the content navigation
+ *
+ * It mangles the sidebar content and handles inline Icon configuration
+ */
+ initContentNav = function () {
+ var $main = $nav.find('nav.nav-main');
+ if (!$main.length) return;
- /**
- * Open and close the sidebar in mobile view
- */
- const initMobileToggling = function () {
- jQuery('.menu-togglelink').find('a').click(function (e) {
- e.preventDefault();
- jQuery('#dokuwiki__aside').toggleClass('show');
- });
- };
+ var ELEMENT = 'h1,h2,h3,h4,h5'; // FIXME move to config
+ var $elements = $main.find(ELEMENT);
+ $elements.each(function () {
+ var $me = jQuery(this),
+
+ // prepare text and the optional icon
+ data = $me.text().split('@', 2),
+ text = data[0].trim();
+
+ var $icon = jQuery('
')
+ .text(text.substr(0, 1).toUpperCase() + text.substr(1, 1).toLowerCase())
+ .wrapInner('');
+ if (data[1]) {
+ var src = data[1].trim();
+ $icon.load(DOKU_BASE + 'lib/tpl/sprintdoc/svg.php?svg=' + src + '&e=1'); // directly embed
+ }
+
+ // make the new toggler
+ var $toggler = jQuery('')
+ .addClass('nav')
+ .attr('href', '#')
+ .attr('role', 'heading')
+ .attr('aria-level', '2')
+ .text(text)
+ .wrapInner('')
+ .prepend($icon)
+ ;
+
+ // wrap all following siblings til the next element in a wrapper
+ var $wrap = jQuery('')
+ .addClass('nav-panel');
+ var $sibs = $me.nextAll();
+ for (var i = 0; i < $sibs.length; i++) {
+ var $sib = jQuery($sibs[i]);
+ if ($sib.is(ELEMENT)) break;
+ $sib.detach().appendTo($wrap);
+ }
+ $wrap.insertAfter($me);
+
+ // replace element with toggler
+ $me.replaceWith($toggler);
+ });
+ },
+
+ /**
+ * Initialize the open/close toggling of menu entries
+ */
+ initMenuHandling = function () {
+ $nav.on('click', 'a.nav', function (e) {
+ toggleNav(jQuery(this));
+ e.preventDefault();
+ });
+ },
+
+ /**
+ * Make sure the content area is always as high as the sidebar
+ */
+ initContentMinHeight = function () {
+ var $sidebar = jQuery('.page-wrapper').find('> .tools').find('.col-xs-12');
+ if ($sidebar.length == 1) {
+ var num = parseFloat($sidebar.height());
+ if (!isNaN(num)) {
+ jQuery('#dokuwiki__content').css('minHeight', num + 100);
+ }
+ }
+ },
+
+ /**
+ * Initialize the sidebar handle behaviour
+ */
+ initSidebarToggling = function () {
+ var $toggler = jQuery('.togglelink.page_main-content').find('a');
+ $toggler.click(function (e) {
+ e.preventDefault();
+ if (jQuery('body').hasClass('wide-content')) {
+ setDefaultContent();
+ } else {
+ setWideContent();
+ }
+ });
+ },
+
+ /**
+ * Show sidebar when accessing the search
+ */
+ initSearchToggling = function () {
+ jQuery('.toggleSearch').find('a').click(function (e) {
+ setDefaultContent();
+ e.preventDefault();
+ jQuery('#qsearch__in').focus();
+ });
+
+ },
+
+ /**
+ * Open and close the sidebar in mobile view
+ */
+ initMobileToggling = function () {
+ jQuery('.menu-togglelink').find('a').click(function (e) {
+ e.preventDefault();
+ var $body = jQuery('body');
+ $body.toggleClass('show-mobile-sidebar');
+ });
+ };
// main
initContentNav();
diff --git a/lang/en/lang.php b/lang/en/lang.php
index b12f687..d06471c 100755
--- a/lang/en/lang.php
+++ b/lang/en/lang.php
@@ -30,6 +30,7 @@ $lang['meta_box_tags_none'] = 'tags found: none';
$lang['js']['meta_box_toc_none'] = 'no Table of Contents available';
$lang['tab_tags'] = 'Tags';
+$lang['tab_issues'] = 'Issues';
$lang['quality_trigger'] = 'toggle page analysis';
diff --git a/main.php b/main.php
index 8a15db7..e0f96e4 100755
--- a/main.php
+++ b/main.php
@@ -9,27 +9,17 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*/
+use dokuwiki\template\sprintdoc\Template;
+
if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */
header('X-UA-Compatible: IE=edge,chrome=1');
$showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && !empty($_SERVER['REMOTE_USER']) );
$showSidebar = true; /* */
-$hasFooter = page_findnearest('pagefooter');
-$showFooter = $hasFooter && ($ACT === 'show');
-
-
-/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
-/* conditional comments for IE8 / IE9 browser detection if needed */
-/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
?>
-
-
-
+
-
-
-
-
-
-
-
+ getInclude(
+ 'footer',
+ ''
+ );
+ ?>
@@ -363,7 +335,7 @@ $classWideContent = ($ACT === "show") ? "": "wide-content ";
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* copyright */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
- tpl_license('');
+ tpl_license($img = false, $imgonly = false, $return = false, $wrap = false);
?>
diff --git a/mediamanager.php b/mediamanager.php
index 8c85a6d..dd98bf3 100755
--- a/mediamanager.php
+++ b/mediamanager.php
@@ -1,3 +1,4 @@
+
-
-
-
+
-
-
- getMetaBoxTabs();
';
echo '';
echo '';
@@ -27,6 +30,9 @@ $tabs = \dokuwiki\template\sprintdoc\Template::getInstance()->getMetaBoxTabs();
';
echo $tab['tab'];
echo '
';