diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-01 18:43:03 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-01 18:43:03 +0000 |
commit | 47e81498d87703035a9d3a78215e80d7f3e02448 (patch) | |
tree | 1e5f3285daffe86f9c34cb335d699ce337daa79d | |
parent | 715fe7872366a415b97c13e3074aea02f87658b9 (diff) | |
download | elgg-47e81498d87703035a9d3a78215e80d7f3e02448.tar.gz elgg-47e81498d87703035a9d3a78215e80d7f3e02448.tar.bz2 |
starting adding a .elgg-text class - plugins need to use output/longtext when displaying text
git-svn-id: http://code.elgg.org/elgg/trunk@7806 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | mod/blog/views/default/object/blog.php | 10 | ||||
-rw-r--r-- | views/default/css/elements/core.php | 25 | ||||
-rw-r--r-- | views/default/navigation/menu/site.php | 2 | ||||
-rw-r--r-- | views/default/output/longtext.php | 11 |
4 files changed, 38 insertions, 10 deletions
diff --git a/mod/blog/views/default/object/blog.php b/mod/blog/views/default/object/blog.php index d169117e8..23ccb57be 100644 --- a/mod/blog/views/default/object/blog.php +++ b/mod/blog/views/default/object/blog.php @@ -17,7 +17,6 @@ $container = $blog->getContainerEntity(); $categories = elgg_view('categories/view', $vars); $excerpt = $blog->excerpt; -$body = autop($blog->description); $owner_icon = elgg_view('profile/icon', array('entity' => $owner, 'size' => 'tiny')); $owner_link = elgg_view('output/url', array( 'href' => "pg/blog/owner/$owner->username", @@ -98,6 +97,11 @@ if (elgg_in_context('widgets')) { if ($full) { + $body = elgg_view('output/longtext', array( + 'value' => $blog->description, + 'class' => 'blog-post', + )); + $header = elgg_view_title($blog->title); $params = array( @@ -114,9 +118,7 @@ if ($full) { echo <<<HTML $header $blog_info -<div class="blog-post elgg-content"> - $body -</div> +$body HTML; } else { diff --git a/views/default/css/elements/core.php b/views/default/css/elements/core.php index 2e47b9283..e730c4ee2 100644 --- a/views/default/css/elements/core.php +++ b/views/default/css/elements/core.php @@ -94,6 +94,14 @@ h2 { .listing .icon img { width: auto } .listing .info { display: table-cell; } +.hidden { + display:none; +} +.center { + margin: 0 auto; +} + + .link { cursor:pointer; } @@ -103,9 +111,8 @@ h2 { .divider { border-top:1px solid #cccccc; } -.hidden { - display:none; -} + + .radius8 { -webkit-border-radius: 8px; -moz-border-radius: 8px; @@ -116,6 +123,7 @@ h2 { .margin-top { margin-top:10px; } + .elgg-tags { background-image:url(<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png); background-repeat: no-repeat; @@ -229,3 +237,14 @@ h2 { .elgg-width-classic { width: 990px; } + +.elgg-text ul, ol { + margin: 0 1.5em 1.5em 0; + padding-left: 1.5em; +} +.elgg-text ul { + list-style-type: disc; +} +.elgg-text ol { + list-style-type: decimal; +}
\ No newline at end of file diff --git a/views/default/navigation/menu/site.php b/views/default/navigation/menu/site.php index 111f941b3..39fb980a7 100644 --- a/views/default/navigation/menu/site.php +++ b/views/default/navigation/menu/site.php @@ -6,7 +6,7 @@ * @uses $vars['menu']['more'] */ -echo '<ul class="elgg-site-menu clearfix">'; +echo '<ul class="elgg-menu elgg-site-menu clearfix">'; foreach ($vars['menu']['default'] as $menu_item) { echo elgg_view('navigation/menu/elements/item', array('item' => $menu_item)); } diff --git a/views/default/output/longtext.php b/views/default/output/longtext.php index 22a4ad46d..ea91fe424 100644 --- a/views/default/output/longtext.php +++ b/views/default/output/longtext.php @@ -8,9 +8,16 @@ * * @uses $vars['value'] The text to display * @uses $vars['parse_urls'] Whether to turn urls into links. Default is true. + * @uses $vars['class'] */ -$parse_urls = isset($vars['parse_urls']) ? $vars['parse_urls'] : TRUE; +$class = 'elgg-text'; +$additional_class = elgg_get_array_value('class', $vars, ''); +if ($additional_class) { + $class = "$class $additional_class"; +} + +$parse_urls = elgg_get_array_value('parse_urls', $vars, true); $text = $vars['value']; @@ -22,4 +29,4 @@ if ($parse_urls) { $text = autop($text); -echo $text; +echo "<div class=\"$class\">$text</div>"; |