Merge branch 'master' into 'live'

Release des aktuellen Stands des Templates

See merge request !37
This commit is contained in:
Michael Große 2017-04-19 16:43:16 +02:00
commit 0a145a576b
36 changed files with 1264 additions and 511 deletions

View file

@ -181,7 +181,7 @@ class Template {
'img',
array(
'class' => 'mobile-hide',
'src' => array(tpl_getConf('logo'), 'wiki:logo-wide.png', 'wiki:logo.png'),
'src' => array('wiki:logo-wide.png', 'wiki:logo.png'),
'alt' => $title,
),
0, 0
@ -190,7 +190,7 @@ class Template {
'img',
array(
'class' => 'mobile-only',
'src' => array('wiki:logo-32x32.png', 'wiki:favicon.png', 'wiki:logo-square.png', 'wiki:logo.png', tpl_getConf('logo')),
'src' => array('wiki:logo-32x32.png', 'wiki:favicon.png', 'wiki:logo-square.png', 'wiki:logo.png'),
'alt' => $title,
),
32, 32

View file

@ -4,13 +4,5 @@
*
*/
$conf['logo'] = 'wiki:logo.png';
$conf['mobile_logo'] = 'images/fav/favicon-32x32.png';
$conf['sidebar_sections'] = 'h1,h2,h3,h4,h5';
$conf['logo_spacer'] = 'logo_spacer.png';
$conf['discussionPage'] = 'discussion:@ID@';
$conf['userPage'] = 'user:@USER@:';
$conf['user_ns'] = 'user';
$conf['hideTools'] = 0;
$conf['tasks_page'] = 'dashboard';

View file

@ -1,14 +1,11 @@
<?php
/*
* configuration metadata
*
*/
$meta['logo'] = array('string');
$conf['logo_spacer'] = array('string');
$meta['discussionPage'] = array('string');
$meta['userPage'] = array('string');
$conf['user_ns'] = array('string');
$meta['hideTools'] = array('onoff');
$meta['tasks_page'] = array('string');
$meta['sidebar_sections'] = array(
'multichoice',
'_choices' => array(
'h1',
'h1,h2',
'h1,h2,h3,h4,h5',
'li.level1 > .li',
),
);

View file

@ -25,34 +25,6 @@ form {
width: 48.5%;
}
}
// older version (history)
.dokuwiki & > .no > ul > li {
min-height: 2rem;
vertical-align: baseline;
a,
span,
img {
vertical-align: baseline;
}
img {
margin-left: 4px;
margin-right: 4px;
}
input[type="checkbox"] {
margin-bottom: .2rem;
}
span.user bdi {
a {
vertical-align: baseline;
}
}
}
}
fieldset {
@ -130,6 +102,20 @@ keygen {
padding-right: .3rem;
}
input[type="radio"],
input[type="checkbox"] {
min-height: 1rem;
}
input[type="radio"],
input[type="checkbox"],
input[type="image"] {
padding: 0;
border-style: none;
//box-shadow: none; :in ie picture and checkbox disappear
}
input:active,
input:focus,
textarea:active,
@ -141,14 +127,6 @@ keygen:focus {
border-color: #999;
}
input[type="radio"],
input[type="checkbox"],
input[type="image"] {
padding: 0;
border-style: none;
box-shadow: none;
}
input[type="file"] {
padding-top: .1rem;
padding-bottom: .1rem;
@ -205,14 +183,14 @@ button[type=submit],
}
button[type='reset'] {
min-height: 2rem;
min-height: @formfield_min-height;
vertical-align: middle;
padding: .3em 1rem;
}
input[type=submit],
button[type=submit] {
min-height: 2rem;
min-height: @formfield_min-height;
vertical-align: middle;
&[disabled] {

View file

@ -150,4 +150,35 @@
}
}
}
/* + + + + + with magic matcher + + + + + */
&.has-magicmatcher {
.logo {
@media @screen_min-md {
padding-top: 2rem;
}
}
.main-title.desktop-only {
@media @screen_min-md {
vertical-align: bottom;
padding-top: @height-context-bar;
padding-bottom: 1rem;
}
p.title {
@media @screen_min-md {
margin-right: 16rem;
}
}
p.claim {
@media @screen_max-md {
display: block;
padding-bottom: 1rem;
}
}
}
}
}

View file

