From: <car...@us...> - 2025-02-14 04:15:30
|
Revision: 11095 http://sourceforge.net/p/phpwiki/code/11095 Author: carstenklapp Date: 2025-02-14 04:15:28 +0000 (Fri, 14 Feb 2025) Log Message: ----------- Fixed MacOSX theme buttons not loading, other visual improvements and RecentChanges uses a table now. Modified Paths: -------------- trunk/themes/MacOSX/MacOSX.css trunk/themes/MacOSX/lib/RecentChanges.php trunk/themes/MacOSX/themeinfo.php Modified: trunk/themes/MacOSX/MacOSX.css =================================================================== --- trunk/themes/MacOSX/MacOSX.css 2025-02-14 03:44:59 UTC (rev 11094) +++ trunk/themes/MacOSX/MacOSX.css 2025-02-14 04:15:28 UTC (rev 11095) @@ -27,6 +27,7 @@ body { background: #fafafa url("images/bgpaper8.png"); + font-family: "New York", Palatino; } body.edit { @@ -33,23 +34,84 @@ background: #fafafa url("images/bggranular.png"); } -body { + +#logo { + display: flex; + align-items: center; + /* Aligns items vertically centered */ } +#logo img { + margin-right: 0ex; + /* Adds space between the image and the heading */ + /* + margin-left: 0em; + margin-bottom: 1ex; + */ + margin-left: 0em; +} + + +#logo h1 { + /* display: none; */ +} + + +div.warning { + margin: 2ex; + padding: 2ex; +} + /* Ensure identical vertical alignment for adjacent form buttons, whether image based (Theme buttons) or not */ input[type=submit], input[type=cancel], input[type=image] { - vertical-align: middle + vertical-align: middle; + font-family: "Lucida Grande", "SF Pro", "San Francisco", "Lucida Sans", Helvetica, Arial, sans-serif; } -h1, h2, h3, .toolbar, td { - font-family: "Lucida Grande", Helvetica, Arial, sans-serif; + + +h1, +h2, +h3, +.toolbar, +td { + font-family: "Lucida Grande", "SF Pro", "San Francisco", "Lucida Sans", Helvetica, Arial, sans-serif; + // border-top: 1px solid #7c7c7c; + padding-left: 0.8em; + padding-right: 0.8em; + padding-top: 0.5em; + padding-bottom: 0.5em; + margin: 0.7ex 0; } +h2~*:not(h2) { + padding-left: 5ex; +} + +/* CreateTocPlugin plugin ================================================== */ + +div.toc p { + /*toc title*/ + font-family: "Lucida Grande", "SF Pro", "San Francisco", "Lucida Sans", Helvetica, Arial, sans-serif; + text-decoration: none; + padding-top: 0ex; + margin-left: 5px; +} + +div.toclist p { + /*toc items*/ + font-family: "Lucida Grande", "SF Pro", "San Francisco", "Lucida Sans", Helvetica, Arial, sans-serif; + text-decoration: italic; + padding-top: 0ex; + margin-left: 5px; +} + + input.button { - font-family: "Lucida Grande", Helvetica, Arial, sans-serif; + font-family: "Lucida Grande", "SF Pro", "San Francisco", "Lucida Sans", Helvetica, Arial, sans-serif; } input.numeric { @@ -67,6 +129,16 @@ border-right: 1px solid #c3c3c3; } +fieldset { + font-family: "Lucida Grande", "SF Pro", "San Francisco", "Lucida Sans", Helvetica, Arial, sans-serif; + + display: inline; + border: 1px solid #7c7c7c; + padding: 1ex; + background-color: white; + margin-bottom: 1ex; +} + /* Add space between the input field and following buttons, but not after the last button. */ div.wikiaction input[type=text], div.wikiadmin input[type=text], @@ -79,7 +151,8 @@ /** * Wiki */ -div.wikitext { +div.wikitext, +div.toc { background: white; border-top: 1px solid #7c7c7c; border-left: 1px solid #c3c3c3; @@ -93,6 +166,24 @@ clear: both; } +div.toc a { + text-decoration: none; +} + +div#wiki-signature { + background: rgba(0, 0, 0, 0.05); + /* black with 0.05 opacity */ + border-top: 1px solid #7c7c7c; + border-left: 1px solid #c3c3c3; + border-bottom: 1px solid #dddddd; + border-right: 1px solid #c3c3c3; + padding-left: 0.8em; + padding-right: 0.8em; + padding-top: 0.5em; + padding-bottom: 0.5em; + margin-bottom: 1ex; +} + input.wikitext { margin: 0; } @@ -134,7 +225,7 @@ } body.sidebar div.wikitext ul { - padding-left: 1em; + padding-left: 2em; } body.sidebar h2 { @@ -172,7 +263,8 @@ text-decoration: none; } -.wiki, .named-wiki { +.wiki, +.named-wiki { font-weight: bold; color: #1d42be; } @@ -180,11 +272,14 @@ /*blue*/ /* Unknown links */ -.wikiunknown a, .named-wikiunknown a, .wikiunknown U { +.wikiunknown a, +.named-wikiunknown a, +.wikiunknown U { text-decoration: none; } -.wikiunknown, .named-wikiunknown { +.wikiunknown, +.named-wikiunknown { color: #555; } @@ -198,12 +293,14 @@ } .interwiki, -i .interwiki .wikipage, em .interwiki .wikipage { +i .interwiki .wikipage, +em .interwiki .wikipage { font-style: oblique; } .interwiki .wikipage, -i .interwiki, em .interwiki { +i .interwiki, +em .interwiki { font-style: normal; } @@ -210,8 +307,9 @@ /* * wikiaction, wikiadmin, wikiunsafe: */ -a.wikiaction, a.wikiadmin { - text-decoration: none; +a.wikiaction, +a.wikiadmin { + text-decoration: underline; } img { @@ -253,7 +351,7 @@ p.editdate { font-size: smaller; margin-bottom: 0; - font-family: "Lucida Grande", Helvetica, Arial, sans-serif; + font-family: "Lucida Grande", "SF Pro", "San Francisco", Helvetica, Arial, sans-serif; } /* Calendar plugin ==================================================== */ @@ -301,7 +399,7 @@ /* IncludePage plugin ================================================= */ .transclusion-title { - font-family: "Lucida Grande", Helvetica, Arial, sans-serif; + font-family: "Lucida Grande", "SF Pro", "San Francisco", Helvetica, Arial, sans-serif; font-size: smaller; text-decoration: underline; text-align: right; @@ -400,7 +498,7 @@ /* + - line prefix */ .diff .block tt.prefix { font-weight: normal; - font-family: monospace; + font-family: Monaco, monospace; margin-left: -1.6em; color: black; border: none; @@ -426,37 +524,45 @@ /* blocks containing deleted words */ .diff .original:first-child, .diff .deleted:first-child { - border-top: 2px solid #f99; /* fcc */ + border-top: 2px solid #f99; + /* fcc */ } .diff .original, .diff .deleted { background: white; - border-left: 2px solid #f99; /* fcc */ - border-right: 2px solid #f99; /* fcc */ + border-left: 2px solid #f99; + /* fcc */ + border-right: 2px solid #f99; + /* fcc */ } .diff .original:last-child, .diff .deleted:last-child { - border-bottom: 2px solid #f99; /* fcc */ + border-bottom: 2px solid #f99; + /* fcc */ } /* blocks containing added words */ .diff .final:first-child, .diff .added:first-child { - border-top: 2px solid #9f9; /* cfc */ + border-top: 2px solid #9f9; + /* cfc */ } .diff .final, .diff .added { background: white; - border-left: 2px solid #9f9; /* cfc */ - border-right: 2px solid #9f9; /* cfc */ + border-left: 2px solid #9f9; + /* cfc */ + border-right: 2px solid #9f9; + /* cfc */ } .diff .final:last-child, .diff .added:last-child { - border-bottom: 2px solid #9f9; /* cfc */ + border-bottom: 2px solid #9f9; + /* cfc */ } /* deleted words */ @@ -493,7 +599,7 @@ font-weight: bold; } -.pagelist thead td u { +.pagelist thead u { text-decoration: none; } @@ -510,9 +616,10 @@ } th.gridbutton { - background-color: ThreeDLightShadow; + background-color: #eaedf4; + color: black; - font-family: Tahoma, Arial, Helvetica, sans-serif; + font-family: Arial, Helvetica, sans-serif; font-size: small; font-weight: normal; height: 18px; @@ -526,12 +633,15 @@ border-color: ThreeDHighlight ThreeDDarkShadow ThreeDDarkShadow ThreeDHighlight; } -input.gridbutton, a.gridbutton, a:hover.gridbutton, a:visited.gridbutton { +input.gridbutton, +a.gridbutton, +a:hover.gridbutton, +a:visited.gridbutton { text-decoration: none; font-size: small; font-weight: normal; - font-family: Tahoma, Arial, Helvetica, sans-serif; - background-color: ThreeDLightShadow; + // font-family: Tahoma, Arial, Helvetica, sans-serif; + // background-color: ThreeDLightShadow;//doesn't work in chrome,shows as black! color: black; } @@ -575,7 +685,8 @@ /* No underlines for wiki-links in dt, we already have dotted underline */ -dt a.wiki, dt a.named-wiki { +dt a.wiki, +dt a.named-wiki { text-decoration: none; } @@ -625,12 +736,6 @@ background: #fafafa url("images/bgpaper8.png"); } -/* Indented wrap past diff buttons in RecentChanges */ -ul li.rc-major, ul li.rc-minor { - margin-left: 0; - padding-left: 3em; - text-indent: -3em; -} /** * PageHistory, Info @@ -639,7 +744,8 @@ font-weight: bold; } -.pageinfo-minoredit, .pageinfo-authorid { +.pageinfo-minoredit, +.pageinfo-authorid { font-size: smaller; font-style: oblique; } @@ -647,7 +753,8 @@ /** * Other */ -.printer, .no-css { +.printer, +.no-css { display: none; } @@ -696,12 +803,12 @@ padding: 0 0; } -div.wikiblog > div { +div.wikiblog>div { margin: 0 0; padding: 0.5ex 0.5em; } -div.wikiblog > div.wikiblog-footer { +div.wikiblog>div.wikiblog-footer { padding: 0.2ex 0.5em; } @@ -920,6 +1027,7 @@ border: 1px outset; letter-spacing: 0; padding: 2px; + maRGIN-BOTTOM: 1EX; } span.wikiwyg_control_link a { @@ -970,7 +1078,9 @@ /** * Wiki */ -textarea.wikiedit, input.wikitext, textarea.summary { +textarea.wikiedit, +input.wikitext, +textarea.summary { background: white; border-top: 1px solid #7c7c7c; border-left: 1px solid #c3c3c3; @@ -1021,8 +1131,10 @@ } /* blocks containing deleted or added words */ -.diff .original, .diff .deleted, -.diff .final, .diff .added { +.diff .original, +.diff .deleted, +.diff .final, +.diff .added { padding: 1px; } @@ -1038,7 +1150,149 @@ } /* deleted & added words */ -.diff del, .diff ins { +.diff del, +.diff ins { padding-left: 0.5ex; padding-right: 0.5ex; } + + +/* Hints */ +.hint { + border: thin solid #d8caae; + padding-left: 0.5em; + padding-right: 0.5em; + padding-top: 0.75ex; + padding-bottom: 0.75ex; + margin-left: 0; + margin-right: 0; + margin-top: 1ex; + margin-bottom: 1ex; + background: #f8f8f8; + border-top: 1px solid #7c7c7c; + border-left: 1px solid #c3c3c3; + border-bottom: 1px solid #dddddd; + border-right: 1px solid #c3c3c3; +} + +span.hint { + padding: 0; +} + + +/* ******* make other buttons look like aqua buttons */ +/* http://universaleditbutton.org + https://cloudinary.com/guides/front-end-development/6-ways-to-stretch-a-background-image-with-css +*/ +div#actionbuttons a.wikiadmin, +input[type=submit] { + background: url('buttons/en/button-template.png'); + // background-position: top left; + padding-top: 6px !important; + padding-left: 0.6em !important; + padding-bottom: 8px !important; + padding-right: 0.6em !important; + background-repeat: no-repeat; + background-size: 100% 100%; + /*looks ugly for really wide buttons */ + + font-family: "Lucida Grande", "Helvetica Narrow", Arial, sans-serif; + // font-weight: bold; + font-size: 10pt; + text-decoration: none; + color: black; + border: 0; + cursor: pointer; +} + +/* +.interwiki-map thead td { + background: #e8e8e8; + font-weight: bold; + font-size: smaller; +} + +.interwiki-map thead td:first-child { + text-decoration: underline; +} +*/ + +/* RecentChanges now as table */ + +/* Indented wrap past diff buttons in RecentChanges */ +ul li.rc-major, +ul li.rc-minor { + margin-left: 0; + padding-left: 3em; + text-indent: -3em; +} + +/* use same bg as .pagelist tr.evenrow */ +td.rc-major { + background: #f8f8f8; + padding-top: 0; + padding-bottom: 0; + border-top: 0; +} + +td.rc-minor { + background: white; + padding-top: 0; + padding-bottom: 0; + border-top: 0; +} + +td.rc-minor a { + font-weight: normal; +} + +/* Recent changes */ +.tdselected, +.tdunselected { + padding: 0; + font-size: smaller; + text-align: center; +} + +.tdselected { + color: white; + font-weight: normal; + background-color: #4566de; + text-decoration: none; + border: solid #aaa 2px; + padding-left: 5px; + padding-right: 5px; +} + +.tdunselected { + font-weight: normal; + background: white; + text-decoration: underline; + background: #f8f8f8; +} + +.tdselected:before { + content: "• "; +} + +.tdunselected:before { + content: " "; +} + + +/* Yellow highlight for every td of mouseover'd tr in pagelist tbody + ie mac ignores all these */ +table.rc tr:hover>td { + border: solid #ffff99 2px; +} + +/* some browsers give wacky expanding :hover cells, + use transparent border here instead of padding change */ +table.rc tr>td { + border: solid transparent 2px; +} + +td { + padding: 2pt; +} + Modified: trunk/themes/MacOSX/lib/RecentChanges.php =================================================================== --- trunk/themes/MacOSX/lib/RecentChanges.php 2025-02-14 03:44:59 UTC (rev 11094) +++ trunk/themes/MacOSX/lib/RecentChanges.php 2025-02-14 04:15:28 UTC (rev 11095) @@ -1,7 +1,7 @@ <?php /** * Copyright © 2002 Jeff Dairiki - * Copyright © 2002 Carsten Klapp + * Copyright © 2002-2025 Carsten Klapp * * This file is part of PhpWiki. * @@ -32,22 +32,20 @@ function MacOSX_RC_revision_formatter(&$fmt, &$rev) { + // format as table instead of default li $class = 'rc-' . $fmt->importance($rev); - return HTML::li( + return HTML::tr( array('class' => $class), - $fmt->diffLink($rev), - ' ', - $fmt->pageLink($rev), - ' ', - $rev->get('is_minor_edit') ? $fmt->time($rev) : HTML::strong($fmt->time($rev)), - ' . . . ', - $fmt->summaryAsHTML($rev), - ' -- ', - $fmt->authorLink($rev) + HTML::td('',$fmt->diffLink($rev),''), + HTML::td(array('class' => $class), $fmt->pageLink($rev)), + HTML::td('',$rev->get('is_minor_edit') ? $fmt->time($rev) : HTML::strong($fmt->time($rev)),''), + HTML::td('',$fmt->summaryAsHTML($rev),''), + HTML::td('',$fmt->authorLink($rev),'') ); } + function MacOSX_PH_revision_formatter(&$fmt, &$rev) { $class = 'rc-' . $fmt->importance($rev); @@ -57,7 +55,7 @@ $fmt->diffLink($rev), ' ', $fmt->pageLink($rev), - ' ', + ' . . . ', $rev->get('is_minor_edit') ? $fmt->time($rev) : HTML::strong($fmt->time($rev)), ' . . . ', $fmt->summaryAsHTML($rev), @@ -73,6 +71,67 @@ { return MacOSX_RC_revision_formatter($this, $rev); } + public function diffLink($rev) + { + global $WikiTheme; + $button = $WikiTheme->makeButton(_("(diff)"), $this->diffURL($rev), 'wiki-rc-action');/*inelegant to use small diff button*/ + $button->setAttr('rel', 'nofollow'); + return HTML("", $button, ""); /*omit braces because using imgbutton in this theme*/ + } + + public function format($changes) + { + include_once 'lib/InlineParser.php'; + + $html = HTML(HTML::h2(false, $this->headline())); + if (($desc = $this->description())) { + $html->pushContent($desc); + } + + if ($this->_args['daylist']) { + $html->pushContent(new OptionsButtonBars($this->_args)); + } + + $last_date = ''; + $lines = false; + $first = true; + + while ($rev = $changes->next()) { + if (($date = $this->date($rev)) != $last_date) { + if ($lines) { + $html->pushContent($lines); + } + // for user contributions no extra date line + $html->pushContent(HTML::h3($date)); + $lines = HTML::table(array('class' => 'rc')); //was ul. fixme: how to get tbody in there too? + $last_date = $date; + } + // enforce view permission + if (mayAccessPage('view', $rev->_pagename)) { + $lines->pushContent($this->format_revision($rev)); + if ($first) { + $this->setValidators($rev); + } + $first = false; + } + } + if ($lines) { + $html->pushContent($lines); + } + if ($first) { + if ($this->_args['daylist']) { + $html->pushContent // force display of OptionsButtonBars + (JavaScript("document.getElementById('rc-action-body').style.display='block';")); + } + $html->pushContent(HTML::p( + array('class' => 'rc-empty'), + $this->empty_message() + )); + } + + return $html; + } + } class _MacOSX_PageHistory_Formatter extends _PageHistory_HtmlFormatter Modified: trunk/themes/MacOSX/themeinfo.php =================================================================== --- trunk/themes/MacOSX/themeinfo.php 2025-02-14 03:44:59 UTC (rev 11094) +++ trunk/themes/MacOSX/themeinfo.php 2025-02-14 04:15:28 UTC (rev 11095) @@ -121,7 +121,7 @@ /** * The logo image appears on every page and links to the HomePage. */ - $this->addImageAlias('logo', WIKI_NAME . 'Logo.png'); + $this->addImageAlias('logo', WIKI_NAME . 'logo.png'); /** * The Signature image is shown after saving an edited page. If this @@ -128,10 +128,10 @@ * is set to false then the "Thank you for editing..." screen will * be omitted. */ - $this->addImageAlias('signature', WIKI_NAME . "Signature.png"); + $this->addImageAlias('signature', WIKI_NAME . "signature.png"); // Uncomment this next line to disable the signature. //$this->addImageAlias('signature', false); - + $this->addImageAlias('search', 'search.png'); /* * Link icons. */ @@ -149,8 +149,45 @@ $this->addButtonAlias(_("Lock Page"), "Lock Page"); $this->addButtonAlias(_("Unlock Page"), "Unlock Page"); $this->addButtonAlias(_("Page Locked"), "Page Locked"); - $this->addButtonAlias("...", "alltime"); + $this->addButtonAlias("All time", "alltime"); + //add aliases of button images that need to be updated but should still work + $this->addButtonAlias(_("Page History"), "PageHistory"); + $this->addButtonAlias(_("Page Info"), "PageInfo"); + $this->addButtonAlias(_("Find Page"), "FindPage"); + $this->addButtonAlias(_("Sign in as:"), "Sign In"); + $this->addButtonAlias(_("Debug Backend Info"), "DebugInfo"); + $this->addButtonAlias(_("Page Dump"), "PageDump"); + $this->addButtonAlias(_("Setacl"), "Set Acl"); + + /* + buttons todo: + probably will not get around to this any time soon. + Requires screenshots from Mac OS developer tools < Mojave + so I added css background button image to simulate missing buttons. + */ + /* + Chown + Setacl + Rename Page + Revert + + rss2 + atom + Email Verification + Choose File + WikiAdminSelect + PasswordReset + Select Pages + E-mail Verification + Upload & Overwrite + Load & Overwrite + Change Access Rights + Change owner of selected pages + Overwrite All + Search+%26+Replace + */ + /** * WikiWords can automatically be split by inserting spaces between * the words. The default is to leave WordsSmashedTogetherLikeSo. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |