Git Product home page Git Product logo

ifs_afd-aces-dev's Introduction

ACES CARDS


Online websites

predrod


Goal

Display AFD's quotes as cards (aka "ACES" cards)

  • mobile-first ;
  • agnostically load list of Google Sheet data to the Vue's store ;
  • (option) add list of sheets as correspondance tables ;
  • (option) add list of sheets as data types references ;
  • by default the sheet-loads includes : internationalizatin with i18n, cookie-parser...

Environment variables

You can define the locations of the gsheets you want to load in the environment variables (.env file). A file called example.env can be used as a template.

Env vars as lists

In the .envfile some variables will be converted into arrays or/and objects at launch in the nuxt.config file. Usually the logic is the followinng:

### .env file for instance
NUXT_ENV_LOCALES=Français:fr:fr-FR,English:en:en-US

# will be converted in the nuxt.config file into : 
locales = [
  { name: 'Français', code: 'fr', iso: 'fr-FR', file: 'fr-FR.json' },
  { name: 'English', code: 'en', iso: 'en-US', file: 'en-US.json' },
]

Configure GSheets loading

With sheet-loads you can load data several GSheets for several uses : as pure data, as

Here an example based on this spreadsheet : https://docs.google.com/spreadsheets/d/1FcV5ZQAKyx5cZWW7EABTioaRYrs4Jw9ncHjs2ZeVWFA/edit#gid=0

### DATA GSHEETS : main datasets
# LIST FORMAT (separator == ',') : 
# NUXT_GSHEET_IDS_DATAS=<GSHEET_ID>:<SHEET_NUMBER>:<DS_ID>,....
NUXT_GSHEET_IDS_DATAS=1FcV5ZQAKyx5cZWW7EABTioaRYrs4Jw9ncHjs2ZeVWFA:1:contents

### DATA GSHEETS CORRESPONDANCE TABLES
# LIST FORMAT (separator == ',') : 
# NUXT_GSHEET_IDS_CORRESP_DICTS=<GSHEET_ID>:<SHEET_NUMBER>:<DS_ID>:COL_TITLE_FOR_KEY,....
NUXT_GSHEET_IDS_CORRESP_DICTS=1FcV5ZQAKyx5cZWW7EABTioaRYrs4Jw9ncHjs2ZeVWFA:2:correspondances:categories-code

### DATA GSHEETS TYPES
# LIST FORMAT (separator == ',') : 
# NUXT_GSHEET_IDS_DATA_TYPES=<GSHEET_ID>:<SHEET_NUMBER>:<DS_ID>::<COL_TITLE_FOR_KEY>:<DATATYPE>,....
NUXT_GSHEET_IDS_DATA_TYPES=1FcV5ZQAKyx5cZWW7EABTioaRYrs4Jw9ncHjs2ZeVWFA:3:my-types:col-title:data-type:is-list:list-separator:lang:key-value-separator

Note : you can specify several spreadsheets for every env variable, just separate each definition by a comma (,)


Stack

  • Nuxt
  • Vuetify
  • vue2-interact
  • I18n
  • Axios
  • Material design icons
  • Fontawesome icons
  • Cookie-parser
  • js-cookie
  • dotenv

Build Setup

# install dependencies
$ npm install

# serve with hot reload at localhost:3000
$ npm run dev

# build for production and launch server
$ npm run build
$ npm start

# generate static project
$ npm run generate

For detailed explanation on how things work, checkout Nuxt.js docs.


Netlify setup

=> see the general setup summary here

# Build settings

Repository = github.com/we-do-data/IFS_AFD-ACES-dev
Base directory = Not set
Build command = npm run build
Publish directory = dist
Deploy log visibility = Logs are public

# Deploy contexts

