commit 84725e5c46cbf09533ff09103a46e2896a2a02a1 Author: Knah Tsaeb Date: Fri Aug 2 15:20:41 2013 +0200 Initial commit diff --git a/.project b/.project new file mode 100644 index 0000000..6f3912a --- /dev/null +++ b/.project @@ -0,0 +1,13 @@ + + + theme.wiki.knah-tsaeb.local + + + + + + + com.aptana.projects.webnature + com.aptana.editor.php.phpNature + + diff --git a/detail.php b/detail.php new file mode 100644 index 0000000..d2ed530 --- /dev/null +++ b/detail.php @@ -0,0 +1,134 @@ + + * @author Anika Henke + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + */ + +// must be run from within DokuWiki +if (!defined('DOKU_INC')) die(); +header('X-UA-Compatible: IE=edge,chrome=1'); + +?> + + + + + <?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG))?> + [<?php echo strip_tags($conf['title'])?>] + + + + + + + + + + +
+ + + +
+ + +
+ + +
+ + +
+ + + + '.$ERROR.''; + else: ?> + +

+ + + +
+
+ $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 '
'.$lang[$tag[1]].':
'; + if ($tag[2] == 'date') { + echo dformat($value); + } else { + echo hsc($value); + } + echo '
'; + } + } + ?> +
+
+ + +
+ + + + +
+ */ ?> + +
+ +
+ + + +
+

+
+ +
+
+ +
+ + +
+ + + + diff --git a/main.php b/main.php new file mode 100644 index 0000000..43a0c0d --- /dev/null +++ b/main.php @@ -0,0 +1,97 @@ + + * @author Clarence Lee + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + */ + +if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */ +header('X-UA-Compatible: IE=edge,chrome=1'); + +$hasSidebar = page_findnearest($conf['sidebar']); +$showSidebar = $hasSidebar && ($ACT=='show'); +?> + + + + <?php tpl_pagetitle() ?> [<?php echo strip_tags($conf['title']) ?>] + + + + + + + + + +
+ + + +
+ + + +
+

+
+ + + + +
+
+ + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ +
+ + +
+

+
+
    + ', ''); + tpl_action('revert', 1, 'li', 0, '', ''); + tpl_action('revisions', 1, 'li', 0, '', ''); + tpl_action('backlink', 1, 'li', 0, '', ''); + tpl_action('subscribe', 1, 'li', 0, '', ''); + tpl_action('top', 1, 'li', 0, '', ''); + ?> +
+
+
+
+ + +
+ +
+
+ + + diff --git a/mediamanager.php b/mediamanager.php new file mode 100644 index 0000000..dadf2b1 --- /dev/null +++ b/mediamanager.php @@ -0,0 +1,46 @@ + + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + */ +// must be run from within DokuWiki +if (!defined('DOKU_INC')) die(); +header('X-UA-Compatible: IE=edge,chrome=1'); + +?> + + + + + <?php echo hsc($lang['mediaselect'])?> + [<?php echo strip_tags($conf['title'])?>] + + + + + + + + + + +
+ +
+

