Skip to content

Commit

Permalink
Merge branch 'release/5.0.0-beta.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
w00fz committed Mar 27, 2015
2 parents 5254c32 + 1032363 commit b61f36c
Show file tree
Hide file tree
Showing 1,215 changed files with 93,008 additions and 26,110 deletions.
27 changes: 21 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,37 @@
# Composer
composer.lock
vendor/**
# OS Generated
.DS_Store*
ehthumbs.db
Thumbs.db

# PhpStorm
.idea

# Composer
bin/**/composer.lock
bin/**/vendor/**
src/composer.lock
src/vendor/**

# Symbolic links in admin
platforms/joomla/com_gantry5/*/common
platforms/*/*/common
platforms/*/*/src
platforms/*/*/vendor

# Symbolic links in themes
themes/*/*/common
themes/*/*/skeleton
themes/*/*/src
themes/*/*/vendor
themes/*/*/cache
themes/*/*/custom
themes/*/magento/design/default/gantry/common
themes/*/magento/design/default/gantry/src
themes/*/magento/design/default/gantry/vendor
themes/*/magento/skin/default/common

# Compiled
.sass-cache/*
**/.sass-cache
node_modules/*
platforms/wordpress/gantryadmin/cache
platforms/common/node_modules
assets/application/node_modules
assets/common/application/node_modules
26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,32 @@
Gantry Framework
================

Install composer to your system and run ```./bin/build.sh``` before doing anything else!
[![Join the chat at https://gitter.im/gantry/gantry5](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/gantry/gantry5?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

After you have done that, just go into your site and run ```./bin/install.sh``` in there.
Documentation for all the supported platforms can be found from [themes](themes/README.md) folder.

Best place to get started is to take a look into Gantry Prime which is our primary theme development and testing environment.

PS. You should run 'composer install' inside 'src/' folder before installing Gantry 5 to your sites.


After you have done that, just go into your Joomla / WordPress / phpBB / Magento / Grav installation and run ```{PATH_TO_REPO}/bin/install.sh``` in there.

## Joomla

Extensions Manager / Discover / Discover and install all Gantry 5 related extensions. Also remember to enable System - Gantry Administration plugin.

## WordPress

In WordPress you should also install Timber plugin before using the theme.

Directory structure
===================

- assets System wide media assets (Font Awesome, Whoops etc).
- bin Scripts to install and build Gantry.
- design Design images for Gantry.
- engines Supported engines (Nucleus, Bootstrap etc).
- platforms Gantry administration, and platform specific plugins etc.
- src Gantry framework and platform specific overrides.
- themes Base themes for Gantry.
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5.0.0-beta.1
29 changes: 29 additions & 0 deletions assets/common/application/Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module.exports = function(grunt) {
grunt.initConfig({
wrapup: {
build: {
requires: {
'G5': './main.js'
},
options: {
output: '../js/main.js',
sourcemap: '../js/main.js.map',
sourcemapRoot: '../',
sourcemapURL: 'main.js.map',
compress: false
}
}
},
watch: {
js: {
files: ['**/*.js', 'Gruntfile.js'],
tasks: ['wrapup']
}
}
});

grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-wrapup');
grunt.registerTask('default', ['watch']);
grunt.registerTask('all', ['wrapup']);
};
5 changes: 5 additions & 0 deletions assets/common/application/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"use strict";

module.exports = {
menu: require('./menu')
};
136 changes: 136 additions & 0 deletions assets/common/application/menu/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
"use strict";

var r = require('domready'),
$ = require('elements'),
zen = require('elements/zen');

var MBP = 768;

var resetSelectedActive = function() {
var body = $('body'),
mainNav = $('.g-main-nav'),
selected, actives, levels;

body.removeClass('g-nav-overlay-active');
selected = mainNav.search('.g-selected');
actives = mainNav.search('.g-active');
levels = mainNav.search('.g-toplevel, .g-sublevel');

if (selected) { selected.removeClass('g-selected'); }
if (actives) { actives.removeClass('g-active').addClass('g-inactive'); }
if (levels) { levels.removeClass('g-slide-out'); }
};

var adjustOnViewportChange = function() {
var body = $('body'),
topLevel = $('.g-toplevel'),
pageSurround = $('#g-page-surround'),
mainNav = pageSurround.search('.g-main-nav'),
mobileNav = pageSurround.nextSibling('.g-mobile-nav');

if (window.innerWidth < MBP) {
resetSelectedActive();
if (mobileNav) { mobileNav.appendChild(topLevel); }
} else {
resetSelectedActive();
if (mainNav) { mainNav.appendChild(topLevel); }
if (body.hasClass('g-mobile-nav-active')) {
body.removeClass('g-mobile-nav-active');
}
}
};

$(window).on('load', adjustOnViewportChange);
$(window).on('resize', adjustOnViewportChange);