@ -31,6 +31,11 @@
> div {
color: @ini_text_webframe;
}
&.toggler {
list-style: none;
margin-left: 0;
}
}
}
@ -111,7 +116,7 @@
flex-grow: 0;
border-right: 1px solid @ini_nav_menu_color;
text-align: center;
margin-right: @margin-small;
margin-right: 4%;
color: inherit;
// simple fake icon

View file

@ -1,3 +1,10 @@
/**
* This file provides the design styles for message block
*
* @author Jana Deutschlaender <deutschlaender@cosmocode.de>
*/
.msg-area {
clear: both;
padding-top: 1.6rem;

View file

@ -85,54 +85,4 @@
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: @toggle-size;
border: 1px solid @wikiicons-border;
border-radius: @ini_default_border_radius; // @ini_default_border_radius vs. @fix_border-radius
text-align: center;
margin: 0;
}
.prefix {
.btn-prefix ();
.icon-clipboard();
display: block;
font-size: 1.2rem;
line-height: 1;
}
} // li
a {
.btn-hover();
&[aria-expanded="false"] + #plugin__qc__wrapper {
display: none;
}
}
}
}

View file

@ -0,0 +1,75 @@
/**
* Page Attribute Icons in the breadcrumb bar
*/
/* + + + + + icons in breadcrumb area + + + + + */
.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: @toggle-size;
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: 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,
&:active {
background-color: @ini_nav_menu_hover_color;
border-color: @ini_nav_menu_hover_color;
color: @ini_nav_menu_hover_bg;
span {
fill: @ini_nav_menu_hover_bg;
color: @ini_nav_menu_hover_bg;
}
}
}
.prefix {
.btn-prefix(.26rem);
.icon-clipboard();
display: block;
font-size: 1.2rem;
line-height: 1;
}
.num {
top: -.6em;
}
}
}

View file

