Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Docs tweaks, submenu for API

  • Loading branch information...
commit 41485ab2c211bdf615644bf0c2461e027d6082a0 1 parent 33bced3
@fakedarren fakedarren authored
View
5 application/controllers/docs.php
@@ -10,6 +10,8 @@ protected function index(){
$menu = $api ? 'Source/Docs/api-ref.json' : 'Source/Docs/docs-ref.json';
$root = $api ? '/api' : '/docs';
+ $this->api = $api;
+
$packagemenu = new PackageMenu($menu, $root);
$this->menu = $packagemenu->html;
@@ -26,6 +28,9 @@ protected function index(){
if ($api === true){
$this->html = $parser->html;
+ foreach ($parser->titles as $id => $title){
+ $this->submenu[] = $id;
+ }
} else {
$this->html = $parser->description;
foreach ($parser->titles as $title){
View
11 application/views/docs.tpl
@@ -12,7 +12,16 @@
<?php require($this->config('views_folder') . '/shared/header.tpl');?>
<div class="content">
<?php echo $this->menu ?>
- <div class="main">
+ <?php
+ if ($this->api === true){
+ ?><ul class="sidemenu"><?
+ foreach ($this->submenu as $item){
+ echo "<li>$item</li>";
+ }
+ ?></ul><?
+ }
+ ?>
+ <div class="main <?php if ($this->api === true) echo 'api'; ?>">
<?php echo $this->html ?>
</div>
</div>
View
2  application/views/shared/footer.tpl
@@ -2,7 +2,7 @@
<p>
<a href="/developers" class="footerDevs">MooTools Development Team</a>
- <span class="footerCopy">&copy; 2006-<!--<?php echo date('Y'); ?>--> <a href="http://mad4milk.net" rel="nofollow">Valerio Proietti</a></span>
+ <span class="footerCopy">&copy; 2006 &mdash; <?php echo date('Y'); ?> <a href="http://mad4milk.net" rel="nofollow">Valerio Proietti</a></span>
</p>
</footer>
View
33 assets/css/docs.css
@@ -1,13 +1,25 @@
.menu {
float: left;
- width: 150px;
+ margin: 20px 0 0;
+ width: 200px;
}
-.menu ul {
- padding: 0 0 0 20px;
+.menu li {
+ font-size: 14px;
}
+ .menu ul li {
+ padding: 0 0 0 20px;
+ }
+ .menu li a {
+ cursor: pointer;
+ display: block;
+ }
+ .menu li a:hover {
+ background: #ddd;
+ }
.main {
- float: left;
- width: 800px;
+ float: right;
+ margin: 20px 0 0;
+ width: 745px;
}
.main ol, .main ul {
font-size: 1.3em;
@@ -15,9 +27,11 @@
}
.main ol li {
list-style: decimal;
+ margin: 0 0 5px;
}
.main ul li {
list-style: disc;
+ margin: 0 0 5px;
}
.main hr {
display: none;
@@ -26,4 +40,13 @@
.main li pre, .main p pre {
display: inline;
padding: 0;
+}
+
+.api {
+ width: 600px;
+}
+.sidemenu {
+ float: right;
+ padding: 20px 0 0 10px;
+ width: 130px;
}
View
7 assets/css/main.css
@@ -21,6 +21,11 @@ body {
margin: 0 auto;
width: 960px;
}
+.content:after {
+ clear: both;
+ content: "";
+ display: table;
+}
header, footer {
display: block;
@@ -142,7 +147,7 @@ footer {
clear: both;
border-top: 1px solid #d9d9d9;
font-size: .85em;
- text-align: center;
+ margin: 40px auto 0;
padding: 4px 0 10px 0;
}
Please sign in to comment.
Something went wrong with that request. Please try again.