diff options
Diffstat (limited to 'documentation/theming')
-rw-r--r-- | documentation/theming/preview/forms.php | 220 | ||||
-rw-r--r-- | documentation/theming/preview/general.php | 70 | ||||
-rw-r--r-- | documentation/theming/preview/grid.php | 92 | ||||
-rw-r--r-- | documentation/theming/preview/head.php | 42 | ||||
-rw-r--r-- | documentation/theming/preview/icons.php | 41 | ||||
-rw-r--r-- | documentation/theming/preview/index.php | 23 | ||||
-rw-r--r-- | documentation/theming/preview/nav.php | 77 | ||||
-rw-r--r-- | documentation/theming/preview/objects.php | 84 | ||||
-rw-r--r-- | documentation/theming/preview/widgets.php | 63 |
9 files changed, 712 insertions, 0 deletions
diff --git a/documentation/theming/preview/forms.php b/documentation/theming/preview/forms.php new file mode 100644 index 000000000..89caf8e8b --- /dev/null +++ b/documentation/theming/preview/forms.php @@ -0,0 +1,220 @@ +<?php +/** + * Form CSS + */ + +$title = 'Forms and Buttons'; + +require dirname(__FILE__) . '/head.php'; + +$url = current_page_url(); + +?> +<body> + <div class="elgg-page mal"> + <h1 class="mbs"> + <a href="index.php">Index</a> > <a href="<?php echo $url; ?>"><?php echo $title; ?></a> + </h1> + <div class="mbl"> + <a href="nav.php">< previous</a> <a href="objects.php">next ></a> + </div> + <h2>Form</h2> + <form action="#"> + <fieldset> + <legend>Form legend</legend> + <p> + <label for="f1">Text input:</label> + <?php echo elgg_view('input/text', array( + 'internalname' => 'f1', + 'internalid' => 'f1', + 'value' => 'input text', + )); + ?> + </p> + <p> + <label for="f2">Password input:</label> + <?php echo elgg_view('input/password', array( + 'internalname' => 'f2', + 'internalid' => 'f2', + 'value' => 'password', + )); + ?> + </p> + <p> + <label for="f3">Radio input:</label><br /> + <?php echo elgg_view('input/radio', array( + 'internalname' => 'f3', + 'internalid' => 'f3', + 'options' => array(1, 2), + )); + ?> + </p> + <p> + <label for="f4">Checkboxes input:</label><br /> + <?php echo elgg_view('input/checkboxes', array( + 'internalname' => 'f4', + 'internalid' => 'f4', + 'options' => array(1, 2), + )); + ?> + </p> + <p> + <label for="f5">Dropdown input:</label><br /> + <?php echo elgg_view('input/dropdown', array( + 'internalname' => 'f5', + 'internalid' => 'f5', + 'options' => array('option 1', 'option 2'), + )); + ?> + </p> + <p> + <label for="f6">Access input:</label> + <?php echo elgg_view('input/access', array( + 'internalname' => 'f6', + 'internalid' => 'f6', + 'value' => ACCESS_PUBLIC, + )); + ?> + </p> + <p> + <label for="f7">File input:</label> + <?php echo elgg_view('input/file', array( + 'internalname' => 'f7', + 'internalid' => 'f7', + )); + ?> + </p> + <p> + <label for="f8">URL input:</label> + <?php echo elgg_view('input/url', array( + 'internalname' => 'f8', + 'internalid' => 'f8', + 'value' => 'http://elgg.org/', + )); + ?> + </p> + <p> + <label for="f9">Tags input:</label> + <?php echo elgg_view('input/tags', array( + 'internalname' => 'f9', + 'internalid' => 'f9', + 'value' => 'one, two, three', + )); + ?> + </p> + <p> + <label for="f10">Email input:</label> + <?php echo elgg_view('input/email', array( + 'internalname' => 'f10', + 'internalid' => 'f10', + 'value' => 'noone@elgg.org', + )); + ?> + </p> + <p> + <label for="f11">Autocomplete input:</label> + <?php echo elgg_view('input/autocomplete', array( + 'internalname' => 'f11', + 'internalid' => 'f11', + 'match_on' => 'users', + )); + ?> + </p> + <p> + <label for="f12">Date picker input:</label> + <?php echo elgg_view('input/datepicker', array( + 'internalname' => 'f12', + 'internalid' => 'f12', + )); + ?> + </p> + <p> + <label for="f13">User picker input:</label> + <?php echo elgg_view('input/userpicker', array( + 'internalname' => 'f13', + 'internalid' => 'f13', + )); + ?> + </p> + <p> + <label for="f14">Long text input:</label> + <?php echo elgg_view('input/longtext', array( + 'internalname' => 'f14', + 'internalid' => 'f14', + 'value' => $ipsum, + )); + ?> + </p> + <p> + <label for="f15">Plain text input:</label> + <?php echo elgg_view('input/plaintext', array( + 'internalname' => 'f15', + 'internalid' => 'f15', + 'value' => $ipsum, + )); + ?> + </p> + </fieldset> + </form> + + <div class="mtl"> + <h2>Buttons</h2> + <p> + <?php echo elgg_view('input/submit', array( + 'internalname' => 'b1', + 'value' => 'input[type=submit]', + )); + ?> + </p> + <p> + <?php echo elgg_view('output/url', array( + 'href' => "$url#", + 'text' => 'a.elgg-submit-button', + 'class' => 'elgg-button elgg-submit-button', + )); + ?> + </p> + <p> + <?php echo elgg_view('output/url', array( + 'href' => "$url#", + 'text' => 'submit button disabled', + 'class' => 'elgg-button elgg-submit-button disabled', + )); + ?> + </p> + <p> + <?php echo elgg_view('input/button', array( + 'internalname' => 'b3', + 'value' => 'input[type=button]', + )); + ?> + </p> + <p> + <?php echo elgg_view('output/url', array( + 'href' => "$url#", + 'text' => 'a.elgg-cancel-button', + 'class' => 'elgg-button elgg-cancel-button', + )); + ?> + </p> + <p> + <?php echo elgg_view('output/url', array( + 'href' => "$url#", + 'text' => 'a.elgg-action-button', + 'class' => 'elgg-action-button', + )); + ?> + </p> + <p> + <?php echo elgg_view('output/url', array( + 'href' => "$url#", + 'text' => 'action button disabled', + 'class' => 'elgg-action-button disabled', + )); + ?> + </p> + </div> + + </div> +</body> +</html>
\ No newline at end of file diff --git a/documentation/theming/preview/general.php b/documentation/theming/preview/general.php new file mode 100644 index 000000000..3e8d2f6e9 --- /dev/null +++ b/documentation/theming/preview/general.php @@ -0,0 +1,70 @@ +<?php +/** + * General CSS + */ + +$title = 'General CSS'; + +require dirname(__FILE__) . '/head.php'; + +$url = current_page_url(); + +?> +<body> + <div class="elgg-page mal"> + <h1 class="mbs"> + <a href="index.php">Index</a> > <a href="<?php echo $url; ?>"><?php echo $title; ?></a> + </h1> + <div class="mbl"> + < previous <a href="nav.php">next ></a> + </div> + <h2>Headings</h2> + <div class="mbl"> + <h1>Level 1 heading</h1> + <h2>Level 2 heading</h2> + <h3>Level 3 heading</h3> + <h4>Level 4 heading</h4> + <h5>Level 5 heading</h5> + <h6>Level 6 heading</h6> + </div> + <h2>Paragraph</h2> + <div class="mbl"> + <p>Lorem ipsum dolor sit amet, <a href="#" title="test link">test link</a> + adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec + faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero + nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl. Praesent + mattis, massa quis luctus fermentum, turpis mi volutpat justo, eu + volutpat enim diam eget metus. Maecenas ornare tortor. Donec sed tellus + eget sapien fringilla nonummy. Mauris a ante. Suspendisse quam sem, + consequat at, commodo vitae, feugiat in, nunc. Morbi imperdiet augue + quis tellus.</p> + + <p>Lorem ipsum dolor sit amet, <em>emphasis</em> + consectetuer + adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec + faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero + nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl. Praesent + mattis, massa quis luctus fermentum, turpis mi volutpat justo, eu + volutpat enim diam eget metus. Maecenas ornare tortor. Donec sed tellus + eget sapien fringilla nonummy. Mauris a ante. Suspendisse quam sem, + consequat at, commodo vitae, feugiat in, nunc. Morbi imperdiet augue + quis tellus.</p> + </div> + <h2>Misc</h2> + <p> + I am <a href="?abc123">the a tag</a> example<br /> + I am <abbr title="test">the abbr tag</abbr> example<br /> + I am <acronym>the acronym tag</acronym> example<br /> + I am <b>the b tag</b> example<br /> + I am <code>the code tag</code> example<br /> + I am <del>the del tag</del> example<br /> + I am <em>the em tag</em> example<br /> + I am <i>the i tag</i> example<br /> + I am <strong>the strong tag</strong> example<br /> + </p> + <blockquote><p>Paragraph inside Blockquote: <?php echo $ipsum; ?></p></blockquote> + <pre><strong>Preformated:</strong>Testing one row + and another</pre> + </div> +</body> +</html>
\ No newline at end of file diff --git a/documentation/theming/preview/grid.php b/documentation/theming/preview/grid.php new file mode 100644 index 000000000..bf20804f8 --- /dev/null +++ b/documentation/theming/preview/grid.php @@ -0,0 +1,92 @@ +<?php +/** + * Grid CSS + */ + +$title = 'Grid'; + +require dirname(__FILE__) . '/head.php'; + +$url = current_page_url(); + +?> +<body> + <div class="elgg-page mal"> + <h1 class="mbs"> + <a href="index.php">Index</a> > <a href="<?php echo $url; ?>"><?php echo $title; ?></a> + </h1> + <div class="mbl"> + <a href="objects.php">< previous</a> <a href="widgets.php">next ></a> + </div> +<style> +h3 {text-align: center;} +.preview-outline {border: 1px solid #cccccc; padding: 5px;} +</style> + +<div class="elgg-col elgg-col-1of5"> + <div class="preview-outline"> + <h3>1/5</h3> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + </div> +</div> +<div class="elgg-col elgg-col-3of5"> + <div class="preview-outline clearfix"> + <h3>3/5</h3> + <div class="elgg-col elgg-col-1of2"> + <div class="preview-outline"> + <h3>1/2</h3> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + </div> + </div> + <div class="elgg-col elgg-col-1of2"> + <div class="preview-outline"> + <h3>1/2</h3> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + </div> + </div> + <div class="elgg-col elgg-col-1of3"> + <div class="preview-outline"> + <h3>1/3</h3> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + </div> + </div> + <div class="elgg-col elgg-col-2of3"> + <div class="preview-outline"> + <h3>2/3</h3> + <div class="elgg-col elgg-col-1of2"> + <div class="preview-outline"> + <h3>1/2</h3> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + </div> + </div> + <div class="elgg-col elgg-col-1of2"> + <div class="preview-outline"> + <h3>1/2</h3> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + </div> + </div> + <div class="elgg-col elgg-col-1of1"> + <div class="preview-outline"> + <h3>1</h3> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + </div> + </div> + </div> + </div> + </div> +</div> +<div class="elgg-col elgg-col-1of5 elgg-col-last"> + <div class="preview-outline"> + <h3>1/5</h3> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + </div> +</div> + + </div> +</body> +</html>
\ No newline at end of file diff --git a/documentation/theming/preview/head.php b/documentation/theming/preview/head.php new file mode 100644 index 000000000..360f56647 --- /dev/null +++ b/documentation/theming/preview/head.php @@ -0,0 +1,42 @@ +<?php +/** + * head of the preview pages + */ +require_once(dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php"); + +$ipsum = "Sed scelerisque sagittis lorem. Phasellus sodales. Nulla urna justo, vehicula in, suscipit nec, molestie sed, tellus."; + +$screen = elgg_view_get_simplecache_url('css', 'screen'); +$ie_url = elgg_view_get_simplecache_url('css', 'ie'); +$ie6_url = elgg_view_get_simplecache_url('css', 'ie6'); + +$base = elgg_get_site_url(); +elgg_register_js("{$base}vendors/jquery/jquery-1.4.2.min.js", 'jquery'); +elgg_register_js("{$base}vendors/jquery/jquery-ui-1.7.2.min.js", 'jquery-ui'); +elgg_register_js("{$base}vendors/jquery/jquery.form.js", 'jquery.form'); + +// Set the content type +header("Content-type: text/html; charset=UTF-8"); + +?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <title><?php echo $title; ?></title> + <link rel="stylesheet" href="<?php echo $screen; ?>" type="text/css" /> + <!--[if IE 6]> + <link rel="stylesheet" type="text/css" href="<?php echo $ie_url; ?>" /> + <![endif]--> + + <!--[if gt IE 6]> + <link rel="stylesheet" type="text/css" href="<?php echo $ie6_url; ?>" /> + <![endif]--> +<?php +foreach (elgg_get_js() as $script) { +?> + <script type="text/javascript" src="<?php echo $script; ?>"></script> +<?php +} +?> +</head> diff --git a/documentation/theming/preview/icons.php b/documentation/theming/preview/icons.php new file mode 100644 index 000000000..2a3a9bb7e --- /dev/null +++ b/documentation/theming/preview/icons.php @@ -0,0 +1,41 @@ +<?php +/** + * Icons CSS + */ + +$title = 'Icons'; + +require dirname(__FILE__) . '/head.php'; + +$url = current_page_url(); + +?> +<style>li {margin: 10px; float: left;} ul {background-color: #e0e0e0;}</style> +<body> + <div class="elgg-page mal"> + <h1 class="mbs"> + <a href="index.php">Index</a> > <a href="<?php echo $url; ?>"><?php echo $title; ?></a> + </h1> + <div class="mbl"> + <a href="widgets.php">< previous</a> next > + </div> + <h2>Icon Sprites</h2> + <ul class="mbl clearfix"> + <li><span class="elgg-icon elgg-icon-settings"></span>Settings</li> + <li><span class="elgg-icon elgg-icon-friends"></span>Friends</li> + <li><span class="elgg-icon elgg-icon-help"></span>Help</li> + <li><span class="elgg-icon elgg-icon-delete"></span>Delete</li> + <li><span class="elgg-icon elgg-icon-likes"></span>Likes</li> + <li><span class="elgg-icon elgg-icon-liked"></span>Liked</li> + <li><span class="elgg-icon elgg-icon-following"></span>Following</li> + <li><span class="elgg-icon elgg-icon-rss"></span>RSS</li> + <li><span class="elgg-icon elgg-icon-arrow-s"></span>Arrow S</li> + <li><span class="elgg-icon elgg-icon-hover-menu"></span>Hover Menu</li> + </ul> + <h2>Ajax loader</h2> + <div class="mbl"> + <?php echo elgg_view('graphics/ajax_loader', array('hidden' => false)); ?> + </div> + </div> +</body> +</html>
\ No newline at end of file diff --git a/documentation/theming/preview/index.php b/documentation/theming/preview/index.php new file mode 100644 index 000000000..ce71d28df --- /dev/null +++ b/documentation/theming/preview/index.php @@ -0,0 +1,23 @@ +<?php +/** + * Main index page + */ + +include dirname(__FILE__) . '/head.php'; + +?> +<body> + <div class="elgg-page mal"> + <h1 class="mbl"><a href="index.php">Index</a></h1> + <ul class="mtl"> + <li><a href="general.php">General CSS</a></li> + <li><a href="nav.php">Navigation CSS</a></li> + <li><a href="forms.php">Form CSS</a></li> + <li><a href="objects.php">Lists, modules, image blocks CSS</a></li> + <li><a href="grid.php">Grid CSS</a></li> + <li><a href="widgets.php">Widgets CSS</a></li> + <li><a href="icons.php">Icons CSS</a></li> + </ul> + </div> +</body> +</html>
\ No newline at end of file diff --git a/documentation/theming/preview/nav.php b/documentation/theming/preview/nav.php new file mode 100644 index 000000000..3a9daea98 --- /dev/null +++ b/documentation/theming/preview/nav.php @@ -0,0 +1,77 @@ +<?php +/** + * Navigation CSS + */ + +$title = 'Navigation'; + +require dirname(__FILE__) . '/head.php'; + +$url = current_page_url(); + +elgg_push_breadcrumb('First', "$url#"); +elgg_push_breadcrumb('Second', "$url#"); +elgg_push_breadcrumb('Third'); + +?> +<body> + <div class="elgg-page mal"> + <h1 class="mbs"> + <a href="index.php">Index</a> > <a href="<?php echo $url; ?>"><?php echo $title; ?></a> + </h1> + <div class="mbl"> + <a href="general.php">< previous</a> <a href="forms.php">next ></a> + </div> + <h2>Breadcrumbs</h2> + <div class="mbl"> + <?php echo elgg_view('navigation/breadcrumbs'); ?> + </div> + <h2>Tabs</h2> + <div class="mbl"> + <?php + $tabs = array( + array('title' => 'First', 'url' => "$url#"), + array('title' => 'Second', 'url' => "$url#", 'selected' => true), + array('title' => 'Third', 'url' => "$url#"), + ); + echo elgg_view('navigation/tabs', array('tabs' => $tabs)); + ?> + </div> + <h2>Pagination</h2> + <div class="mbl"> + <?php + $params = array( + 'count' => 1000, + 'limit' => 10, + 'offset' => 230, + ); + echo elgg_view('navigation/pagination', $params); + ?> + </div> + <h2>Site Menu</h2> + <div class="mbl"> + <div class="elgg-page-header" style="height: 40px;"> + <?php + $params = array(); + $params['menu'] = array(); + $params['menu']['default'] = array(); + for ($i=1; $i<=5; $i++) { + $params['menu']['default'][] = new ElggMenuItem($i, "Page $i", "$url#"); + } + $params['menu']['default'][2]->setSelected(true); + echo elgg_view('navigation/menu/site', $params); + ?> + </div> + </div> + <h2>Page Menu</h2> + <div class="mbl pam" style="width: 200px; background-color: #cccccc;"> + <?php + $m = new ElggMenuItem(10, "Child", "$url#"); + $m->setParent($params['menu']['default'][1]); + $params['menu']['default'][1]->addChild($m); + echo elgg_view('navigation/menu/page', $params); + ?> + </div> + </div> +</body> +</html>
\ No newline at end of file diff --git a/documentation/theming/preview/objects.php b/documentation/theming/preview/objects.php new file mode 100644 index 000000000..f90009cab --- /dev/null +++ b/documentation/theming/preview/objects.php @@ -0,0 +1,84 @@ +<?php +/** + * CSS Objects: list, module, image_block + */ + +$title = 'CSS Objects'; + +require dirname(__FILE__) . '/head.php'; + +$url = current_page_url(); + +?> +<body> + <div class="elgg-page mal"> + <h1 class="mbs"> + <a href="index.php">Index</a> > <a href="<?php echo $url; ?>"><?php echo $title; ?></a> + </h1> + <div class="mbl"> + <a href="forms.php">< previous</a> <a href="grid.php">next ></a> + </div> + <h2>Modules</h2> + <div class="mbl clearfix"> + <div class="elgg-col elgg-col-1of2"> + <div class="pam"> + <?php + echo elgg_view('layout/objects/module', array( + 'title' => 'elgg-aside-module', + 'body' => $ipsum, + 'class' => 'elgg-aside-module', + )); + ?> + <?php + echo elgg_view('layout/objects/module', array( + 'title' => 'elgg-popup-module', + 'body' => $ipsum, + 'class' => 'elgg-popup-module', + )); + ?> + </div> + </div> + <div class="elgg-col elgg-col-1of2"> + <div class="pam"> + <?php + echo elgg_view('layout/objects/module', array( + 'title' => 'elgg-group-module', + 'body' => $ipsum, + 'class' => 'elgg-group-module', + )); + ?> + </div> + <div class="pam"> + <?php + echo elgg_view('layout/objects/module', array( + 'title' => 'elgg-info-module', + 'body' => $ipsum, + 'class' => 'elgg-info-module', + )); + ?> + </div> + </div> + </div> + <h2>Image Block</h2> + <div class="mbl clearfix"> + <?php + $src = elgg_view('icon/user/default/small'); + $image = "<img src=\"$src\" />"; + echo elgg_view_image_block($image, $ipsum); + ?> + </div> + <h2>List</h2> + <div class="mbl clearfix"> + <?php + $obj1 = new ElggObject(); + $obj1->title = "Object 1"; + $obj1->description = $ipsum; + $obj2 = new ElggObject(); + $obj2->title = "Object 2"; + $obj2->description = $ipsum; + echo elgg_view('layout/objects/list', array('items' => array($obj1, $obj2))); + ?> + </div> + </div> +</body> +</html>
\ No newline at end of file diff --git a/documentation/theming/preview/widgets.php b/documentation/theming/preview/widgets.php new file mode 100644 index 000000000..ca45132df --- /dev/null +++ b/documentation/theming/preview/widgets.php @@ -0,0 +1,63 @@ +<?php +/** + * Widgets CSS + */ + +$title = 'Widgets'; + +require dirname(__FILE__) . '/head.php'; + +$url = current_page_url(); + +elgg_register_plugin_hook_handler('view', 'widgets/friends/content', 'css_widget_content'); +elgg_register_plugin_hook_handler('view', 'widgets/friends/edit', 'css_widget_content'); +elgg_register_plugin_hook_handler('permissions_check', 'all', 'css_permissions_override'); + +function css_widget_content() { + global $ipsum; + return $ipsum; +} + +function css_permissions_override() { + return true; +} + + +?> +<body> + <div class="elgg-page mal"> + <h1 class="mbs"> + <a href="index.php">Index</a> > <a href="<?php echo $url; ?>"><?php echo $title; ?></a> + </h1> + <div class="mbl"> + <a href="grid.php">< previous</a> <a href="icons.php">next ></a> + </div> +<?php +$w = array(); +for ($i=1; $i<=6; $i++) { + $obj = new ElggWidget(); + $obj->handler = 'friends'; + $obj->title = "Widget $i"; + $w[] = $obj; +} +$column1 = array($w[0], $w[1]); +$column2 = array($w[2], $w[3]); +$column3 = array($w[4], $w[5]); +$widgets = array(1 => $column1, 2 => $column2, 3 => $column3); +$num_columns = 3; +$widget_class = "elgg-col-1of{$num_columns}"; +for ($column_index = 1; $column_index <= $num_columns; $column_index++) { + $column_widgets = $widgets[$column_index]; + + echo "<div class=\"$widget_class elgg-widgets\" id=\"elgg-widget-col-$column_index\">"; + if (is_array($column_widgets) && sizeof($column_widgets) > 0) { + foreach ($column_widgets as $widget) { + echo elgg_view_entity($widget); + } + } + echo '</div>'; +} +?> + </div> +</body> +</html>
\ No newline at end of file |