summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Legler <alex@a3li.li>2014-12-28 11:52:24 +0100
committerAlex Legler <alex@a3li.li>2014-12-28 11:52:24 +0100
commit68f084b274948775a78599be8063be19a5dfc60c (patch)
treed113940b30778dd30b834faf243330bd3aba66ef
parentand more (diff)
downloadskin-tyrian-68f084b274948775a78599be8063be19a5dfc60c.tar.gz
skin-tyrian-68f084b274948775a78599be8063be19a5dfc60c.tar.bz2
skin-tyrian-68f084b274948775a78599be8063be19a5dfc60c.zip
Refactor/-indent template, few other things
* Add jump to content link for CLI browsers * Fix link colors * Fix category boxes
-rw-r--r--TyrianTemplate.php363
-rw-r--r--main.css22
2 files changed, 185 insertions, 200 deletions
diff --git a/TyrianTemplate.php b/TyrianTemplate.php
index f7a2d06..00c1456 100644
--- a/TyrianTemplate.php
+++ b/TyrianTemplate.php
@@ -7,196 +7,58 @@ class TyrianTemplate extends BaseTemplate {
wfSuppressWarnings();
$this->html( 'headelement' );
+
+ $this->header();
?>
- <header>
- <div class="site-title">
- <div class="container">
- <div class="row">
- <div class="site-title-buttons">
- <div class="btn-group btn-group-sm">
- <a href="http://get.gentoo.org/" role="button" class="btn get-gentoo"><span class="fa fa-download"></span> <strong>Get Gentoo!</strong></a>
- <div class="btn-group btn-group-sm">
- <button type="button" class="btn gentoo-org-sites dropdown-toggle" data-toggle="dropdown">
- <span class="glyphicon glyphicon-globe"></span> gentoo.org sites <span class="caret"></span>
- </button>
- <ul class="dropdown-menu">
- <li><a href="http://www.gentoo.org/" title="Main Gentoo website"><span class="fa fa-home fa-fw"></span> gentoo.org</a></li>
- <li><a href="http://wiki.gentoo.org/" title="Find and contribute documentation"><span class="fa fa-file-text fa-fw"></span> Wiki</a></li>
- <li><a href="https://bugs.gentoo.org/" title="Report issues and find common issues"><span class="fa fa-bug fa-fw"></span> Bugs</a></li>
- <li><a href="http://forums.gentoo.org/" title="Discuss with the community"><span class="fa fa-comments-o fa-fw"></span> Forums</a></li>
- <li><a href="http://packages.gentoo.org/" title="Find software for your Gentoo"><span class="fa fa-hdd-o fa-fw"></span> Packages</a></li>
- <li class="divider"></li>
- <li><a href="http://overlays.gentoo.org/" title="Collaborate on maintaining packages"><span class="fa fa-code-fork fa-fw"></span> Overlays</a></li>
- <li><a href="http://planet.gentoo.org/" title="Find out what's going on in the developer community"><span class="fa fa-rss fa-fw"></span> Planet</a></li>
- <li><a href="http://archives.gentoo.org/" title="Read up on past discussions"><span class="fa fa-archive fa-fw"></span> Archives</a></li>
- <li><a href="http://sources.gentoo.org/" title="Browse our source code"><span class="fa fa-code fa-fw"></span> Sources</a></li>
- <li class="divider"></li>
- <li><a href="http://infra-status.gentoo.org/" title="Get updates on the services provided by Gentoo"><span class="fa fa-tasks fa-fw"></span> Infra Status</a></li>
- </ul>
- </div>
- </div>
- </div>
- <div class="logo">
- <img src="https://1b9a50f4f9de4348cd9f-e703bc50ba0aa66772a874f8c7698be7.ssl.cf5.rackcdn.com/site-logo.png" data-at2x="https://1b9a50f4f9de4348cd9f-e703bc50ba0aa66772a874f8c7698be7.ssl.cf5.rackcdn.com/site-logo@2x.png" alt="Gentoo Linux Logo"/>
- <span class="site-label">Wiki</span>
- </div>
- </div>
- </div>
- </div>
- <nav class="tyrian-navbar" role="navigation">
- <div class="container">
- <div class="row">
- <div class="navbar-header">
- <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse">
- <span class="sr-only">Toggle navigation</span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- </div>
- <div class="collapse navbar-collapse navbar-main-collapse">
- <ul class="nav navbar-nav">
- <?php
- $this->renderPortals( $this->data['sidebar'] );
- ?>
- </ul>
- <ul class="nav navbar-nav navbar-right">
- <?php
- $this->toolbox();
- $this->personaltools();
- ?>
- </ul>
- </div>
- </div>
- </div>
- </nav>
- <?php $this->cactions(); ?>
- </header>
<div class="container">
- <div class="row">
- <div class="col-md-12">
- <div id="content" class="mw-body" role="main">
- <a id="top"></a>
- <?php
- if ( $this->data['sitenotice'] ) {
- ?>
- <div id="siteNotice"><?php
- $this->html( 'sitenotice' )
- ?></div><?php
- }
- ?>
+ <div class="row">
+ <div class="col-md-12">
+ <div id="content" class="mw-body" role="main">
+ <a id="top"></a>
+ <?php if ( $this->data['sitenotice'] ) { ?>
+ <div id="siteNotice"><?php $this->html( 'sitenotice' ) ?></div>
+ <?php } ?>
- <h1 id="firstHeading" class="first-header" lang="<?php
- $this->data['pageLanguage'] =
- $this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode();
- $this->text( 'pageLanguage' );
- ?>"><span dir="auto"><?php $this->html( 'title' ) ?></span></h1>
-
- <div id="bodyContent" class="mw-body-content">
- <div id="siteSub"><?php $this->msg( 'tagline' ) ?></div>
- <div id="contentSub"<?php
- $this->html( 'userlangattributes' ) ?>><?php $this->html( 'subtitle' )
- ?></div>
- <?php if ( $this->data['undelete'] ) { ?>
- <div id="contentSub2"><?php $this->html( 'undelete' ) ?></div>
- <?php
-}
- ?><?php
- if ( $this->data['newtalk'] ) {
- ?>
- <div class="usermessage"><?php $this->html( 'newtalk' ) ?></div>
- <?php
- }
- ?>
- <div id="jump-to-nav" class="mw-jump"><?php
- $this->msg( 'jumpto' )
- ?> <a href="#column-one"><?php
- $this->msg( 'jumptonavigation' )
- ?></a><?php
- $this->msg( 'comma-separator' )
- ?><a href="#searchInput"><?php
- $this->msg( 'jumptosearch' )
- ?></a></div>
-
- <!-- start content -->
- <?php $this->html( 'bodytext' ) ?>
- <?php
- if ( $this->data['catlinks'] ) { ?>
- <div class="well well-sm"> <?php
- $this->html( 'catlinks' );
- ?></div>
- <?php }
- ?>
- <!-- end content -->
- <?php
- if ( $this->data['dataAfterContent'] ) {
- $this->html( 'dataAfterContent'
- );
- }
- ?>
+ <h1 id="firstHeading" class="first-header" lang="<?php $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode(); $this->text( 'pageLanguage' ); ?>">
+ <span dir="auto"><?php $this->html( 'title' ) ?></span>
+ </h1>
+
+ <div id="bodyContent" class="mw-body-content">
+ <div id="siteSub"><?php $this->msg( 'tagline' ) ?></div>
+ <div id="contentSub"<?php $this->html( 'userlangattributes' ) ?>>
+ <?php $this->html( 'subtitle' ) ?>
+ </div>
+ <?php if ( $this->data['undelete'] ) { ?>
+ <div id="contentSub2"><?php $this->html( 'undelete' ) ?></div>
+ <?php } ?>
+ <?php if ( $this->data['newtalk'] ) { ?>
+ <div class="usermessage"><?php $this->html( 'newtalk' ) ?></div>
+ <?php } ?>
+ <div id="jump-to-nav" class="mw-jump">
+ <?php $this->msg( 'jumpto' ) ?>
+ <a href="#column-one"><?php $this->msg( 'jumptonavigation' ) ?></a><?php $this->msg( 'comma-separator' ) ?>
+ <a href="#searchInput"><?php $this->msg( 'jumptosearch' ) ?></a>
+ </div>
+
+ <!-- start content -->
+ <?php $this->html( 'bodytext' ) ?>
+ <?php if ( $this->data['catlinks'] ) { ?>
+ <?php $this->html( 'catlinks' ); ?>
+ <?php } ?>
+ <!-- end content -->
+
+ <?php if ( $this->data['dataAfterContent'] ) {
+ $this->html( 'dataAfterContent' );
+ } ?>
+ </div>
+ </div>
</div>
</div>
- </div></div>
</div>
- <?php
- $validFooterIcons = $this->getFooterIcons( "icononly" );
- $validFooterLinks = $this->getFooterLinks( "flat" ); // Additional footer links
- ?>
- <footer>
- <div class="container">
- <div class="row">
- <div class="col-md-8">
- <?php
- if ( count( $validFooterLinks ) > 0 ) {
- ?>
- <ul id="f-list">
- <?php
- foreach ( $validFooterLinks as $aLink ) {
- ?>
- <li id="<?php echo $aLink ?>"><?php $this->html( $aLink ) ?></li>
- <?php
- }
- ?>
- </ul>
- <?php
- } ?>
- </div>
- <div class="col-md-4 footericons">
- <?php
- foreach ( $validFooterIcons as $blockName => $footerIcons ) {
- ?>
- <div id="f-<?php echo htmlspecialchars( $blockName ); ?>ico" style="display: inline-block;">
- <?php foreach ( $footerIcons as $icon ) { ?>
- <?php echo $this->getSkin()->makeFooterIcon( $icon ); ?>
- <?php
- }
- ?>
- </div>
- <?php
- } ?>
- </div>
- </div>
- <div class="row">
- <div class="col-md-12">
- <strong>&copy; 2001-2015 Gentoo Foundation, Inc.</strong><br />
- <small>
- Gentoo is a trademark of the Gentoo Foundation, Inc.
- The contents of this document, unless otherwise expressly stated, are licensed under the
- <a href="http://creativecommons.org/licenses/by-sa/3.0/" rel="license">CC-BY-SA-3.0</a> license.
- The <a href="http://www.gentoo.org/main/en/name-logo.xml">Gentoo Name and Logo Usage Guidelines</a> apply.
- </small>
- </div>
- </div>
- </div>
- </footer>
-
- <?php
- echo $footerEnd;
- ?>
+ <?php $this->footer(); ?>
- </div>
<script src="https://1b9a50f4f9de4348cd9f-e703bc50ba0aa66772a874f8c7698be7.ssl.cf5.rackcdn.com/bootstrap.min.js"></script>
<script src="https://1b9a50f4f9de4348cd9f-e703bc50ba0aa66772a874f8c7698be7.ssl.cf5.rackcdn.com/retina.min.js"></script>
<?php
@@ -208,6 +70,122 @@ class TyrianTemplate extends BaseTemplate {
/*************************************************************************************************/
+ function header() {
+ ?>
+ <div class="mw-jump">
+ <?php $this->msg( 'jumpto' ) ?>
+ <a href="#top">content</a>
+ </div>
+ <header>
+ <div class="site-title">
+ <div class="container">
+ <div class="row">
+ <div class="site-title-buttons">
+ <div class="btn-group btn-group-sm">
+ <a href="http://get.gentoo.org/" role="button" class="btn get-gentoo"><span class="fa fa-download"></span> <strong>Get Gentoo!</strong></a>
+ <div class="btn-group btn-group-sm">
+ <button type="button" class="btn gentoo-org-sites dropdown-toggle" data-toggle="dropdown">
+ <span class="glyphicon glyphicon-globe"></span> gentoo.org sites <span class="caret"></span>
+ </button>
+ <ul class="dropdown-menu">
+ <li><a href="http://www.gentoo.org/" title="Main Gentoo website"><span class="fa fa-home fa-fw"></span> gentoo.org</a></li>
+ <li><a href="http://wiki.gentoo.org/" title="Find and contribute documentation"><span class="fa fa-file-text fa-fw"></span> Wiki</a></li>
+ <li><a href="https://bugs.gentoo.org/" title="Report issues and find common issues"><span class="fa fa-bug fa-fw"></span> Bugs</a></li>
+ <li><a href="http://forums.gentoo.org/" title="Discuss with the community"><span class="fa fa-comments-o fa-fw"></span> Forums</a></li>
+ <li><a href="http://packages.gentoo.org/" title="Find software for your Gentoo"><span class="fa fa-hdd-o fa-fw"></span> Packages</a></li>
+ <li class="divider"></li>
+ <li><a href="http://overlays.gentoo.org/" title="Collaborate on maintaining packages"><span class="fa fa-code-fork fa-fw"></span> Overlays</a></li>
+ <li><a href="http://planet.gentoo.org/" title="Find out what's going on in the developer community"><span class="fa fa-rss fa-fw"></span> Planet</a></li>
+ <li><a href="http://archives.gentoo.org/" title="Read up on past discussions"><span class="fa fa-archive fa-fw"></span> Archives</a></li>
+ <li><a href="http://sources.gentoo.org/" title="Browse our source code"><span class="fa fa-code fa-fw"></span> Sources</a></li>
+ <li class="divider"></li>
+ <li><a href="http://infra-status.gentoo.org/" title="Get updates on the services provided by Gentoo"><span class="fa fa-tasks fa-fw"></span> Infra Status</a></li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ <div class="logo">
+ <img src="https://1b9a50f4f9de4348cd9f-e703bc50ba0aa66772a874f8c7698be7.ssl.cf5.rackcdn.com/site-logo.png" data-at2x="https://1b9a50f4f9de4348cd9f-e703bc50ba0aa66772a874f8c7698be7.ssl.cf5.rackcdn.com/site-logo@2x.png" alt="Gentoo Linux Logo"/>
+ <span class="site-label">Wiki</span>
+ </div>
+ </div>
+ </div>
+ </div>
+ <nav class="tyrian-navbar" role="navigation">
+ <div class="container">
+ <div class="row">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ </div>
+ <div class="collapse navbar-collapse navbar-main-collapse">
+ <ul class="nav navbar-nav">
+ <?php
+ $this->renderPortals( $this->data['sidebar'] );
+ ?>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <?php
+ $this->toolbox();
+ $this->personaltools();
+ ?>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </nav>
+ <?php $this->cactions(); ?>
+ </header>
+ <?php
+ }
+
+ function footer() {
+ $validFooterIcons = $this->getFooterIcons( "icononly" );
+ $validFooterLinks = $this->getFooterLinks( "flat" ); // Additional footer links
+ ?>
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="col-md-8">
+ <?php if ( count( $validFooterLinks ) > 0 ) { ?>
+ <ul id="f-list">
+ <?php foreach ( $validFooterLinks as $aLink ) { ?>
+ <li id="<?php echo $aLink ?>"><?php $this->html( $aLink ) ?></li>
+ <?php } ?>
+ </ul>
+ <?php } ?>
+ </div>
+ <div class="col-md-4 footericons">
+ <?php foreach ( $validFooterIcons as $blockName => $footerIcons ) { ?>
+ <div id="f-<?php echo htmlspecialchars( $blockName ); ?>ico" style="display: inline-block;">
+ <?php foreach ( $footerIcons as $icon ) {
+ echo $this->getSkin()->makeFooterIcon( $icon );
+ } ?>
+ </div>
+ <?php } ?>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col-md-12">
+ <strong>&copy; 2001-2015 Gentoo Foundation, Inc.</strong><br />
+ <small>
+ Gentoo is a trademark of the Gentoo Foundation, Inc.
+ The contents of this document, unless otherwise expressly stated, are licensed under the
+ <a href="http://creativecommons.org/licenses/by-sa/3.0/" rel="license">CC-BY-SA-3.0</a> license.
+ The <a href="http://www.gentoo.org/main/en/name-logo.xml">Gentoo Name and Logo Usage Guidelines</a> apply.
+ </small>
+ </div>
+ </div>
+ </div>
+ </footer>
+ <?php
+ echo $footerEnd;
+ }
+
/**
* @param array $sidebar
*/
@@ -216,7 +194,7 @@ class TyrianTemplate extends BaseTemplate {
$sidebar['SEARCH'] = false;
$sidebar['TOOLBOX'] = false;
$sidebar['LANGUAGES'] = false;
-
+
foreach ( $sidebar as $boxName => $content ) {
if ( $content === false ) {
continue;
@@ -233,12 +211,12 @@ class TyrianTemplate extends BaseTemplate {
<div class="input-group">
<?php echo $this->makeSearchInput( array( "id" => "searchInput", "class" => "form-control", "placeholder" => $this->getMsg( 'search' )->escaped() ) ); ?>
- <div class="input-group-btn"><?php
+ <div class="input-group-btn"><?php
echo $this->makeSearchButton(
"go",
array( "id" => "searchGoButton", "class" => "searchButton btn btn-default" )
);
-
+
echo $this->makeSearchButton(
"fulltext",
array( "id" => "mw-searchButton", "class" => "searchButton btn btn-default" )
@@ -268,7 +246,7 @@ class TyrianTemplate extends BaseTemplate {
if ( strpos( $tab['class'], 'selected' ) !== false ) {
$primary_actions[$key]['class'] .= ' active';
- }
+ }
}
} else {
$secondary_actions[$key] = $tab;
@@ -290,7 +268,7 @@ class TyrianTemplate extends BaseTemplate {
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
- </div>
+ </div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="gw-toolbar">
@@ -349,9 +327,9 @@ class TyrianTemplate extends BaseTemplate {
function personaltools() {
?>
<li class="dropdown">
- <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
- <span class="glyphicon glyphicon-user" aria-label="<?php $this->msg( 'personaltools' ) ?>"></span>
- <?php $this->msg( 'listfiles_user' ) ?>
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ <span class="glyphicon glyphicon-user" aria-label="<?php $this->msg( 'personaltools' ) ?>"></span>
+ <?php $this->msg( 'listfiles_user' ) ?>
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
@@ -361,9 +339,9 @@ class TyrianTemplate extends BaseTemplate {
}
?>
</ul>
- </li>
+ </li>
<?php
- }
+ }
/*************************************************************************************************/
function languageBox() {
@@ -376,9 +354,8 @@ class TyrianTemplate extends BaseTemplate {
<ul>
<?php foreach ( $this->data['language_urls'] as $key => $langlink ) { ?>
<?php echo $this->makeListItem( $key, $langlink ); ?>
-
<?php
-}
+ }
?>
</ul>
diff --git a/main.css b/main.css
index 867c930..15e27df 100644
--- a/main.css
+++ b/main.css
@@ -60,12 +60,20 @@ body.page-Main_Page div.jumbotron img {
margin-top: -2em;
}
+.mw-body-content {
+ padding-bottom: 10px;
+}
+
body.skin-tyrian .catlinks {
- margin-top: 0;
- padding: 0;
- border: none;
- background: none;
- clear: both;
+ margin-top: 8px;
+ margin-bottom: 4px;
+ padding: 4px;
+ border: 1px solid #ccc;
+ border: 1px solid rgba(0, 0, 0, 0.15);
+ background-color: #eee;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
}
div.box-caption {
@@ -135,6 +143,6 @@ pre > pre {
padding: 2px 4px;
}
-.cmd-box a, .cmd-box a.external {
+.cmd-box a, .cmd-box a.external, .cmd-box a.external:visited {
color: white;
-} \ No newline at end of file
+}