Skip to content

Commit

Permalink
Layout edits
Browse files Browse the repository at this point in the history
  • Loading branch information
antonydoyle committed Oct 2, 2012
1 parent f12a2ed commit 3d9d1b3
Show file tree
Hide file tree
Showing 9 changed files with 442 additions and 234 deletions.
7 changes: 6 additions & 1 deletion README.md
Expand Up @@ -25,4 +25,9 @@
<li>Added template width override</li> <li>Added template width override</li>
<li>Fixed a menu issue causing problems on 3.0</li> <li>Fixed a menu issue causing problems on 3.0</li>
</ul> </ul>
<p>Some features are still untested on 3.0, so please use with caution and take backups! </p> <p>Some features are still untested on 3.0, so please use with caution and take backups! </p>
<h5>Updated - 02/10/12</h5>
<p>Updated Foundation core files.</p>
<p>Few styling fixes.</p>
<p>Added a layout selector & full width layout. You can now create your own, drop them in the layouts folder and pick them from the template admin.</p>

1 change: 1 addition & 0 deletions framework.php
Expand Up @@ -24,6 +24,7 @@
$unAlerts = $this->params->get('unAlerts'); $unAlerts = $this->params->get('unAlerts');
$minFound = $this->params->get('minFound'); $minFound = $this->params->get('minFound');
$setWidth = $this->params->get('setWidth'); $setWidth = $this->params->get('setWidth');
$templateLayout = $this->params->get('layout');


$pageTitle = $this->getTitle(); $pageTitle = $this->getTitle();
$option = JRequest::getCmd('option'); $option = JRequest::getCmd('option');
Expand Down
205 changes: 6 additions & 199 deletions index.php
Expand Up @@ -40,205 +40,12 @@
})(); })();
</script> </script>
</head> </head>
<body>

<!--Logo / Nav Row -->
<div class="row">
<div class="three columns">
<?php if ($logoUp > 0) { ?>
<a href="<?php echo $this->baseurl ?>" alt="<?php echo $sitename ?>" title="<?php echo $sitename ?>">
<img src="<?php echo $custLogo ?>" alt="<?php echo $sitename ?>" title="<?php echo $sitename ?>" />
</a>

<?php } else { ?>
<jdoc:include type="modules" name="logo" style="html5" />
<?php }; ?>
</div>
<?php if ($menu > 0) : ?>
<nav class="nine columns">
<jdoc:include type="modules" name="menu" style="html5" />
</nav>
<?php endif; ?>
</div>

<!--Orbit Row -->
<div class="row">
<?php if ($orbit > 0) : ?>
<div class="twelve columns" id="orbit">
<jdoc:include type="modules" name="orbit" style="raw" />
</div>
<?php endif; ?>
</div>

<!--Slideshow Row -->
<div class="row">
<?php if ($slideshow > 0) : ?>
<div class="twelve columns">
<jdoc:include type="modules" name="slideshow" style="html5" />
</div>
<?php endif; ?>
</div>

<!--Top Row -->
<div class="row">
<?php if ($top1 > 0) : ?>
<div class="<?php echo $topWidth ?>">
<jdoc:include type="modules" name="top1" style="html5" />
</div>
<?php endif; ?>
<?php if ($top2 > 0) : ?>
<div class="<?php echo $topWidth ?>">
<jdoc:include type="modules" name="top2" style="html5" />
</div>
<?php endif; ?>
<?php if ($top3 > 0) : ?>
<div class="<?php echo $topWidth ?>">
<jdoc:include type="modules" name="top3" style="html5" />
</div>
<?php endif; ?>
</div>

<!--MAIN Row -->
<div class="row">

<?php if ($left > 0) : ?>
<div class="<?php echo htmlspecialchars($leftWidth); ?> ">
<jdoc:include type="modules" name="left" style="html5" />
</div>
<?php endif; ?>

