示例#1
0
    exit;
}
/* PmWiki Colorimetry skin
 *
 * Examples at: http://pmwiki.com/Cookbook/Colorimetry and http://solidgone.org/Skins/
 * Copyright (c)2016 David Gilbert
 * This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.
 * Please retain the links in the footer.
 * http://creativecommons.org/licenses/by-sa/4.0/
 */
global $FmtPV;
$FmtPV['$SkinName'] = '"Colorimetry"';
$FmtPV['$SkinVersion'] = '"1.2.3"';
global $PageLogoUrl, $PageLogoUrlHeight, $PageLogoUrlWidth, $HTMLStylesFmt, $SkinTheme;
if (!empty($PageLogoUrl)) {
    dg_SetLogoHeightWidth(15, 16);
    $HTMLStylesFmt['colorimetry'] .= '#logo .sitetitle a{height:' . $PageLogoUrlHeight . '; background: url(' . $PageLogoUrl . ') left 16px no-repeat} ' . '#logo .sitetitle a, #logo .sitetag{padding-left: ' . $PageLogoUrlWidth . '} ';
}
global $SkinWidth, $SkinSidebarWidth, $SkinWidthUnit;
SDV($SkinWidth, 850);
SDV($SkinSidebarWidth, 195);
#good percentage width is 25
SDV($SkinWidthUnit, 'px');
#only use 'px' or '%'
$HTMLStylesFmt['colorimetry'] .= '#header, #page, #footer-inner { width: ' . $SkinWidth . $SkinWidthUnit . '; } ' . '#content { width: ' . ($SkinWidthUnit == 'px' ? $SkinWidth - $SkinSidebarWidth - 55 : 100 - $SkinSidebarWidth - 5) . $SkinWidthUnit . '; } ' . '#sidebar { width: ' . $SkinSidebarWidth . $SkinWidthUnit . '; } ';
$SkinColor = dg_SetSkinColor('green', array('green', 'orange', 'blue', 'purple', 'yellow', 'pink'));
# ----------------------------------------
# - Standard Skin Setup
# ----------------------------------------
$FmtPV['$WikiTitle'] = '$GLOBALS["WikiTitle"]';
$FmtPV['$WikiTag'] = '$GLOBALS["WikiTag"]';
示例#2
0
$ValidSkinColors['gold'] = array('block-highlight-back' => '#C79810', 'entry-title-text' => '#000', 'text-highlight' => '#0B96D0', 'block-highlight-text' => '#fff', 'title-text' => '#000');
$ValidSkinColors['green'] = array('block-highlight-back' => '#008C00', 'entry-title-text' => '#000', 'text-highlight' => '#0B96D0', 'block-highlight-text' => '#fff', 'title-text' => '#000');
$ValidSkinColors['blue'] = array('block-highlight-back' => '#356AA0', 'entry-title-text' => '#000', 'text-highlight' => '#0B96D0', 'block-highlight-text' => '#fff', 'title-text' => '#000');
$ValidSkinColors['mint'] = array('block-highlight-back' => '#CDEB8B', 'entry-title-text' => '#000', 'text-highlight' => '#0B96D0', 'block-highlight-text' => '#fff', 'title-text' => '#000');
$ValidSkinColors['dark-blue'] = array('block-highlight-back' => '#3F4C6B', 'entry-title-text' => '#000', 'text-highlight' => '#0B96D0', 'block-highlight-text' => '#fff', 'title-text' => '#000');
$ValidSkinColors = array_merge($ValidSkinColors, $UserSkinColors);
if (isset($_GET['color']) && isset($ValidSkinColors[$_GET['color']])) {
    $SkinColor = $_GET['color'];
} elseif (!isset($ValidSkinColors[$SkinColor])) {
    $SkinColor = 'black';
}
$UserStyle = $HTMLStylesFmt['equilibrium'];
$HTMLStylesFmt['equilibrium'] = '.featured .title,.latest .title,.featured .title h2 a,.latest .title h2 a' . '{color:' . $ValidSkinColors[$SkinColor]['entry-title-text'] . '} ' . '.latest-title h2 a:hover,.latest .title h2 a:hover,.featured-title h2 a:hover,.featured .title h2 a:hover{color:' . $ValidSkinColors[$SkinColor]['block-highlight-text'] . ' !important;} ' . '.featured .title,.latest .title{background:' . $ValidSkinColors[$SkinColor]['block-highlight-back'] . '} ' . '#wikitext a, #wikitext a:visited, p a,p a:visited,.postMeta-post a,.postMeta-post a:visited,.featured .post-content h2 a,' . '.blogit-page-topigation a,.blogit-page-topigation a:visited,' . '.latest .post-content h2,#footer div a:hover,' . '#comments .commentmetadata li a' . '{color:' . $ValidSkinColors[$SkinColor]['text-highlight'] . '} ' . '#sidebar li:hover,#sidebar li:hover a,#top a:hover,#siteheader ul a:hover,ul#top li.current_page_item a:link,' . 'ul#top li.current_page_item a:visited,ul#top li.current_page_item a:hover,ul#top li.current_page_item a:active,' . '#siteheader ul li.current_page_item a:link,#siteheader ul li.current_page_item a:visited,#siteheader ul li.current_page_item a:hover,' . '#siteheader ul li.current_page_item a:active' . '{color:' . $ValidSkinColors[$SkinColor]['block-highlight-text'] . ' !important;background:' . $ValidSkinColors[$SkinColor]['block-highlight-back'] . '} ' . '#siteheader .sitetitle.logo a, #siteheader .sitetitle a' . '{color:' . $ValidSkinColors[$SkinColor]['title-text'] . '} ';
global $PageLogoUrl, $PageLogoUrlHeight, $PageLogoUrlWidth, $HTMLStylesFmt;
if (!empty($PageLogoUrl)) {
    dg_SetLogoHeightWidth(15);
    $HTMLStylesFmt['equilibrium'] .= '#siteheader .sitetitle a{height:' . $PageLogoUrlHeight . '; background: url(' . $PageLogoUrl . ') left top no-repeat} ' . '#siteheader .sitetitle a, #siteheader .sitetag{padding-left: ' . $PageLogoUrlWidth . '} ' . '#siteheader .sitetag{margin-top: ' . (45 - substr($PageLogoUrlHeight, 0, -2)) . 'px}';
}
$HTMLStylesFmt['equilibrium'] .= $UserStyle;
# Allows classes on anchors
global $WikiStyleApply;
$WikiStyleApply['a'] = 'a';
# ----------------------------------------
# - Standard Skin Setup
# ----------------------------------------
$FmtPV['$WikiTitle'] = '$GLOBALS["WikiTitle"]';
$FmtPV['$WikiTag'] = '$GLOBALS["WikiTag"]';
# Move any (:noleft:) or SetTmplDisplay('PageLeftFmt', 0); directives to variables for access in jScript.
$FmtPV['$LeftColumn'] = "\$GLOBALS['TmplDisplay']['PageLeftFmt']";
Markup('noleft', 'directives', '/\\(:noleft:\\)/ei', "SetTmplDisplay('PageLeftFmt',0)");
$FmtPV['$RightColumn'] = "\$GLOBALS['TmplDisplay']['PageRightFmt']";
示例#3
0
文件: skin.php 项目: pmskin/Minimous
    exit;
}
/* PmWiki Minimous skin
 *
 * Examples at: http://pmwiki.com/Cookbook/Minimous and http://solidgone.org/Skins/
 * Copyright (c) 2010 David Gilbert
 * This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.
 * Please retain the links in the footer.
 * http://creativecommons.org/licenses/by-sa/3.0/us/
 */
