Merge branch 'master' into 'live'
Release current version See merge request !24
This commit is contained in:
commit
7da8d0b333
19 changed files with 330 additions and 234 deletions
|
@ -1,5 +1,15 @@
|
||||||
sprintdoc-farm:
|
sprintdoc-farm:
|
||||||
environment: sprintdoc-farm
|
environment: sprintdoc-farm
|
||||||
|
tags:
|
||||||
|
- locally
|
||||||
|
only:
|
||||||
|
- live
|
||||||
|
script:
|
||||||
|
- fab deploy
|
||||||
|
|
||||||
|
|
||||||
|
cosmocode-farm:
|
||||||
|
environment: cosmocode-farm
|
||||||
tags:
|
tags:
|
||||||
- locally
|
- locally
|
||||||
only:
|
only:
|
||||||
|
|
42
Template.php
42
Template.php
|
@ -17,6 +17,7 @@ class Template {
|
||||||
protected $plugins = array(
|
protected $plugins = array(
|
||||||
'sqlite' => null,
|
'sqlite' => null,
|
||||||
'tagging' => null,
|
'tagging' => null,
|
||||||
|
'magicmatcher' => null,
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -35,6 +36,36 @@ class Template {
|
||||||
*/
|
*/
|
||||||
protected function __construct() {
|
protected function __construct() {
|
||||||
$this->initializePlugins();
|
$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');
|
$this->plugins['sqlite'] = plugin_load('helper', 'sqlite');
|
||||||
if($this->plugins['sqlite']) {
|
if($this->plugins['sqlite']) {
|
||||||
$this->plugins['tagging'] = plugin_load('helper', 'tagging');
|
$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;
|
return $tabs;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background-color: @color-site-bg;
|
background-color: @color-site-bg;
|
||||||
|
|
||||||
}
|
}
|
||||||
p {
|
p {
|
||||||
font-size: @font-size-default;
|
font-size: @font-size-default;
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
a.nav {
|
a.nav {
|
||||||
font-size: @font-size-head6;
|
font-size: @font-size-head6;
|
||||||
margin: 0 0 @font-size-head6;
|
margin: 0 0 @font-size-head6;
|
||||||
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
margin-left: (@menu-margin * -1); // moves the toggles back to the left
|
margin-left: (@menu-margin * -1); // moves the toggles back to the left
|
||||||
|
@ -27,7 +26,9 @@
|
||||||
|
|
||||||
height: @icon-size + @margin-small;
|
height: @icon-size + @margin-small;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
display: -ms-flexbox;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
-ms-flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
|
@ -108,28 +109,62 @@
|
||||||
#dokuwiki__aside {
|
#dokuwiki__aside {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
// show when toggled
|
// show when toggled
|
||||||
#dokuwiki__aside.show {
|
body.show-mobile-sidebar {
|
||||||
display: block;
|
|
||||||
|
|
||||||
position: absolute;
|
#dokuwiki__aside {
|
||||||
left: 0;
|
display: block;
|
||||||
z-index: 200; // above all
|
|
||||||
|
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
|
// FIXME check if the stuff below is still relevant
|
||||||
|
|
||||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
/* + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||||
|
@ -158,7 +193,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
/* + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||||
|
|
|
@ -151,7 +151,10 @@
|
||||||
right: 0;
|
right: 0;
|
||||||
width: auto;
|
width: auto;
|
||||||
border: 0 none;
|
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;
|
z-index: 2000;
|
||||||
|
|
||||||
#plugin__qc__out{
|
#plugin__qc__out{
|
||||||
|
|
|
@ -34,6 +34,8 @@
|
||||||
@box-shadow-offset: __box_shadow_offset__;
|
@box-shadow-offset: __box_shadow_offset__;
|
||||||
@box-shadow: __box_shadow__;
|
@box-shadow: __box_shadow__;
|
||||||
@box-shadow-colored: __box_shadow_colored__;
|
@box-shadow-colored: __box_shadow_colored__;
|
||||||
|
@box-shadow-right-bottom:__box_shadow_right_bottom__;
|
||||||
|
@box-shadow-bottom: __box_shadow_bottom__;
|
||||||
|
|
||||||
@th_background: __background_alt__;
|
@th_background: __background_alt__;
|
||||||
|
|
||||||
|
|
|
@ -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{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -76,6 +76,16 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* + + + + + in meta box + + + + + */
|
||||||
|
#spr__tab-issues {
|
||||||
|
ul.mmissuelist {
|
||||||
|
padding-left: 0;
|
||||||
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* + + + + + in content + + + + + */
|
/* + + + + + in content + + + + + */
|
||||||
a.jiralink {
|
a.jiralink {
|
||||||
font-size: @font-size-default;
|
font-size: @font-size-default;
|
||||||
|
|
|
@ -45,3 +45,7 @@
|
||||||
margin-top: -.5rem;
|
margin-top: -.5rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dokuwiki .struct_inlineditor {
|
||||||
|
z-index: 3;
|
||||||
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* DokuWiki Image Detail Page
|
* DokuWiki Image Detail Page
|
||||||
|
@ -11,7 +12,7 @@
|
||||||
if (!defined('DOKU_INC')) die();
|
if (!defined('DOKU_INC')) die();
|
||||||
header('X-UA-Compatible: IE=edge,chrome=1');
|
header('X-UA-Compatible: IE=edge,chrome=1');
|
||||||
|
|
||||||
?><!DOCTYPE html>
|
?>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang']?>"
|
<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">
|
lang="<?php echo $conf['lang']?>" dir="<?php echo $lang['direction'] ?>" class="no-js">
|
||||||
<head>
|
<head>
|
||||||
|
@ -28,7 +29,6 @@ header('X-UA-Compatible: IE=edge,chrome=1');
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<!--[if lte IE 8 ]><div id="IE8"><![endif]-->
|
|
||||||
<div id="dokuwiki__detail" class="<?php echo tpl_classes(); ?>">
|
<div id="dokuwiki__detail" class="<?php echo tpl_classes(); ?>">
|
||||||
<?php html_msgarea() ?>
|
<?php html_msgarea() ?>
|
||||||
|
|
||||||
|
@ -89,6 +89,5 @@ header('X-UA-Compatible: IE=edge,chrome=1');
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
<!--[if lte IE 8 ]></div><![endif]-->
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
* Sets up the breadcrumb behaviour (adds do / ACT status information)
|
* Sets up the breadcrumb behaviour (adds do / ACT status information)
|
||||||
*/
|
*/
|
||||||
jQuery(function () {
|
jQuery(function () {
|
||||||
const $breadcrumb = jQuery('.breadcrumbs');
|
var $breadcrumb = jQuery('.breadcrumbs');
|
||||||
if (!$breadcrumb.length) return;
|
if (!$breadcrumb.length) return;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* add ACT status to breadcrumb (if not show)
|
* 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){
|
if(mode && mode.indexOf('show') !== 0){
|
||||||
var markup = '<bdi lang="en"><span class="curid"> : <strong>' + mode + '</strong></span></bdi>';
|
var markup = '<bdi lang="en"><span class="curid"> : <strong>' + mode + '</strong></span></bdi>';
|
||||||
$breadcrumb.find('p').append(markup);
|
$breadcrumb.find('p').append(markup);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
jQuery(function () {
|
jQuery(function () {
|
||||||
const $metaBox = jQuery('#spr__meta-box');
|
var $metaBox = jQuery('#spr__meta-box');
|
||||||
if (!$metaBox.length) return;
|
if (!$metaBox.length) return;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -10,8 +10,8 @@ jQuery(function () {
|
||||||
*/
|
*/
|
||||||
$metaBox.on('click', '.meta-tabs a', function (e) {
|
$metaBox.on('click', '.meta-tabs a', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
const $tab = jQuery(this);
|
var $tab = jQuery(this),
|
||||||
const isopen = $tab.attr('aria-expanded') === 'true';
|
isopen = $tab.attr('aria-expanded') === 'true';
|
||||||
|
|
||||||
// disable all existing tabs
|
// disable all existing tabs
|
||||||
$metaBox.find('.meta-tabs li')
|
$metaBox.find('.meta-tabs li')
|
||||||
|
|
298
js/sidebar.js
298
js/sidebar.js
|
@ -2,163 +2,165 @@
|
||||||
* Sets up the sidebar behaviour
|
* Sets up the sidebar behaviour
|
||||||
*/
|
*/
|
||||||
jQuery(function () {
|
jQuery(function () {
|
||||||
const $nav = jQuery('#dokuwiki__aside');
|
var $nav = jQuery('#dokuwiki__aside');
|
||||||
if (!$nav.length) return;
|
if (!$nav.length) return;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* closes sidebar
|
* closes sidebar
|
||||||
*/
|
*/
|
||||||
const setWideContent = function () {
|
var setWideContent = function () {
|
||||||
$nav.find('div.nav-panel').hide(); // close all panels
|
$nav.find('div.nav-panel').hide(); // close all panels
|
||||||
jQuery('body').addClass('wide-content');
|
jQuery('body').addClass('wide-content');
|
||||||
};
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* opens the sidebar
|
* opens the sidebar
|
||||||
*/
|
*/
|
||||||
const setDefaultContent = function () {
|
setDefaultContent = function () {
|
||||||
jQuery('body').removeClass('wide-content');
|
jQuery('body').removeClass('wide-content');
|
||||||
|
|
||||||
};
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Accessibility helper, focuses the first link witih the given element
|
* Accessibility helper, focuses the first link witih the given element
|
||||||
*
|
*
|
||||||
* @param {jQuery} $elem
|
* @param {jQuery} $elem
|
||||||
*/
|
*/
|
||||||
const focusFirstSubLink = function ($elem) {
|
focusFirstSubLink = function ($elem) {
|
||||||
$elem.find('a').first().focus();
|
$elem.find('a').first().focus();
|
||||||
};
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Toggle a navigation panel
|
* Toggle a navigation panel
|
||||||
*
|
*
|
||||||
* @param {jQuery} $toggler The h6 toggler
|
* @param {jQuery} $toggler The h6 toggler
|
||||||
*/
|
*/
|
||||||
const toggleNav = function ($toggler) {
|
toggleNav = function ($toggler) {
|
||||||
const $panel = $toggler.next('div.nav-panel');
|
var $panel = $toggler.next('div.nav-panel');
|
||||||
const isOpen = $panel.is(':visible');
|
var isOpen = $panel.is(':visible');
|
||||||
// open sidebar on interaction
|
// 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('<span class="ico">')
|
|
||||||
.text(text.substr(0, 1).toUpperCase() + text.substr(1, 1).toLowerCase())
|
|
||||||
.wrapInner('<strong>');
|
|
||||||
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('<a>')
|
|
||||||
.addClass('nav')
|
|
||||||
.attr('href', '#')
|
|
||||||
.attr('role', 'heading')
|
|
||||||
.attr('aria-level', '2')
|
|
||||||
.text(text)
|
|
||||||
.wrapInner('<span class="lbl">')
|
|
||||||
.prepend($icon)
|
|
||||||
;
|
|
||||||
|
|
||||||
// wrap all following siblings til the next element in a wrapper
|
|
||||||
const $wrap = jQuery('<div>')
|
|
||||||
.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) {
|
|
||||||
setDefaultContent();
|
setDefaultContent();
|
||||||
e.preventDefault();
|
// toggle the panel, focus first link after opening
|
||||||
jQuery('#qsearch__in').focus();
|
$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;
|
||||||
|
|
||||||
/**
|
var ELEMENT = 'h1,h2,h3,h4,h5'; // FIXME move to config
|
||||||
* Open and close the sidebar in mobile view
|
var $elements = $main.find(ELEMENT);
|
||||||
*/
|
$elements.each(function () {
|
||||||
const initMobileToggling = function () {
|
var $me = jQuery(this),
|
||||||
jQuery('.menu-togglelink').find('a').click(function (e) {
|
|
||||||
e.preventDefault();
|
// prepare text and the optional icon
|
||||||
jQuery('#dokuwiki__aside').toggleClass('show');
|
data = $me.text().split('@', 2),
|
||||||
});
|
text = data[0].trim();
|
||||||
};
|
|
||||||
|
var $icon = jQuery('<span class="ico">')
|
||||||
|
.text(text.substr(0, 1).toUpperCase() + text.substr(1, 1).toLowerCase())
|
||||||
|
.wrapInner('<strong>');
|
||||||
|
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('<a>')
|
||||||
|
.addClass('nav')
|
||||||
|
.attr('href', '#')
|
||||||
|
.attr('role', 'heading')
|
||||||
|
.attr('aria-level', '2')
|
||||||
|
.text(text)
|
||||||
|
.wrapInner('<span class="lbl">')
|
||||||
|
.prepend($icon)
|
||||||
|
;
|
||||||
|
|
||||||
|
// wrap all following siblings til the next element in a wrapper
|
||||||
|
var $wrap = jQuery('<div>')
|
||||||
|
.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
|
// main
|
||||||
initContentNav();
|
initContentNav();
|
||||||
|
|
|
@ -30,6 +30,7 @@ $lang['meta_box_tags_none'] = 'tags found: none';
|
||||||
$lang['js']['meta_box_toc_none'] = 'no Table of Contents available';
|
$lang['js']['meta_box_toc_none'] = 'no Table of Contents available';
|
||||||
|
|
||||||
$lang['tab_tags'] = 'Tags';
|
$lang['tab_tags'] = 'Tags';
|
||||||
|
$lang['tab_issues'] = 'Issues';
|
||||||
|
|
||||||
$lang['quality_trigger'] = 'toggle page analysis';
|
$lang['quality_trigger'] = 'toggle page analysis';
|
||||||
|
|
||||||
|
|
50
main.php
50
main.php
|
@ -9,27 +9,17 @@
|
||||||
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
|
* @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 */
|
if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */
|
||||||
header('X-UA-Compatible: IE=edge,chrome=1');
|
header('X-UA-Compatible: IE=edge,chrome=1');
|
||||||
|
|
||||||
$showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && !empty($_SERVER['REMOTE_USER']) );
|
$showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && !empty($_SERVER['REMOTE_USER']) );
|
||||||
$showSidebar = true; /* */
|
$showSidebar = true; /* */
|
||||||
$hasFooter = page_findnearest('pagefooter');
|
|
||||||
$showFooter = $hasFooter && ($ACT === 'show');
|
|
||||||
|
|
||||||
|
|
||||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
|
||||||
/* conditional comments for IE8 / IE9 browser detection if needed */
|
|
||||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
|
||||||
?>
|
?>
|
||||||
<!--[if lt IE 9]> <html class="no-js lt-ie10 lt-ie9" lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>"> <![endif]-->
|
<html class="edge no-js" lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>">
|
||||||
<!--[if IE 9]> <html class="no-js lt-ie10 ie-9" lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>"> <![endif]-->
|
|
||||||
<!--[if gt IE 9]><!--> <html class="edge no-js" lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>"> <!--<![endif]-->
|
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||||
/* meta and link relations */
|
/* meta and link relations */
|
||||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||||
|
@ -40,18 +30,6 @@ $showFooter = $hasFooter && ($ACT === 'show');
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
|
||||||
/* conditional comments for HTML5 / media queries support in IE8 */
|
|
||||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
|
||||||
?>
|
|
||||||
<!--[if lt IE 9]>
|
|
||||||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
|
||||||
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
|
|
||||||
<![endif]-->
|
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
|
|
||||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||||
/* page title */
|
/* page title */
|
||||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||||
|
@ -298,19 +276,13 @@ $classWideContent = ($ACT === "show") ? "": "wide-content ";
|
||||||
tpl_content(false); /* the main content */
|
tpl_content(false); /* the main content */
|
||||||
?>
|
?>
|
||||||
<div class="clearer"></div>
|
<div class="clearer"></div>
|
||||||
<?php if($showFooter):
|
<?php
|
||||||
|
if($ACT == 'show') echo Template::getInstance()->getInclude(
|
||||||
|
'footer',
|
||||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
'<div class="wikipagefooter"><hr>',
|
||||||
/* Page Include Hook: pagefooter.txt */
|
'<div class="clearer"></div></div>'
|
||||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
);
|
||||||
?>
|
?>
|
||||||
<div class="wikipagefooter">
|
|
||||||
<hr>
|
|
||||||
<?php tpl_include_page('pagefooter', true, true) ?>
|
|
||||||
<div class="clearer"></div>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
</div><!-- .main-content -->
|
</div><!-- .main-content -->
|
||||||
|
|
||||||
|
|
||||||
|
@ -363,7 +335,7 @@ $classWideContent = ($ACT === "show") ? "": "wide-content ";
|
||||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||||
/* copyright */
|
/* copyright */
|
||||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||||
tpl_license('');
|
tpl_license($img = false, $imgonly = false, $return = false, $wrap = false);
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* DokuWiki Media Manager Popup
|
* DokuWiki Media Manager Popup
|
||||||
|
@ -10,13 +11,8 @@
|
||||||
if (!defined('DOKU_INC')) die();
|
if (!defined('DOKU_INC')) die();
|
||||||
header('X-UA-Compatible: IE=edge,chrome=1');
|
header('X-UA-Compatible: IE=edge,chrome=1');
|
||||||
|
|
||||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
|
||||||
/* conditional comments for IE8 / IE9 browser detection if needed */
|
|
||||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
|
||||||
?>
|
?>
|
||||||
<!--[if lt IE 9]> <html class="no-js lt-ie10 lt-ie9" lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>"> <![endif]-->
|
<html class="edge no-js" lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>">
|
||||||
<!--[if IE 9]> <html class="no-js lt-ie10 ie-9" lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>"> <![endif]-->
|
|
||||||
<!--[if gt IE 9]><!--> <html class="edge no-js" lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>"> <!--<![endif]-->
|
|
||||||
<head>
|
<head>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
@ -29,20 +25,6 @@ header('X-UA-Compatible: IE=edge,chrome=1');
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<?php tpl_metaheaders() ?>
|
<?php tpl_metaheaders() ?>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
|
||||||
/* conditional comments for HTML5 / media queries support in IE8 */
|
|
||||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
|
||||||
?>
|
|
||||||
<!--[if lt IE 9]>
|
|
||||||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
|
||||||
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
|
|
||||||
<![endif]-->
|
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
|
|
||||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||||
/* page title */
|
/* page title */
|
||||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||||
|
|
|
@ -6,3 +6,4 @@
|
||||||
/* DOKUWIKI:include js/meta-box.js */
|
/* DOKUWIKI:include js/meta-box.js */
|
||||||
/* DOKUWIKI:include js/sidebar.js */
|
/* DOKUWIKI:include js/sidebar.js */
|
||||||
/* DOKUWIKI:include js/breadcrumb.js */
|
/* DOKUWIKI:include js/breadcrumb.js */
|
||||||
|
|
||||||
|
|
|
@ -160,6 +160,8 @@ __nav_direct_background__ = "#FFF"
|
||||||
__nav_direct_color__ = "#286da8"
|
__nav_direct_color__ = "#286da8"
|
||||||
__box_shadow_colored__ = "0 0 .5em rgba(40,109,168,.5)"
|
__box_shadow_colored__ = "0 0 .5em rgba(40,109,168,.5)"
|
||||||
__box_shadow__ = "0 0 .5em rgb(153,153,153,.5)"
|
__box_shadow__ = "0 0 .5em rgb(153,153,153,.5)"
|
||||||
|
__box_shadow_right_bottom__ = "0.1em 0.3rem 0.5em rgb(153,153,153,.5)"
|
||||||
|
__box_shadow_bottom__ = "0 0.1em 0.5em rgb(153,153,153,.5)"
|
||||||
__box_shadow_offset__ = ".1em .1em .1em rgb(153,153,153,.5)"
|
__box_shadow_offset__ = ".1em .1em .1em rgb(153,153,153,.5)"
|
||||||
__nav_menu_color__ = "#696969"
|
__nav_menu_color__ = "#696969"
|
||||||
__nav_menu_hover_color__ = "#286da8"
|
__nav_menu_hover_color__ = "#286da8"
|
||||||
|
|
|
@ -9,6 +9,9 @@ $tabs = \dokuwiki\template\sprintdoc\Template::getInstance()->getMetaBoxTabs();
|
||||||
<li class="a11y"> </li>
|
<li class="a11y"> </li>
|
||||||
<?php
|
<?php
|
||||||
foreach($tabs as $tab) {
|
foreach($tabs as $tab) {
|
||||||
|
if (empty($tab['tab']) || trim($tab['tab']) === '') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
echo '<li>';
|
echo '<li>';
|
||||||
echo '<a href="#' . $tab['id'] . '" aria-expanded="false">';
|
echo '<a href="#' . $tab['id'] . '" aria-expanded="false">';
|
||||||
echo '<span class="prefix">';
|
echo '<span class="prefix">';
|
||||||
|
@ -27,6 +30,9 @@ $tabs = \dokuwiki\template\sprintdoc\Template::getInstance()->getMetaBoxTabs();
|
||||||
<div class="box-content">
|
<div class="box-content">
|
||||||
<?php
|
<?php
|
||||||
foreach($tabs as $tab) {
|
foreach($tabs as $tab) {
|
||||||
|
if (empty($tab['tab']) || trim($tab['tab']) === '') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
echo '<div id="' . $tab['id'] . '" class="tab-pane" aria-hidden="true">';
|
echo '<div id="' . $tab['id'] . '" class="tab-pane" aria-hidden="true">';
|
||||||
echo $tab['tab'];
|
echo $tab['tab'];
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue