Last active
December 27, 2015 02:39
-
-
Save tenforward/7253406 to your computer and use it in GitHub Desktop.
dokuwiki の arctic テンプレートのタイトル部分を arctic-mho っぽくするパッチ + css 微調整
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -uNr a/lib/tpl/arctic/arctic_design.css b/lib/tpl/arctic/arctic_design.css | |
--- a/lib/tpl/arctic/arctic_design.css 2012-09-15 02:56:58.000000000 +0900 | |
+++ b/lib/tpl/arctic/arctic_design.css 2013-04-25 17:07:53.322883768 +0900 | |
@@ -6,7 +6,7 @@ | |
/* ----- General Elements ----- */ | |
body { | |
- font: __font_size__ Verdana, "Lucida Grande", Lucida, Helvetica, Arial, sans-serif; | |
+ font: __font_size__ Verdana, "Hiragino Maru Gothic Pro", "Lucida Grande", Lucida, Helvetica, Arial, sans-serif; | |
color: __text__; | |
margin: __body_margin__; | |
line-height: __line_height__; | |
@@ -208,6 +208,7 @@ | |
width: auto !important; | |
width: 98%; | |
font-size: 100%; | |
+ font-family: "Bitstream Vera Sans Mono", "Menlo", monospace; | |
} | |
/* Footnotes fix for IE7 */ | |
diff -uNr a/lib/tpl/arctic/main.php b/lib/tpl/arctic/main.php | |
--- a/lib/tpl/arctic/main.php 2012-09-15 02:56:58.000000000 +0900 | |
+++ b/lib/tpl/arctic/main.php 2013-03-06 17:33:36.003274926 +0900 | |
@@ -50,7 +50,10 @@ | |
<div class="stylehead"> | |
<div class="header"> | |
<div class="pagename"> | |
+ <?php tpl_arctic_mbo_pagename() ?> | |
+<!-- tpl_arctic_mbo_pagename from arctic-mbo template by tenforward | |
[[<?php tpl_link(wl($ID,'do=backlink'),tpl_pagetitle($ID,true))?>]] | |
+--> | |
</div> | |
<div class="logo"> | |
<?php tpl_link(wl(),$conf['title'],'name="dokuwiki__top" accesskey="h" title="[ALT+H]"')?> | |
diff -uNr a/lib/tpl/arctic/tpl_functions.php b/lib/tpl/arctic/tpl_functions.php | |
--- a/lib/tpl/arctic/tpl_functions.php 2012-09-15 02:56:58.000000000 +0900 | |
+++ b/lib/tpl/arctic/tpl_functions.php 2013-03-06 17:09:20.410225133 +0900 | |
@@ -373,5 +373,54 @@ | |
} | |
} | |
+function tpl_arctic_mbo_pagename($sep=' » '){ | |
+ global $conf; | |
+ global $ID; | |
+ global $lang; | |
+ | |
+ $parts = explode(':', $ID); | |
+ $count = count($parts); | |
+ | |
+ if($GLOBALS['ACT'] == 'search') | |
+ { | |
+ $parts = array($conf['start']); | |
+ $count = 1; | |
+ } | |
+ | |
+ // always print the site title | |
+ tpl_link(wl(),$conf['title'],'name="dokuwiki__top" id="dokuwiki__top" title="'.$conf['start'].'"'); | |
+ | |
+ // print intermediate namespace links | |
+ $part = ''; | |
+ for($i=0; $i<$count - 1; $i++){ | |
+ $part .= $parts[$i].':'; | |
+ $page = $part; | |
+ resolve_pageid('',$page,$exists); | |
+ if ($page == $conf['start']) continue; // Skip startpage | |
+ | |
+ // output | |
+ echo $sep; | |
+ if($exists && (auth_quickaclcheck($page) >= AUTH_READ)){ | |
+ $title = useHeading('navigation') ? p_get_first_heading($page) : $parts[$i]; | |
+ tpl_link(wl($page),hsc($title),'title="'.$page.'"'); | |
+ }else{ | |
+ tpl_link(wl($page),$parts[$i],'title="'.$page.'" class="wikilink2" rel="nofollow"'); | |
+ } | |
+ } | |
+ | |
+ // print current page, skipping start page, skipping for namespace index | |
+ if(isset($page) && $page==$part.$parts[$i]) return; | |
+ $page = $part.$parts[$i]; | |
+ if($page == $conf['start']) return; | |
+ echo $sep; | |
+ if(page_exists($page) && (auth_quickaclcheck($page) >= AUTH_READ)){ | |
+ $title = useHeading('navigation') ? p_get_first_heading($page) : $parts[$i]; | |
+ tpl_link(wl($page),hsc($title),'title="'.$page.'"'); | |
+ }else{ | |
+ tpl_link(wl($page),$parts[$i],'title="'.$page.'" class="wikilink2" rel="nofollow"'); | |
+ } | |
+ return true; | |
+} | |
+ | |
// vim:ts=4:sw=4:et:enc=utf-8: | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment