Skip to content

Commit

Permalink
Merge pull request #3 from gantry/develop
Browse files Browse the repository at this point in the history
Update from original
  • Loading branch information
JoomFX committed May 27, 2015
2 parents 6f2b59e + 7766df0 commit 5689ec9
Show file tree
Hide file tree
Showing 151 changed files with 4,004 additions and 2,017 deletions.
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
121 changes: 121 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
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;
cd $TRAVIS_BUILD_DIR/platforms/common && npm install &>/dev/null;
cd $TRAVIS_BUILD_DIR/assets/common && npm install &>/dev/null;
cd $TRAVIS_BUILD_DIR/engines/common/nucleus && npm install &>/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
cd $TRAVIS_BUILD_DIR/platforms/joomla;
sed -i -e "s/<version>.*<\/version>/<version>dev-$SHORT_COMMIT<\/version>/g" pkg_gantry5.xml;
cd $TRAVIS_BUILD_DIR/bin/build;
php build.php dev -propertyfile release.ini -Dpackage_dir=$TRAVIS_BUILD_DIR/repo_pkgs -Dstr.fileversion=_develop;
elif [ ! -z "$TRAVIS_TAG" ]; then
php build.php prod -propertyfile release.ini -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 "bot@travis-ci.org";
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
16 changes: 7 additions & 9 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
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.0.0-rc.3-dev
@version@
2 changes: 1 addition & 1 deletion assets/common/js/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

64 changes: 58 additions & 6 deletions bin/build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
-Dpackage_dir=../../../builds/gantry5 (= builds/gantry5)
-Dtmp_dir=tmp (= git/gantry5/build/tmp)
-Dbuild_dir=package (= git/gantry5/build/package)
-Dupdate_versions=false (= true / for CI and automated push)
-->
<project name="gantry5" basedir="." description="Phing Build Script" default="dist">
<project name="gantry5" basedir="." description="Phing Build Script" default="prod">

<!-- Setup of any global settings that will apply to the entire build script -->
<property file="${phing.dir}/build.ini" />
Expand All @@ -34,6 +35,9 @@
<condition property="build_dir" value="${phing.dir}/package">
<not><isset property="build_dir" /></not>
</condition>
<condition property="update_versions" value="false">
<not><isset property="update_versions" /></not>
</condition>

<property name="path.assets" value="${project_dir}/assets" />
<property name="path.engines" value="${project_dir}/engines" />
Expand Down Expand Up @@ -72,7 +76,8 @@
</replacetokens>
</filterchain>

<target name="dist" depends="preflight,info,mkdir,backup,assets-prod,build-installer,build-component,build-library,build-nucleus,build-plugins,build-themes,reset-git,package,postflight" />
<target name="prod" depends="preflight,info,mkdir,assets-prod,build-installer,build-component,build-library,build-nucleus,build-plugins,build-themes,reset-git,package,cleanup,postflight" />
<target name="dev" depends="preflight,info,mkdir,build-installer,build-component,build-library,build-nucleus,build-plugins,build-themes,package,cleanup,postflight" />

<!-- Preflight check to see if we can even run the build script -->
<target name="preflight">
Expand All @@ -97,7 +102,7 @@
<exec command="npm list -g gulp|grep gulp" checkreturn="true" passthru="true" output="/dev/null" />
</try>
<catch>
<fail message="Please install Gulp globally" />
<echo message="Please install Gulp globally" />
</catch>
</trycatch>
</target>
Expand All @@ -123,7 +128,6 @@
<mkdir dir="${build_dir}/distribution/packages" />
<mkdir dir="${package_dir}" />
<mkdir dir="${package_dir}/backup" />
<touch file="${package_dir}/build"/>
</target>


Expand Down Expand Up @@ -212,6 +216,7 @@
<echo message="Building Library.." />

<copy todir="${tmp_dir}/packages/lib_gantry5/library" overwrite="true">
<filterchain refid="filter" />
<fileset dir="${path.src}">
<include name="*.php"/>
<include name="composer.*"/>
Expand Down Expand Up @@ -352,6 +357,21 @@
<include name="*.xml"/>
</fileset>
</copy>

<echo message="Building Modules.." />

<copy todir="${tmp_dir}/packages/mod_gantry5_particle" overwrite="true">
<fileset dir="${path.platforms}/joomla/mod_gantry5_particle"/>
</copy>

