New theme.

Clean up of existing theme, implementation of a new easier to integrate layout.
This commit is contained in:
Will Rossiter 2014-09-06 11:13:12 +12:00
parent fab0cba8a8
commit 2c00a3b20f
31 changed files with 1451 additions and 1331 deletions

6
_config/docsviewer.yml Normal file
View File

@ -0,0 +1,6 @@
---
name: docsviewer
---
DocumentationViewer:
google_analytics_code: ''

View File

@ -0,0 +1,43 @@
<?php
/**
* Collection of static helper methods for managing the documentation
*
* @package docsviewer
*/
class DocumentationHelper {
/**
* Generate an array of every single documentation page installed on the
* system.
*
* @return ArrayList
*/
public static function get_all_documentation_pages() {
DocumentationService::load_automatic_registration();
$modules = DocumentationService::get_registered_entities();
$output = new ArrayList();
if($modules) {
foreach($modules as $module) {
foreach($module->getVersions() as $version) {
try {
$pages = DocumentationService::get_pages_from_folder($module, false, true, $version);
if($pages) {
foreach($pages as $page) {
$output->push($page);
}
}
}
catch(Exception $e) {
user_error($e, E_USER_WARNING);
}
}
}
}
return $output;
}
}

View File

@ -167,7 +167,7 @@ class DocumentationParser {
return $output; return $output;
} }
static function rewrite_image_links($md, $page) { public static function rewrite_image_links($md, $page) {
// Links with titles // Links with titles
$re = '/ $re = '/
! !
@ -227,7 +227,7 @@ class DocumentationParser {
* @param DocumentationPage $page * @param DocumentationPage $page
* @return String * @return String
*/ */
static function rewrite_api_links($md, $page) { public static function rewrite_api_links($md, $page) {
// Links with titles // Links with titles
$re = '/ $re = '/
`? `?
@ -287,6 +287,9 @@ class DocumentationParser {
return $md; return $md;
} }
/**
*
*/
public static function _rewrite_heading_anchors_callback($matches) { public static function _rewrite_heading_anchors_callback($matches) {
$heading = $matches[0]; $heading = $matches[0];
$headingText = $matches[1]; $headingText = $matches[1];
@ -309,7 +312,7 @@ class DocumentationParser {
* *
* @return String * @return String
*/ */
static function generate_html_id($title) { public static function generate_html_id($title) {
$t = $title; $t = $title;
$t = str_replace('&amp;','-and-',$t); $t = str_replace('&amp;','-and-',$t);
$t = str_replace('&','-and-',$t); $t = str_replace('&','-and-',$t);
@ -329,7 +332,7 @@ class DocumentationParser {
* @param String $baselink * @param String $baselink
* @return String Markdown * @return String Markdown
*/ */
static function rewrite_relative_links($md, $page, $baselink = null) { public static function rewrite_relative_links($md, $page, $baselink = null) {
if(!$baselink) $baselink = $page->getEntity()->getRelativeLink(); if(!$baselink) $baselink = $page->getEntity()->getRelativeLink();
$re = '/ $re = '/

View File

@ -46,7 +46,7 @@ class DocumentationSearch {
* Defaults to 1.0, lower to decrease relevancy. Requires reindex. * Defaults to 1.0, lower to decrease relevancy. Requires reindex.
* Uses {@link DocumentationPage->getRelativePath()} for comparison. * Uses {@link DocumentationPage->getRelativePath()} for comparison.
*/ */
static $boost_by_path = array(); private static $boost_by_path = array();
/** /**
* @var ArrayList - Results * @var ArrayList - Results
@ -119,38 +119,6 @@ class DocumentationSearch {
*/ */
private static $index_location; private static $index_location;
/**
* Generate an array of every single documentation page installed on the system.
*
* @return ArrayList
*/
public static function get_all_documentation_pages() {
DocumentationService::load_automatic_registration();
$modules = DocumentationService::get_registered_entities();
$output = new ArrayList();
if($modules) {
foreach($modules as $module) {
foreach($module->getVersions() as $version) {
try {
$pages = DocumentationService::get_pages_from_folder($module, false, true, $version);
if($pages) {
foreach($pages as $page) {
$output->push($page);
}
}
}
catch(Exception $e) {
user_error($e, E_USER_WARNING);
}
}
}
}
return $output;
}
/** /**
* Enable searching documentation * Enable searching documentation

View File

@ -34,6 +34,8 @@ class DocumentationOpenSearchController extends Controller {
return $this->customise( return $this->customise(
new ArrayData($data) new ArrayData($data)
)->renderWith(array('OpenSearchDescription')); )->renderWith(array(
'OpenSearchDescription'
));
} }
} }

View File

@ -4,10 +4,10 @@
* Documentation Viewer. * Documentation Viewer.
* *
* Reads the bundled markdown files from documentation folders and displays the * Reads the bundled markdown files from documentation folders and displays the
* output (either via markdown or plain text) * output (either via markdown or plain text).
* *
* For more documentation on how to use this class see the documentation in the * For more documentation on how to use this class see the documentation in the
* docs folder * docs folder.
* *
* @package docsviewer * @package docsviewer
*/ */
@ -26,6 +26,11 @@ class DocumentationViewer extends Controller {
'results' 'results'
); );
/**
* @var string
*/
private static $google_analytics_code = '';
/** /**
* @var string * @var string
*/ */
@ -71,33 +76,14 @@ class DocumentationViewer extends Controller {
private static $edit_links = array(); private static $edit_links = array();
/** /**
* @var boolean $separate_submenu *
*/ */
protected static $separate_submenu = true;
/**
* @var bool $recursive_submenu
*/
protected static $recursive_submenu = false;
/**
* @param bool $separate_submenu
*/
public static function set_separate_submenu($separate_submenu = true) {
self::$separate_submenu = $separate_submenu;
}
/**
* @param bool $recursive_submenu
*/
public static function set_recursive_submenu($recursive_submenu = false) {
self::$recursive_submenu = $recursive_submenu;
}
public function init() { public function init() {
parent::init(); parent::init();
if(!$this->canView()) return Security::permissionFailure($this); if(!$this->canView()) {
return Security::permissionFailure($this);
}
Requirements::javascript(THIRDPARTY_DIR .'/jquery/jquery.js'); Requirements::javascript(THIRDPARTY_DIR .'/jquery/jquery.js');
Requirements::combine_files( Requirements::combine_files(
@ -116,12 +102,19 @@ class DocumentationViewer extends Controller {
Requirements::javascript(DOCSVIEWER_DIR .'/javascript/DocumentationViewer.js'); Requirements::javascript(DOCSVIEWER_DIR .'/javascript/DocumentationViewer.js');
Requirements::css(DOCSVIEWER_DIR .'/css/shSilverStripeDocs.css'); Requirements::css(DOCSVIEWER_DIR .'/css/shSilverStripeDocs.css');
Requirements::css(DOCSVIEWER_DIR .'/css/DocumentationViewer.css'); Requirements::combine_files('docs.css', array(
DOCSVIEWER_DIR .'/css/normalize.css',
DOCSVIEWER_DIR .'/css/utilities.css',
DOCSVIEWER_DIR .'/css/typography.css',
DOCSVIEWER_DIR .'/css/forms.css',
DOCSVIEWER_DIR .'/css/layout.css',
DOCSVIEWER_DIR .'/css/small.css'
));
} }
/** /**
* Can the user view this documentation. Hides all functionality for * Can the user view this documentation. Hides all functionality for private
* private wikis. * wikis.
* *
* @return bool * @return bool
*/ */
@ -405,7 +398,8 @@ class DocumentationViewer extends Controller {
'Title' => $entity->getTitle(), 'Title' => $entity->getTitle(),
'Link' => $link, 'Link' => $link,
'LinkingMode' => $mode, 'LinkingMode' => $mode,
'Content' => $content 'Content' => $content,
))); )));
} }
} }
@ -602,31 +596,6 @@ class DocumentationViewer extends Controller {
return false; return false;
} }
/**
* @return DocumentationPage
*/
public function getCurrentLevelOnePage() {
return $this->currentLevelOnePage;
}
/**
* returns 'separate' if the submenu should be displayed in a separate
* block, 'nested' otherwise. If no currentDocPage is defined, there is
* no submenu, so an empty string is returned.
*
* @return string
*/
public function getSubmenuLocation() {
if ($this->currentLevelOnePage) {
if (self::$separate_submenu && !self::$recursive_submenu) {
return 'separate';
} else {
return 'nested';
}
}
return '';
}
/** /**
* Return the content for the page. If its an actual documentation page then * Return the content for the page. If its an actual documentation page then
* display the content from the page, otherwise display the contents from * display the content from the page, otherwise display the contents from
@ -634,7 +603,7 @@ class DocumentationViewer extends Controller {
* *
* @return HTMLText * @return HTMLText
*/ */
function getContent() { public function getContent() {
$page = $this->getPage(); $page = $this->getPage();
if($page) { if($page) {
@ -659,27 +628,29 @@ class DocumentationViewer extends Controller {
'Content' => false, 'Content' => false,
'Title' => DocumentationService::clean_page_name(array_pop($url)), 'Title' => DocumentationService::clean_page_name(array_pop($url)),
'Pages' => $pages 'Pages' => $pages
))->renderWith('DocFolderListing'); ))->renderWith('DocumentationFolderListing');
} }
else { else {
return $this->customise(array( return $this->customise(array(
'Content' => false, 'Content' => false,
'Title' => _t('DocumentationViewer.MODULES', 'Modules'), 'Title' => _t('DocumentationViewer.MODULES', 'Modules'),
'Pages' => $this->getEntities() 'Pages' => $this->getEntities()
))->renderWith('DocFolderListing'); ))->renderWith('DocumentationFolderListing');
} }
return false; return false;
} }
/** /**
* Generate a list of breadcrumbs for the user. Based off the remaining params * Generate a list of breadcrumbs for the user. Based off the remaining
* in the url * params in the url
* *
* @return ArrayList * @return ArrayList
*/ */
public function getBreadcrumbs() { public function getBreadcrumbs() {
if(!$this->Remaining) $this->Remaining = array(); if(!$this->Remaining) {
$this->Remaining = array();
}
$pages = array_merge(array($this->entity), $this->Remaining); $pages = array_merge(array($this->entity), $this->Remaining);
$output = new ArrayList(); $output = new ArrayList();
@ -870,7 +841,7 @@ class DocumentationViewer extends Controller {
* *
* @return array * @return array
*/ */
function getSearchedEntities() { public function getSearchedEntities() {
$entities = array(); $entities = array();
if(!empty($_REQUEST['Entities'])) { if(!empty($_REQUEST['Entities'])) {
@ -958,7 +929,7 @@ class DocumentationViewer extends Controller {
} }
// get a list of all the unique versions // get a list of all the unique versions
$uniqueVersions = array_unique(self::array_flatten(array_values($versions))); $uniqueVersions = array_unique(ArrayLib::flatten(array_values($versions)));
asort($uniqueVersions); asort($uniqueVersions);
$uniqueVersions = array_combine($uniqueVersions,$uniqueVersions); $uniqueVersions = array_combine($uniqueVersions,$uniqueVersions);
@ -1114,24 +1085,13 @@ class DocumentationViewer extends Controller {
} }
/** /**
* Flattens an array * @return string
*
* @param array
* @return array
*/ */
public static function array_flatten($array) { public function getGoogleAnalyticsCode() {
if(!is_array($array)) return false; $code = Config::inst()->get('DocumentationViewer', 'google_analytics_code');
$output = array(); if($code) {
foreach($array as $k => $v) { return $code;
if(is_array($v)) {
$output = array_merge($output, self::array_flatten($v));
} }
else {
$output[$k] = $v;
}
}
return $output;
} }
} }

View File

@ -1,12 +1,14 @@
<?php <?php
/** /**
* A {@link DocumentationEntity} is created when registering a module path * A {@link DocumentationEntity} is created when registering a path with
* with {@link DocumentationService::register()}. A {@link DocumentationEntity} * {@link DocumentationService::register()}.
* represents a module or folder with documentation rather than a specific
* page. Individual pages are handled by {@link DocumentationPage}
* *
* Each folder must have at least one language subfolder, which is automatically * A {@link DocumentationEntity} represents a module or folder with
* documentation not an individual page. Individual documentation pages are
* represented by a {@link DocumentationPage}
*
* Each entity folder must have at least one language sub folder, which is.
* determined through {@link addVersion()} and should not be included in the * determined through {@link addVersion()} and should not be included in the
* $path argument. * $path argument.
* *
@ -64,7 +66,7 @@ class DocumentationEntity extends ViewableData {
* @param string $path Absolute path to this module (excluding language folders) * @param string $path Absolute path to this module (excluding language folders)
* @param string $title * @param string $title
*/ */
function __construct($folder, $version, $path, $title = false) { public function __construct($folder, $version, $path, $title = false) {
$this->addVersion($version, $path); $this->addVersion($version, $path);
$this->title = (!$title) ? $folder : $title; $this->title = (!$title) ? $folder : $title;
$this->folder = $folder; $this->folder = $folder;
@ -139,6 +141,7 @@ class DocumentationEntity extends ViewableData {
return $this->stableVersion; return $this->stableVersion;
} else { } else {
$sortedVersions = $this->getVersions(); $sortedVersions = $this->getVersions();
usort($sortedVersions, create_function('$a,$b', 'return version_compare($a,$b);')); usort($sortedVersions, create_function('$a,$b', 'return version_compare($a,$b);'));
return array_pop($sortedVersions); return array_pop($sortedVersions);
@ -149,7 +152,10 @@ class DocumentationEntity extends ViewableData {
* @param String $version * @param String $version
*/ */
public function setStableVersion($version) { public function setStableVersion($version) {
if(!$this->hasVersion($version)) throw new InvalidArgumentException(sprintf('Version "%s" does not exist', $version)); if(!$this->hasVersion($version)) {
throw new InvalidArgumentException(sprintf('Version "%s" does not exist', $version));
}
$this->stableVersion = $version; $this->stableVersion = $version;
} }
@ -198,13 +204,15 @@ class DocumentationEntity extends ViewableData {
if($langs) { if($langs) {
foreach($langs as $key => $lang) { foreach($langs as $key => $lang) {
if(!is_dir($path . $lang) || strlen($lang) > 2 || in_array($lang, DocumentationService::get_ignored_files(), true)) if(!is_dir($path . $lang) || strlen($lang) > 2 || in_array($lang, DocumentationService::get_ignored_files(), true)) {
$lang = 'en'; $lang = 'en';
}
if(!in_array($lang, $available)) if(!in_array($lang, $available)) {
$available[] = $lang; $available[] = $lang;
} }
} }
}
$this->addLanguage($available); $this->addLanguage($available);
$this->versions[$version] = $path; $this->versions[$version] = $path;
@ -228,8 +236,13 @@ class DocumentationEntity extends ViewableData {
* @return string * @return string
*/ */
public function getPath($version = false, $lang = false) { public function getPath($version = false, $lang = false) {
if(!$version) $version = $this->getStableVersion(); if(!$version) {
if(!$lang) $lang = 'en'; $version = $this->getStableVersion();
}
if(!$lang) {
$lang = 'en';
}
if($this->hasVersion($version)) { if($this->hasVersion($version)) {
$path = $this->versions[$version]; $path = $this->versions[$version];
@ -254,9 +267,14 @@ class DocumentationEntity extends ViewableData {
); );
} }
function getRelativeLink($version = false, $lang = false) { public function getRelativeLink($version = false, $lang = false) {
if(!$lang) $lang = 'en'; if(!$lang) {
if($version == $this->getStableVersion()) $version = false; $lang = 'en';
}
if($version == $this->getStableVersion()) {
$version = false;
}
return Controller::join_links( return Controller::join_links(
DocumentationViewer::get_link_base(), DocumentationViewer::get_link_base(),
@ -272,7 +290,7 @@ class DocumentationEntity extends ViewableData {
* *
* @return DocumentationPage * @return DocumentationPage
*/ */
function getIndexPage($version, $lang = 'en') { public function getIndexPage($version, $lang = 'en') {
$path = $this->getPath($version, $lang); $path = $this->getPath($version, $lang);
$absFilepath = Controller::join_links($path, 'index.md'); $absFilepath = Controller::join_links($path, 'index.md');
@ -286,6 +304,8 @@ class DocumentationEntity extends ViewableData {
$page->setVersion($version); $page->setVersion($version);
return $page; return $page;
} else {
// fall back to reading the modules README.md
} }
return false; return false;
@ -294,7 +314,7 @@ class DocumentationEntity extends ViewableData {
/** /**
* @return string * @return string
*/ */
function __toString() { public function __toString() {
return sprintf('DocumentationEntity: %s)', $this->getPath()); return sprintf('DocumentationEntity: %s)', $this->getPath());
} }
} }

View File

@ -1,8 +1,10 @@
<?php <?php
/** /**
* A specific page within a {@link DocumentationEntity}. Maps 1 to 1 to a file on the * A specific documentation page within a {@link DocumentationEntity}. Maps to
* filesystem. * a file on the file system. Note that the URL to access this documentation
* page may not always be the file name. If the file contains meta data with
* a nicer URL then it will use that.
* *
* @package docsviewer * @package docsviewer
* @subpackage model * @subpackage model
@ -18,12 +20,12 @@ class DocumentationPage extends ViewableData {
* Stores the relative path (from the {@link DocumentationEntity} to * Stores the relative path (from the {@link DocumentationEntity} to
* this page. The actual file name can be accessed via {@link $this->getFilename()} * this page. The actual file name can be accessed via {@link $this->getFilename()}
* *
* @var String * @var string
*/ */
protected $relativePath; protected $relativePath;
/** /**
* @var String * @var string
*/ */
protected $lang = 'en'; protected $lang = 'en';
@ -33,30 +35,29 @@ class DocumentationPage extends ViewableData {
protected $title; protected $title;
/** /**
* @var String * @var string
*/ */
protected $version; protected $version;
/** /**
* @var Boolean * @var boolean
*/ */
protected $isFolder = false; protected $isFolder = false;
/** /**
*
* @var integer * @var integer
*/ */
protected $pagenumber = 0; protected $pagenumber = 0;
/** /**
* @param Boolean * @param boolean
*/ */
public function setIsFolder($isFolder = false) { public function setIsFolder($isFolder = false) {
$this->isFolder = $isFolder; $this->isFolder = $isFolder;
} }
/** /**
* @return Boolean * @return boolean
*/ */
public function getIsFolder($isFolder = false) { public function getIsFolder($isFolder = false) {
return $this->isFolder; return $this->isFolder;
@ -101,7 +102,7 @@ class DocumentationPage extends ViewableData {
/** /**
* @return string * @return string
*/ */
function getExtension() { public function getExtension() {
return DocumentationService::get_extension($this->getRelativePath()); return DocumentationService::get_extension($this->getRelativePath());
} }
@ -114,7 +115,7 @@ class DocumentationPage extends ViewableData {
* will return the path of the first file in the folder * will return the path of the first file in the folder
* @return string * @return string
*/ */
function getPath($defaultFile = false, $realpath = true) { public function getPath($defaultFile = false, $realpath = true) {
if($this->entity) { if($this->entity) {
$path = Controller::join_links( $path = Controller::join_links(
$this->entity->getPath($this->getVersion(), $this->lang), $this->entity->getPath($this->getVersion(), $this->lang),
@ -148,7 +149,7 @@ class DocumentationPage extends ViewableData {
* *
* @return string * @return string
*/ */
function getBreadcrumbTitle($divider = ' - ') { public function getBreadcrumbTitle($divider = ' - ') {
$pathParts = explode('/', $this->getRelativePath()); $pathParts = explode('/', $this->getRelativePath());
// add the module to the breadcrumb trail. // add the module to the breadcrumb trail.
@ -165,7 +166,7 @@ class DocumentationPage extends ViewableData {
* @param Boolean Absolute URL (incl. domain), or relative to webroot * @param Boolean Absolute URL (incl. domain), or relative to webroot
* @return string * @return string
*/ */
function getLink($absolute=true) { public function getLink($absolute = true) {
if($entity = $this->getEntity()) { if($entity = $this->getEntity()) {
$link = $this->getRelativeLink(); $link = $this->getRelativeLink();
$link = rtrim(DocumentationService::trim_extension_off($link), '/'); $link = rtrim(DocumentationService::trim_extension_off($link), '/');
@ -194,7 +195,7 @@ class DocumentationPage extends ViewableData {
* *
* @return string * @return string
*/ */
function getRelativeLink() { public function getRelativeLink() {
$link = rtrim(DocumentationService::trim_extension_off($this->getRelativePath()), '/'); $link = rtrim(DocumentationService::trim_extension_off($this->getRelativePath()), '/');
// folders should have a / on them. Looks nicer // folders should have a / on them. Looks nicer
@ -242,26 +243,27 @@ class DocumentationPage extends ViewableData {
/** /**
* @return string * @return string
*/ */
function getFilename() { public function getFilename() {
$path = rtrim($this->relativePath, '/'); $path = rtrim($this->relativePath, '/');
try { try {
return (is_dir($this->getPath())) ? $path . '/' : $path; return (is_dir($this->getPath())) ? $path . '/' : $path;
} }
catch (Exception $e) {} catch (Exception $e) {
}
return $path; return $path;
} }
/** /**
* Return the raw markdown for a given documentation page. Will throw * Return the raw markdown for a given documentation page.
* an error if the path isn't a file.
* *
* Will return empty if the type is not readable * @param boolean $removeMetaData
* *
* @return string * @return string
*/ */
function getMarkdown($removeMetaData = false) { public function getMarkdown($removeMetaData = false) {
try { try {
$path = $this->getPath(true); $path = $this->getPath(true);
@ -282,13 +284,13 @@ class DocumentationPage extends ViewableData {
} }
/** /**
* Parse a file (with a lang and a version). * Parse a file and return the parsed HTML version.
* *
* @param string $baselink * @param string $baselink
* *
* @return string * @return string
*/ */
function getHTML($version, $lang = 'en') { public function getHTML($version, $lang = 'en') {
return DocumentationParser::parse($this, $this->entity->getRelativeLink($version, $lang)); return DocumentationParser::parse($this, $this->entity->getRelativeLink($version, $lang));
} }
@ -329,4 +331,24 @@ class DocumentationPage extends ViewableData {
} }
} }
} }
/**
* Returns the next page. Either retrieves the sibling of the current page
* or return the next sibling of the parent page.
*
* @return DocumentationPage
*/
public function getNextPage() {
}
/**
* Returns the previous page. Either returns the previous sibling or the
* parent of this page
*
* @return DocumentationPage
*/
public function getPreviousPage() {
}
} }

View File

@ -60,7 +60,7 @@ class RebuildLuceneDocsIndex extends BuildTask {
} }
// includes registration // includes registration
$pages = DocumentationSearch::get_all_documentation_pages(); $pages = DocumentationHelper::get_all_documentation_pages();
if($pages) { if($pages) {
$count = 0; $count = 0;
@ -91,8 +91,13 @@ class RebuildLuceneDocsIndex extends BuildTask {
// custom boosts // custom boosts
$titleField->boost = 3; $titleField->boost = 3;
$breadcrumbField->boost = 1.5; $breadcrumbField->boost = 1.5;
foreach(DocumentationSearch::$boost_by_path as $pathExpr => $boost) {
if(preg_match($pathExpr, $page->getRelativePath())) $doc->boost = $boost; $boost = Config::inst()->get('DocumentationSearch', 'boost_by_path');
foreach($boost as $pathExpr => $boost) {
if(preg_match($pathExpr, $page->getRelativePath())) {
$doc->boost = $boost;
}
} }
$index->addDocument($doc); $index->addDocument($doc);

View File

@ -1,1021 +0,0 @@
/**
* Documentation Viewer Styles.
*
* Vertical grid = 7px
*/
/*! reset */
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td {
margin:0;
padding:0;
}
/*! core */
html {
background: #eff1f2;
font: 14px/21px Helvetica, arial, sans-serif;
color: #444;
}
img {
border: none;
}
/*! helpers */
.clear {
clear: both;
display: block;
overflow: hidden;
visibility: hidden;
width: 0;
height: 0;
}
.clearfix:after {
clear: both;
content:' ';
display: block;
font-size: 0;
line-height: 0;
visibility: hidden;
width: 0;
height: 0
}
* html .clearfix,
*:first-child+html .clearfix{
zoom: 1;
}
/*! core */
body {
font: 14px/21px Helvetica, Arial,sans-serif;
color: #444;
}
/*! typography */
a {
color: #1389ce;
text-decoration: none;
}
a:hover,
a:focus {
text-decoration: underline;
}
p {
font-size: 14px;
line-height: 21px;
margin-bottom: 14px;
}
ul { margin: 14px 0 21px 20px; }
li, dd {
font-size: 12px; line-height: 21px;
}
li {
list-style-position: inside;
}
li ul,
li ol {
margin: 0 0 7px 20px;
}
dl { margin: 7px 0 21px 0; }
dt { font-weight: bold; }
dd { margin: 7px 0 7px 20px; }
h1 {
font-size: 32px;
line-height: 35px;
margin-bottom: 14px;
color: #111;
letter-spacing: -1px;
}
h1 + p {
font-size: 18px;
line-height: 21px;
}
h2 {
font-size: 24px;
line-height: 28px;
margin: 21px 0 7px;
color: #111;
}
h3 {
font-size: 18px;
line-height: 21px;
margin: 21px 0 7px;
color: #111;
}
h4 {
font-size: 16px;
margin-bottom: 14px;
line-height: 21px;
}
h5 {
font-size: 14px;
line-height: 14px;
margin-bottom: 7px;
}
h6 {
font-size: 12px;
line-height: 14px;
margin-bottom: 7px;
}
h1 .heading-anchor-link,
h2 .heading-anchor-link,
h3 .heading-anchor-link,
h4 .heading-anchor-link,
h5 .heading-anchor-link,
h6 .heading-anchor-link {
display: none;
color: #fff;
text-decoration: none;
}
h1.hover .heading-anchor-link,
h2.hover .heading-anchor-link,
h3.hover .heading-anchor-link,
h4.hover .heading-anchor-link,
h5.hover .heading-anchor-link,
h6.hover .heading-anchor-link {
display: inline;
}
.heading-anchor-link:hover {
color: #aaa;
}
img {
max-width: 100%;
border: none;
}
pre {
margin: 7px 0 21px;
font: 11px/14px 'Bitstream Vera Sans Mono',Monaco, 'Courier New', monospace;
background: #F9FAF4;
border: 1px solid #ddd;
padding: 6px;
overflow-x: scroll;
color: #444;
}
pre code {
background: none;
}
code {
background: none repeat scroll 0 0 #F9FAF4;
font: 11px/14px Monaco, 'Bitstream Vera Sans Mono', Courier, monospace;
}
code a {
color: #444;
}
/* Quotes */
blockquote {
margin: 28px 0; padding: 14px 14px 0 38px;
background: #f8f9fa url(../../docsviewer/images/quote.gif) no-repeat 9px 18px;
overflow: hidden;
}
blockquote h1,
blockquote h2,
blockquote h3,
blockquote h4,
blockquote h5,
blockquote h6 { font-style: italic; color: #627871; }
blockquote h4 { font-size: 18px; }
blockquote p { font-style: italic; font-size: 14px; color: #667D76; }
/* Tables */
table {
border-collapse: collapse;
width: 100%;
background-color: #fafafa;
margin-bottom: 28px;
border: 1px solid #c3cdca;
}
table tr:nth-child(even) {
background: #eef4f6;
}
table caption {
text-align: left;
font-weight: bold;
font-size: 18px;
line-height: 21px;
}
table thead {
background: #fafafa;
}
table thead th {
padding: 7px 10px 6px;
font-size: 12px;
text-align: left;
border-right: 1px solid #c3cdca;
}
table tbody tr {
border-top: 1px solid #c3cdca;
}
table td {
font-size: 12px;
line-height: 21px;
padding: 7px;
border-right: 1px solid #c3cdca;
}
/* Forms */
fieldset { border: none; }
/* Container */
#container {
margin: 28px auto 21px auto; padding: 14px 20px;
background: #fff;
overflow: hidden;
-webkit-box-shadow: 0 0 15px #e0e3e4;
-moz-box-shadow: 0 0 15px #e0e3e4;
box-shadow: 0 0 15px #e0e3e4;
-moz-border-radius: 4px;
border-radius: 4px;
}
/* Header */
#header {
}
#header h1 {
margin-bottom: 0px;
}
#header h1 a {
text-decoration: none; letter-spacing: -1px;
}
/* Language Bar */
#language { position: absolute; top: 12px; left: 50%; margin-left: -480px; width: 960px; }
#language label { float: left; width: 830px; line-height: 19px; text-align: right; font-size: 11px; color: #999;}
#language select { float: right; width: 120px;}
#language input.action { float: right; margin-top: 4px;}
/* Footer */
#footer {
margin: 21px auto;
}
#footer p {
font-size: 11px; line-height: 21px; color: #798D85;
}
#footer p a { color: #798D85;}
/* module and version selection */
#top-nav { float: left; }
/* Search */
#search { float: right; }
#search label { display: none; }
/* Breadcrumbs */
.doc-breadcrumbs { }
.doc-breadcrumbs p {
font-size: 11px;
margin: 0;
color: #999;
}
.doc-breadcrumbs p a {
color: #999;
}
/* Content */
#layout { }
#content { }
/* Versions */
.documentation-nav {
clear: both;
padding: 7px 0 0;
overflow: hidden; color: #999;
font-size: 11px;
line-height: 20px;
}
.documentation-nav h2 {
font-size: 11px;
font-weight: normal;
float: left;
margin: 0 5px 0 0;
color: #999;
line-height: 20px;
}
.documentation-nav ul {
margin: 0; padding: 0; float: left;
}
.documentation-nav li {
display: inline; list-style: none;
padding: 0; margin: 0;
font-size: 11px;
}
.documentation-nav li a {
margin-left: 5px; padding: 0px;
}
.documentation-nav li a.current {
background: #0973A6; color: #fff;
font-weight: bold;
padding: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.documentation-nav li a.current:hover,
.documentation-nav li a.current:focus {
text-decoration: none;
}
/* Links to API */
#left-column a[href^="http://api."] {
padding: 2px;
font-family: Monaco, 'Bitstream Vera Sans Mono', Courier, monospace;
background: url(../../ssorgsites/images/external_link.png) no-repeat right 3px;
padding-right: 14px;
}
#content-column {
}
#sidebar-column {
}
#sidebar-column .box {
margin: 0 12px 12px 0;
}
/* Nested tree */
.box ul.tree {}
.box ul.tree li {
list-style: none;
}
.box ul.tree li.folder {
background: #d5eefd;
font-size: 12px;
color: #29688c;
margin-bottom: 9px;
border: 1px solid #d5eefd;
padding: 2px 6px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
}
.undocumented-modules {
clear: both;
padding-top: 10px;
font-style: italic;
}
.module { margin: 10px 0; }
/**
* TOC
*/
.sidebar-box {
margin: 0 0 11px 0;
padding: 7px 15px;
background: #f6fbfe;
border: 1px solid #DDE8ED;
-moz-border-radius: 4px;
border-radius: 4px;
}
.sidebar-box ul {
margin: 0; padding: 0;
}
.sidebar-box h4 {
font-size: 12px;
margin: 0;
}
.sidebar-box ul li { list-style: none; }
.sidebar-box ul li .current { font-weight: bold;}
.sidebar-box ul li.h1 { margin-top: 11px; font-weight: bold;}
.sidebar-box ul li.h2,
.sidebar-box ul ul { margin-top: 8px;}
.sidebar-box ul li li { font-size: 11px; margin-left: 10px;}
.sidebar-box ul li.h3,
.sidebar-box ul li li li { margin-left: 20px; font-size: 10px; margin-left: 20px;}
.sidebar-box ul li.h4,
.sidebar-box ul li li li li { margin-right: 30px; font-size: 10px; margin-left: 20px; }
/* Code styles - each site should have syntaxhighlighter installed for
code blocks */
.syntaxhighlighter { padding: 9px 0; }
#edit-link {
margin: 7px 0;
}
#edit-link p {
margin: 0;
overflow: hidden;
}
#edit-link a {
display: block;
background: #fafafa; /* Old browsers */
background: -moz-linear-gradient(top, #fafafa 1%, #e6e6e6 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(1%,#fafafa), color-stop(100%,#e6e6e6)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #fafafa 1%,#e6e6e6 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #fafafa 1%,#e6e6e6 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #fafafa 1%,#e6e6e6 100%); /* IE10+ */
background: linear-gradient(to bottom, #fafafa 1%,#e6e6e6 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fafafa', endColorstr='#e6e6e6',GradientType=0 ); /* IE6-9 */
border: 1px solid #d4d4d4;
border-bottom-color: #bcbcbc;
text-shadow: 0 1px 0 #fff;
color: #333;
font-weight: bold;
margin-bottom: 5px;
text-decoration: none;
padding: 5px 10px;
-moz-border-radius: 3px;
border-radius: 3px;
float: left;
}
#edit-link a:hover,
#edit-link a:focus {
color: #fff;
text-shadow: 0 -1px 1px #3072B3;
border-color: #518CC6;
background: #599BDC;
background: -moz-linear-gradient(top, #599BDC 1%, #3072B3 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(1%,#3072B3), color-stop(100%,#3072B3)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #599BDC 1%,#3072B3 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #599BDC 1%,#3072B3 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #599BDC 1%,#3072B3 100%); /* IE10+ */
background: linear-gradient(to bottom, #599BDC 1%,#3072B3 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#599BDC', endColorstr='#3072B3',GradientType=0 ); /* IE6-9 */
}
/* contains the arrow that marks a folder */
span.is-folder {float: right;}
#table-of-contents {
margin: 0 0 10px 0;
padding: 6px 6px 6px 10px;
background: #f6fbfe;
border: 1px solid #DDE8ED;
-moz-border-radius: 4px;
border-radius: 4px;
cursor: pointer;
margin-bottom: 21px;
}
#table-of-contents h4 {
font-size: 12px;
margin: 0;
padding: 0;
}
#table-of-contents h4 span.updown {
color: #a2c1d0;
margin-left: 6px;
font-size: 10px;
}
#table-of-contents h4:hover {
opacity: 0.8;
}
#table-of-contents ul {
margin: 0;
padding: 0;
}
#table-of-contents li {
line-height: 14px;
padding: 0;
list-style: none;
margin: 0;
line-height: 20px;
}
#table-of-contents li.H2 { padding-left:20px; }
#table-of-contents li.H3 { padding-left:40px; }
#table-of-contents li.H4 { padding-left:60px; }
#table-of-contents li.H5 { padding-left:80px; }
#table-of-contents li.H6 { padding-left:100px; }
#table-of-contents li li {
padding-left: 20px;
}
#table-of-contents a,
#table-of-contents a:visited {
color: #1389ce;
text-decoration: none;
}
#table-of-contents a:hover,
#table-of-contents a:focus {
text-decoration: underline;
color: #1389ce;
}
/* some settings adapted from themes/ssorgsites/css/core.css */
#sidebar-column a {
padding: 2px 10px;
}
#sidebar-column a:hover,
#sidebar-column a:focus,
#sidebar-column a:visited {
text-decoration: none;
color: #1389ce;
}
/* Container */
#container {
margin: 18px auto;
padding: 17px 1.25%;
background: #fff;
overflow: hidden;
border: 1px solid #dfdfdf;
-webkit-box-shadow: 0 0 20px #e8ebed;
-moz-box-shadow: 0 0 20px #e8ebed;
box-shadow: 0 0 20px #e8ebed;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
position: relative;
}
.container {
max-width: 960px;
margin: auto;
}
#content-column {
width: 72.5%;
float: right;
border-left: 1px solid #efefef;
padding-left: 2.5%;
}
#content-column.full-width,
.full-width#content-column {
width: 100%;
float: none;
border: none;
}
#content-column img {
max-width: 90%;
border: 1px solid #ccc;
box-shadow: 0 0 6px #ddd;
padding: 6px;
margin: 7px 0;
border-radius: 3px;
}
#sidebar-column {
width: 22.5%;
float: left;
}
/* Header */
#header {
padding: 0 0 14px 0;
overflow: hidden;
}
#header h1 {
margin: 0;
line-height: 38px;
float: left;
}
#header h1 a {
text-decoration: none;
font-size: 22px;
color: #0973A6;
letter-spacing: -1px;
}
#header .logo {
background: #fff url(../../docsviewer/images/logo.jpg) no-repeat bottom left;
height: 36px; width: 140px;
display: inline-block;
}
/* Breadcrumbs */
#breadcrumbs {
float: left;
}
#breadcrumbs p {
font-size: 11px; margin: 0; color: #798D85;
}
/* Search */
#search-bar {
border-top: 1px solid #E6EBE9;
border-bottom: 1px solid #E6EBE9;
margin-bottom: 21px;
padding: 6px 10px;
overflow: hidden;
}
#search {
float: right;
width: 252px;
margin-top: 6px;
position: relative;
}
#search label {
float: left;
font-size: 11px;
color: #999;
margin: 3px;
}
#search input.text {
float: right; width: 170px; height: 22px;
background: url(../../docsviewer/images/search.png) top left no-repeat;
font-size: 11px;
color: #495C56;
outline: none;
padding-left: 10px;
border: none;
}
#search fieldset {
width: 230px;
float: left;
}
#search input.action {
position: absolute;
top: 0; right: 0;
width: 22px; height: 22px;
border: none;
text-indent: 99999px;
cursor: pointer;
background: url(../../docsviewer/images/search.png) top right no-repeat;
}
/* Search Results */
#search-results {}
#search-results li {
list-style: none; border-bottom: 1px solid #ddd; padding: 0 0 17px 0; margin: 0 0 17px 0;
background: none;
}
/* Sidebar menu */
#sidebar-column .sidebar-box {
margin: 0 0 18px 0;
padding: 4.75%;
background: #f6fbfe;
border: 1px solid #DDE8ED;
-moz-border-radius: 4px;
border-radius: 4px;
}
#sidebar-column .sidebar-box ul {
margin: 0; padding: 0;
}
#sidebar-column .sidebar-box li {
list-style: none;
padding: 0; margin: 0;
}
#sidebar-column .sidebar-box li a:hover,
#sidebar-column .sidebar-box li a:focus,
#sidebar-column .sidebar-box li a.current,
#sidebar-column .sidebar-box li a.section {
background: #0973A6;
color: #fff;
}
#sidebar-column .sidebar-box li .current {
font-weight: bold;
}
#sidebar-column a {
display: block;
padding: 4px 8px 2px;
border-bottom: 1px solid #efefef;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
#sidebar-column a:hover,
#sidebar-column a:focus {
text-decoration: none;
}
#sidebar-column .sidebar-box li.h1 { font-weight: bold;}
#sidebar-column .sidebar-box li.h2,
#sidebar-column .sidebar-box li.h3,
#sidebar-column .sidebar-box li.h4,
#sidebar-column .sidebar-box ul#toc ul { margin: 0 0 0 9px; }
#sidebar-column .sidebar-box ul ul { margin: 0 0 9px 18px; }
#sidebar-column .sidebar-box li li {
font-size: 11px;
border-bottom: none;
}
#sidebar-column .sidebar-box li li a,
#sidebar-column .sidebar-box ul#toc li a {
border: none;
-webkit-border-radius: none;
-moz-border-radius: none;
border-radius: none;
font-size: 11px;
padding: 2px 0;
}
#sidebar-column .sidebar-box li li a:hover,
#sidebar-column .sidebar-box li li a:focus,
#sidebar-column .sidebar-box ul#toc li a:hover,
#sidebar-column .sidebar-box ul#toc li a:focus {
background: none;
color: #667D76;
text-decoration: underline;
}
#sidebar-column .sidebar-box li li a.current,
#sidebar-column .sidebar-box li li a.section,
#sidebar-column .sidebar-box ul#toc li a.current,
#sidebar-column .sidebar-box ul#toc li a.section {
background: none;
color: #333;
}
#sidebar-column .sidebar-box li li li li { margin: 0 0 0 20px; }
#sidebar-column .sidebar-box label.left {
font-weight: bold;
}
#sidebar-column .sidebar-box form li {
list-style: none;
}
#sidebar-column .sidebar-box form li label {
cursor: pointer;
}
#sidebar-column .sidebar-box .field {
border-bottom: 1px solid #ddd;
padding-bottom: 8px;
margin-bottom: 9px;
}
#sidebar-column .sidebar-box input.text {
padding: 3px 3px 4px 3px;
}
/* Footer */
#footer {
padding: 21px 1.25%;
max-width: 960px;
}
#footer p { font-size: 11px; line-height: 18px; color: #798D85;}
#footer p a { color: #798D85; text-decoration: underline; }
#footer .cc-logo { float: right; }
/**
* Pagination Styles
*/
#page-numbers span,
#page-numbers a {
padding: 3px 5px;
}
#page-numbers span {
background-color: #ACD5CA;
}
#page-numbers a:hover {
color: #FFFFFF;
background-color: #005F99;
}
ul.pagination {
margin: 27px 0;
}
ul.pagination li {
display: inline;
background: none;
padding: 0 4px 0 0;
}
.pagination li strong, .pagination li a {
padding: 1px 4px;
}
.pagination li.active strong {
background-color: #c3dbd4;
}
.pagination li a:hover {
background-color: #0973A6;
color: #fff;
text-decoration: none;
}
/* Messages */
/**
* Example:
* <div class="info">
* <h5>This is a info message</h5>
* <p>Body text</p>
* <a href="#" class="close" title="Close notification">close</a>
* </div>
*/
#content .warningBox h5,
#content .hint h5,
#content .notice h5,
#content .warning h5,
#content .info h5 {
margin-bottom: 0px;
}
.hint a.close,
.notice a.close,
.warning a.close,
.info a.close {
background:url(../../docsviewer/images/ico_close_off.png) no-repeat scroll left top transparent;
display:block;
font-size:0;
height:11px;
position:absolute;
right:3px;
text-indent:-9999px;
top:3px;
width:11px;
}
.hint,
.note {
border: 1px dotted #a5b5b0;
padding: 13px 10px 0px 60px;
clear: both;
margin: 9px 0 18px;
background: #f9fafa url(../../docsviewer/images/lightbulb.png) no-repeat 21px 14px;
}
.typography .note h3,
.typography .hint h3 {
line-height: 27px;
}
.pageSkip {
background-color: #f9fafa;
border: 1px solid #a5b5b0;
padding: 8px 10px 8px 10px;
text-align: center;
margin: 9px 0 18px;
}
.notice {
border: 1px solid #D3C200;
padding: 13px 10px 0px 60px;
margin: 9px 0 18px;
position: relative;
background: #FFFAC6 url(../../docsviewer/images/notification.png) no-repeat 18px 11px;
}
p.notice {
padding-bottom: 18px;
}
.warning {
border: 1px solid #f8c3cd;
padding: 13px 10px 13px 60px;
clear: both;
margin: 7px 0 21px;
position: relative;
background: #fdf1f3 url(../../docsviewer/images/error_button.png) no-repeat 18px 11px;
}
.info {
border: 1px solid #6baad8;
padding: 13px 10px 0px 60px;
clear: both;
margin: 9px 0 18px;
position: relative;
background: #f7fcff url(../../docsviewer/images/info_button.png) no-repeat 18px 11px;
}
.warning p {
margin-bottom: 0;
}
/* Used on 404 page not found */
.warningBox { margin:9px 0 18px; }
#content .warningBox p {
margin: 0;
}
.warningBoxTop {
background-color: #F9FAFA;
border: 1px solid #d3d9dc;
padding: 13px 9px 13px 66px;
background: #F9FAFA url(../../docsviewer/images/warning.png) no-repeat 18px 14px;
}
#content .warningBoxTop h1 {
font-size: 27px; margin-bottom: 0; letter-spacing: 0;
}
#content .warningBoxTop ul {
margin: 9px 0 18px;
}
#content .warningBoxTop li {
margin-bottom: 4px;
}
#content .warningBoxBottom {
background-color: #0973A6;
padding: 12px 0 16px;
}
#content .warningBoxBottom a { color: #fff; }
#content .warningBoxBottom a:hover { color: #f3fbfe; }
#content .warningBoxBottom ul { margin: 0 0 0 40px; }
#content .warningBoxBottom li { background: none; margin-bottom: 0; }
/* Comments */
#comments {
clear: both;
padding-top: 18px;
}
#comments .notice {
font-size: 12px;
}
/* Icons */
.typography a[href$=".pdf"],
.typography a[href$=".PDF"],
.typography a.pdf {
padding: 2px; padding-left: 20px;
background: url(../../docsviewer/images/icons/page_white_acrobat.png) no-repeat left center; }
.typography a[href$=".doc"],
.typography a[href$=".DOC"],
.typography a.doc {
padding: 2px; padding-left: 20px;
background: url(../../docsviewer/images/icons/page_word.png) no-repeat left center; }
.typography a[href$=".xls"],
.typography a[href$=".XLS"],
.typography a.xls {
padding: 2px; padding-left: 20px;
background: url(../../docsviewer/images/icons/page_excel.png) no-repeat left center;
}
.typography a[href$=".gz"],
.typography a[href$=".GZ"],
.typography a[href$=".gzip"],
.typography a[href$=".GZIP"],
.typography a[href$=".zip"],
.typography a[href$=".ZIP"],
.typography a.archive {
padding: 2px; padding-left: 20px;
background: url(../../docsviewer/images/icons/page_white_zip.png) no-repeat left center;
}
.typography a[href$=".exe"],
.typography a[href$=".EXE"],
.typography a.application {
padding: 2px; padding-left: 20px; background: url(../../docsviewer/images/icons/application.png) no-repeat left center;
}
@media screen and (max-width: 540px) {
#content-column {
width: 100%;
padding: 0;
}
#container {
padding: 15px;
}
#sidebar-column {
width: 100%;
}
#sidebar-column .sidebar-box {
padding: 10px;
}
#footer {
padding: 20px;
}
.pinned { position: absolute; left: 0; top: 0; background: #fff; width: 35%; overflow: hidden; overflow-x: scroll; border-right: 1px solid #ccc; border-left: 1px solid #ccc; }
.pinned table { border-right: none; border-left: none; width: 100%; }
.pinned table th, .pinned table td { white-space: nowrap; }
.pinned td:last-child { border-bottom: 0; }
div.table-wrapper { position: relative; margin-bottom: 20px; overflow: hidden; border-right: 1px solid #ccc; }
div.table-wrapper div.scrollable table { margin-left: 35%; }
div.table-wrapper div.scrollable { overflow: scroll; overflow-y: hidden; }
table td, table th { position: relative; white-space: nowrap; overflow: hidden; }
table th:first-child, table td:first-child, table td:first-child, .pinned table td { display: none; }
.pinned table td:first-child,
.pinned table th:first-child { display: block; }
}

3
css/forms.css Normal file
View File

@ -0,0 +1,3 @@
fieldset {
border: none;
}

364
css/layout.css Normal file
View File

@ -0,0 +1,364 @@
html {
background: #f0f0f0;
font: 14px/20px Helvetica Neue, Helvetica, arial, sans-serif;
color: #334348;
padding-bottom: 40px;
-webkit-font-smoothing: antialiased;
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
/*! container */
.wrapper {
margin: 20px auto;
max-width: 1020px;
width: 100%;
}
.box {
background: #fff;
border: 1px solid;
border-color: #e5e6e9 #dfe0e4 #d0d1d5;
-webkit-box-shadow: 0 1px 3px #e0e3e4;
-moz-box-shadow: 0 1px 3px #e0e3e4;
box-shadow: 0 1px 3px #e0e3e4;
border-radius: 3px;
}
/*! main content column */
#content {
float: right;
width: 72%;
}
#content .box {
padding: 30px;
}
/*! sidebar */
#sidebar {
width: 25%;
float: left;
}
#sidebar .nav {
margin: 0;
padding: 0;
list-style: none;
}
#sidebar .nav .top {
width: 100%;
display: block;
font-size: 14px;
line-height: 15px;
color: #181C17;
border-bottom: 1px solid #eee;
padding: 15px 15px 14px;
}
#layout {
padding-bottom: 20px;
}
/*! language */
#language {
position: absolute;
top: 12px;
left: 50%;
margin-left: -480px;
width: 960px;
}
#language label {
float: left;
width: 830px;
line-height: 19px;
text-align: right;
font-size: 11px;
color: #999;
}
#language select {
float: right;
width: 120px;
}
#language input.action {
float: right;
margin-top: 4px;
}
/* Header */
#header {
padding: 0 0 14px 0;
overflow: hidden;
}
#header h1 {
margin: 0;
line-height: 38px;
float: left;
}
#header h1 a {
text-decoration: none;
font-size: 22px;
color: #0973A6;
letter-spacing: -1px;
}
#header .logo {
background: #fff url(../../docsviewer/images/logo.jpg) no-repeat bottom left;
height: 36px; width: 140px;
display: inline-block;
}
/* Breadcrumbs */
#breadcrumbs {
float: left;
}
#breadcrumbs p {
font-size: 11px; margin: 0; color: #798D85;
}
/* Search Results */
#search-results {
}
#search-results li {
list-style: none;
border-bottom: 1px solid #ddd;
padding: 0 0 19px 0;
margin: 0 0 20px 0;
background: none;
}
/* Comments */
#comments {
clear: both;
padding-top: 18px;
}
#comments .notice {
font-size: 12px;
}
/* Footer */
#footer {
margin: 20px auto;
padding: 0 30px;
}
#footer p {
color: #798D85;
}
#footer p a {
color: #798D85;
}
/*! Pagination */
#page-numbers span,
#page-numbers a {
padding: 3px 5px;
}
#page-numbers span {
background-color: #ACD5CA;
}
#page-numbers a:hover {
color: #FFFFFF;
background-color: #005F99;
}
.pagination {
margin: 27px 0;
}
.pagination li {
display: inline;
background: none;
padding: 0 4px 0 0;
}
.pagination li strong, .pagination li a {
padding: 1px 4px;
}
.pagination li.active strong {
background-color: #c3dbd4;
}
.pagination li a:hover {
background-color: #0973A6;
color: #fff;
text-decoration: none;
}
/* Table of contents */
#table-of-contents {
margin: 0 0 10px 0;
padding: 6px 6px 6px 10px;
background: #f6fbfe;
border: 1px solid #DDE8ED;
-moz-border-radius: 4px;
border-radius: 4px;
cursor: pointer;
margin-bottom: 21px;
}
#table-of-contents h4 {
font-size: 12px;
margin: 0;
padding: 0;
}
#table-of-contents h4 span.updown {
color: #a2c1d0;
margin-left: 6px;
font-size: 10px;
}
#table-of-contents h4:hover {
opacity: 0.8;
}
#table-of-contents ul {
margin: 0;
padding: 0;
}
#table-of-contents li {
line-height: 14px;
padding: 0;
list-style: none;
margin: 0;
line-height: 20px;
}
#table-of-contents li.H2 { padding-left:20px; }
#table-of-contents li.H3 { padding-left:40px; }
#table-of-contents li.H4 { padding-left:60px; }
#table-of-contents li.H5 { padding-left:80px; }
#table-of-contents li.H6 { padding-left:100px; }
#table-of-contents li li {
padding-left: 20px;
}
#table-of-contents a,
#table-of-contents a:visited {
color: #1389ce;
text-decoration: none;
}
#table-of-contents a:hover,
#table-of-contents a:focus {
text-decoration: underline;
color: #1389ce;
}
/*! Messages */
/**
* Example:
* <div class="info">
* <h5>This is a info message</h5>
* <p>Body text</p>
* <a href="#" class="close" title="Close notification">close</a>
* </div>
*/
#content .warningBox h5,
#content .hint h5,
#content .notice h5,
#content .warning h5,
#content .info h5 {
margin-bottom: 0px;
}
.hint a.close,
.notice a.close,
.warning a.close,
.info a.close {
background:url(../../docsviewer/images/ico_close_off.png) no-repeat scroll left top transparent;
display:block;
font-size:0;
height:11px;
position:absolute;
right:3px;
text-indent:-9999px;
top:3px;
width:11px;
}
.hint,
.note {
border: 1px dotted #a5b5b0;
padding: 13px 10px 0px 60px;
clear: both;
margin: 9px 0 18px;
background: #f9fafa url(../../docsviewer/images/lightbulb.png) no-repeat 21px 14px;
}
.typography .note h3,
.typography .hint h3 {
line-height: 27px;
}
.pageSkip {
background-color: #f9fafa;
border: 1px solid #a5b5b0;
padding: 8px 10px 8px 10px;
text-align: center;
margin: 9px 0 18px;
}
.notice {
border: 1px solid #D3C200;
padding: 13px 10px 0px 60px;
margin: 9px 0 18px;
position: relative;
background: #FFFAC6 url(../../docsviewer/images/notification.png) no-repeat 18px 11px;
}
p.notice {
padding-bottom: 18px;
}
.warning {
border: 1px solid #f8c3cd;
padding: 13px 10px 13px 60px;
clear: both;
margin: 7px 0 21px;
position: relative;
background: #fdf1f3 url(../../docsviewer/images/error_button.png) no-repeat 18px 11px;
}
.info {
border: 1px solid #6baad8;
padding: 13px 10px 0px 60px;
clear: both;
margin: 9px 0 18px;
position: relative;
background: #f7fcff url(../../docsviewer/images/info_button.png) no-repeat 18px 11px;
}
.warning p {
margin-bottom: 0;
}
/* Used on 404 page not found */
.warningBox { margin:9px 0 18px; }
#content .warningBox p {
margin: 0;
}
.warningBoxTop {
background-color: #F9FAFA;
border: 1px solid #d3d9dc;
padding: 13px 9px 13px 66px;
background: #F9FAFA url(../../docsviewer/images/warning.png) no-repeat 18px 14px;
}
#content .warningBoxTop h1 {
font-size: 27px; margin-bottom: 0; letter-spacing: 0;
}
#content .warningBoxTop ul {
margin: 9px 0 18px;
}
#content .warningBoxTop li {
margin-bottom: 4px;
}
#content .warningBoxBottom {
background-color: #0973A6;
padding: 12px 0 16px;
}
#content .warningBoxBottom a { color: #fff; }
#content .warningBoxBottom a:hover { color: #f3fbfe; }
#content .warningBoxBottom ul { margin: 0 0 0 40px; }
#content .warningBoxBottom li { background: none; margin-bottom: 0; }

