Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New design #6

Merged
merged 62 commits into from
Mar 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
cf4c855
Some tests for a new layout
AmauryCarrade May 25, 2017
a4543f3
Added map on homepage and improved search form.
AmauryCarrade May 26, 2017
2eeb2c2
Fixed details and tested others.
AmauryCarrade May 27, 2017
0b5e74f
Beginning of the search page (small fixes first)
AmauryCarrade May 28, 2017
1cf32c4
Started layout for route page
AmauryCarrade May 29, 2017
a221928
Restarted from scratch with a full screen map and a floating form above.
AmauryCarrade Jun 29, 2017
cebb81e
Added identity, header to the search form, and options to the form.
AmauryCarrade Jun 30, 2017
80c4f05
Added inversion button
AmauryCarrade Jun 30, 2017
b3b51ec
Added smart autocompletion and prepared input handling for the future.
AmauryCarrade Aug 10, 2017
cdee9de
Removed finally-not-used hidden inputs with station code name.
AmauryCarrade Aug 10, 2017
3f474f8
Improved design and map; added alternative routes selector.
AmauryCarrade Jan 7, 2018
a1eaac9
Improved alternative paths management and UI
AmauryCarrade Jan 8, 2018
e473f9b
Styles & UI tweaks
AmauryCarrade Jan 9, 2018
86ff2d1
Fixed options not displayed when selected
AmauryCarrade Feb 17, 2018
44e0599
Improved highlighted path auto-fit a little bit
AmauryCarrade Feb 17, 2018
f3a051a
Improved mobile version.
AmauryCarrade Feb 17, 2018
89f36fc
Migrate to SCSS and Webpack
AmauryCarrade Mar 10, 2018
31d0bc2
Webpack continued - styles & JS
AmauryCarrade Mar 12, 2018
8492e6b
Removed old CSS dependancies and migrated some colors to variables & …
AmauryCarrade Mar 12, 2018
f29bfb6
Improved JS modules.
AmauryCarrade Mar 12, 2018
749cedc
Optimized webpack and started NetworkMap conversion.
AmauryCarrade Mar 13, 2018
16a1cf7
Now using webpack-dev-server.
AmauryCarrade Mar 13, 2018
e6ab2a1
Development environment configuration in the README.
AmauryCarrade Mar 13, 2018
fd7f05e
Better doc
AmauryCarrade Mar 13, 2018
08eb142
Migrated the network map to the new JS.
AmauryCarrade Mar 13, 2018
c705db1
The network map now works with webpack and ES6.
AmauryCarrade Mar 14, 2018
7df9153
Small fixes and beginning of work on live path update
AmauryCarrade Mar 15, 2018
7d98117
Code reorganization in NetworkMap
AmauryCarrade Mar 16, 2018
9fc2808
Improved Network Map and added support for live-updates.
AmauryCarrade Mar 23, 2018
61a9cb4
Improved search results with some additional tips.
AmauryCarrade Mar 23, 2018
6b64737
Fixed a small but in the intermediate stations plural & display.
AmauryCarrade Mar 23, 2018
45d4e57
Fixed automatic zoom to path according to the nex UI.
AmauryCarrade Mar 23, 2018
a50f943
Fixed intermediate steps.
AmauryCarrade Mar 23, 2018
8c71450
Improved zoom adaptation.
AmauryCarrade Mar 23, 2018
bb1f71c
Results are now live-updated without reloading.
AmauryCarrade Mar 25, 2018
4f99bf2
Optimized home link when we are already in a “homepage” context.
AmauryCarrade Mar 25, 2018
7bbe686
Added back attribution.
AmauryCarrade Mar 25, 2018
8efd5dc
Added back other ZéPS page as sub-pages in a modal.
AmauryCarrade Mar 26, 2018
b40284e
The old /plan URL now redirects to /
AmauryCarrade Mar 26, 2018
34c12a6
Removed unused templates and methods.
AmauryCarrade Mar 26, 2018
fee23db
Fixed URL not reset while leaving a sub-page modale.
AmauryCarrade Mar 26, 2018
cc54152
Improved autocompletion.
AmauryCarrade Mar 26, 2018
d7ce8ba
Disallowed /sub-pages/ for robots.
AmauryCarrade Mar 26, 2018
5ad4db0
Added extensions to composer.json and updated dependencies.
AmauryCarrade Mar 27, 2018
1d24d0b
Fixed form AJAX-sent even if empty.
AmauryCarrade Mar 27, 2018
4a917ca
More specific CSS for map
AmauryCarrade Mar 27, 2018
0151b4c
EasyAutocomplete: added a reset method.
AmauryCarrade Mar 27, 2018
3bd99b7
Removed geolocation opening when the form input is empty
AmauryCarrade Mar 27, 2018
ad8b899
Improved search fields keyboard behavior
AmauryCarrade Mar 27, 2018
2743e16
Small autocompletion fix.
AmauryCarrade Mar 27, 2018
46f6d82
Fixed form sent from first field if empty.
AmauryCarrade Mar 27, 2018
e48c3b9
Improved about page
AmauryCarrade Mar 27, 2018
3cb2ae8
Fixed typo and display bg in about page.
AmauryCarrade Mar 27, 2018
2a5abd9
Fixed ordering bug in normalize_people with special characters.
AmauryCarrade Mar 27, 2018
0cb7b47
Fixed stations not matched in autocomplete for some accentued charact…
AmauryCarrade Mar 27, 2018
ae5d699
Fixed mobile autocomplete.
AmauryCarrade Mar 28, 2018
db9bfbd
Added the possibility to access the app remotely in development.
AmauryCarrade Mar 28, 2018
1671389
Unfocuses the fields when the search is sent from the enter key.
AmauryCarrade Mar 28, 2018
cae9dca
Improved map bottom for mobiles.
AmauryCarrade Mar 28, 2018
3d0a6ab
Fixed spaces tabs in tab-tab-indented file.
AmauryCarrade Mar 28, 2018
b7b70f7
Added partners on about page.
AmauryCarrade Mar 29, 2018
a291f4c
There was a missing word. I put it back on place.
AmauryCarrade Mar 29, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"presets": [
["env", {
"targets": {
"browsers": ["last 2 versions", "safari >= 7", "ie >= 10"]
}
}]
]
}
69 changes: 68 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@

