mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-04-26 01:57:21 -05:00
The topbar in pokemonshowdown.com (and all not-in-sim pages) has gotten revised in three ways: 1. Ladder has been replaced with Strategy, a link to the Smogon Strategydex. 2. Strategy and Forum now open in new tabs, because they don't share top nav with PS. 3. Strategy and Forum are now purple, to signal that they lead to Smogon and open in new tabs. I'm way more a fan of the new look than I expected to be. Purple and blue matches the "Horizon" art used on the main page quite well, it turns out. Ladder was always kind of useless - there's a better Ladder button in-sim that keeps way more up-to-date with tier additions/removals, and finding users can be done by clicking on the "X users online" button.
92 lines
3.2 KiB
PHP
92 lines
3.2 KiB
PHP
<?php
|
|
|
|
include_once __DIR__ . '/../../config/config.inc.php';
|
|
|
|
/********************************************************************
|
|
* Header
|
|
********************************************************************/
|
|
|
|
function ThemeHeaderTemplate() {
|
|
global $panels, $psconfig;
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html><head>
|
|
|
|
<meta charset="utf-8" />
|
|
|
|
<title><?php if ($panels->pagetitle) echo htmlspecialchars($panels->pagetitle).' - '; ?>Pokémon Showdown</title>
|
|
|
|
<?php if ($panels->pagedescription) { ?>
|
|
<meta name="description" content="<?php echo htmlspecialchars($panels->pagedescription); ?>" />
|
|
<?php } ?>
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=IE8" />
|
|
<link rel="stylesheet" href="//<?= $psconfig['routes']['client']; ?>/style/font-awesome.css" />
|
|
<link rel="stylesheet" href="/theme/panels.css?" />
|
|
<link rel="stylesheet" href="/theme/main.css?" />
|
|
|
|
<!-- Workarounds for IE bugs to display trees correctly. -->
|
|
<!--[if lte IE 6]><style> li.tree { height: 1px; } </style><![endif]-->
|
|
<!--[if IE 7]><style> li.tree { zoom: 1; } </style><![endif]-->
|
|
|
|
<!-- Google Analytics -->
|
|
<script>
|
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
|
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
|
|
|
ga('create', 'UA-26211653-1', 'pokemonshowdown.com', {'allowLinker': true});
|
|
ga('require', 'linker');
|
|
|
|
ga('linker:autoLink', ['pokemonshowdown.com', 'play.pokemonshowdown.com', 'replay.pokemonshowdown.com']);
|
|
ga('send', 'pageview');
|
|
|
|
</script>
|
|
<!-- End Google Analytics -->
|
|
</head><body>
|
|
|
|
<div class="pfx-topbar">
|
|
<div class="header">
|
|
<ul class="nav">
|
|
<li><a class="button nav-first<?php if ($panels->tab === 'home') echo ' cur'; ?>" href="/"><img src="/images/pokemonshowdownbeta.png" srcset="/images/pokemonshowdownbeta.png 1x, /images/pokemonshowdownbeta@2x.png 2x" alt="Pokémon Showdown" width="146" height="44" /> Home</a></li>
|
|
<li><a class="button" href="//<?= $psconfig['routes']['dex'] ?>/">Pokédex</a></li>
|
|
<li><a class="button" href="//<?= $psconfig['routes']['replays'] ?>/">Replay</a></li>
|
|
<li><a class="button purplebutton" href="//smogon.com/dex/" target="_blank">Strategy</a></li>
|
|
<li><a class="button nav-last purplebutton" href="//smogon.com/forums/" target="_blank">Forum</a></li>
|
|
</ul>
|
|
<ul class="nav nav-play">
|
|
<li><a class="button greenbutton nav-first nav-last" href="//<?= $psconfig['routes']['client'] ?>/">Play</a></li>
|
|
</ul>
|
|
<div style="clear:both"></div>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
}
|
|
|
|
/********************************************************************
|
|
* Footer
|
|
********************************************************************/
|
|
|
|
function ThemeScriptsTemplate() {
|
|
?>
|
|
<script src="/js/jquery-1.9.1.min.js"></script>
|
|
<script src="/js/underscore.js"></script>
|
|
<script src="/js/backbone.js"></script>
|
|
<script src="/js/panels.js"></script>
|
|
<?php
|
|
}
|
|
|
|
function ThemeFooterTemplate() {
|
|
global $panels;
|
|
?>
|
|
<?php $panels->scripts(); ?>
|
|
|
|
<?php if ($panels->tab === 'ladder') { ?>
|
|
<script src="/js/ladder.js?b23"></script>
|
|
<?php } ?>
|
|
|
|
</body></html>
|
|
<?php
|
|
}
|