425
css/normalize.css vendored Normal file
View File

@ -0,0 +1,425 @@
/*! normalize.css v3.0.1 | MIT License | git.io/normalize */
/**
* 1. Set default font family to sans-serif.
* 2. Prevent iOS text size adjust after orientation change, without disabling
* user zoom.
*/
html {
font-family: sans-serif; /* 1 */
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/**
* Remove default margin.
*/
body {
margin: 0;
}
/* HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined for any HTML5 element in IE 8/9.
* Correct `block` display not defined for `details` or `summary` in IE 10/11 and Firefox.
* Correct `block` display not defined for `main` in IE 11.
*/
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section,
summary {
display: block;
}
/**
* 1. Correct `inline-block` display not defined in IE 8/9.
* 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
*/
audio,
canvas,
progress,
video {
display: inline-block; /* 1 */
vertical-align: baseline; /* 2 */
}
/**
* Prevent modern browsers from displaying `audio` without controls.
* Remove excess height in iOS 5 devices.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Address `[hidden]` styling not present in IE 8/9/10.
* Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
*/
[hidden],
template {
display: none;
}
/* Links
========================================================================== */
/**
* Remove the gray background color from active links in IE 10.
*/
a {
background: transparent;
}
/**
* Improve readability when focused and also mouse hovered in all browsers.
*/
a:active,
a:hover {
outline: 0;
}
/* Text-level semantics
========================================================================== */
/**
* Address styling not present in IE 8/9/10/11, Safari, and Chrome.
*/
abbr[title] {
border-bottom: 1px dotted;
}
/**
* Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
*/
b,
strong {
font-weight: bold;
}
/**
* Address styling not present in Safari and Chrome.
*/
dfn {
font-style: italic;
}
/**
* Address variable `h1` font-size and margin within `section` and `article`
* contexts in Firefox 4+, Safari, and Chrome.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/**
* Address styling not present in IE 8/9.
*/
mark {
background: #ff0;
color: #000;
}
/**
* Address inconsistent and variable font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
/* Embedded content
========================================================================== */
/**
* Remove border when inside `a` element in IE 8/9/10.
*/
img {
border: 0;
}
/**
* Correct overflow not hidden in IE 9/10/11.
*/
svg:not(:root) {
overflow: hidden;
}
/* Grouping content
========================================================================== */
/**
* Address margin not present in IE 8/9 and Safari.
*/
figure {
margin: 1em 40px;
}
/**
* Address differences between Firefox and other browsers.
*/
hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
/**
* Contain overflow in all browsers.
*/
pre {
overflow: auto;
}
/**
* Address odd `em`-unit font size rendering in all browsers.
*/
code,
kbd,
pre,
samp {
font-family: monospace, monospace;
font-size: 1em;
}
/* Forms
========================================================================== */
/**
* Known limitation: by default, Chrome and Safari on OS X allow very limited
* styling of `select`, unless a `border` property is set.
*/
/**
* 1. Correct color not being inherited.
* Known issue: affects color of disabled elements.
* 2. Correct font properties not being inherited.
* 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
*/
button,
input,
optgroup,
select,
textarea {
color: inherit; /* 1 */
font: inherit; /* 2 */
margin: 0; /* 3 */
}
/**
* Address `overflow` set to `hidden` in IE 8/9/10/11.
*/
button {
overflow: visible;
}
/**
* Address inconsistent `text-transform` inheritance for `button` and `select`.
* All other form control elements do not inherit `text-transform` values.
* Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
* Correct `select` style inheritance in Firefox.
*/
button,
select {
text-transform: none;
}
/**
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
* and `video` controls.
* 2. Correct inability to style clickable `input` types in iOS.
* 3. Improve usability and consistency of cursor style between image-type
* `input` and others.
*/
button,
html input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; /* 2 */
cursor: pointer; /* 3 */
}
/**
* Re-set default cursor for disabled elements.
*/
button[disabled],
html input[disabled] {
cursor: default;
}
/**
* Remove inner padding and border in Firefox 4+.
*/
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
/**
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
* the UA stylesheet.
*/
input {
line-height: normal;
}
/**
* It's recommended that you don't attempt to style these elements.
* Firefox's implementation doesn't respect box-sizing, padding, or width.
*
* 1. Address box sizing set to `content-box` in IE 8/9/10.
* 2. Remove excess padding in IE 8/9/10.
*/
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Fix the cursor style for Chrome's increment/decrement buttons. For certain
* `font-size` values of the `input`, it causes the cursor style of the
* decrement button to change from `default` to `text`.
*/
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Address `appearance` set to `searchfield` in Safari and Chrome.
* 2. Address `box-sizing` set to `border-box` in Safari and Chrome
* (include `-moz` to future-proof).
*/
input[type="search"] {
-webkit-appearance: textfield; /* 1 */
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box; /* 2 */
box-sizing: content-box;
}
/**
* Remove inner padding and search cancel button in Safari and Chrome on OS X.
* Safari (but not Chrome) clips the cancel button when the search input has
* padding (and `textfield` appearance).
*/
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* Define consistent border, margin, and padding.
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/**
* 1. Correct `color` not being inherited in IE 8/9/10/11.
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
*/
legend {
border: 0; /* 1 */
padding: 0; /* 2 */
}
/**
* Remove default vertical scrollbar in IE 8/9/10/11.
*/
textarea {
overflow: auto;
}
/**
* Don't inherit the `font-weight` (applied by a rule above).
* NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
*/
optgroup {
font-weight: bold;
}
/* Tables
========================================================================== */
/**
* Remove most spacing between table cells.
*/
table {
border-collapse: collapse;
border-spacing: 0;
}
td,
th {
padding: 0;
}