@ -86,6 +86,7 @@
position: relative;
min-height: 26px;
height: 1rem; // for IE11
overflow: visible;
background: @ini_nav_menu_hover_bg; // for removing bg-image
border: 0 none;
@ -95,6 +96,10 @@
margin-right: -.3rem;
padding: 0 .2em 0 0;
@media @screen_only-xlg {
padding-bottom: .1em;
}
@media @screen_min-xxlg {
margin-top: -(@space-min-xxlg);
}
@ -124,7 +129,6 @@
border-radius: @ini_default_border_radius; // @ini_default_border_radius vs. @fix_border-radius
color: inherit;
transform: none;
//transition: @transition opacity;
}
&:hover,
@ -141,10 +145,6 @@
bdi,
bdi:first-of-type {
color: @ini_nav_menu_hover_bg;
//&::before {
// color: inherit;
//}
}
}
}
@ -152,7 +152,6 @@
bdi {
display: inline-block;
color: inherit;
transition: @transition color;
}
bdi:first-of-type {
@ -168,7 +167,6 @@
left: -2px;
font-size: 1.4rem;
margin: 0;
transition: @transition color;
@media @screen_min-xxlg {
top: -.25rem;

163
css/area_recent.less Normal file
View file

@ -0,0 +1,163 @@
/**
* This file provides the design styles for page revisions
*
* @author Jana Deutschlaender <deutschlaender@cosmocode.de>
*/
.dokuwiki {
/* + + + + + list of changes + + + + + */
form.changes {
li {
.sizechange {
color: @color-editBox;
&.positive {
background-color: #cfc;
}
&.negative {
background-color: #fdd;
}
}
}
> .no > ul > li {
min-height: @formfield_min-height;
vertical-align: baseline;
margin-bottom: @small-spacing;
.li {
line-height: 150%;
> * {
min-height: 10px;
}
}
a,
span,
img {
vertical-align: baseline;
}
img {
margin-left: @small-spacing;
margin-right: @small-spacing;
}
input[type="checkbox"] {
margin: 0 .5rem .2rem -1.5rem;
}
span.user bdi {
a {
vertical-align: baseline;
}
}
}
}
/* + + + + + view of differents + + + + + */
a.difflink {
color: @ini_existing;
* {
color: inherit;
}
}
.diffnav {
a {
background-color: @ini_background;
border: solid 1px @ini_background;
border-radius: @ini_default_border_radius;
color: @ini_nav_menu_color;
transition: @transition background-color, @transition color, @transition border-color;
&::before {
background-color: inherit;
border: 0 none;
color: inherit;
}
&:hover,
&:focus,
&:active {
background-color: @ini_nav_menu_color;
border: solid 1px @ini_nav_menu_color;
color: @ini_background;
&::before {
background-color: inherit;
color: inherit;
}
}
}
}
table.diff {
background-color: #fff;
border: solid 1px #fff;
border-top-width: 10px;
border-bottom-width: 10px;
&.diff_inline {
border-top-width: 0;
.diffnav {
padding-top: 10px;
padding-bottom: 10px;
}
}
th {
background-color: @ini_background_content;
color: @ini_text;
padding-top: 10px;
padding-bottom: 10px;
&.minor {
color: #999;
}
}
td {
&.diff-blockheader {
background-color: #cfc;
color: @color-editBox;
}
&.diff-context {
background-color: #eee;
color: @color-editBox;
}
}
.diff-addedline {
background-color: #cfc;
color: @color-editBox;
strong {
background-color: transparent;
color: #f00;
}
}
.diff-deletedline {
background-color: #fdd;
color: @color-editBox;
* {
color: inherit;
}
strong {
background-color: transparent;
color: #f00;
}
}
}
}

View file

@ -31,11 +31,11 @@
@transition: ease-out .30s;
@box-shadow-offset: .1em .1em .1em rgba(153,153,153,.5); // pagetools, tabinclude
@box-shadow: 0 0 .5em rgba(153,153,153,.5);
@box-shadow-offset: .1em .1em .1em rgba(153,153,153,.5); // tabinclude
@box-shadow: 0 0 .5em rgba(153,153,153,.5); // pagetoolbox hover
@box-shadow-colored: 0 0 .5em fade(@ini_existing, 50%);
@box-shadow-right-bottom: 0.1em 0.3rem 0.5em rgba(153,153,153,.5);
@box-shadow-bottom: 0 .1em .5em rgba(153,153,153,.5); // qc-wrapper - breadcrumb
@box-shadow-right-bottom: .1em .3rem .5em rgba(153,153,153,.5);
@box-shadow-bottom: 0 .1em .5em rgba(153,153,153,.5); // qc-wrapper (breadcrumb), struct inline-editor
/* + + + for programmers customizing + + + */
@ -69,7 +69,7 @@
/* edit mode */
@highlight-odd-ini_text: fade(@ini_background_content, 95%);
@highlight-even-ini_text: fade(@ini_text, 5%);
@color-editBox: #252525; // editmode for tables
@color-editBox: #252525; // editmode for tables, revision states
//@nolinkedicon-ini_background: fade(@ini_background, 10%);
@ -153,6 +153,7 @@
@screen_only-md: ~"only screen and (min-width: 800px) and (max-width: " ~"@{break-max-md}px)";
@screen_only-lg: ~"only screen and (min-width: " ~"@{break-min-md}px) and (max-width: " ~"@{break-max-xlg}px)";
@screen_only-xlg: ~"only screen and (min-width: " ~"@{break-min-xlg}px) and (max-width: " ~"@{break-max-xxlg}px)";
@screen_xs-lg: ~"only screen and (min-width: " ~"@{break-min-xs}px) and (max-width: " ~"@{break-max-md}px)";
@ -454,18 +455,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;
}

View file

@ -514,6 +514,10 @@ pre {
padding: .7em 1em;
}
code:not([class]) {
display: inline-block;
}
blockquote {
border: solid @ini_border;
border-width: 0 0 0 .25em;

View file

@ -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();
@ -200,15 +200,15 @@
font-size: @font-size-default;
@media @screen_min-xxlg {
margin-top: .25rem;
margin-top: .22rem;
}
@media @screen_max-xxlg {
margin-top: .3rem;
margin-top: @margin-top;
}
@media @screen_max-md {
margin-top: .25rem;
margin-top: .2rem;
}
}

View file

@ -19,7 +19,6 @@ ul.page-attributes {
}
.num {
margin-top: 1px;
background-color: @noopentasks-border; // fix
color: @noopentasks-color; // fix
}

View file

@ -1,79 +1,89 @@
/**
* This file provides styles for qc plugin
* Styles for the QC plugin
*/
/* + + + + + global + + + + + */
/* + + + + + icon in breadcrumb + + + + + */
#dokuwiki__site {
.plugin__qc {
display: inline-block;
overflow: visible;
position: static;
}
.page-attributes .plugin_qc {
.qc_icon {
margin: 0;
#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: 0;
}
}
}
#plugin__qc__wrapper {
position: absolute;
right: 0;
z-index: 2000;
width: auto;
box-shadow: @box-shadow-bottom;
background: @ini_background_page_header;
background: -webkit-linear-gradient(top, @ini_background_page_header, @ini_background_content);
background: linear-gradient(top, @ini_background_page_header, @ini_background_content);
border: 0 none;
font-size: @font-size-default;
p {
font-size: @font-size-default;
}
#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;
svg {
margin-top: .1em;
width: 1.6em;
height: 1.6em;
font-size: (@font-size-small - .06);
}
}
}
/* + + + + + slideout output + + + + + */
.qc-output {
min-width: 100%;
width: auto;
font-size: 90%;
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);
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 {
padding-bottom: @small-spacing;
@media @screen_max-xxs {
float: none;
display: inline-block;
width: 49%;
max-width: 10em;
vertical-align: top;
margin-left: 0;
}
}
}
.qc_icon {
background-color: #fff;
border-radius: @fix_border-radius;
vertical-align: top;
padding: .1rem;
}
}

