summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Steffen2013-04-22 17:56:27 (GMT)
committer Al Steffen2013-04-22 17:56:27 (GMT)
commit162c71395fd00db8b0b9c36feb7ccf1ba04747f1 (patch)
tree9a9850b781b02db09635983a881d3bd0ee5a0ec8
parente24cba1484e5d75525b4c627515458a744a1dd65 (diff)
Issue #1962682 by Zarabadoo: Rejigger node styling and structure to make theme consistent and easier to theme.
-rw-r--r--css/global.styles.css30
-rwxr-xr-xsass/global.styles.scss34
-rwxr-xr-xtemplate.php7
-rwxr-xr-xtemplates/node/node.tpl.php20
-rw-r--r--templates/panels/node--panel--fallback.tpl.php19
5 files changed, 34 insertions, 76 deletions
diff --git a/css/global.styles.css b/css/global.styles.css
index 7796299..373cb00 100644
--- a/css/global.styles.css
+++ b/css/global.styles.css
@@ -347,9 +347,6 @@ var {
display: none;
}
}
-.node .field-name-body {
- margin-bottom: 20px;
-}
.node-actions {
float: right;
@@ -370,14 +367,6 @@ var {
}
}
-.node-teaser {
- border-bottom: 1px solid #ccc;
- padding-bottom: 20px;
- margin-bottom: 10px;
-}
-.views-row-last .node-teaser {
- margin-bottom: 0;
-}
.node-teaser.node-promoted {
background-image: url('../images/node-promoted-star.png?1363371593');
background-position: top right;
@@ -2134,9 +2123,11 @@ h1.node-title a:hover {
}
.field-name-body {
- clear: both;
margin-top: 1.7em;
}
+.node-event .field-name-body {
+ clear: both;
+}
.field-name-field-date {
font-weight: bold;
@@ -2147,6 +2138,10 @@ h1.node-title a:hover {
padding: 0;
}
+ul.node-action-links {
+ display: inline-block;
+ margin-top: 1.4em;
+}
ul.node-action-links li {
padding: 0;
vertical-align: baseline;
@@ -3297,9 +3292,6 @@ ul.action-links {
#quicktabs-container-commons_bw .quicktabs-tabpage .view-empty {
clear: both;
}
-#quicktabs-container-commons_bw .quicktabs-tabpage article {
- margin-bottom: 25px;
-}
#quicktabs-container-commons_bw .quicktabs-tabpage .form-submit {
margin-top: 0;
}
@@ -3408,9 +3400,6 @@ ul.action-links {
display: block;
}
-.node {
- margin-bottom: 20px;
-}
.node .node-title {
margin: 0;
}
@@ -3785,14 +3774,11 @@ body.front.not-logged-in #block-system-main .pane-1 .pane-title {
}
body.front.logged-in .view-commons-homepage-content > .view-content {
- padding: 10px 10px 20px 10px;
+ padding: 10px;
}
body.front.logged-in .view-commons-homepage-content > .view-content > .views-row {
position: relative;
}
-body.front.logged-in .view-commons-homepage-content .article.node .node-header a, body.front.logged-in .view-commons-homepage-content .node-teaser.node-group .node-header a {
- float: left;
-}
body.front.logged-in .view-commons-homepage-content .article.node .author-datetime, body.front.logged-in .view-commons-homepage-content .node-teaser.node-group .author-datetime {
margin-bottom: 1.5em;
clear: both;
diff --git a/sass/global.styles.scss b/sass/global.styles.scss
index cd1c2f9..2b0eda9 100755
--- a/sass/global.styles.scss
+++ b/sass/global.styles.scss
@@ -326,10 +326,6 @@ var {
&.node-question {
@extend %node-space-right;
}
-
- .field-name-body {
- margin-bottom: 20px;
- }
}
.node-actions {
@@ -353,14 +349,6 @@ var {
}
.node-teaser {
- border-bottom: 1px solid #ccc;
- padding-bottom: 20px;
- margin-bottom: 10px;
-
- .views-row-last & {
- margin-bottom: 0;
- }
-
&.node-promoted {
background-image: image-url('node-promoted-star.png');
background-position: top right;
@@ -1663,8 +1651,11 @@ h1.node-title {
}
.field-name-body {
- clear: both;
margin-top: 1.7em;
+
+ .node-event & {
+ clear: both;
+ }
}
.field-name-field-date {
@@ -1683,6 +1674,9 @@ h1.node-title {
}
ul.node-action-links {
+ display: inline-block;
+ margin-top: 1.4em;
+
li {
padding: 0;
vertical-align: baseline;
@@ -3009,10 +3003,6 @@ body.page-node .pane-views-panes {
clear: both;
}
- article {
- margin-bottom: 25px;
- }
-
.form-submit {
margin-top: 0;
}
@@ -3119,8 +3109,6 @@ body.page-node .pane-views-panes {
}
.node {
- margin-bottom: 20px;
-
.node-title {
margin: 0;
}
@@ -3549,7 +3537,7 @@ body.front.logged-in {
.view-commons-homepage-content {
> .view-content {
@extend %pod;
- padding: 10px 10px 20px 10px;
+ padding: $gutter-width;
> .views-row {
position: relative;
@@ -3557,12 +3545,6 @@ body.front.logged-in {
}
.article.node, .node-teaser.node-group {
- .node-header {
- a {
- float: left;
- }
- }
-
.node-content {
form {
diff --git a/template.php b/template.php
index 1d7d0e6..2e09826 100755
--- a/template.php
+++ b/template.php
@@ -415,16 +415,9 @@ function commons_origins_preprocess_views_view(&$variables, $hook) {
// Style some views without bottom borders and padding.
$plain = array(
- 'commons_bw_all' => array('default'),
- 'commons_bw_polls' => array('default'),
- 'commons_bw_posts' => array('default'),
- 'commons_bw_q_a' => array('default'),
- 'commons_bw_wikis' => array('default'),
- 'commons_events_upcoming' => array('panel_pane_2'),
'commons_groups_directory' => array('panel_pane_1'),
'commons_groups_recent_content' => array('block'),
'commons_groups_user_groups' => array('panel_pane_1'),
- 'commons_homepage_content' => array('panel_pane_1'),
'commons_radioactivity_groups_active_in_group' => array('panel_pane_1'),
);
if (isset($plain[$variables['name']]) && in_array($variables['display_id'], $plain[$variables['name']])) {
diff --git a/templates/node/node.tpl.php b/templates/node/node.tpl.php
index 815c129..99e5a38 100755
--- a/templates/node/node.tpl.php
+++ b/templates/node/node.tpl.php
@@ -106,29 +106,27 @@
*/
hide($content['comments']);
hide($content['links']);
-hide($content['report_link'])
+hide($content['report_link']);
?>
<article id="node-<?php print $node->nid; ?>" class="<?php print $classes; ?>"<?php print $attributes; ?>>
<?php if ($title && !$page): ?>
<header<?php print $header_attributes; ?>>
- <?php if ($title): ?>
- <?php print render($title_prefix); ?>
+ <?php print render($title_prefix); ?>
<h1<?php print $title_attributes; ?>>
<a href="<?php print $node_url; ?>" rel="bookmark"><?php print $title; ?></a>
</h1>
- <?php print render($title_suffix); ?>
- <?php endif; ?>
+ <?php print render($title_suffix); ?>
</header>
<?php endif; ?>
<?php if(!empty($user_picture) || $display_submitted): ?>
<footer<?php print $footer_attributes; ?>>
+ <?php print $user_picture; ?>
<p class="author-datetime"><?php print $submitted; ?></p>
</footer>
<?php endif; ?>
<div<?php print $content_attributes; ?>>
- <?php print $user_picture; ?>
<?php print render($content); ?>
</div>
@@ -138,9 +136,9 @@ hide($content['report_link'])
<?php print render($content['report_link']); ?>
+ <?php if (isset($content['comments']['comments'])): ?>
+ <div class="commons-pod commons-pod-comments">
+ <?php print render($content['comments']); ?>
+ </div>
+ <?php endif; ?>
</article>
-<?php if (isset($content['comments']['comments'])): ?>
-<div class="commons-pod commons-pod-comments">
- <?php print render($content['comments']); ?>
-</div>
-<?php endif; ?>
diff --git a/templates/panels/node--panel--fallback.tpl.php b/templates/panels/node--panel--fallback.tpl.php
index 46351ba..05c4297 100644
--- a/templates/panels/node--panel--fallback.tpl.php
+++ b/templates/panels/node--panel--fallback.tpl.php
@@ -109,35 +109,34 @@ hide($content['links']);
hide($content['report_link']);
?>
<article id="node-<?php print $node->nid; ?>" class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>
-
- <?php print render($title_prefix); ?>
<header<?php print $header_attributes; ?>>
+ <?php print render($title_prefix); ?>
<h2<?php print $title_attributes; ?>>
<?php print $title; ?>
</h2>
+ <?php print render($title_suffix); ?>
</header>
<?php if(!empty($user_picture) || $display_submitted): ?>
<footer<?php print $footer_attributes; ?>>
+ <?php print $user_picture; ?>
<p class="author-datetime"><?php print $submitted; ?></p>
</footer>
<?php endif; ?>
<div<?php print $content_attributes; ?>>
- <?php print $user_picture; ?>
<?php print render($content); ?>
</div>
<?php if ($links = render($content['links'])): ?>
<nav<?php print $links_attributes; ?>><?php print $links; ?></nav>
<?php endif; ?>
+
<?php print render($content['report_link']); ?>
+ <?php if (isset($content['comments']['comments'])): ?>
+ <div class="commons-pod commons-pod-comments">
+ <?php print render($content['comments']); ?>
+ </div>
+ <?php endif; ?>
</article>
-
-<?php if (isset($content['comments']['comments'])): ?>
-<div class="commons-pod commons-pod-comments">
- <?php print render($content['comments']); ?>
- <?php print render($title_suffix); ?>
-</div>
-<?php endif; ?>