View File

@ -38,13 +38,16 @@
.syntaxhighlighter { .syntaxhighlighter {
width: 100% !important; width: 100% !important;
margin: 7px 0 21px !important; margin: 20px 0 !important;
position: relative !important; position: relative !important;
overflow: auto !important; overflow: auto !important;
font-size: 11px !important; font-size: 13px !important;
line-height: 14px !important; line-height: 20px !important;
background-color: #f9faf4 !important; background-color: #f6f7f8 !important;
border: 1px solid #ddd !important; -webkit-border-radius: 3px;
border-radius: 3px;
padding: 14px 0;
border: 1px solid #e9eaed !important;
} }
.syntaxhighlighter.source { .syntaxhighlighter.source {
overflow: hidden !important; overflow: hidden !important;

36
css/small.css Normal file
View File

@ -0,0 +1,36 @@
@media screen and (max-width: 540px) {
#content-column {
width: 100%;
padding: 0;
}
#container {
padding: 15px;
}
#sidebar-column {
width: 100%;
}
#sidebar-column .sidebar-box {
padding: 10px;
}
#footer {
padding: 20px;
}
.pinned { position: absolute; left: 0; top: 0; background: #fff; width: 35%; overflow: hidden; overflow-x: scroll; border-right: 1px solid #ccc; border-left: 1px solid #ccc; }
.pinned table { border-right: none; border-left: none; width: 100%; }
.pinned table th, .pinned table td { white-space: nowrap; }
.pinned td:last-child { border-bottom: 0; }
div.table-wrapper { position: relative; margin-bottom: 20px; overflow: hidden; border-right: 1px solid #ccc; }
div.table-wrapper div.scrollable table { margin-left: 35%; }
div.table-wrapper div.scrollable { overflow: scroll; overflow-y: hidden; }
table td, table th { position: relative; white-space: nowrap; overflow: hidden; }
table th:first-child, table td:first-child, table td:first-child, .pinned table td { display: none; }
.pinned table td:first-child,
.pinned table th:first-child { display: block; }
}

315
css/typography.css Normal file
View File

@ -0,0 +1,315 @@
/*! text selection */
::-moz-selection {
background: #fff7a8;
text-shadow:none;
}
::selection {
background: #fff7a8;
text-shadow: none;
}
/*! links */
a {
color: #1389ce;
text-decoration: none;
}
a:hover,
a:focus {
text-decoration: underline;
}
a[href$=".pdf"],
a[href$=".PDF"],
a.pdf {
padding: 2px; padding-left: 20px;
background: url(../../docsviewer/images/icons/page_white_acrobat.png) no-repeat left center; }
a[href$=".doc"],
a[href$=".DOC"],
a.doc {
padding: 2px; padding-left: 20px;
background: url(../../docsviewer/images/icons/page_word.png) no-repeat left center; }
a[href$=".xls"],
a[href$=".XLS"],
a.xls {
padding: 2px; padding-left: 20px;
background: url(../../docsviewer/images/icons/page_excel.png) no-repeat left center;
}
a[href$=".gz"],
a[href$=".GZ"],
a[href$=".gzip"],
a[href$=".GZIP"],
a[href$=".zip"],
a[href$=".ZIP"],
a.archive {
padding: 2px; padding-left: 20px;
background: url(../../docsviewer/images/icons/page_white_zip.png) no-repeat left center;
}
a[href$=".exe"],
a[href$=".EXE"],
a.application {
padding: 2px; padding-left: 20px; background: url(../../docsviewer/images/icons/application.png) no-repeat left center;
}
/*! pargraphs */
p {
font-size: 14px;
line-height: 20px;
margin: 0 0 10px;
}
/*! lists */
ul {
margin: 15px 0 20px 20px;
padding: 0;
}
li, dd {
font-size: 12px;
margin: 0;
line-height: 20px;
}
li {
list-style-position: inside;
}
li ul,
li ol {
margin: 0 0 5px 20px;
}
dl {
margin: 7px 0 21px 0;
}
dt {
font-weight: bold;
}
dd {
margin: 5px 0 10px 20px;
}
/*! headers */
h1 {
font-size: 30px;
line-height: 30px;
margin-bottom: 10px;
letter-spacing: -1px;
}
h1 + p {
font-size: 18px;
line-height: 20px;
}
h2 {
font-size: 28px;
line-height: 30px;
margin: 40px 0 20px;
border-top: 1px solid #eee;
padding-top: 29px;
letter-spacing: -1px;
color: #283134;
}
h3 {
font-size: 20px;
line-height: 20px;
margin: 30px 0 10px;
color: #181c1d;
}
h4 {
font-size: 16px;
margin-bottom: 14px;
line-height: 21px;
}
h5 {
font-size: 14px;
line-height: 14px;
margin-bottom: 7px;
}
h6 {
font-size: 12px;
line-height: 15px;
margin-bottom: 10px;
}
h1 .heading-anchor-link,
h2 .heading-anchor-link,
h3 .heading-anchor-link,
h4 .heading-anchor-link,
h5 .heading-anchor-link,
h6 .heading-anchor-link {
display: none;
color: #fff;
text-decoration: none;
}
h1.hover .heading-anchor-link,
h2.hover .heading-anchor-link,
h3.hover .heading-anchor-link,
h4.hover .heading-anchor-link,
h5.hover .heading-anchor-link,
h6.hover .heading-anchor-link {
display: inline;
}
.heading-anchor-link:hover {
color: #aaa;
}
/*! images */
img {
max-width: 100%;
border: 1px solid #ccc;
box-shadow: 0 0 6px #ddd;
padding: 6px;
margin: 10px 0;
border-radius: 3px;
}
/*! code */
pre {
margin: 20px 0;
font: 13px/20px Monaco, 'Bitstream Vera Sans Mono', 'Courier New', monospace;
background-color: #f6f7f8;
border: 1px solid #e9eaed;
padding: 14px;
-webkit-border-radius: 3px;
border-radius: 3px;
overflow-x: scroll;
color: #4E5661;
}
pre code {
background: none;
}
code {
font: 11px/15px Monaco, 'Bitstream Vera Sans Mono', Courier, monospace;
}
code a {
color: #4E5661;
}
/*! quotes */
blockquote {
margin: 28px 0;
padding: 14px 14px 0 38px;
background: #f8f9fa url(../../docsviewer/images/quote.gif) no-repeat 9px 18px;
overflow: hidden;
}
blockquote h1,
blockquote h2,
blockquote h3,
blockquote h4,
blockquote h5,
blockquote h6 {
font-style: italic; color: #627871;
}
blockquote h4 {
font-size: 18px;
}
blockquote p {
font-style: italic;
font-size: 14px;
color: #667D76;
}
/*! tables */
table {
border-collapse: collapse;
width: 100%;
background-color: #fafafa;
margin-bottom: 28px;
border: 1px solid #c3cdca;
}
table tr:nth-child(even) {
background: #eef4f6;
}
table caption {
text-align: left;
font-weight: bold;
font-size: 18px;
line-height: 21px;
}
table thead {
background: #fafafa;
}
table thead th {
padding: 7px 10px 6px;
font-size: 12px;
text-align: left;
border-right: 1px solid #c3cdca;
}
table tbody tr {
border-top: 1px solid #c3cdca;
}
table td {
font-size: 12px;
line-height: 21px;
padding: 7px;
border-right: 1px solid #c3cdca;
}
/*! Edit Link */
#edit-link {
margin: 7px 0;
}
#edit-link p {
margin: 0;
overflow: hidden;
}
#edit-link a {
display: block;
background: #fafafa; /* Old browsers */
background: -moz-linear-gradient(top, #fafafa 1%, #e6e6e6 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(1%,#fafafa), color-stop(100%,#e6e6e6)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #fafafa 1%,#e6e6e6 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #fafafa 1%,#e6e6e6 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #fafafa 1%,#e6e6e6 100%); /* IE10+ */
background: linear-gradient(to bottom, #fafafa 1%,#e6e6e6 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fafafa', endColorstr='#e6e6e6',GradientType=0 ); /* IE6-9 */
border: 1px solid #d4d4d4;
border-bottom-color: #bcbcbc;
text-shadow: 0 1px 0 #fff;
color: #333;
font-weight: bold;
margin-bottom: 5px;
text-decoration: none;
padding: 5px 10px;
-moz-border-radius: 3px;
border-radius: 3px;
float: left;
}
#edit-link a:hover,
#edit-link a:focus {
color: #fff;
text-shadow: 0 -1px 1px #3072B3;
border-color: #518CC6;
background: #599BDC;
background: -moz-linear-gradient(top, #599BDC 1%, #3072B3 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(1%,#3072B3), color-stop(100%,#3072B3)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #599BDC 1%,#3072B3 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #599BDC 1%,#3072B3 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #599BDC 1%,#3072B3 100%); /* IE10+ */
background: linear-gradient(to bottom, #599BDC 1%,#3072B3 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#599BDC', endColorstr='#3072B3',GradientType=0 ); /* IE6-9 */
}

24
css/utilities.css Normal file
View File

@ -0,0 +1,24 @@
.clear {
clear: both;
display: block;
overflow: hidden;
visibility: hidden;
width: 0;
height: 0;
}
.clearfix:after {
clear: both;
content:' ';
display: block;
font-size: 0;
line-height: 0;
visibility: hidden;
width: 0;
height: 0
}
* html .clearfix,
*:first-child+html .clearfix{
zoom: 1;
}

View File

@ -4,6 +4,11 @@ This module has been developed to read and display content from markdown and
plain text files in web browser. It provides an easy way to bundle end user plain text files in web browser. It provides an easy way to bundle end user
documentation within a SilverStripe installation or module. documentation within a SilverStripe installation or module.
:::bash
$> composer require
## Setup ## Setup
The module includes the ability to read documentation from any folder on your The module includes the ability to read documentation from any folder on your

View File

@ -4,12 +4,11 @@
<head> <head>
<% base_tag %> <% base_tag %>
<meta charset="utf-8" /> <meta charset="utf-8" />
<title>SilverStripe Documentation</title> <title><% if PageTitle %>$PageTitle &#8211;<% end_if %>SilverStripe Documentation</title>
<% require css(docsviewer/css/DocumentationViewer.css) %>
</head> </head>
<body> <body>
<div id="container" class="container"> <div class="wrapper">
<div id="header"> <div id="header">
<h1><a href="$Link"><% _t('SILVERSTRIPEDOCUMENTATION', 'SilverStripe Documentation') %></a></h1> <h1><a href="$Link"><% _t('SILVERSTRIPEDOCUMENTATION', 'SilverStripe Documentation') %></a></h1>
@ -18,46 +17,28 @@
</div> </div>
</div> </div>
<div id="layout"> <div id="layout" class="clearfix">
<div id="search-bar"> <% include DocumentationSidebar %>
<div id="search"> <div id="content">
$DocumentationSearchForm
</div>
<div id="top-nav">
<% if Entities %>
<div id="entities-nav" class="documentation-nav clearfix">
<h2>Modules:</h2>
<ul>
<% loop Entities %>
<li><a href="$Link" class="$LinkingMode">$Title</a></li>
<% end_loop %>
</ul>
<div class="clear"><!-- --></div>
</div>
<% end_if %>
<% if Versions %>
<div id="versions-nav" class="documentation-nav clearfix">
<h2>Versions:</h2>
<ul>
<% loop Versions %>
<li><a href="$Link" class="$LinkingMode">$Title</a></li>
<% end_loop %>
</ul>
</div>
<% end_if %>
</div>
</div>
<div id="content" class="typography">
$Layout $Layout
</div>
</div>
</div>
<% include DocumentationFooter %> <% include DocumentationFooter %>
</div>
</div>
</div>
<% if GoogleAnalyticsCode %>
<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', '$GoogleAnalyticsCode', 'auto'); // Replace with your property ID.
ga('send', 'pageview');
</script>
<% end_if %>
</body> </body>
</html> </html>

View File

@ -1,28 +0,0 @@
<% if EntityPages %>
<div id="sibling-pages" class="sidebar-box">
<h4>In this module:</h4>
<ul>
<% loop EntityPages %>
<li>
<a href="$Link" class="$LinkingMode">$Title</a>
<% if Top.SubmenuLocation = nested %>
<% if Children %>
<% include DocSubmenu %>
<% end_if %>
<% end_if %>
</li>
<% end_loop %>
</ul>
</div>
<% end_if %>
<% if SubmenuLocation = separate %>
<% loop CurrentLevelOnePage %>
<% if Children %>
<div class = "sidebar-box">
<h4>$title</h4>
<% include DocSubmenu %>
</div>
<% end_if %>
<% end_loop %>
<% end_if %>

View File

@ -1,14 +0,0 @@
<ul id="submenu">
<% loop Children %>
<li><a href="$Link" class="$LinkingMode">
$Title <% if IsFolder %><span class="is-folder">&#9658;</span><% end_if %>
</a>
<% if Children %>
<ul>
<% loop Children %>
<li><a href="$Link" class="$LinkingMode">$Title</a></li>
<% end_loop %>
</ul><% end_if %>
</li>
<% end_loop %>
</ul>

View File

@ -0,0 +1 @@
<!-- include this file in your theme with the Disqus Universal Code -->

View File

@ -0,0 +1,7 @@
<div id="edit-link">
<p>
<a target="_blank" href="$EditLink">
Edit this page <small>(requires github.com login)</small>
</a>
</p>
</div>

View File

@ -0,0 +1,16 @@
<div id="sidebar" class="box">
<ul class="nav">
<% loop Entities %>
<li><a href="$Link" class="$LinkingMode top">$Title <% if IsFolder %><span class="is-folder">&#9658;</span><% end_if %></a>
<% if LinkingMode == current %>
<% if Children %>
<ul>
<% loop Children %>
<li><a href="$Link" class="$LinkingMode">$Title</a></li>
<% end_loop %>
</ul><% end_if %>
<% end_if %>
</li>
<% end_loop %>
</ul>
</div>

View File

@ -5,25 +5,15 @@
<div id="documentation-page"> <div id="documentation-page">
<div id="content-column"> <div id="content-column">
<% if Breadcrumbs %> <% if Breadcrumbs %>
<% include DocBreadcrumbs %> <% include DocumentationBreadcrumbs %>
<% end_if %> <% end_if %>
$Content $Content
<% if EditLink %> <% if EditLink %>
<div id="edit-link"> <% include DocumentationEditLink %>
<p>
<a target="_blank" href="$EditLink">
Edit this page <small>(requires github.com login)</small>
</a>
</p>
</div>
<% end_if %> <% end_if %>
</div> </div>
<% if Content %>
<div id="sidebar-column">
<% include DocInThisModule %>
</div>
<% end_if %>
</div> </div>
<% include DocumentationComments %>

View File

@ -1,30 +1,15 @@
<% if VersionWarning %> <div id="module-home" class="box">
<% if VersionWarning %>
<% include DocumentationVersion_warning %> <% include DocumentationVersion_warning %>
<% end_if %>
<div id="module-home">
<div id="content-column">
<% if Content %>
<% if Breadcrumbs %>
<% include DocBreadcrumbs %>
<% end_if %> <% end_if %>
<% if Content %>
$Content $Content
<% if EditLink %> <% if EditLink %>
<div id="edit-link"> <% include DocumentationEditLink %>
<p>
<a target="_blank" href="$EditLink">
Edit this page <small>(requires github.com login)</small>
</a>
</p>
</div>
<% end_if %> <% end_if %>
<% else %> <% else %>
<h2>$Title</h2> <h2>$Title</h2>
<% end_if %> <% end_if %>
</div>
<div id="sidebar-column">
<% include DocInThisModule %>
</div>
</div> </div>

View File

@ -1,8 +1,9 @@
<div id="documentation-page"> <div id="documentation-page">
<div id="content-column"> <div id="content-column">
<p>Your search for <strong>&quot;$Query.XML&quot;</strong> found $TotalResults result<% if TotalResults != 1 %>s<% end_if %>.</p> <p>Your search for <strong>&quot;$Query.XML&quot;</strong> found $TotalResults result<% if TotalResults != 1 %>s<% end_if %>.</p>
<% if Modules || Versions %> <% if AdvancedSearchEnabled %>
<p>Limited search to <% if Modules %>$Modules <% if Versions %>of<% end_if %><% end_if %> <% if Versions %>versions $Versions<% end_if %> <h4><% _t('ADVANCEDSEARCH', 'Advanced Search') %></h4>
$AdvancedSearchForm
<% end_if %> <% end_if %>
<% if Results %> <% if Results %>
@ -43,13 +44,5 @@
<% end_if %> <% end_if %>
</div> </div>
<% if AdvancedSearchEnabled %>
<div id="sidebar-column">
<div class="sidebar-box">
<h4><% _t('ADVANCEDSEARCH', 'Advanced Search') %></h4>
$AdvancedSearchForm
</div>
</div>
<% end_if %>
</div> </div>

View File

@ -0,0 +1,17 @@
<?php
class DocumentationHelperTests extends SapphireTest {
public function testGetAllPages() {
if(!DocumentationSearch::enabled()) {
return;
}
DocumentationService::set_automatic_registration(false);
DocumentationService::register('docs-search', DOCSVIEWER_PATH . '/tests/docs-search/');
$search = DocumentationSearch::get_all_documentation_pages();
$this->assertEquals(7, $search->Count(), '5 pages. 5 pages in entire folder');
}
}

View File

@ -16,17 +16,6 @@ class DocumentationSearchTest extends FunctionalTest {
DocumentationService::register('docs-search', DOCSVIEWER_PATH . '/tests/docs-search/'); DocumentationService::register('docs-search', DOCSVIEWER_PATH . '/tests/docs-search/');
} }
function testGetAllPages() {
if(!DocumentationSearch::enabled()) return;
DocumentationService::set_automatic_registration(false);
DocumentationService::register('docs-search', DOCSVIEWER_PATH . '/tests/docs-search/');
$search = DocumentationSearch::get_all_documentation_pages();
$this->assertEquals(7, $search->Count(), '5 pages. 5 pages in entire folder');
}
function testOpenSearchControllerAccessible() { function testOpenSearchControllerAccessible() {
$c = new DocumentationOpenSearchController(); $c = new DocumentationOpenSearchController();