View file

@ -95,8 +95,25 @@
}
}
.dokuwiki .struct_inlineditor {
z-index: 3;
/* + + + + + struct inline-editor + + + + + */
.dokuwiki {
.struct_inlineditor {
z-index: 3;
box-shadow: @box-shadow-bottom;
.hint p {
color: @color-editBox;
margin-top: @small-spacing;
margin-bottom: @margin-small;
}
button[type="submit"] + button {
min-height: @formfield_min-height;
vertical-align: middle;
margin-left: @small-spacing;
}
}
}

130
css/template_detail.less Normal file
View file

@ -0,0 +1,130 @@
/**
* 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
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;
}
> h4 {
padding-top: (@margin-default / 2);
}
dl {
display: flex;
display: -webkit-flex;
display: -ms-flexbox;
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 {
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;
}
}
}
}

View file

@ -1,93 +1,381 @@
<!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;
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">
<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>
<div id="dokuwiki__detail" class="<?php echo tpl_classes(); ?>">
<?php html_msgarea() ?>
<body id="dokuwiki__top" class="<?php echo tpl_classes(); ?> wide-content showSidebar">
<div id="dokuwiki__site">
<?php
<?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>
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* template Include: tpl/nav-direct */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
?>
<?php include('tpl/nav-direct.php') ?>
<div class="page-wrapper <?php echo ($showSidebar) ? 'hasSidebar' : ''; ?>">
<?php
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* Include Hook: header.html */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
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')))) {
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* 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');
} ?>
<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 -->
<div class="tools">
<div class="container">
<div class="row">
<div class="col-xs-12">
<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 -->
</div><!-- .col -->
</div><!-- .row -->
</div><!-- .container -->
</div><!-- .tools -->
<div class="top-header">
<div class="container">
<div class="row">
<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');
?>
</div><!-- .col -->
</div><!-- .row -->
</div><!-- .container -->
</div><!-- /top-header -->
<div id="dokuwiki__detail">
<?php tpl_flush(); /* flush the output buffer */ ?>
<div class="content group">
<?php tpl_img(900, 700); /* the image; parameters: maximum width, maximum height (and more) */ ?>
<div class="container">
<div class="row">
<div class="col-xs-12">
<div class="breadcrumbs" data-do="<?php echo $ACT ?>">
<div class="img_detail">
<h2><?php print nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h2>
<div class="togglelink page_main-content">
<a href="#"><span class="sr-out"><?php echo tpl_getLang('a11y_sidebartoggle') ?></span></a>
</div>
<?php if(function_exists('tpl_img_meta')): ?>
<?php tpl_img_meta(); ?>
<?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);
}
}
<h6 class="sr-only" role="heading" aria-level="2"><?php echo tpl_getLang('head_menu_status') ?></h6>
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);
<?php
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* 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>
<?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">
<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: ?>
<?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
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* meta data of image */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
?>
<div class="img_detail">
<?php
$simple_title = hsc(tpl_img_getTag('simple.title'));
if(strlen($simple_title) > 0) {
?>
<h4><?php print nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h4>
<?php
} else {
echo hsc($value);
echo '<h4>' . tpl_getLang('meta_data') . '</h4>';
}
?>
<?php
tpl_img_meta();
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* 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;
$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 '<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>';
}
echo '</dd>';
}
}
?>
</dl>
<?php endif; ?>
<?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw')); ?>
</div>
?>
<?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw')); ?>
</div>
</div><!-- .main-content -->
</div><!-- .col -->
</div><!-- .row -->
</div><!-- .container -->
</div><!-- /.content -->
<p class="back">
<?php tpl_action('mediaManager', 1) ?><br />
&larr; <?php tpl_action('img_backto', 1) ?>
</p>
<?php endif; ?>
</div>
</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>