<div class="<?php echo htmlspecialchars($mainWidth); ?>">
<?php if ($above1 > 0) : ?>
<div class="<?php echo $aboveWidth ?>">
<jdoc:include type="modules" name="above1" style="html5" />
</div>
<?php endif; ?>
<?php if ($above2 > 0) : ?>
<div class="<?php echo $aboveWidth ?>">
<jdoc:include type="modules" name="above2" style="html5" />
</div>
<?php endif; ?>
<?php if ($above3 > 0) : ?>
<div class="<?php echo $aboveWidth ?>">
<jdoc:include type="modules" name="above3" style="html5" />
</div>
<?php endif; ?>

<jdoc:include type="message" />
<jdoc:include type="component" />

<?php if ($below1 > 0) : ?>
<div class="<?php echo $belowWidth ?>">
<jdoc:include type="modules" name="below1" style="html5" />
</div>
<?php endif; ?>
<?php if ($below2 > 0) : ?>
<div class="<?php echo $belowWidth ?>">
<jdoc:include type="modules" name="below2" style="html5" />
</div>
<?php endif; ?>
<?php if ($below3 > 0) : ?>
<div class="<?php echo $belowWidth ?>">
<jdoc:include type="modules" name="below3" style="html5" />
</div>
<?php endif; ?>
</div>

<?php if ($right > 0) : ?>
<div class="<?php echo htmlspecialchars($rightWidth); ?> ">
<jdoc:include type="modules" name="right" style="html5" />
</div>
<?php endif; ?>
</div>

<!--Bottom Row -->
<div class="row">
<?php if ($bottom1 > 0) : ?>
<div class="<?php echo $bottomWidth ?>">
<jdoc:include type="modules" name="bottom1" style="html5" />
</div>
<?php endif; ?>
<?php if ($bottom2 > 0) : ?>
<div class="<?php echo $bottomWidth ?>">
<jdoc:include type="modules" name="bottom2" style="html5" />
</div>
<?php endif; ?>
<?php if ($bottom3 > 0) : ?>
<div class="<?php echo $bottomWidth ?>">
<jdoc:include type="modules" name="bottom3" style="html5" />
</div>
<?php endif; ?>
</div>

<!--FooterTop Row -->
<div class="row">
<?php if ($footerTop1 > 0) : ?>
<div class="<?php echo $footerTopWidth ?>">
<jdoc:include type="modules" name="footerTop1" style="html5" />
</div>
<?php endif; ?>
<?php if ($footerTop2 > 0) : ?>
<div class="<?php echo $footerTopWidth ?>">
<jdoc:include type="modules" name="footerTop2" style="html5" />
</div>
<?php endif; ?>
<?php if ($footerTop3 > 0) : ?>
<div class="<?php echo $footerTopWidth ?>">
<jdoc:include type="modules" name="footerTop3" style="html5" />
</div>
<?php endif; ?>
<?php if ($footerTop4 > 0) : ?>
<div class="<?php echo $footerTopWidth ?>">
<jdoc:include type="modules" name="footerTop4" style="html5" />
</div>
<?php endif; ?>
</div>


<!--Footer Row --> <body>
<div class="row"> <?php
<?php if ($footer1 > 0) : ?> // Load template layout
<div class="<?php echo $footerWidth ?>"> include_once JPATH_THEMES . '/' . $this->template . '/layouts/'.$templateLayout.'';
<jdoc:include type="modules" name="footer1" style="html5" /> ?>
</div>
<?php endif; ?>
<?php if ($footer2 > 0) : ?>
<div class="<?php echo $footerWidth ?>">
<jdoc:include type="modules" name="footer2" style="html5" />
</div>
<?php endif; ?>
<?php if ($footer3 > 0) : ?>
<div class="<?php echo $footerWidth ?>">
<jdoc:include type="modules" name="footer3" style="html5" />
</div>
<?php endif; ?>
</div>

<!-- Initialize JS Plugins -->
<script src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/app.js"></script>