<!-- Add version information to all xml files -->
<copy todir="${tmp_dir}/packages/mod_gantry5_particle" overwrite="true">
<filterchain refid="filter"/>
<fileset dir="${path.platforms}/joomla/mod_gantry5_particle">
<include name="*.xml"/>
</fileset>
</copy>

</target>

<target name="build-themes" depends="build-installer">
Expand Down Expand Up @@ -387,7 +407,9 @@
<copy todir="${tmp_dir}/templates/tpl_g5_${directory}" overwrite="true">
<filterchain refid="filter"/>
<fileset dir="${path.themes}/${directory}/joomla">
<include name="*.xml"/>
<include name="**/*.xml"/>
<include name="gantry/theme.yaml"/>
<include name="install.php"/>
</fileset>
</copy>

Expand Down Expand Up @@ -433,9 +455,39 @@
</phingcall>
</target>

<target name="postflight">
<target name="prod-versions">
<if>
<istrue value="${update_versions}" />
<then>
<echo message="Updating versions in ${project_dir} ..." />
<reflexive>
<fileset dir="${project_dir}">
<include pattern="VERSION"/>
<include pattern="**/*.xml"/>
<include pattern="**/*.yaml"/>
<include pattern="*.xml"/>
<include pattern="*.yaml"/>
<include pattern="**/RealLoader.php"/>
<include pattern="**/install.php"/>
<exclude pattern="bin/**"/>
<exclude pattern="**/node_modules/**"/>
<exclude pattern="**/vendor/**"/>
</fileset>
<filterchain refid="filter"/>
</reflexive>
</then>
<else>
<echo message="Skipping versions updates in ${project_dir} ..." />
</else>
</if>
</target>

<target name="cleanup">
<delete dir="${tmp_dir}"/>
<delete dir="${build_dir}"/>
</target>

<target name="postflight">
<echo message="Congratulations, build finished without error!" />
</target>

Expand Down
2 changes: 1 addition & 1 deletion engines/common/nucleus/particles/menu.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
{% if hasCustomWidth and not (root.getDropdown() == 'fullwidth' and item.level > 1) %}
{% set customWidth = ' style="width: ' ~ item.width|raw ~ '" data-g-item-width="' ~ item.width|raw ~ '"' %}
{% endif %}
<ul class="g-dropdown g-inactive {{ gantry.config.get('styles.menu.animation')|default('fade') }}"{{ customWidth|raw }}>
<ul class="g-dropdown g-inactive {{ gantry.config.get('styles.menu.animation')|default('g-fade') }}"{{ customWidth|raw }}>
<li class="g-dropdown-column">
{{ _self.displayContainers(item, root, menu, gantry) }}
</li>
Expand Down
2 changes: 1 addition & 1 deletion engines/joomla/nucleus/css-compiled/joomla.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions engines/joomla/nucleus/particles/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ form:
content: To edit the Module please use the <a href="index.php?option=com_modules" target="_blank" data-g-urltemplate="index.php?option=com_modules&view=module&layout=edit&id=#ID#" href="#">Joomla's Module Manager <i class="fa fa-fw fa-external-link"></i></a>

module_id:
type: input.text
type: gantry.module
label: Module Id
class: g-urltemplate
class: g-urltemplate input-small
picker_label: Pick a Module
description: Enter module Id.
pattern: '\d+'
overridable: false

chrome:
Expand Down
10 changes: 10 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ paths = {
out: './platforms/joomla/com_gantry5/admin/css-compiled/joomla-admin.css',
load: './engines/common/nucleus/scss'
},
{ // admin - wordpress
in: './platforms/wordpress/gantry5/admin/scss/wordpress-admin.scss',
out: './platforms/wordpress/gantry5/admin/css-compiled/wordpress-admin.css',
load: './engines/common/nucleus/scss'
},
{ // nucleus
in: './engines/common/nucleus/scss/nucleus.scss',
out: './engines/common/nucleus/css-compiled/nucleus.css'
Expand All @@ -76,6 +81,11 @@ paths = {
in: './engines/joomla/nucleus/scss/joomla.scss',
out: './engines/joomla/nucleus/css-compiled/joomla.css',
load: './engines/common/nucleus/scss'
},
{ // nucleus - wordpress
in: './engines/wordpress/nucleus/scss/wordpress.scss',
out: './engines/wordpress/nucleus/css-compiled/wordpress.css',
load: './engines/common/nucleus/scss'
}
],
minify: [
Expand Down
Loading

0 comments on commit 5689ec9

Please sign in to comment.