From db3e55d2f7553db1f0b6cafbfa7d13b115b5d44a Mon Sep 17 00:00:00 2001 From: rurban Date: Sun, 19 Dec 2004 17:34:19 +0000 Subject: [PATCH] Add a minimalistic design by walter rafelsberger See http://www.shamino.com/wiki/ Tiny actionbar: PageInfo, Edit and all other actionbars buttons in info.tmpl, Signin only implictly after Edit. Tiny navbar: without buttons, just links git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@4307 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- themes/shamino_com/shamino_com.css | 142 ++++++++++++ themes/shamino_com/templates/actionbar.tmpl | 24 ++ themes/shamino_com/templates/bottom.tmpl | 8 + .../shamino_com/templates/browse-footer.tmpl | 10 + themes/shamino_com/templates/debug.tmpl | 10 + themes/shamino_com/templates/info.tmpl | 211 ++++++++++++++++++ themes/shamino_com/templates/signin.tmpl | 33 +++ themes/shamino_com/templates/top.tmpl | 35 +++ themes/shamino_com/themeinfo.php | 129 +++++++++++ 9 files changed, 602 insertions(+) create mode 100644 themes/shamino_com/shamino_com.css create mode 100644 themes/shamino_com/templates/actionbar.tmpl create mode 100644 themes/shamino_com/templates/bottom.tmpl create mode 100644 themes/shamino_com/templates/browse-footer.tmpl create mode 100644 themes/shamino_com/templates/debug.tmpl create mode 100644 themes/shamino_com/templates/info.tmpl create mode 100644 themes/shamino_com/templates/signin.tmpl create mode 100644 themes/shamino_com/templates/top.tmpl create mode 100644 themes/shamino_com/themeinfo.php diff --git a/themes/shamino_com/shamino_com.css b/themes/shamino_com/shamino_com.css new file mode 100644 index 000000000..1891cd162 --- /dev/null +++ b/themes/shamino_com/shamino_com.css @@ -0,0 +1,142 @@ +/** + * $Id: shamino_com.css,v 1.1 2004-12-19 17:34:19 rurban Exp $ + * + * shamino.com style sheet based on the original Wiki + * + */ +body { + font-family: sans-serif; + font-weight: normal; + font-style: normal; + background-color: #ffffff; + position: absolute; + top:0px; + left:0px; + visibility: visible; + z-index: auto; + margin:0px; +} + +hr { + height:0px; + margin-left:10px; + margin-right:10px; +} + +#content { + font-family: sans-serif; + font-weight: normal; + font-style: normal; + background-color: #ffffff; + padding: 1em 10px 1em 10px; +} + +.wikitext, p, form, ul, dd, dl, li, td { + font-size: small; + line-height: 150%; + color: #111111; + margin: 0px; + padding: 0px; + list-style-type:none; +} + +p, ul { + padding: 10px; + text-align: justify; + background-color:#ffffff; +} + +dd { + font-size: x-small; + text-align:right; + padding:0px; + margin:0px; + bottom:0px; +} + +dl { + padding:0px; + margin:0px; + margin-top:14px; + bottom:0px; +} + +li { + margin-left:0px; + margin-bottom:0px; +} + +img { + margin:0px; + border:0px; + padding:0px; +} + +table { +/* position:relative;left:0px;top:0px; */ + border: 0px;; + padding: 0px; + border-spacing: 0px; + margin: 0px; +} + +td, th, tr, tt { + padding: 0px; + margin: 2px; + border: 0px; + border-spacing: 0px; +} + +input.numeric { text-align: right; } +input { + font-family: sans-serif; + font-size: small; + font-style: normal; + font-weight: normal; +} + +textarea { + text-decoration:none; + font-family: sans-serif; + font-size: small; + font-style: normal; + font-weight: normal; +} + +h1, h2, h3, h4 { + font-family: Lucida Grande, sans-serif; + font-weight: normal; + font-style: normal; + margin:0px; + padding:0px; + padding-top:10px; + text-decoration:none; + text-align:left; +} + +a:link { font-weight:normal; color:#445566; text-decoration:none } +a:visited { font-weight:normal; color:#445566; text-decoration:none } +a:hover { font-weight:normal; color:#445566; text-decoration:underline } +a:active { font-weight:normal; color:#445566; text-decoration:underline } +a:focus { font-weight:normal; color:#445566; text-decoration:underline } + +.main { padding: 0px; border: 0px; margin:0px; } +.maintable { padding: 0px; border: 0px; margin:0px; } +.menu { font-size: x-small; padding: 10px; padding-top:0px; border: 0px; margin:0px; } +.box { background-color: #eeeeee; border: 1px solid #dcdcdc; color: #111111; padding: 0px; position: absolute; } +.bar { background-color: #eeeeee; color: #111111; font-weight: bold; padding: 2px 1em 2px 1em; } + +.wikilink { color: #5555CC; text-decoration:none; font-style:normal; } +.wikinavbar { border-bottom: 1px #999999 solid; padding: 2px; font-size: xx-small; } +.toolbar { border-top: 1px #999999 solid; padding: 2px; font-size: xx-small; } +.debug { padding: 2px; margin-left:10px; font-size: xx-small; } +.wikinavbar a.wikilink, .toolbar a.wikilink, .editdate, #xhtml-validator a.wikilink { font-size: xx-small; } +.wikiaction { color: #5555CC; text-decoration:none; font-style:normal; } +.wiki { color: #5555CC; text-decoration:none; font-style:normal; } +.backlinks { color: #5555CC; text-decoration:none; font-style:normal; } +/* .header { font-size: x-small; border-top: 1px #999999 solid; padding:10px; padding-top:5px; padding-bottom:5px; } */ + +#header { font-size: xx-small; margin-left:4px; } +.signin, .signin a.wiki, .signin a.wikiaction { font-size: xx-small; } +.top { font-size: 75%; margin:4px; } +.plugin { margin:0px; } \ No newline at end of file diff --git a/themes/shamino_com/templates/actionbar.tmpl b/themes/shamino_com/templates/actionbar.tmpl new file mode 100644 index 000000000..a06fd14ac --- /dev/null +++ b/themes/shamino_com/templates/actionbar.tmpl @@ -0,0 +1,24 @@ +getButtonSeparator(); +?> + +'PageInfo'),_("PageInfo"),$page->getName()) ?> +isCurrent() ? _("Edit") : _("Edit Old Revision")) ?> +isAdmin() or mayAccessPage('change',$page->getName())) { ?> + get('locked') ? 'unlock' : 'lock') ?> + + + + + +isAdmin() or mayAccessPage('remove',$page->getName())) { ?> + + +isAdmin()) { ?> + + + + + + + diff --git a/themes/shamino_com/templates/bottom.tmpl b/themes/shamino_com/templates/bottom.tmpl new file mode 100644 index 000000000..3067677ae --- /dev/null +++ b/themes/shamino_com/templates/bottom.tmpl @@ -0,0 +1,8 @@ + + +DUMP_MODE) { ?> +getPostponedErrorsAsHTML() ?> + + diff --git a/themes/shamino_com/templates/browse-footer.tmpl b/themes/shamino_com/templates/browse-footer.tmpl new file mode 100644 index 000000000..a99e644d8 --- /dev/null +++ b/themes/shamino_com/templates/browse-footer.tmpl @@ -0,0 +1,10 @@ + +
+ + + getButtonSeparator() ?> + + getOwnerMessage($page) ?> getLastModifiedMessage($revision) ?> getAuthorMessage($revision) ?> +
diff --git a/themes/shamino_com/templates/debug.tmpl b/themes/shamino_com/templates/debug.tmpl new file mode 100644 index 000000000..569322706 --- /dev/null +++ b/themes/shamino_com/templates/debug.tmpl @@ -0,0 +1,10 @@ + + +
+ +Valid XHTML 1.0   Valid CSS + + getStats())?>
+
diff --git a/themes/shamino_com/templates/info.tmpl b/themes/shamino_com/templates/info.tmpl new file mode 100644 index 000000000..85ed44ff4 --- /dev/null +++ b/themes/shamino_com/templates/info.tmpl @@ -0,0 +1,211 @@ + + +formatDateTime($revision->get('mtime')); + +$author = $revision->get('author'); +global $WikiNameRegexp; +$dbi = $request->getDbh(); +$author = $revision->get('author'); +$authorLink = $author; +if (preg_match("/^$WikiNameRegexp\$/", $author) && $dbi->isWikiPage($author)) + $authorLink = WikiLink($author); + +$authorId = $revision->get('author_id'); +$version = $revision->getVersion(); +$hits = $page->get('hits'); + +$is_minor_edit = $revision->get('is_minor_edit') ? _("minor edit") : false; +if ($minor_flag = $is_minor_edit) { + $minor_flag = HTML(" ", + HTML::span(array('class' => 'pageinfo-minoredit'), + "(" . _("minor edit") . ")")); +} + +/* better way to do this? */ +$bytes = strlen($revision->_data['%content']); +if ($bytes < 1024 ) + $size = fmt("%s bytes", $bytes); +else { + $kb = round($bytes / 1024, 1); + $size = fmt("%s Kb (%s bytes)", $kb, $bytes); +} +// Count words +preg_match_all('/\\w+\\W*/', $revision->_data['%content'], $whitespacematches); +if (1 == $c = count_all($whitespacematches)) + $wordcount = fmt("1 word"); +else + $wordcount = fmt("%s words", $c); + + +$markupVersion = ($markupVersion = $revision->get('markup')) + ? fmt("Version %s", $markupVersion) + : _("Original (1.2 or 1.0)"); + +$summary = HTML::textarea(array('name' => 'summary', + 'class' => 'summary', + 'rows' => 3, + 'cols' => $request->getPref('editWidth')/2, + 'readonly' => 'readonly', + 'wrap' => 'virtual'), /* for Netscape 4 */ + $revision->get('summary')); + +if ($is_current = $revision->isCurrent()) { + + $LOCKED_CB = HTML::input(array('type' => 'checkbox', + 'name' => 'edit[locked]', + 'disabled' => !$user->isadmin(), + 'checked' => $page->get('locked'))); + + // Not sure if I want to keep this... --Carsten + if ($user->isadmin()) { + $lockunlock = $page->get('locked') ? 'unlock' : 'lock'; + $clickcheckbUrl = WikiURL($revision, array('action' => $lockunlock)); + $clickcheckb = "location.href='$clickcheckbUrl'"; + + $LOCKED_CB->setAttr('onclick', $clickcheckb); + } + + $label['date'] = _("Last Modified").':'; + $label['author'] = _("Last Author").':'; + $label['summary'] = _("Last Summary").':'; + +} else { + $label['date'] = _("Saved on:"); + $label['author'] = _("Author").':'; + $label['summary'] = _("Summary").':'; +} + +$tableSummary = fmt("Statistics about %s.", $page->getName()); +$Sep = $WikiTheme->getButtonSeparator(); + +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +getName()) { + $pagetype []= sprintf('%s %s', WIKI_NAME, _("home page")); +} +if (0 && $page->isUserPage($include_empty=true)) { + $pagetype []= _("User page"); +} +if (@$request->isActionPage($page->getName())) { + $pagetype []= _("Action page"); +} +if ($page->get('pagetype') == 'wikiblog') { + $pagetype []= _("Blog page"); +} +if ($page->getName() == _("InterWikiMap")) { + $pagetype []= _("InterWikiMap"); +} +if (0 and isSubPage($page->getName())) { + $pagetype []= _("Subpage"); +} ?> + + + + + + + +
formatDateTime($revision->get('_supplanted')) ?>
+ + () +
,
+
+ isCurrent() ? _("Edit") : _("Edit Old Revision")) ?> + + + + + + 'diff','previous' => 'minor'),_("Diff previous Revision"),$page->getName()) ?> + 'diff','previous' => 'author'),_("Diff previous Author"),$page->getName()) ?> +isAdmin()) { ?> + + + 'purge'), + _("PurgeHtmlCache"), $page->getName()); + $PurgeCache->addTooltip(_("Purge HTML cache for this page. Regenerate from WikiMarkup when next accessed.")); +?> + + + +
+ + nesting. (Was generating invalid HTML.) +// +// Revision 1.12 2003/01/11 22:54:28 carstenklapp +// Added Page type field displayed for special pages. +// +?> \ No newline at end of file diff --git a/themes/shamino_com/templates/signin.tmpl b/themes/shamino_com/templates/signin.tmpl new file mode 100644 index 000000000..9e7102d77 --- /dev/null +++ b/themes/shamino_com/templates/signin.tmpl @@ -0,0 +1,33 @@ + + +
+ getArgs(), false, array('auth')) ?> +isAuthenticated()) { + $Sep = $WikiTheme->getButtonSeparator(); + $SignOutB = $WikiTheme->makeButton(_("Sign Out"), "javascript:SignOut();", 'wikiaction'); + $SignOutJS = JavaScript(' + document.write(\'\'); + function SignOut() { + var form = document.forms["'.$FORMNAME.'"]; + form.elements["auth[logout]"].value = 1; + form.submit(); + } + document.write(\''.AsXML($SignOutB).'\');'); +?> + + + + +
+ \ No newline at end of file diff --git a/themes/shamino_com/templates/top.tmpl b/themes/shamino_com/templates/top.tmpl new file mode 100644 index 000000000..65f28896b --- /dev/null +++ b/themes/shamino_com/templates/top.tmpl @@ -0,0 +1,35 @@ + + + + +
+ + - + + + + + -
" + method="get" accept-charset="" style="display: inline"> + "> + - ">: + + '; return true;" + onmouseout="window.status=''; return true;" /> + isSignedIn()) { ?> + - ">: + +
+ + + +
+ diff --git a/themes/shamino_com/themeinfo.php b/themes/shamino_com/themeinfo.php new file mode 100644 index 000000000..abbbbb6a3 --- /dev/null +++ b/themes/shamino_com/themeinfo.php @@ -0,0 +1,129 @@ +_get_name_and_rev($page_or_rev)); + + if (is_array($action)) { + $attr = $action; + $action = isset($attr['action']) ? $attr['action'] : 'browse'; + } + else + $attr['action'] = $action; + + $class = is_safe_action($action) ? 'named-wiki' : 'wikiadmin'; + if (!$label) + $label = $this->_labelForAction($action); + + if ($version) + $attr['version'] = $version; + + if ($action == 'browse') + unset($attr['action']); + + return $this->makeButton($label, WikiURL($pagename, $attr), $class); + } +} + +$WikiTheme = new Theme_shamino_com('shamino_com'); + +// CSS file defines fonts, colors and background images for this +// style. The companion '*-heavy.css' file isn't defined, it's just +// expected to be in the same directory that the base style is in. + +// This should result in phpwiki-printer.css being used when +// printing or print-previewing with style "PhpWiki" or "MacOSX" selected. +$WikiTheme->setDefaultCSS('PhpWiki', + array('' => 'shamino_com.css', + 'print' => 'phpwiki-printer.css')); + +// This allows one to manually select "Printer" style (when browsing page) +// to see what the printer style looks like. +$WikiTheme->addAlternateCSS(_("Printer"), 'phpwiki-printer.css', 'print, screen'); +$WikiTheme->addAlternateCSS(_("Top & bottom toolbars"), 'phpwiki-topbottombars.css'); +$WikiTheme->addAlternateCSS(_("Modern"), 'phpwiki-modern.css'); + +/** + * The logo image appears on every page and links to the HomePage. + */ +//$WikiTheme->addImageAlias('logo', WIKI_NAME . 'Logo.png'); + +/** + * The Signature image is shown after saving an edited page. If this + * is set to false then the "Thank you for editing..." screen will + * be omitted. + */ + +//$WikiTheme->addImageAlias('signature', WIKI_NAME . "Signature.png"); +// Uncomment this next line to disable the signature. +$WikiTheme->addImageAlias('signature', false); + +/* + * Link icons. + */ +//$WikiTheme->setLinkIcon('http'); +//$WikiTheme->setLinkIcon('https'); +//$WikiTheme->setLinkIcon('ftp'); +//$WikiTheme->setLinkIcon('mailto'); +//$WikiTheme->setLinkIcon('interwiki'); +//$WikiTheme->setLinkIcon('wikiuser'); +//$WikiTheme->setLinkIcon('*', 'url'); + +//$WikiTheme->setButtonSeparator("\n | "); + +/** + * WikiWords can automatically be split by inserting spaces between + * the words. The default is to leave WordsSmashedTogetherLikeSo. + */ +//$WikiTheme->setAutosplitWikiWords(false); + +/** + * Layout improvement with dangling links for mostly closed wiki's: + * If false, only users with edit permissions will be presented the + * special wikiunknown class with "?" and Tooltip. + * If true (default), any user will see the ?, but will be presented + * the PrintLoginForm on a click. + */ +$WikiTheme->setAnonEditUnknownLinks(false); + +/* + * You may adjust the formats used for formatting dates and times + * below. (These examples give the default formats.) + * Formats are given as format strings to PHP strftime() function See + * http://www.php.net/manual/en/function.strftime.php for details. + * Do not include the server's zone (%Z), times are converted to the + * user's time zone. + */ +$WikiTheme->setDateFormat("%B %d, %Y"); +$WikiTheme->setTimeFormat("%H:%M"); + +/* + * To suppress times in the "Last edited on" messages, give a + * give a second argument of false: + */ +//$WikiTheme->setDateFormat("%B %d, %Y", false); + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// (c-file-style: "gnu") +// Local Variables: +// mode: php +// tab-width: 8 +// c-basic-offset: 4 +// c-hanging-comment-ender-p: nil +// indent-tabs-mode: nil +// End: +?> \ No newline at end of file -- 2.45.0