View file

@ -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 );
//
//
//
//

37
js/plugins/qc.js Normal file
View file

@ -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();
}
});
});

View file

@ -11,6 +11,20 @@ jQuery(function () {
var setWideContent = function () {
$nav.find('div.nav-panel').hide(); // close all panels
jQuery('body').addClass('wide-content');
removeToggleStorage();
},
/**
* removes information about the toggle-state
*/
removeToggleStorage = function () {
for (var index=0; index <= sessionStorage.length; index += 1) {
var item = sessionStorage.getItem('sidebar-section-' + index + '-open');
if (!item) {
break;
}
sessionStorage.removeItem('sidebar-section-' + index + '-open');
}
},
/**
@ -46,6 +60,7 @@ jQuery(function () {
focusFirstSubLink($panel);
}
});
sessionStorage.setItem('sidebar-section-' + $toggler.data('index') + '-open', !isOpen);
},
/**
@ -57,9 +72,13 @@ jQuery(function () {
var $main = $nav.find('nav.nav-main');
if (!$main.length) return;
var ELEMENT = 'h1,h2,h3,h4,h5'; // FIXME move to config
if(jQuery('body').hasClass('wide-content')) {
removeToggleStorage();
}
var ELEMENT = JSINFO.template.sprintdoc.sidebar_toggle_elements;
var $elements = $main.find(ELEMENT);
$elements.each(function () {
$elements.each(function (index) {
var $me = jQuery(this),
// prepare text and the optional icon
@ -83,6 +102,7 @@ jQuery(function () {
.text(text)
.wrapInner('<span class="lbl">')
.prepend($icon)
.data('index', index)
;
// wrap all following siblings til the next element in a wrapper
@ -98,6 +118,15 @@ jQuery(function () {
// replace element with toggler
$me.replaceWith($toggler);
if ($toggler.parent('li').length) {
$toggler.parent('li').addClass('toggler');
}
if (sessionStorage.getItem('sidebar-section-' + index + '-open') === 'true') {
$wrap.css('display', 'block');
}
});
},

View file

@ -43,6 +43,10 @@ $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';
/**
* colors

View file

@ -4,7 +4,9 @@
*
*/
$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';
$lang['sidebar_sections'] = 'Automatisches Ein- und Ausblenden der Sidebar Abschnitte orientieren sich an diesen Elementen:';
$lang['sidebar_sections_o_h1'] = 'Überschriften 1. Ordnung';
$lang['sidebar_sections_o_h1,h2'] = 'Überschriften der 1. und 2. Ordnung';
$lang['sidebar_sections_o_h1,h2,h3,h4,h5'] = 'Alle Überschriften';
$lang['sidebar_sections_o_li.level1 > .li'] = 'Top-level Listeneinträge in verschachtelten Listen';

View file

@ -44,6 +44,10 @@ $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';
/**
* colors

View file

@ -4,7 +4,11 @@
*
*/
$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.';
$lang['sidebar_sections'] = 'Auto-toggle the sidebar into sections on these elements:';
$lang['sidebar_sections_o_h1'] = '1st order headings';
$lang['sidebar_sections_o_h1,h2'] = '1st and 2nd order headings';
$lang['sidebar_sections_o_h1,h2,h3,h4,h5'] = 'All headings';
$lang['sidebar_sections_o_li.level1 > .li'] = 'Top-level list items';

View file

@ -14,7 +14,13 @@ 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']) );
global $JSINFO;
if (empty($JSINFO['template'])) {
$JSINFO['template'] = array();
}
$JSINFO['template']['sprintdoc'] = array('sidebar_toggle_elements' => tpl_getConf('sidebar_sections'));
$showTools = true;
$showSidebar = true; /* */
?>
<html class="edge no-js" lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>">
@ -82,9 +88,26 @@ $classWideContent = ($ACT === "show") ? "": "wide-content ";
/* Include Hook: header.html */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
tpl_includeFile('header.html');
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* User Tools and MagicMatcher Bar */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/** @var \helper_plugin_magicmatcher_context $mm */
$mm = plugin_load('helper', 'magicmatcher_context');
$headerClass = ""; /* for additionial class in #dokuwiki__header */
$navClass = ""; /* for additionial class in #dokuwiki__usertools (header.html) */
if($mm){
$matcher = $mm->getIssueContextBar();
if($matcher !== ""){
$headerClass = "has-magicmatcher";
$navClass = "has-bar";
}
}
?>
<div id="dokuwiki__header" class="header no-print">
<div id="dokuwiki__header" class="header <?php echo $headerClass; ?> no-print">
<div class="container">
<div class="row">
<div class="col-xs-12">
@ -95,7 +118,7 @@ $classWideContent = ($ACT === "show") ? "": "wide-content ";
</a>
</div>
<?php if (tpl_getConf('logo') && file_exists(mediaFN(tpl_getConf('logo')))){
<?php
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
@ -103,7 +126,7 @@ $classWideContent = ($ACT === "show") ? "": "wide-content ";
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* 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');
} ?>
?>
<div class="main-title">
<?php if ($conf['title']):
@ -116,6 +139,7 @@ $classWideContent = ($ACT === "show") ? "": "wide-content ";
</div><!-- .headings -->
</div><!-- .col -->
<div class="col-xs-12">
<div class="main-title desktop-only">
<?php if ($conf['title']):
@ -153,18 +177,6 @@ $classWideContent = ($ACT === "show") ? "": "wide-content ";
<div class="container">
<div class="row">
<div class="col-xs-12">
<div class="sidebarheader main-sidebar">
<?php
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* Include Hook: sidebarheader.html */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
tpl_includeFile('sidebarheader.html')
?>
</div><!-- .sidebarheader -->
<div class="search main-sidebar">
<?php
@ -175,6 +187,16 @@ $classWideContent = ($ACT === "show") ? "": "wide-content ";
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">
@ -219,16 +241,6 @@ $classWideContent = ($ACT === "show") ? "": "wide-content ";
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* User Tools and MagicMatcher Bar */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/** @var \helper_plugin_magicmatcher_context $mm */
$mm = plugin_load('helper', 'magicmatcher_context');
$navClass = "";
if($mm){
$matcher = $mm->getIssueContextBar();
if($matcher !== ""){
$navClass = "has-bar";
}
}
include('tpl/nav-usertools-buttons.php');
if($mm && $matcher !== ""){
include('tpl/nav-magicmatcher.php');
@ -276,7 +288,7 @@ $classWideContent = ($ACT === "show") ? "": "wide-content ";
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* page quality / page tasks */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
include('tpl/nav-page-quality-tasks.php');
include('tpl/nav-page-attributes.php');
?>
<?php
@ -312,6 +324,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

View file

@ -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 */

View file

@ -66,21 +66,25 @@ 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
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
css/area_forms.less = all
css/area_search.less = all
css/area_tabs.less = all
css/area_recent.less = all
; ____________ template styles _____________
css/template_admin.less = all
css/template_detail.less = all
; _____________ plugin styles _____________

86
tpl.php
View file

@ -97,4 +97,90 @@ class tpl {
return $out;
}
/**
* Assemble the tools for the current page
*
* It also includes the tools for some plugins, if they are installed and enabled. This does currently not trigger
* any events, but should be adjusted to the standard dokuwiki template, once that has svg-functionality implemented.
*
* @return array
*/
static public function assemblePageTools() {
$data = array(
'view' => 'main-svg',
'items' => array(
'edit' => static::pageToolAction('edit'),
'revert' => static::pageToolAction('revert'),
'revisions' => static::pageToolAction('revisions'),
'backlink' => static::pageToolAction('backlink'),
'subscribe' => static::pageToolAction('subscribe'),
)
);
$data['items'] = array_map(function ($elem) {
return '<li>' . $elem . '</li>';
},array_filter($data['items']));
/**
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* Begin shims as a temporary solution until the svg-approach is mainlined and the plugins have adapted
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*/
global $ACT;
if (act_clean($ACT) === 'show') {
/** @var \action_plugin_move_rename $move */
$move = plugin_load('action', 'move_rename');
if ($move && $move->getConf('pagetools_integration')) {
$attr = array(
'style' => 'background-image: none;',
);
$item = \dokuwiki\template\sprintdoc\tpl::pageToolItem('', $move->getLang('renamepage'), __DIR__ . '/images/tools/41-format-paint.svg', $attr);
$data['items'][] = '<li class="plugin_move_page">' . $item . '</li>';
}
/** @var \action_plugin_odt_export $odt */
$odt = plugin_load('action', 'odt_export');
if ($odt && $odt->getConf('showexportbutton')) {
global $ID, $REV;
$params = array('do' => 'export_odt');
if ($REV) {
$params['rev'] = $REV;
}
$attr = array(
'class' => 'action export_pdf',
'style' => 'background-image: none;',
);
$svg = __DIR__ . '/images/tools/43-file-delimeted.svg';
$item = \dokuwiki\template\sprintdoc\tpl::pageToolItem(wl($ID, $params, false, '&'), $odt->getLang('export_odt_button'), $svg, $attr);
$data['items'][] = '<li>' . $item . '</li>';
}
/** @var \action_plugin_dw2pdf $dw2pdf */
$dw2pdf = plugin_load('action', 'dw2pdf');
if ($dw2pdf && $dw2pdf->getConf('showexportbutton')) {
global $ID, $REV;
$params = array('do' => 'export_pdf');
if ($REV) {
$params['rev'] = $REV;
}
$attr = array(
'class' => 'action export_pdf',
'style' => 'background-image: none;',
);
$svg = __DIR__ . '/images/tools/40-pdf-file.svg';
$item = \dokuwiki\template\sprintdoc\tpl::pageToolItem(wl($ID, $params, false, '&'), $dw2pdf->getLang('export_pdf_button'), $svg, $attr);
$data['items'][] = '<li>' . $item . '</li>';
}
}
/**
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* End of shims
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*/
$data['items']['top'] = '<li>' . static::pageToolAction('top') . '</li>';
return $data;
}
}

View file

@ -17,7 +17,7 @@ echo Template::getResizedImgTag(
'link',
array(
'rel' => 'shortcut icon',
'href' => array('wiki:favicon.ico', 'wiki:favicon.png', tpl_getConf('logo'))
'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', tpl_getConf('logo'))
'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', tpl_getConf('logo'))
'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', tpl_getConf('logo'))
'content' => array('wiki:logo-' . $size . 'x' . $size . '.png', 'wiki:logo-square.png', 'wiki:favicon.ico', 'wiki:favicon.png', 'wiki:logo.png'),
),
$size, $size
);
@ -66,7 +66,7 @@ foreach(array(array(310, 150)) as $size) {
'meta',
array(
'name' => 'msapplication-wide' . $size[0] . 'x' . $size[1] . 'logo',
'content' => array('wiki:logo-' . $size[0] . 'x' . $size[1] . '.png', 'wiki:logo-wide.png', 'wiki:logo.png', tpl_getConf('logo'))
'content' => array('wiki:logo-' . $size[0] . 'x' . $size[1] . '.png', 'wiki:logo-wide.png', 'wiki:logo.png')
),
$size[0], $size[1]
);

