Skip to content

Commit

Permalink
Merge branch 'release/5.0.0-rc.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
w00fz committed Jun 8, 2015
2 parents 9ad2538 + 5013eb7 commit d0c4dd2
Show file tree
Hide file tree
Showing 261 changed files with 16,885 additions and 10,891 deletions.
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4

# 2 space indentation
[*.yaml, *.yml]
indent_style = space
indent_size = 2
7 changes: 5 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Linguist Normalizer
*.yaml linguistic-language=PHP
*.twig linguistic-language=PHP
**/js/main.js linguist-vendored=true
**/css-compiled/*.css linguist-vendored=true
**/gulpfile.js linguist-vendored
**/js/*.js linguist-vendored
**/js/*.json linguist-vendored
**/css-compiled/*.css linguist-vendored
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@ src/composer.lock
src/vendor/**

# Symbolic links in admin
platforms/joomla/com_gantry5/*/common
platforms/joomla/com_gantry5/admin/common
platforms/wordpress/gantry5/admin/common
platforms/*/*/common
platforms/*/*/src
platforms/*/*/assets
platforms/*/*/engines

# Symbolic links in themes
themes/*/*/common
themes/*/*/skeleton

themes/*/*/src
themes/*/*/cache
themes/*/*/custom
Expand Down
115 changes: 115 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
language: php
php: 5.6
branches:
except:
- master
- /^feature\//
notifications:
email:
on_success: never
on_failure: always
env:
global:
# GH_TOKEN
- secure: "kY4hfKlKczsizZVxHMA1THnh3w2kmMOPnaadpnAwbpYcCQOlCgwgz7tbGEB5gPAbsKJfQMEgdlEAWnRiUUQdQE5vKhiwS14Jo3pry/i10iWCys/M+zLn6uclXCuTQUjNm4L0ReLQu5nkCPRyDL/F9vOp6v3h+vd4gfTEw+9TntfOg1g5RIW8tG1iBm12IhFgoQjP+wKUXluGTqZIlJyV5Jx1ef51Da3nSxd8lPHrsxElzZEebTRd2CvVM5vY+wZY4xjl0GjZo2v8ps3HI7IOZYygzYGLkH+Hbir+SHNTLZX6IMWQWuq56iiRb5CZm64GNULnrXAEaP2EZyiEHkA7gQgddtCzhMlGq5qyrYBfrPRukjRGEhRHEMvntUQloGlPYsETzO6ulvYBRlkS26s4C1uw6RBSgv58vWjhoXHyt7cDzv9yjKsboRE+2KCogkbbBDt7DxFRuUsQ9SnslzPuAFzBKZXik8Ea5Fl2Q/3tXOMt3fXp5CTQ5fT3X0p82orln5o1yQ1GZ3xWBtprMoWz5GyRq67G+gZql/BTI834JeQQ/TBhOszWV2a0zcw2SyjVFf9SeZTfNSOmpJz60aJcZSegEuTuxEfm+P3x34WAP/AFIt3vAFxRGad6A8ceP0rbY7R3WzaJcRWpuLCVzcmMukKNOltbzL0We3fF267Z7d4="
before_install:
- composer self-update
- if [ ! -z "$TRAVIS_TAG" ]; then
gem install sass;
npm install -g gulp &>/dev/null;
fi
install:
- if [ ! -z "$TRAVIS_TAG" ]; then
npm install &>/dev/null;
gulp -up &>/dev/null;
fi
- cd $TRAVIS_BUILD_DIR/src && composer install --no-dev;
- cd $TRAVIS_BUILD_DIR/bin/build && composer install --no-dev
script:
- export SHORT_COMMIT=$(echo $TRAVIS_COMMIT | cut -c1-9)
- echo "Branch ($TRAVIS_BRANCH)"
- cd $TRAVIS_BUILD_DIR/bin/build
- if [ "$TRAVIS_BRANCH" == "develop" ]; then
php build.php joomla-dev -Dpackage_dir=$TRAVIS_BUILD_DIR/repo_pkgs -Dxml.version=dev-$SHORT_COMMIT -Dstr.fileversion=_develop;
elif [ ! -z "$TRAVIS_TAG" ]; then
php build.php joomla-prod -Dpackage_dir=$TRAVIS_BUILD_DIR/repo_pkgs -Dxml.version=$TRAVIS_TAG;
else
echo "($TRAVIS_BRANCH) is not a supported branch for builds";
fi
before_deploy:
- export PROJ_PKGS_PATH=$TRAVIS_BUILD_DIR/repo_pkgs
- export PROJ_PKGS=$HOME/build/$TRAVIS_REPO_SLUG/repo_pkgs/*.zip
- if [ "$TRAVIS_BRANCH" == 'develop' ]; then
FILES_PATH=$PROJ_PKGS_PATH;
JSON="{";
FILES=$FILES_PATH/*.zip;
COUNT=`ls $FILES 2>/dev/null | wc -l | awk '{print $1}'`;
COMMIT=$TRAVIS_COMMIT;
SHORT_COMMIT=$(echo $COMMIT | cut -c1-9)
CURRENT_DATE=`date +%s`

JSON+="\"count\":$COUNT,";
JSON+="\"commit\":\"$COMMIT\",";
JSON+="\"commit_short\":\"$SHORT_COMMIT\",";
JSON+="\"date\":\"$CURRENT_DATE\",";
JSON+="\"files\":[";

i=0;
for file in ${FILES[@]}; do
i=$(($i + 1));
SIZE=`wc -c < $file | awk '{print $1}'`;
DATE=`stat --format=\"%m\" $file`;
JSON+="{";
JSON+="\"file\":\"${file##*/}\",";
JSON+="\"size\":$SIZE,";
JSON+="\"date\":$DATE";
JSON+="}";