<?php if ($orbit > 0) : ?>
<script type="text/javascript">
$(window).load(function() {
$('#orbit').orbit({
animation: 'fade', // fade, horizontal-slide, vertical-slide, horizontal-push
animationSpeed: 800, // how fast animtions are
timer: true, // true or false to have the timer
resetTimerOnClick: false, // true resets the timer instead of pausing slideshow progress
advanceSpeed: 4000, // if timer is enabled, time between transitions
pauseOnHover: false, // if you hover pauses the slider
startClockOnMouseOut: false, // if clock should start on MouseOut
startClockOnMouseOutAfter: 1000, // how long after MouseOut should the timer start again
directionalNav: true, // manual advancing directional navs
captions: true, // do you want captions?
captionAnimation: 'fade', // fade, slideOpen, none
captionAnimationSpeed: 800, // if so how quickly should they animate in
bullets: false, // true or false to activate the bullet navigation
bulletThumbs: false, // thumbnails for the bullets
bulletThumbLocation: '', // location from this file where thumbs will be
afterSlideChange: function(){}, // empty function
fluid: true // or set a aspect ratio for content slides (ex: '4x3')
});
</script>
<?php endif; ?>
</body> </body>

</html> </html>
77 changes: 44 additions & 33 deletions js/app.js
@@ -1,35 +1,46 @@
(function($){ ;(function ($, window, undefined) {
$(function(){ 'use strict';


$(document).foundationAlerts(); var $doc = $(document),
$(document).foundationAccordion(); Modernizr = window.Modernizr;
$(document).tooltips();
$('input, textarea').placeholder();

$.fn.foundationAlerts ? $doc.foundationAlerts() : null;

$.fn.foundationAccordion ? $doc.foundationAccordion() : null;

$.fn.foundationTooltips ? $doc.foundationTooltips() : null;
$(document).foundationButtons(); $('input, textarea').placeholder();





$.fn.foundationButtons ? $doc.foundationButtons() : null;
$(document).foundationNavigation();



$.fn.foundationNavigation ? $doc.foundationNavigation() : null;


$(document).foundationCustomForms();

$.fn.foundationTopBar ? $doc.foundationTopBar() : null;



$.fn.foundationCustomForms ? $doc.foundationCustomForms() : null;

$.fn.foundationMediaQueryViewer ? $doc.foundationMediaQueryViewer() : null;
$(document).foundationTabs({callback:$.foundation.customForms.appendCustomMarkup});



$.fn.foundationTabs ? $doc.foundationTabs() : null;


// UNCOMMENT THE LINE YOU WANT BELOW IF YOU WANT IE8 SUPPORT AND ARE USING .block-grids
// $('.block-grid.two-up>li:nth-child(2n+1)').css({clear: 'left'});
// $('.block-grid.three-up>li:nth-child(3n+1)').css({clear: 'left'});
// $('.block-grid.four-up>li:nth-child(4n+1)').css({clear: 'left'}); // UNCOMMENT THE LINE YOU WANT BELOW IF YOU WANT IE8 SUPPORT AND ARE USING .block-grids
// $('.block-grid.five-up>li:nth-child(5n+1)').css({clear: 'left'}); // $('.block-grid.two-up>li:nth-child(2n+1)').css({clear: 'both'});
}); // $('.block-grid.three-up>li:nth-child(3n+1)').css({clear: 'both'});

// $('.block-grid.four-up>li:nth-child(4n+1)').css({clear: 'both'});
})(jQuery); // $('.block-grid.five-up>li:nth-child(5n+1)').css({clear: 'both'});

// Hide address bar on mobile devices
if (Modernizr.touch) {
$(window).load(function () {
setTimeout(function () {
window.scrollTo(0, 1);
}, 0);
});
}

})(jQuery, this);
3 changes: 2 additions & 1 deletion language/en-GB/en-GB.tpl_siegeengine.ini
Expand Up @@ -184,7 +184,8 @@ TPL_SETTINGS_FOUNDATION_ALL_NO="No"


TPL_SETTINGS_SETWIDTH_LABEL="Template Width" TPL_SETTINGS_SETWIDTH_LABEL="Template Width"
TPL_SETTINGS_SETWIDTH_DESC="Specify the template width in px. Leave blank for default value (1440px)" TPL_SETTINGS_SETWIDTH_DESC="Specify the template width in px. Leave blank for default value (1440px)"

TPL_SETTINGS_LAYOUT_LABEL="Choose Layout"
TPL_SETTINGS_LAYOUT_DESC="Choose template layout. You can create your own using default.php as a basis and place the file in the 'layouts' in the template folder."






Expand Down

0 comments on commit 3d9d1b3

Please sign in to comment.