# Created by https://www.gitignore.io/api/webstorm,composer,symfony
# Created by https://www.gitignore.io/api/webstorm,composer,symfony,sass,node

### Custom ###

/maintenance
/cache
/web/assets
/web/dist

missing_stations.json

Expand Down Expand Up @@ -100,3 +101,69 @@ composer.phar

# Build data
/build/


### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env


### Sass ###
.sass-cache/
*.css.map
39 changes: 31 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ L'interface d'un outil de calcul d'itinéraire dans le Nether Zcraftien, et peut

## Installation & update

### Installation
### Install

PHP 5.5+ is required to run this application.

Expand All @@ -22,6 +22,9 @@ cd ZePS-GUI

# Updates the dependencies
php composer.phar install

# And the front dependencies
npm install --save-dev
```
*[Composer installation documentation is available here](https://getcomposer.org/download/).*

Expand All @@ -33,25 +36,45 @@ git pull

# Updates the dependencies (if needed)
php composer.phar install
npm install --save-dev

# Clears the cache (always)
# Clears the cache (always, especially in production)
# If you don't want to remove all the cache for the routing API (because it auto-clears when needed),
# you should delete the cache/twig/ directory only (but, delete it!): rm -rf cache/twig/*
rm -rf cache/*
```

## Deployment
## Run

The front assets are built using webpack.

### Local test server

Just use the PHP's integrated server.
To launch the webpack development server plus the PHP server, run:
```bash
npm run dev
```
The app should be accessible at [127.0.0.1:8888](http://127.0.0.1:8888).

To debug from other devices, such as phones, use
```bash
php -S 0.0.0.0:8080 -t ./web/
npm run dev-remote
```
The app should be accessible at [127.0.0.1:8080](http://127.0.0.1:8080), or at the same port using your local IP address from other devices (e.g. phones).
so the webpack dev server will listen from any IP, not only localhost, and the PHP server configured to lookup for webpack at the correct IP. As long as _both_ 8080 and 8888 ports are open, you'll be able to access the app using [http://networkIP:8888](http://networkIP:8888).

In both cases, these commands enable webpack's hot-reload.


### Production server

To generate production assets, run:

```bash
npm run prod
```

and you'll find them in the `web/dist` directory a few seconds later.

The server serving the application must serve the `/web/` directory only.
By default, the service will be available through `https://root/index.php`, `https://root/index.php/plan`, etc. To remove the filename part, use a rewrite rule, like this one for Apache:

Expand All @@ -66,9 +89,9 @@ By default, the service will be available through `https://root/index.php`, `htt
RewriteRule ^ index.php [L]
</IfModule>
```
(with all usual security features too, like no indexing, etc.).
(with all usual security features too, like no indexing, etc.). [Use that if you prefer nginx.](https://silex.symfony.com/doc/2.0/web_servers.html#nginx)

To enhance application performances, you can use the optimized autoloader—but if you do so, you'll have to re-update it for every release.
To enhance application performances, you can use the optimized autoloader (I even recommend it)—but if you do so, you'll have to re-update it for every release.
```bash
php composer.phar dump-autoload -a
```
Binary file added assets/fonts/FontAwesome.otf
Binary file not shown.
93 changes: 93 additions & 0 deletions assets/fonts/Lato-italic/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Copyright (c) 2010-2014 by tyPoland Lukasz Dziedzic ([email protected]) with Reserved Font Name "Lato"

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file added assets/fonts/Lato-italic/Lato-italic.eot
Binary file not shown.
Loading