This project builds the static and internationalized landing page of Upplication.
GPL-3.0 License
$ git clone [email protected]:Upplication/landing.git
$ yarn install
$ yarn start
Also, it's recomendend (but not mandatory) installing
yarn install -g gulp-cli
$ git clone [email protected]:Upplication/landing.git
$ yarn install
$ yarn start
Starts a local development environment which:
$ yarn run deploy --mode=production
Builds the project with optimization for distribution.
If you are going to upload the project to a folder different than root (/), you can use a parameter called config.base_path
with the destination root path. Example grunt deploy --config.base_path=/new
to make the static files points to the proper path.
This is a quick reference that aims to help you to learn how to add new languages and views on this project.
The file config.json
contains the definition of all the configuration needed by the project. This definitions are grouped by environment. You can activate one environemnt by calling the paramenter env
. Example yarn run deploy -- --env=localhost
load all the vars defined in the localhost section. All this vars are available at:
#{localConfig.xxxx}
@@config
. (#{localConfig.} cant be use because saas define his own vars in that way)@@config
.You can override this vars passing the concrete key as parameter with the prefix config.
. Example yarn run deploy -- --env=localhost --config.token_manager=1337 --mode=production
load all the vars defined in the localhost section and override the token_manager var with the value 1337
Adding template: Create:
app/views/[view_name].jade
Adding styles:
app/styles/less/[view_name]/[name].less
link(rel='stylesheet', href='#{localConfig.base_path}/styles/[view_name]/[name].css')
Adding scripts:
Scripts are concatenated by folder.
app/scripts/[folder]/1.js
app/scripts/[folder]/2.js
app/scripts/[folder]/3.js
script(type="text/javascript", src='#{localConfig.base_path}/scripts/[folder].js')
Add translations:
Update all: app/locales/[names]_[language_code]-[country-code].json
with:
We use Oneskyapp.com to translate/review the texts. You can use the task: grunt oneskyExport to override the lang with the translations in: https://upplication.oneskyapp.com (you need the access key and secret key)
Notes:
Add language:
Update: app/locales/languages.json
adding the new language
Add the translation file:
Create: app/locales/[custom_name]_[language_code]-[country_code]*.json
Language code list: http://www.w3schools.com/tags/ref_language_codes.asp Country code list: https://www.w3schools.com/tags/ref_country_codes.asp (optional)
* country code is optional.