diff --git a/Template.php b/Template.php index e221821..7eae3ae 100644 --- a/Template.php +++ b/Template.php @@ -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'; } /** diff --git a/css/area_forms.less b/css/area_forms.less index 6469546..996bd68 100644 --- a/css/area_forms.less +++ b/css/area_forms.less @@ -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] { diff --git a/css/area_header.less b/css/area_header.less index e02bf1a..0225a71 100755 --- a/css/area_header.less +++ b/css/area_header.less @@ -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; + } + } + } + } } diff --git a/css/area_main-sidebar-nav.less b/css/area_main-sidebar-nav.less index b7e9984..34e2dac 100755 --- a/css/area_main-sidebar-nav.less +++ b/css/area_main-sidebar-nav.less @@ -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 diff --git a/css/area_msg.less b/css/area_msg.less index 1e2ad9e..205b7ab 100644 --- a/css/area_msg.less +++ b/css/area_msg.less @@ -1,3 +1,10 @@ +/** + * This file provides the design styles for message block + * + * @author Jana Deutschlaender + */ + + .msg-area { clear: both; padding-top: 1.6rem; diff --git a/css/area_nav-usertools.less b/css/area_nav-usertools.less index 87959cd..d7c942f 100755 --- a/css/area_nav-usertools.less +++ b/css/area_nav-usertools.less @@ -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; diff --git a/css/area_recent.less b/css/area_recent.less new file mode 100644 index 0000000..a24ca63 --- /dev/null +++ b/css/area_recent.less @@ -0,0 +1,163 @@ +/** + * This file provides the design styles for page revisions + * + * @author Jana Deutschlaender + */ + + +.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; + } + } + } +} diff --git a/css/base.less b/css/base.less index 8d8a53f..4c4352f 100755 --- a/css/base.less +++ b/css/base.less @@ -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)"; diff --git a/css/base_design.less b/css/base_design.less index 9d68d7b..d56d117 100755 --- a/css/base_design.less +++ b/css/base_design.less @@ -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; diff --git a/css/plugins/struct.less b/css/plugins/struct.less index 1f9998b..7bb1df7 100755 --- a/css/plugins/struct.less +++ b/css/plugins/struct.less @@ -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; + } + } } diff --git a/main.php b/main.php index f4d2ee8..25e0d4d 100755 --- a/main.php +++ b/main.php @@ -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"; + } + } ?> -
+
@@ -122,6 +139,7 @@ $classWideContent = ($ACT === "show") ? "": "wide-content ";
+
- -
- -
- +
+ +
+ + getInclude( + 'sidebarheader', + '
', + '
' + ); + ?> + + + getInclude( + 'sidebarfooter', + '
', + '
' + ); + ?>
@@ -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'); diff --git a/style.ini b/style.ini index 1fd8b20..64a8289 100755 --- a/style.ini +++ b/style.ini @@ -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 diff --git a/template.info.txt b/template.info.txt index a9ad526..861a96e 100755 --- a/template.info.txt +++ b/template.info.txt @@ -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 diff --git a/tpl.php b/tpl.php index 98a8663..b5a432f 100644 --- a/tpl.php +++ b/tpl.php @@ -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 '
  • ' . $elem . '
  • '; + },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'][] = '
  • ' . $item . '
  • '; + } + + /** @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'][] = '
  • ' . $item . '
  • '; + } + + /** @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'][] = '
  • ' . $item . '
  • '; + } + } + /** + * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + * End of shims + * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + */ + + $data['items']['top'] = '
  • ' . static::pageToolAction('top') . '
  • '; + return $data; + } } diff --git a/tpl/nav-page-tools.php b/tpl/nav-page-tools.php index f57d335..1cd38a8 100755 --- a/tpl/nav-page-tools.php +++ b/tpl/nav-page-tools.php @@ -9,82 +9,13 @@
      '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 "
    • $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 '
    • ' . $item . '
    • '; - } - /** @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 '
    • ' . $item . '
    • '; - } - - /** @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 '
    • ' . $item . '
    • '; - } - } - /** - * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - * End of shims - * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - */ ?>