Merge branch 'master' into toggleConf

This commit is contained in:
Michael Große 2017-04-18 13:10:14 +02:00
commit 1c24bf1989
No known key found for this signature in database
GPG key ID: 7E31028FBFEACC79
15 changed files with 390 additions and 148 deletions

View file

@ -49,6 +49,8 @@ class Template {
*/
public function registerIncludes(\Doku_Event $event) {
$event->data['footer'] = 'Footer below the page content';
$event->data['sidebarfooter'] = 'Footer below the sidebar';
$event->data['sidebarheader'] = 'Header above the sidebar';
}
/**

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

@ -116,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

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

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

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

View file

@ -88,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">
@ -122,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']):
@ -159,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
@ -181,14 +187,41 @@ $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">
<?php
echo Template::getInstance()->getInclude(
'sidebarheader',
'<div class="sidebarheader">',
'<div class="clearer"></div></div>'
);
?>
<?php
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* sidebar */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
include('tpl/main-sidebar-nav.php');
?>
<?php
echo Template::getInstance()->getInclude(
'sidebarfooter',
'<div class="sidebarfooter">',
'<div class="clearer"></div></div>'
);
?>
</div><!-- .aside -->
</div><!-- .col -->
@ -208,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');

View file

@ -79,6 +79,7 @@ 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
css/template_admin.less = all

View file

@ -1,7 +1,7 @@
base sprintdoc
author Jana Deutschlaender
email deutschlaender@cosmocode.de
date 2016-12-05
date 2017-04-13
name sprintDoc Template
desc DokuWiki Template for sprintDoc Project
url FIXME URL

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

@ -9,82 +9,13 @@
<?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'),
)
);
$data = dokuwiki\template\sprintdoc\tpl::assemblePageTools();
foreach ($data['items'] as $k => $html) {
if ($html) {
echo "<li>$html</li>";
}
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>