View file

@ -12,7 +12,7 @@ $tabs = \dokuwiki\template\sprintdoc\Template::getInstance()->getMetaBoxTabs();
if (empty($tab['tab']) || trim($tab['tab']) === '') {
continue;
}
echo '<li>';
echo '<li class="' . $tab['id'] . '">';
echo '<a href="#' . $tab['id'] . '" aria-expanded="false">';
echo '<span class="prefix">';
echo $tab['label'];

57
tpl/nav-page-attributes.php Executable file
View file

@ -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(tpl_getLang('title_intime'), $count['undone']);
} else { // late tasks
$class = 'do_late';
$title = sprintf(tpl_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;*/

View file

@ -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;*/

View file

@ -1,93 +1,23 @@
<?php
if (!defined('DOKU_INC')) die();
if (!defined('DOKU_INC')) {
die();
}
?>
<?php if ($showTools): ?>
<nav id="dokuwiki__pagetools">
<div class="tools">
<?php include('nav-status.php');?>
<ul>
<?php
$data = array(
'view' => 'main-svg',
'items' => array(
'edit' => dokuwiki\template\sprintdoc\tpl::pageToolAction('edit'),
'revert' => dokuwiki\template\sprintdoc\tpl::pageToolAction('revert'),
'revisions' => dokuwiki\template\sprintdoc\tpl::pageToolAction('revisions'),
'backlink' => dokuwiki\template\sprintdoc\tpl::pageToolAction('backlink'),
'subscribe' => dokuwiki\template\sprintdoc\tpl::pageToolAction('subscribe'),
'top' => dokuwiki\template\sprintdoc\tpl::pageToolAction('top'),
)
);
<nav id="dokuwiki__pagetools">
<div class="tools">
<?php include('nav-status.php'); ?>
<ul>
<?php
$data = dokuwiki\template\sprintdoc\tpl::assemblePageTools();
foreach ($data['items'] as $k => $html) {
if ($html) {
echo "<li>$html</li>";
}
}
foreach ($data['items'] as $k => $html) {
echo $html;
}
/**
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* Begin shims as a temporary solution until the svg-approach is mainlined and the plugins have adapted
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*/
global $ACT;
if (act_clean($ACT) === 'show') {
/** @var action_plugin_move_rename $move */
$move = plugin_load('action', 'move_rename');
if ($move && $move->getConf('pagetools_integration')) {
$attr = array(
'style' => 'background-image: none;',
);
$item = \dokuwiki\template\sprintdoc\tpl::pageToolItem('', $move->getLang('renamepage'), __DIR__ . '/../images/tools/41-format-paint.svg', $attr);
echo '<li class="plugin_move_page">' . $item . '</li>';
}
/** @var action_plugin_odt_export $odt */
$odt = plugin_load('action', 'odt_export');
if ($odt && $odt->getConf('showexportbutton')) {
global $ID, $REV;
$params = array('do' => 'export_odt');
if ($REV) {
$params['rev'] = $REV;
}
$attr = array(
'class' => 'action export_pdf',
'style' => 'background-image: none;',
);
$svg = __DIR__ . '/../images/tools/43-file-delimeted.svg';
$item = \dokuwiki\template\sprintdoc\tpl::pageToolItem(wl($ID, $params, false, '&'), $odt->getLang('export_odt_button'), $svg, $attr);
echo '<li>' . $item . '</li>';
}
/** @var action_plugin_dw2pdf $dw2pdf */
$dw2pdf = plugin_load('action', 'dw2pdf');
if ($dw2pdf && $dw2pdf->getConf('showexportbutton')) {
global $ID, $REV;
$params = array('do' => 'export_pdf');
if ($REV) {
$params['rev'] = $REV;
}
$attr = array(
'class' => 'action export_pdf',
'style' => 'background-image: none;',
);
$svg = __DIR__ . '/../images/tools/40-pdf-file.svg';
$item = \dokuwiki\template\sprintdoc\tpl::pageToolItem(wl($ID, $params, false, '&'), $dw2pdf->getLang('export_pdf_button'), $svg, $attr);
echo '<li>' . $item . '</li>';
}
}
/**
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* End of shims
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*/
?>
</ul>
</div>
</nav>
<?php endif; ?>
?>
</ul>
</div>
</nav>

View file

@ -1,7 +1,7 @@
<?php
if (!defined('DOKU_INC')) die();
if ($conf['useacl'] && $showTools): ?>
if ($conf['useacl']): ?>
<nav id="dokuwiki__usertools" class="nav-usertools <?php echo $navClass?>">
<h6 class="sr-only" role="heading" aria-level="2"><?php echo $lang['user_tools']; ?></h6>
@ -32,11 +32,11 @@
$class = 'opentask opentasks';
break;
}
$linktarget = tpl_getConf('tasks_page');
$doInner = "<span class=\"prefix\">".tpl_getLang('prefix_tasks_user')." </span><span class=\"num\">".count($tasks)."</span>";
if($linktarget){
if (substr($linktarget, 0, 1) !== ':') {
$linktarget = tpl_getConf('user_ns'). $_SERVER['REMOTE_USER'] .':' . $linktarget;
$linktarget = 'user:' . $_SERVER['REMOTE_USER'] .':' . 'dashboard';
}
if($num == 0){
echo '<li class="user-task '.$class.'"><strong>'.$doInner.'</strong></li>';