if [ $i != $COUNT ]; then
JSON+=",";
fi
done;
JSON+="]}";

echo $JSON > "$FILES_PATH/map.json";
fi
deploy:
- provider: releases
api_key:
secure: "KgEZx0dHoPLOYj9T087flZKgaf4ggasJcd/DOjHjsXKhjyLYuWZNLOdJaT0MQ+UJ2RwzW+7ESR1lquwEqUN8uPFaA05SZwrCyJU1pOgTYqunM+Sz+lRWANMjgwtGNAQvPfTTAoaKZxrOVSMxv0U2OBAHE2lEsDvz7kwCuHbsoU3/xY144ecUG2lWItHjxQr2X7GmApBgCZ63OPaHK/NP1a8xtkQT+kTfKRHIZwPCyRplSRhqaa8ftQoi5SynaHtECi9/RYCRp3wgclbCPHRH3Eez4li+AdE8Q/X+LK/jmIYqOUWvq8IpS0ePg67fuE4cBNLYBrbPWgSPfUka3/61KyGRTw+2ofdf9eMOtJQa7JZUSWWUEeeyeBFIomNvY40nWSmC+T/l5EixIwBFF7CzVatnDPCz3w4gPYxAVwQjTtKqqFu6ZfeQNp0asj9OqukF3nJbN42iuIh6vxHxIQ6U3WMo+0t507i0rYf3Esl3YGlMVUuN7mNlWNv5eKrfD2CLHeBiDvo6SRCdYpgLu6FMBnwM2Fadlm51nAN/tpSxXEA1gUoVT3rJ8e6vnFcdy1ZHq1DPMtiZ8oMLBtdq8lcDs8DzKqCwImfmsDtM7M040JG/MuB5kVUXLcA5ycRCh1piDUAqITmvPucYHO8hT63cMZHwcxlqw1Ta3ckB4Ng3Eqg="
skip_cleanup: true
file_glob: true
file: "${PROJ_PKGS}"
on:
repo: gantry/gantry5
tags: true
- provider: s3
access_key_id: AKIAIGEIWVFNBMVSH2UA
secret_access_key:
secure: "DP32BDS3fk7/tLsZxj5CjiAT5GLHQFNOFte9Rds7eird+xqOSqUXHVplkOSVPKCt6V3CIO3wtxe97T4cuxtoobwVlwF8WRmrS4x98u2sLIS9lSZZzDg/W8tkLjOmW9QOKFtBEykj1z1i9nYDlhKFDtGNIkN7juZUz5UZ2S3Unwsm94vcm8ATghXGclwfib329I+7GVIA24PMUv2ETl0PGs+s+D1KmhXeU5UwharxnM+X4kyIsCBPrxXX+2QfAiSrjqKwHfzGQjRJIAQ6m4UdzuZWbxSAiJ4TrWrwRYDCKn8Va72g9UcUdiOyLd6Eg54iSCKdbQ+zELYjhcuwO7g4kpc6V/wgcHYVG4stPyuiXc2G+ZAGXDtW0H7QobeXEUTAsad2AshmCA+lFCmecywBdpsDSYp9ZBY0Qfevncmx0CIWlaPPVjUQ3FMn+oniamJlmbwpmHLiZuCyDE9sSxeQrPSI/7N+zSD03EM6AxIBswaF6XzIhcP3aPz9BzJ2v/YHpPzxtqLaLhEswxWkghmRYASaJn6Ut9xwuWkfhO2UIzkBW6RA3HV6CjZ5opQBe4IyxiVsB2qPzQfxGXz4pN2BoTbuLyf4jS0CA1h6g/7vpCz6VnOuTzBg/c7nQjk8Y69hUYHL91lSlZ/a7tNHe3z9DtaxVg24MG56e+mevYpUgLk="
bucket: gantry5
local-dir: "$PROJ_PKGS_PATH"
upload-dir: nightly
skip_cleanup: true
acl: public_read
on:
repo: gantry/gantry5
branch: develop
after_deploy:
- echo "Branch ($TRAVIS_BRANCH) - Tag ($TRAVIS_TAG)"
- if [ ! -z "$TRAVIS_TAG" ]; then
git config user.email "[email protected]";
git config user.name "Travis CI";
rm -rf $PROJ_PKGS_PATH;
git checkout -b master;
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*";
git fetch --quiet;
cd $TRAVIS_BUILD_DIR/bin/build;
php build.php prod-versions -propertyfile release.ini -Dupdate_versions=true -Dxml.version=$TRAVIS_TAG;
cd $TRAVIS_BUILD_DIR;
git commit -am "Release [$TRAVIS_TAG] - Automatic Version Number Updates";
git push --force --quiet --set-upstream https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git master:master &>/dev/null;
fi
- if [ "$TRAVIS_BRANCH" == 'develop' ]; then
curl -L http://gantry.org/cibuilds >/dev/null 2>&1;
fi
29 changes: 16 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Gantry Framework
Gantry Framework [![Build Status](https://travis-ci.org/gantry/gantry5.svg)](https://travis-ci.org/gantry/gantry5)
================

[![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)
Expand All @@ -25,10 +25,8 @@ Gantry 5 is a framework by which Gantry-powered themes are made. In order for a

The first thing you need to do is download the latest build of Gantry 5 and Hydrogen. You can do so by clicking the links below, or via [GitHub](http://github.com/gantry/gantry5/).

* [Download Gantry 5](https://github.com/gantry/gantry5/releases/download/5.0.0-rc.2/joomla-pkg_gantry5_v5.0.0-rc.2.zip)
* [Download Hydrogen Theme](https://github.com/gantry/gantry5/releases/download/5.0.0-rc.2/joomla-tpl_g5_hydrogen_v5.0.0-rc.2.zip)

>>> During the initial beta, the **Framework** and **Template** are being distributed in different installable packages. A bundled package is planned, but will likely be available after the initial beta launch.
| [Download Stable](http://www.gantry.org/downloads#gantry5) | [Download CI Builds](http://gantry.org/downloads#ci-builds) |
|:---------------------------------------------------:|:---------------------------------------------------------:|

Once you have the latest packages, installation is simple. We have provided a step-by-step guide in the **Installation** portion of this documentation.

Expand All @@ -55,23 +53,23 @@ You will notice the following menu items in the Gantry 5 Administrator:

4. **Clear Cache**: This button clears the cache files related to Gantry. This includes all of the temporary files outside of CSS and configuration information.

5. **Configuration Dropdown**: This dropdown makes it easy to quickly switch between Configurations without having to leave the Gantry Administrator.
5. **Outlines Dropdown**: This dropdown makes it easy to quickly switch between Outlines without having to leave the Gantry Administrator.

6. **Styles**: This administrative panel gives you access to style related configuration settings. This includes things like theme colors, fonts, style presets, and more.
6. **Styles**: This administrative panel gives you access to style related outline settings. This includes things like theme colors, fonts, style presets, and more.

7. **Settings**: This administrative panel offers you the ability to configure the functional settings of the theme. This includes setting defaults for Particles, as well as enabling/disabling individual Particles.

8. **Layout**: This administrative panel is where you would configure the layout for your theme. Creating an placing module positions, Particles, spacers, and non-rendered scripts such as Google Analytics code is all done in this panel.

[**Learn More**](http://docs.gantry.org/gantry5/configure/gantry-admin)

## What are Configurations, Particles, Atoms, etc.?
## What are Outlines, Particles, Atoms, etc.?

Because Gantry 5 is so different from any version of Gantry before it, we came up with some terms to help make sense of the relationships Gantry's new features have with one-another. Here is a quick breakdown of commonly used terms related to Gantry 5.

| Term | Definition |
| :----- | :----- |
| Configuration | A configurable style used in one or more areas of your site. It serves as the container on which a page's style, settings, and layout are set. |
| Outline | A configurable style used in one or more areas of your site. It serves as the container on which a page's style, settings, and layout are set. |
| Particle | A typically small block of data used on the front end. It acts a lot like a widget/module, but can be easily configured in the Gantry 5 Administrator. |
| Atom | A type of Particle that contains non-rendered data, such as custom scripting (JS, CSS, etc.) or analytics scripts for traffic tracking. |

Expand Down Expand Up @@ -103,15 +101,20 @@ Once that’s done, you can install **Gulp**. We recommend installing Gulp globa

Now that you have the required pieces, the next step is to install all of the JS module dependencies. To do so, make sure you are at the root of the Gantry 5 project, and run the command `npm install`.

Because we have two sets of JS applications, one for admin and one for the site, you will also need to install the JS modules for those. Still, from the root of your project you can run this command:
Because we have different sets of JS and SCSS applications for admin, site, nucleus, you will also need to install the node modules for all of them. Still, from the root of your project you can run the command `gulp -up` which will take care of all the sub projects.

`cd platforms/common/ && npm install && cd ../../assets/common/ && npm install && cd ../../`
> Along with the `-up` command, you can alternatively use `-update`, `--update`, `-up`, `--up`, `-install`,
> `--install`, `-inst`, `--inst`, `-go`, `--go`, `-deps`, `--deps`.
> Whichever is easier for you to remember. The code will understand on its own if it needs to install for the first time or just update the node modules.
>
> Note that this might take a few moments.
At this point you have everything you need to run Gulp. Just type the command `gulp` and you should see the CSS and JS getting compiled.

We provide a few handy tasks as well:

1. `$ gulp` / `$ gulp all`: Compiles all of the CSS and JS in the project.
2. `$ gulp watch`: Starts the compilers in `watch` mode. Any change applied to targeted **JS** or **SCSS** files will trigger an automatic recompilation.
3. `$ gulp css` / `$ gulp js`: Compiles all of either CSS or JS files, in case you are only working on one and not the other.
4. `$ gulp —prod`: Compiles every CSS and JS in production mode. The compiled files won’t have source maps and will be compressed (this usually takes slightly longer than normal mode).
3. `$ gulp watch --css` / `$ gulp watch --js`: Starts the compilers in `watch` mode and listens to only **SCSS** or **JS** changes. Useful if you are only focusing on one and not the other.
4. `$ gulp css` / `$ gulp js`: Compiles all of either CSS or JS files, in case you are only working on one and not the other.
5. `$ gulp —prod`: Compiles every CSS and JS in production mode. The compiled files won’t have source maps and will be compressed (this usually takes slightly longer than normal mode).
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.0.0-rc.2
@version@
30 changes: 21 additions & 9 deletions assets/common/application/menu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ var Menu = new prime({
mobileContainer = $(selectors.mobileContainer),
body = $('body');

if (!main) { return; }
main.on('mouseenter', this.bound('mouseenter'));
main.on('mouseleave', this.bound('mouseleave'));
body.delegate('click', ':not(' + selectors.mainContainer + ') ' + selectors.linkedParent + ', .g-fullwidth .g-sublevel ' + selectors.linkedParent, this.bound('click'));
Expand Down Expand Up @@ -129,10 +130,13 @@ var Menu = new prime({
}

if (!isSelected) {
var currentlyOpen = parent.siblings().search(selectors.touchIndicator + ' !> * !> ' + selectors.item + '.' + states.selected);
(currentlyOpen || []).forEach(bind(function(open) {
this.closeDropdown(open);
}, this));
var siblings = parent.siblings();
if (siblings) {
var currentlyOpen = siblings.search(selectors.touchIndicator + ' !> * !> ' + selectors.item + '.' + states.selected);
(currentlyOpen || []).forEach(bind(function(open) {
this.closeDropdown(open);
}, this));
}
}

if ((menuType == 'megamenu' || !parent.parent(selectors.mainContainer)) && (parent.find(' > ' + selectors.dropdown + ', > * > ' + selectors.dropdown) || isGoingBack)) {
Expand Down Expand Up @@ -262,27 +266,35 @@ var Menu = new prime({
find, dropdowns;

if (mq.matches) {
// move to Mobile Container
find = mainContainer.find(selectors.topLevel);
if (find) { find.top(mobileContainer); }
if (find) {
mainContainer.parent('.g-block').addClass('hidden');
mobileContainer.parent('.g-block').removeClass('hidden');
find.top(mobileContainer);
}
} else {
// move back to Original Location
find = mobileContainer.find(selectors.topLevel);
if (find) { find.top(mainContainer); }
if (find) {
mobileContainer.parent('.g-block').addClass('hidden');
mainContainer.parent('.g-block').removeClass('hidden');
find.top(mainContainer);
}
}

this.resetStates(find);

// we need to reintroduce fixed widths for those dropdowns that come with it
if (!mq.matches && (find && (dropdowns = find.search('[data-g-item-width]')))) {
console.log(dropdowns);
dropdowns.forEach(function(dropdown) {
dropdown = $(dropdown);
dropdown[0].style.width = dropdown.data('g-item-width');
console.log(dropdown, dropdown.data('g-item-width'));
});
}
},

_debug: function() {}
});

module.exports = Menu;
module.exports = Menu;
Loading

0 comments on commit d0c4dd2

Please sign in to comment.