global $FmtPV;
$FmtPV['$SkinName'] = '"Minimous"';
$FmtPV['$SkinVersion'] = '"1.0.0"';
global $PageLogoUrl, $PageLogoUrlHeight, $PageLogoUrlWidth, $HTMLStylesFmt, $SkinTheme, $action, $bi_EntryType, $bi_BlogIt_Enabled;
if (!empty($PageLogoUrl)) {
    dg_SetLogoHeightWidth(15, 0);
    $HTMLStylesFmt['minimous'] .= '#headerimg {height:' . $PageLogoUrlHeight . '; background: url(' . $PageLogoUrl . ') left no-repeat} ' . '#headerimg .sitetitle a, #headerimg .sitetag {padding-left: ' . $PageLogoUrlWidth . '} ';
}
#Indent the header elements to match the indented blogit content  TODO: Tie into BlogIt active mechanism
global $bi_BlogItActive;
$bi_BlogItActive = $action == 'browse' && isset($bi_EntryType) && $bi_EntryType == 'blog';
if ($bi_BlogItActive) {
    $HTMLStylesFmt['minimous'] .= '#header, #footer {margin-left: 155px;}';
}
global $SkinWidth, $SkinSidebarWidth, $SkinWidthUnit;
SDV($SkinWidth, 900);
SDV($SkinSidebarWidth, 175);
#good percentage width is 25
SDV($SkinWidthUnit, 'px');
#only use 'px' or '%'
$HTMLStylesFmt['minimous'] .= '#page { width: ' . $SkinWidth . $SkinWidthUnit . '; }' . '#content, #wikitext { width: ' . ($SkinWidthUnit == 'px' ? $SkinWidth - $SkinSidebarWidth - 70 : 100 - $SkinSidebarWidth - 5) . $SkinWidthUnit . '; }' . '#sidebar { width: ' . $SkinSidebarWidth . $SkinWidthUnit . '; }';