Explorar o código

added classes to title & subtitle to in skinTemplate to minimize collisions with other headers down the page

Garrick van Buren %!s(int64=12) %!d(string=hai) anos
pai
achega
b3f8b2a7ad
Modificáronse 3 ficheiros con 6 adicións e 5 borrados
  1. 2 2
      assets/scripts/foreground.js
  2. 2 1
      assets/stylesheets/foreground.css
  3. 2 2
      foreground.skin.php

+ 2 - 2
assets/scripts/foreground.js

@@ -1,8 +1,8 @@
 jQuery(document).ready(function() {
   jQuery(document).foundation();
   // Split the namespace title into a title and a label
-  var $title = jQuery("h2:contains(':')").not(":contains('\"')").not(":contains('as of')").text().split(":");
-  jQuery("h2:contains(':')").not(":contains('\"')").not(":contains('as of')").html('<small class="label">' + $title[0] + '</small><span>' + $title[1] + '</span>');
+  var $title = jQuery("h2.title:contains(':')").not(":contains('\"')").not(":contains('as of')").text().split(":");
+  jQuery("h2.title:contains(':')").not(":contains('\"')").not(":contains('as of')").html('<small class="label">' + $title[0] + '</small><span>' + $title[1] + '</span>');
 
   // Turn categories into labels
   jQuery('#mw-normal-catlinks ul li a').addClass('label');

+ 2 - 1
assets/stylesheets/foreground.css

@@ -27,6 +27,7 @@ h2 small.label {
 }
 
 h2 span {
+  display:block;
   clear:both;
 }
 
@@ -137,7 +138,7 @@ footer.row ul.columns li { display: inline;float:none;}
 
 h1,h2,h3,h4,h5,h6 {
   margin-top: 0em;
-  margin-bottom: 0em;
+  line-height: 1em;
 }
 
 .page-Special_SpecialPages h2 {

+ 2 - 2
foreground.skin.php

@@ -99,8 +99,8 @@ class ForegroundTemplate extends BaseTemplate {
 
 		<div class="row">
 				<div class="large-12 columns">
-					<h2><?php $this->html('title') ?></h2>
-					<h5><?php $this->html('subtitle') ?></h5>
+					<h2 class="title"><?php $this->html('title') ?></h2>
+					<h5 class="subtitle"><?php $this->html('subtitle') ?></h5>
 					<?php $this->html('bodytext') ?>
 		    	<div class="group"><?php $this->html('catlinks'); ?></div>
 		    	<?php $this->html('dataAfterContent'); ?>