05ecdc95b976052fa746d091b48a7b4bf7baf687

Author: Mark Story

Date: 2009-06-14 23:49:46 -0400

Adding package sidebar Updating CSS adding CSS gradients Updating view files.

diff --git a/controllers/api_packages_controller.php b/controllers/api_packages_controller.php index 2364aff..c9e357a 100644 --- a/controllers/api_packages_controller.php +++ b/controllers/api_packages_controller.php @@ -64,6 +64,10 @@ class ApiPackagesController extends ApiGeneratorAppController { $this->_notFound(__('No package exists in the index with that name', true)); } $classIndex = $this->ApiPackage->ApiClass->getClassIndex(); - $this->set(compact('apiPackage', 'classIndex')); + $packageIndex = $this->ApiPackage->getPackageIndex(); + + $this->set('showSidebar', true); + $this->set('sidebarElement', 'sidebar/package_sidebar'); + $this->set(compact('apiPackage', 'classIndex', 'packageIndex')); } } \ No newline at end of file diff --git a/vendors/css/base.css b/vendors/css/base.css index 6f21f2e..0802e02 100644 --- a/vendors/css/base.css +++ b/vendors/css/base.css @@ -81,10 +81,13 @@ h1, h2, h3, h4, h5, h6, th, dt { h1 { font-size: 24px; line-height: 30px; + -webkit-text-shadow: 1px 1px #ccc; + text-shadow:1px 1px #ccc; } h2 { - font-size: 22px; line-height: 30px; + color: #333348; + font-size:1.6em; } a { color: #94345A; @@ -99,14 +102,12 @@ table { td, th { padding:0.4em; } -h2 { - color: #333348; - font-size:1.6em; -} h3 { color: #333348; font-size: 1.4em; margin: 1em 0; + -webkit-text-shadow: 1px 1px #ccc; + text-shadow:1px 1px #ccc; } /* containers */ @@ -196,6 +197,7 @@ File Browser Styles margin: 0; padding: 0; } +.file span, .file a, .folder a { padding: 8px 8px 8px 40px; @@ -251,6 +253,8 @@ Documentation Page Styles border-left:7px solid #fff; margin:0; padding: 0 0 0 8px; + -webkit-text-shadow: 1px 1px #ccc; + text-shadow:1px 1px #ccc; } .parent-method .doc-head { background:#FFFFEF; @@ -319,6 +323,8 @@ Documentation Page Styles line-height:1.4em; margin:0; clear:both; + -webkit-text-shadow:1px 0px #ddd; + text-shadow:0px 1px #ddd; } .markdown-block pre { font-size: 12px; @@ -469,15 +475,18 @@ Documentation Page Styles .letter-section h3 { border-bottom: 1px solid #ccc; } +.package-list, .class-index { list-style: square; list-style-position: inside; color: #8BAAB2; } +.package-list li, .class-index li { margin: 0.6em 0; font-size: 14px; } + /** * Sidebar *****************************/ @@ -494,6 +503,11 @@ Documentation Page Styles /** * Package Index *******************/ +.api-package h3 { + font-size:20px; + border-bottom:1px solid #ccc; + margin-top:1em; +} .package-tree .package-tree { margin-left:15px; } diff --git a/views/api_files/source.ctp b/views/api_files/source.ctp index 21e6789..c4b4b27 100644 --- a/views/api_files/source.ctp +++ b/views/api_files/source.ctp @@ -26,7 +26,7 @@ $this->pageTitle = $currentPath; <?php endforeach; ?> <?php else: ?> <li class="file"> - <?php __('No files'); ?> + <span><?php __('No files'); ?></span> </li> <?php endif; ?> diff --git a/views/api_packages/view.ctp b/views/api_packages/view.ctp index 7cb9e1e..db98b16 100644 --- a/views/api_packages/view.ctp +++ b/views/api_packages/view.ctp @@ -1,25 +1,29 @@ <?php $apiDoc->setClassIndex($classIndex); ?> -<h1><?php printf(__('%s Package', true), $apiPackage['ApiPackage']['name']); ?></h1> +<div class="api-package"> + <h1><?php printf(__('%s Package', true), $apiPackage['ApiPackage']['name']); ?></h1> -<?php if(!empty($apiPackage['ParentPackage'])): ?> - <h3><?php __('Parent Package'); ?> </h3> - <p><?php echo $apiDoc->packageLink($apiPackage['ParentPackage']['name']); ?></p> -<?php endif; ?> + <?php if(!empty($apiPackage['ParentPackage'])): ?> + <h3><?php __('Parent Package'); ?> </h3> + <ul class="package-list"> + <li><?php echo $apiDoc->packageLink($apiPackage['ParentPackage']['name']); ?></li> + </ul> + <?php endif; ?> -<?php if (!empty($apiPackage['ChildPackage'])): ?> - <h3><?php __('Child Packages'); ?></h3> - <ul> - <?php foreach ($apiPackage['ChildPackage'] as $child): ?> - <li><?php echo $apiDoc->packageLink($apiPackage['ApiPackage']['name']); ?></li> + <?php if (!empty($apiPackage['ChildPackage'])): ?> + <h3><?php __('Child Packages'); ?></h3> + <ul class="package-list"> + <?php foreach ($apiPackage['ChildPackage'] as $child): ?> + <li><?php echo $apiDoc->packageLink($child['name']); ?></li> + <?php endforeach; ?> + </ul> + <?php endif;?> + + <h3><?php printf(__('Classes in %s', true), $apiPackage['ApiPackage']['name']); ?> </h3> + <ul class="package-list"> + <?php foreach ($apiPackage['ApiClass'] as $class): ?> + <li><?php echo $apiDoc->classLink($class['name']); ?></li> <?php endforeach; ?> </ul> -<?php endif;?> - -<h3><?php printf(__('Classes in %s', true), $apiPackage['ApiPackage']['name']); ?> </h3> -<ul> -<?php foreach ($apiPackage['ApiClass'] as $class): ?> - <li><?php echo $apiDoc->classLink($class['name']); ?></li> -<?php endforeach; ?> -</ul> \ No newline at end of file +</div> \ No newline at end of file diff --git a/views/elements/sidebar/class_sidebar.ctp b/views/elements/sidebar/class_sidebar.ctp index aaaf1c4..997845b 100644 --- a/views/elements/sidebar/class_sidebar.ctp +++ b/views/elements/sidebar/class_sidebar.ctp @@ -14,4 +14,5 @@ 'action' => 'view_class', $slug )); ?></li> -<?php endforeach; ?> \ No newline at end of file +<?php endforeach; ?> +</ul> \ No newline at end of file diff --git a/views/elements/sidebar/package_sidebar.ctp b/views/elements/sidebar/package_sidebar.ctp new file mode 100644 index 0000000..834f1dc --- /dev/null +++ b/views/elements/sidebar/package_sidebar.ctp @@ -0,0 +1,8 @@ +<?php +/** + * Package index sidebar element + * + */ +?> +<h3><?php __('Package Index'); ?></h3> +<?php echo $apiDoc->generatePackageTree($packageIndex); ?> \ No newline at end of file