r(function() {
var body = $('body'),
pageSurround = $('#g-page-surround'),
navOverlay = zen('div.g-nav-overlay'),
mobileNav = zen('nav.g-main-nav.g-mobile-nav'),
mobileNavToggle = zen('div.g-mobile-nav-toggle');

body.delegate('click', '.g-menu-item [data-g-menuparent]', function(e, el) {
el = $(el);

var dropdown = el.nextSibling('.g-dropdown'),
parent = el.parent('.g-menu-item');

if (!dropdown) { return; }

if (dropdown.hasClass('g-inactive')) {
// add g-selected class to clicked item
el.addClass('g-selected');

// remove g-inactive and add g-active to the dropdown
dropdown.removeClass('g-inactive').addClass('g-active');

// add g-slide-out class to the parent UL
el.parent('ul').addClass('g-slide-out');

// switch to inactive all siblings menu-items and remove g-selected on previous ones
var lists = parent.search('~~ .g-menu-item ul');
if (lists) { lists.removeClass('g-active').addClass('g-inactive'); }

// children
var children = el.children('.g-menu-item-content');
if (children) { children.removeClass('g-selected'); }

if (window.innerWidth > MBP) { body.addClass('g-nav-overlay-active'); }
} else {
resetSelectedActive();
}
});

// Go Back Link for Level 1 || dont think we use this :)
body.delegate('click', '.g-menu-item .g-level-1', function(e, el) {
el = $(el);

var dropdown = el.parent('.g-dropdown'),
toplevel = el.parent('.g-toplevel');

if (dropdown || toplevel) {
if (dropdown) { dropdown.removeClass('g-active').addClass('g-inactive'); }
if (toplevel) { toplevel.removeClass('g-slide-out'); }
}
});

// Go Back Link for Level 2+
body.delegate('click', '.g-menu-item .g-go-back', function(e, el) {
el = $(el);

var dropdown = el.parent('.g-dropdown'),
parent = el.parent('.g-menu-item');

if (dropdown) {
var parentSublevel = dropdown.parent('.g-sublevel');
dropdown.removeClass('g-active').addClass('g-inactive');
if (parentSublevel) { parentSublevel.removeClass('g-slide-out'); }
}
if (parent) { parent.search('> .g-menu-item-content').removeClass('g-selected'); }
});

// Close menu on overlay click
body.delegate('click', '.g-nav-overlay', function() {
if (window.innerWidth < MBP) {
body.toggleClass('g-mobile-nav-active');
} else {
body.toggleClass('g-nav-overlay-active');
resetSelectedActive();
}
});

// Mobile Nav Toggle
body.delegate('click', '.g-mobile-nav-toggle', function() {
body.toggleClass('g-mobile-nav-active');
});

// Toggle Class on Mobile
body.appendChild(mobileNav);
navOverlay.bottom(pageSurround);
mobileNavToggle.bottom(pageSurround);

adjustOnViewportChange();
});

module.exports = {};
14 changes: 14 additions & 0 deletions assets/common/application/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "gantry-theme",
"version": "0.1.0",
"dependencies": {
"domready": "^1.0.7",
"elements": "*"
},
"devDependencies": {
"grunt": "~0.4.5",
"grunt-contrib-sass": "~0.9.2",
"grunt-contrib-watch": "~0.6.1",
"grunt-wrapup": "~0.1.3"
}
}
4 changes: 4 additions & 0 deletions assets/common/css/font-awesome.min.css

Large diffs are not rendered by default.

110 changes: 110 additions & 0 deletions assets/common/css/whoops.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
body {
background-color: #eee;
}

body header {
background: #349886;
border-left: 8px solid #29796B;
}

body .clipboard {
width: 28px;
height: 28px;
background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcAQMAAABIw03XAAAAA3NCSVQICAjb4U/gAAAABlBMVEX///////9VfPVsAAAAAnRSTlP/AOW3MEoAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAFnRFWHRDcmVhdGlvbiBUaW1lADEwLzE1LzE0xr/LJAAAADhJREFUCJlj+P///wcGBPGDQR5E8OMi2IEEczOIaAQRHSCioQBGHAAR/7AT/z+DiA8MMALVXhABAJf9Sr5aY+UFAAAAAElFTkSuQmCC);
}

body .exc-title-primary {
color: #1C3631;
text-shadow: none;
}

body .exc-title {
color: #2F5B52;
text-shadow: none;
}

body .data-table-container label {
color: #0082BA;
}

body .frame {
border: 0;
}

body .frames-container {
overflow-y: auto;
overflow-x: hidden;
}

body .active .frame-class {
color: #E3D8E9;
}

body .frame-class {
color: #9055AF;
}

body .frame.active {
border: 0;
box-shadow: none;
background-color: #9055AF;
}

body .frame:not(.active):hover {
background: #e9e9e9;
}

body .frame-file, body .data-table tbody {
font-family: "DejaVu Sans Mono", Menlo, Monaco, Consolas, Courier, monospace;
font-size: 13px;
}

body .frame-code {
background: #305669;
border-left: 8px solid #253A47;
padding: 1rem;
}

body .frame-code .frame-file {
background: #253A47;
color: #eee;
text-shadow: none;
box-shadow: none;
font-family: inherit;
}

body .frame-code .frame-file strong {
color: #fff;
font-weight: normal;
}

body .frame-comments {
background: #283E4D;

box-shadow: none;
}

body .frame-comments.empty:before {
color: #789AAB;
}

body .details-container {
border: 0;
}

body .details {
background-color: #eee;
border-left: 8px solid #ddd;
padding: 1rem;
}

body .code-block {
background: #2C4454;
box-shadow: none;
font-family: "DejaVu Sans Mono", Menlo, Monaco, Consolas, Courier, monospace;
font-size: 13px;
}

body .handler.active {
background: #666;
}
Binary file added assets/common/fonts/FontAwesome.otf
Binary file not shown.
Binary file added assets/common/fonts/fontawesome-webfont.eot
Binary file not shown.

0 comments on commit b61f36c

Please sign in to comment.