From 3d9d1b35942078a1baeb4a237d7f5be9ed4a5922 Mon Sep 17 00:00:00 2001 From: antonydoyle Date: Tue, 2 Oct 2012 18:12:23 +0100 Subject: [PATCH] Layout edits --- README.md | 7 +- framework.php | 1 + index.php | 205 +---------------------- js/app.js | 77 +++++---- language/en-GB/en-GB.tpl_siegeengine.ini | 3 +- layouts/default.php | 202 ++++++++++++++++++++++ layouts/fullWidth.php | 180 ++++++++++++++++++++ layouts/index.html | 0 templateDetails.xml | 1 + 9 files changed, 442 insertions(+), 234 deletions(-) create mode 100644 layouts/default.php create mode 100644 layouts/fullWidth.php create mode 100644 layouts/index.html diff --git a/README.md b/README.md index 8c803bd..25be250 100644 --- a/README.md +++ b/README.md @@ -25,4 +25,9 @@
  • Added template width override
  • Fixed a menu issue causing problems on 3.0
  • -

    Some features are still untested on 3.0, so please use with caution and take backups!

    \ No newline at end of file +

    Some features are still untested on 3.0, so please use with caution and take backups!

    +
    Updated - 02/10/12
    +

    Updated Foundation core files.

    +

    Few styling fixes.

    +

    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.

    + diff --git a/framework.php b/framework.php index 28bbe53..e13a1c3 100644 --- a/framework.php +++ b/framework.php @@ -24,6 +24,7 @@ $unAlerts = $this->params->get('unAlerts'); $minFound = $this->params->get('minFound'); $setWidth = $this->params->get('setWidth'); +$templateLayout = $this->params->get('layout'); $pageTitle = $this->getTitle(); $option = JRequest::getCmd('option'); diff --git a/index.php b/index.php index 2b88fb1..1259cea 100644 --- a/index.php +++ b/index.php @@ -40,205 +40,12 @@ })(); - - - -
    -
    - 0) { ?> - - <?php echo $sitename ?> - - - - - -
    - 0) : ?> - - -
    - - -
    - 0) : ?> -
    - -
    - -
    - - -
    - 0) : ?> -
    - -
    - -
    - - -
    - 0) : ?> -
    - -
    - - 0) : ?> -
    - -
    - - 0) : ?> -
    - -
    - -
    - - -
    - - 0) : ?> -
    - -
    - - -
    - 0) : ?> -
    - -
    - - 0) : ?> -
    - -
    - - 0) : ?> -
    - -
    - - - - - - 0) : ?> -
    - -
    - - 0) : ?> -
    - -
    - - 0) : ?> -
    - -
    - -
    - - 0) : ?> -
    - -
    - -
    - - -
    - 0) : ?> -
    - -
    - - 0) : ?> -
    - -
    - - 0) : ?> -
    - -
    - -
    - - -
    - 0) : ?> -
    - -
    - - 0) : ?> -
    - -
    - - 0) : ?> -
    - -
    - - 0) : ?> -
    - -
    - -
    - -
    - 0) : ?> -
    - -
    - - 0) : ?> -
    - -
    - - 0) : ?> -
    - -
    - -
    - - - - - 0) : ?> - - + +template . '/layouts/'.$templateLayout.''; +?> + diff --git a/js/app.js b/js/app.js index 8205357..88ada54 100644 --- a/js/app.js +++ b/js/app.js @@ -1,35 +1,46 @@ -(function($){ - $(function(){ - - $(document).foundationAlerts(); - $(document).foundationAccordion(); - $(document).tooltips(); - $('input, textarea').placeholder(); - - - - $(document).foundationButtons(); - - - - $(document).foundationNavigation(); - - - - $(document).foundationCustomForms(); - - - - - $(document).foundationTabs({callback:$.foundation.customForms.appendCustomMarkup}); - +;(function ($, window, undefined) { + 'use strict'; + + var $doc = $(document), + Modernizr = window.Modernizr; + + + $.fn.foundationAlerts ? $doc.foundationAlerts() : null; + $.fn.foundationAccordion ? $doc.foundationAccordion() : null; + $.fn.foundationTooltips ? $doc.foundationTooltips() : null; + $('input, textarea').placeholder(); + + + $.fn.foundationButtons ? $doc.foundationButtons() : null; + + + $.fn.foundationNavigation ? $doc.foundationNavigation() : null; + + + $.fn.foundationTopBar ? $doc.foundationTopBar() : null; + + $.fn.foundationCustomForms ? $doc.foundationCustomForms() : null; + $.fn.foundationMediaQueryViewer ? $doc.foundationMediaQueryViewer() : null; + + $.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'}); - // $('.block-grid.five-up>li:nth-child(5n+1)').css({clear: 'left'}); - }); - -})(jQuery); + + + + // 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: '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'}); + // $('.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); diff --git a/language/en-GB/en-GB.tpl_siegeengine.ini b/language/en-GB/en-GB.tpl_siegeengine.ini index a0d1a52..a83caaf 100644 --- a/language/en-GB/en-GB.tpl_siegeengine.ini +++ b/language/en-GB/en-GB.tpl_siegeengine.ini @@ -184,7 +184,8 @@ TPL_SETTINGS_FOUNDATION_ALL_NO="No" TPL_SETTINGS_SETWIDTH_LABEL="Template Width" 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." diff --git a/layouts/default.php b/layouts/default.php new file mode 100644 index 0000000..2d6439d --- /dev/null +++ b/layouts/default.php @@ -0,0 +1,202 @@ + + + +
    +
    + 0) { ?> + + <?php echo $sitename ?> + + + + + +
    + 0) : ?> + + +
    + + +
    + 0) : ?> +
    + +
    + +
    + + +
    + 0) : ?> +
    + +
    + +
    + + +
    + 0) : ?> +
    + +
    + + 0) : ?> +
    + +
    + + 0) : ?> +
    + +
    + +
    + + +
    + + 0) : ?> +
    + +
    + + +
    + 0) : ?> +
    + +
    + + 0) : ?> +
    + +
    + + 0) : ?> +
    + +
    + + + + + + 0) : ?> +
    + +
    + + 0) : ?> +
    + +
    + + 0) : ?> +
    + +
    + +
    + + 0) : ?> +
    + +
    + +
    + + +
    + 0) : ?> +
    + +
    + + 0) : ?> +
    + +
    + + 0) : ?> +
    + +
    + +
    + + +
    + 0) : ?> +
    + +
    + + 0) : ?> +
    + +
    + + 0) : ?> +
    + +
    + + 0) : ?> +
    + +
    + +
    + + +
    + 0) : ?> +
    + +
    + + 0) : ?> +
    + +
    + + 0) : ?> +
    + +
    + +
    + + + + + 0) : ?> + + + + diff --git a/layouts/fullWidth.php b/layouts/fullWidth.php new file mode 100644 index 0000000..3ac752f --- /dev/null +++ b/layouts/fullWidth.php @@ -0,0 +1,180 @@ + + +
    + 0) { ?> + + <?php echo $sitename ?> + + + + + +
    + 0) : ?> + + + + 0) : ?> +
    + +
    + + + + 0) : ?> +
    + +
    + + + + 0) : ?> +
    + +
    + + 0) : ?> +
    + +
    + + 0) : ?> +
    + +
    + + + + + 0) : ?> +
    + +
    + + +
    + 0) : ?> +
    + +
    + + 0) : ?> +
    + +
    + + 0) : ?> +
    + +
    + + + + + + 0) : ?> +
    + +
    + + 0) : ?> +
    + +
    + + 0) : ?> +
    + +
    + +
    + + 0) : ?> +
    + +
    + + + + 0) : ?> +
    + +
    + + 0) : ?> +
    + +
    + + 0) : ?> +
    + +
    + + + + 0) : ?> +
    + +
    + + 0) : ?> +
    + +
    + + 0) : ?> +
    + +
    + + 0) : ?> +
    + +
    + + + + 0) : ?> +
    + +
    + + 0) : ?> +
    + +
    + + 0) : ?> +
    + +
    + + + + 0) : ?> + + diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..e69de29 diff --git a/templateDetails.xml b/templateDetails.xml index 4a5c337..2e3a949 100644 --- a/templateDetails.xml +++ b/templateDetails.xml @@ -73,6 +73,7 @@ +