Production branch = j_integration_01
Deploy previews = Automatically build deploy previews for all pull requests
Branch deploys = Deploy only the production branch
NUXT_ENV_APP_TITLE=Play With Transitions
NUXT_ENV_HOST=localhost
NUXT_ENV_LOCALES=Français:fr:fr-FR,English:en:en-US
NUXT_ENV_LOCALE_DEFAULT=fr
NUXT_ENV_PORT_DEV=50060
NUXT_ENV_PORT_PREPROD=50061
NUXT_ENV_PORT_PROD=50062
NUXT_ENV_RUN_MODE=dev
NUXT_GSHEET_IDS_CORRESP_DICTS=1FcV5ZQAKyx5cZWW7EABTioaRYrs4Jw9ncHjs2ZeVWFA:2:correspondances:categories-code
NUXT_GSHEET_IDS_DATAS=1FcV5ZQAKyx5cZWW7EABTioaRYrs4Jw9ncHjs2ZeVWFA:1:aces-contents
NUXT_GSHEET_IDS_DATA_TYPES=1FcV5ZQAKyx5cZWW7EABTioaRYrs4Jw9ncHjs2ZeVWFA:3:my-types:col-title:data-type:is-list:list-separator:lang:key-value-separator
VUETIFY_accent=#572a99
VUETIFY_error=#FF5252
VUETIFY_info=#cbc8d8
VUETIFY_primary=#2e2265
VUETIFY_secondary=#de4a5bVUETIFY_success#00BCD4
VUETIFY_warning=#FFC107
playwithtransitions-debug-preprod.netlify.com
(Default subdomain)

Credits

client

  • IFS / AFD

Realisation

Team

  • Project lead : Brice Terdjman
  • Design : Clément Thorez
  • Code / integration : Julien Paris

ifs_afd-aces-dev's People

Contributors

clementwedodata avatar julienparis avatar

Watchers

 avatar  avatar  avatar

Forkers

wedodatadev

ifs_afd-aces-dev's Issues

problem button in 'about page'

quand on ouvre pour la première fois l'app, dans la page about, le bouton cards en bas est caché, on clique sur la croix mécaniquement et on revient en arrière. Je pense qu'il faut que la croix permette d'aller sur la carte

position bouton "get a card"

Sur iPhone 10, Safari et Chrome, le bouton Get a Card se positionne sous la barre de navigation basse, on passe donc à côté.
recettage-afd-playwithtransition-04

[upgrade] template d'export card

@JulienParis
On va modifier le style graphique du nom de la webapp pour bien mettre en avant le côté URL (vu que l'image va circuler, il faudra bien identifier l'url un peu atypique avec le .cards).

  • il faudrait écrire le nom en bas de casse, en blanc, roboto regular 18px "playswithtransitions"
  • ".cards" en roboto bold 18px
    recettage-afd-playwithtransition-11
    Merci

format d'export card

@JulienParis
Peut-on exporter un png avec fond transparent ? ça éviterait d'avoir des recoins blancs.
Si pas possible exportons une card sans bord arrondie.
recettage-afd-playwithtransition-10

Taille de typo générale des cards

En l'état, la taille moyenne d'affichage des citations est un peu petite, il faudrait pousser ton réglage pour augmenter la taille de typo de manière générale. Et ajouter un letter-spacing de 0.03em histoire de faire respirer cette typo bien grasse :)

recettage-afd-playwithtransition-03A

recettage-afd-playwithtransition-03B

Difficulté du swipe

Après qq tests utilisateurs, quand on swipe les cartes, il faut dragger la card quasiment jusqu'au bord de l'écran pour que la carte swipe. Il faudrait que le swipe s'active plus facilement.

Style des boutons - choose your language

Les boutons sont trop larges et l'effet hover n'est pas bon
Le label "choose your language" n'est pas dans la bonne couleur.

(cf. styleguide.ai pour les reco)

documentation to do :

  • repos / branches
  • netlify / process
  • projects / issues / tickets
  • readme + install process

[upgrade] nom de la webapp

@JulienParis
On retire le ". cards" en desktop et mobile sur les écrans suivants :

  • écran choix de langue
  • homepage
  • cards

On garde l'URL playwithtransitions.cards seulement sur les exports image, cf. issue #39

Animation transition - find more

Desktop / mobile tous navigateurs >

la transition lorsqu'on clique sur Find more n'est pas très fluide et laisse apparaître le contenu en overflow en dehors de la carte. Au clique sur le bouton, l'ensemble bouton find more+label+bouton fav se décale vers le bas puis apparaît tout en haut. La phrase disparaît instantanément.

Pourrait-on :

  • effacer la phrase en fade out en jouant sur l'opacité 1>0
  • faire remonter le bloc "footer"(bouton find more+fav) avec une transition sans saccade
  • faire remonter les liens avec la même animation de transition.
  • tout ça moins rapidement avec un jolie ease-in-out

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.