+ + +
+ + +
+ +
+ +
+
+ + + diff --git a/script.js b/script.js new file mode 100644 index 0000000..4eb92a4 --- /dev/null +++ b/script.js @@ -0,0 +1,79 @@ +/** + * We handle several device classes based on browser width. + * + * - desktop: > __tablet_width__ (as set in style.ini) + * - mobile: + * - tablet <= __tablet_width__ + * - phone <= __phone_width__ + */ +var device_class = ''; // not yet known +var device_classes = 'desktop mobile tablet phone'; + +function tpl_dokuwiki_mobile(){ + + // the z-index in mobile.css is (mis-)used purely for detecting the screen mode here + var screen_mode = jQuery('#screen__mode').css('z-index') + ''; + + // determine our device pattern + // TODO: consider moving into dokuwiki core + switch (screen_mode) { + case '1': + if (device_class.match(/tablet/)) return; + device_class = 'mobile tablet'; + break; + case '2': + if (device_class.match(/phone/)) return; + device_class = 'mobile phone'; + break; + default: + if (device_class == 'desktop') return; + device_class = 'desktop'; + } + + jQuery('html').removeClass(device_classes).addClass(device_class); + + // handle some layout changes based on change in device + var $handle = jQuery('#dokuwiki__aside h3.toggle'); + var $toc = jQuery('#dw__toc h3'); + + if (device_class == 'desktop') { + // reset for desktop mode + if($handle.length) { + $handle[0].setState(1); + $handle.hide(); + } + if($toc.length) { + $toc[0].setState(1); + } + } + if (device_class.match(/mobile/)){ + // toc and sidebar hiding + if($handle.length) { + $handle.show(); + $handle[0].setState(-1); + } + if($toc.length) { + $toc[0].setState(-1); + } + } +} + +jQuery(function(){ + var resizeTimer; + dw_page.makeToggle('#dokuwiki__aside h3.toggle','#dokuwiki__aside div.content'); + + tpl_dokuwiki_mobile(); + jQuery(window).bind('resize', + function(){ + if (resizeTimer) clearTimeout(resizeTimer); + resizeTimer = setTimeout(tpl_dokuwiki_mobile,200); + } + ); + + // increase sidebar length to match content (desktop mode only) + var $sidebar = jQuery('.desktop #dokuwiki__aside'); + if($sidebar.length) { + var $content = jQuery('#dokuwiki__content div.page'); + $content.css('min-height', $sidebar.height()); + } +}); diff --git a/style.ini b/style.ini new file mode 100644 index 0000000..77bb982 --- /dev/null +++ b/style.ini @@ -0,0 +1,79 @@ +; Please see http://www.php.net/manual/en/function.parse-ini-file.php +; for limitations of the ini format used here + +; To extend this file or make changes to it, it is recommended to create +; a style.local.ini file to prevent losing any changes after an upgrade. +; Please don't forget to copy the section your changes should be under +; (i.e. [stylesheets] or [replacements]) into that file as well. + +; Define the stylesheets your template uses here. The second value +; defines for which output media the style should be loaded. Currently +; print, screen and all are supported. + +[stylesheets] + +css/basic.css = screen +css/_imgdetail.css = screen +css/_media_popup.css = screen +css/_media_fullscreen.css = screen +css/_fileuploader.css = screen +css/_tabs.css = screen +css/_links.css = screen +css/_toc.css = screen +css/_footnotes.css = screen +css/_search.css = screen +css/_recent.css = screen +css/_diff.css = screen +css/_edit.css = screen +css/_modal.css = screen +css/_forms.css = screen +css/_admin.css = screen +css/structure.css = screen +css/design.css = screen +css/pagetools.css = screen +css/content.css = screen +css/includes.css = screen + +css/mobile.css = all +css/print.css = print + + +; This section is used to configure some placeholder values used in +; the stylesheets. Changing this file is the simplest method to +; give your wiki a new look. + +[replacements] + +;-------------------------------------------------------------------------- +;------ guaranteed dokuwiki color placeholders that every plugin can use + +; main text and background colors +__text__ = "#333" +__background__ = "#fff" +; alternative text and background colors +__text_alt__ = "#999" +__background_alt__ = "#eee" +; neutral text and background colors +__text_neu__ = "#666" +__background_neu__ = "#ddd" +; border color +__border__ = "#ccc" + +; highlighted text (e.g. search snippets) +__highlight__ = "#ff9" + +;-------------------------------------------------------------------------- + +__background_site__ = "#fbfaf9" + +; these are used for links +__link__ = "#2b73b7" +__existing__ = "#080" +__missing__ = "#d30" + +; site and sidebar widths +__site_width__ = "75em" +__sidebar_width__ = "16em" +; cut off points for mobile devices +__tablet_width__ = "800px" +__phone_width__ = "480px" diff --git a/template.info.txt b/template.info.txt new file mode 100644 index 0000000..6d4d010 --- /dev/null +++ b/template.info.txt @@ -0,0 +1,7 @@ +base dokuwiki +author Knah Tsaeb +email knah-tsaeb_dokuwiki@knah-tsaeb.org +date 2013-08-01 +name Knah Tsaeb Template +desc Base on DokuWiki template +url http://www.dokuwiki.org/template:dokuwiki diff --git a/tpl_footer.php b/tpl_footer.php new file mode 100644 index 0000000..b7dc9c6 --- /dev/null +++ b/tpl_footer.php @@ -0,0 +1,32 @@ + + + + + + diff --git a/tpl_header.php b/tpl_header.php new file mode 100644 index 0000000..19d1650 --- /dev/null +++ b/tpl_header.php @@ -0,0 +1,91 @@ + + + +
+ + + +
+
    +
  • +
+ +

'.$conf['title'].'', + 'accesskey="h" title="[H]"' + ); + ?>

+ +

+ +
+ +
+ + +
+

+
    + '; + tpl_userinfo(); /* 'Logged in as ...' */ + echo ''; + } + tpl_action('admin', 1, 'li'); + tpl_action('profile', 1, 'li'); + tpl_action('register', 1, 'li'); + tpl_action('login', 1, 'li'); + ?> +
+
+ + + +
+

+ +
+ +
+
    + +
+
+ +
+ + + + + + + + +
+