Compare commits

...

No commits in common. "main" and "v1" have entirely different histories.
main ... v1

78 changed files with 10178 additions and 10153 deletions

View File

@ -1,4 +1,4 @@
# Ignore everything # Ignore everything
** **
!dist !public

View File

@ -1,301 +1,158 @@
--- ---
# drone encrypt Weko/ceiba-scores $DIRECTUS_URL # drone encrypt weko/scores.ceiba-conseil.com $REGISTRY_PASSWORD
kind: secret
name: REGISTRY_PASSWORD
data: BW8D91fKNJuWWF5k5F/CNi8GIQvmNEUocqPJJ+N57qxQ06y+G9q715PBFpys5BTKUQHPQqSd7Q6MhWpsOc5Ttn/gtCX1tbGrAqsFrEec
---
# drone encrypt weko/scores.ceiba-conseil.com $REGISTRY_USER
kind: secret
name: REGISTRY_USER
data: dlboI6U0j0jZxVQiF62p9lQkpFBg7M4QtiD6K7K3NtQmkw==
---
# drone encrypt weko/scores.ceiba-conseil.com "{\"auths\":{\"https://registry.weko.io\":{\"auth\":\"$(echo -n "$REGISTRY_USER:$REGISTRY_PASSWORD" | base64)\",\"email\":\"$REGISTRY_USER\"}}}"
kind: secret
name: REGISTRY_CONFIG
data: B0svjVRqxyDJE+MmSPPCU2hWbBzTjYHS6CnV6IAzGxrQPVNbGmEqoCWkBsG6tUFhL3JcU+fYEidV+RVHTRpYumbDWTXlBSz0q3BVsfqxvgWb2JgpvO7/X3rIxCZwECMMMm7nyRubsOeFDzFh9ic1cU4Bw2DTA+L65lWGiEGME/KqCi6yKy56KjmAC8kAoJ9ifw++KsGytvZjPI68+bbWpRFTAuwWU3SDv12y
---
# drone encrypt weko/scores.ceiba-conseil.com $DIRECTUS_URL
kind: secret kind: secret
name: DIRECTUS_URL name: DIRECTUS_URL
data: Yt43FDPiKPUm3FGUBQvLh4GXGQ0ZP/DXRy38lVlhMX44hxB1W4TEkwpA8U0kRqc/tPfD65nGukzqlYM= data: Z1mUl3LdiVP6vClaVeA56nTafKHIevYaRKqqYDKycN5im+M93XvrZbK995EDreb4cttMD1jMmJaq3NQ=
--- ---
# drone encrypt Weko/ceiba-scores $DIRECTUS_TOKEN # drone encrypt weko/scores.ceiba-conseil.com $DIRECTUS_TOKEN
kind: secret kind: secret
name: DIRECTUS_TOKEN name: DIRECTUS_TOKEN
data: 7rMRCcJgzLoMdBmynOIIXsmBtmNxrDbn+iOZSsEli/zjFTdPM3+doMxptIer/SGFCMUe8QqFN2AdA8DJ data: C4N8jh2kDORa5vo2mqOcqbBLLBXdcnHNDq9sK6+R9gzemeyzLp3K7ENw5ZibVYAJ2VEYylQr9zvHFeFE
--- # ---
# drone encrypt Weko/ceiba-scores $AWS_ACCESS_KEY_ID # kind: pipeline
kind: secret # type: docker
name: STAGING_AWS_ACCESS_KEY_ID # name: prod
data: DT//6Zq3wwIYrqs6dBgVCiuXhD8ullu4nd50KS8IqrfQmt2cFA4ViCBLT/zYv5m4yNjTxFIl #
# platform:
--- # os: linux
# drone encrypt Weko/ceiba-scores $AWS_SECRET_ACCESS_KEY # arch: arm64
kind: secret #
name: STAGING_AWS_SECRET_ACCESS_KEY # steps:
data: JlVsRo/U4AbQnuO4aNaXVqtest4J4lR2VFNJEjMI/02XNug3rRJy8ySriYCXwVZXXqJY5mrdonILOWnTr7qPNmJTHcYjAHVO2A5VeUhmI1XaV/hi4TM+4b6SwP4= # - name: install submodule
# image: drone/git
--- # commands:
# drone encrypt Weko/ceiba-scores $AWS_ACCESS_KEY_ID # - git submodule update --init
kind: secret #
name: PRODUCTION_AWS_ACCESS_KEY_ID # - name: install npm
data: AD1b96/pInoP19/bk9Nrp3vhFVcB+LLeZ6pkL4e76vtubcXaVIuSWovU8SzFFTWn3dODuRIS # image: node:current-alpine
# volumes:
--- # - name: hugo-theme-lowtech_node_modules
# drone encrypt Weko/ceiba-scores $AWS_SECRET_ACCESS_KEY # path: /drone/src/themes/hugo-theme-lowtech/node_modules
kind: secret # # environment:
name: PRODUCTION_AWS_SECRET_ACCESS_KEY # # DIRECTUS_URL:
data: JX44CwSuvFmYhJCW+vxC4GmUKbO83VyYeImCvIgtkdeC1cRtNEgCA6gWoclT4vSBrk6AW6iQnh3MSpIhOERSn/prcWiTwbBn6YqdUaQ18B9/Dp3Qk1RtOkS2wKI= # # from_secret: DIRECTUS_URL
# # DIRECTUS_TOKEN:
--- # # from_secret: DIRECTUS_TOKEN
# drone encrypt Weko/ceiba-scores $AWS_ACCESS_KEY_ID # commands:
kind: secret # - (cd themes/hugo-theme-lowtech && npm i)
name: TEST_AWS_ACCESS_KEY_ID # # - node scripts/directus-to-markdown/index.js
data: Bf6VZlmdGQGAOQtwtiOzRCqhnFaW310rw9LqMFVoaQBHiCbso23Zrt6G1N3J0nYGI/oLMhM3 #
# - name: build website
--- # image: jakejarvis/hugo-extended
# drone encrypt Weko/ceiba-scores $AWS_SECRET_ACCESS_KEY # commands:
kind: secret # - hugo --minify --environment production
name: TEST_AWS_SECRET_ACCESS_KEY #
data: kIq0RuZPg2gSamnbei121OHNtupioEYyVay8CnNxNz+u0fEh0c1qnAKM506h+XbwMr+HDyQEUNDM09fqzM14xmRxz8EZtqg6hXVPUcfEIG9nXI9VtnCKMwoKTMQ= # - name: typo
# image: node:current-alpine
--- # volumes:
# drone encrypt Weko/ceiba-scores $AWS_ACCESS_KEY_ID # - name: hugo-theme-lowtech_node_modules
kind: secret # path: /drone/src/themes/hugo-theme-lowtech/node_modules
name: DMH_AWS_ACCESS_KEY_ID # commands:
data: ZJi1IozPCoLgmwBnQy9OkOe7ByerC/b94aTNivtkAYh1K9A4WR+eXGNrbyXZci06HYjV8pBU # - node themes/hugo-theme-lowtech/scripts/typo
#
--- # - name: push docker image on registry
# drone encrypt Weko/ceiba-scores $AWS_SECRET_ACCESS_KEY # image: plugins/docker
kind: secret # settings:
name: DMH_AWS_SECRET_ACCESS_KEY # username:
data: sLiY4plTjS73Dzw0qHaAuSR4PiHGIhb6H2i1KyP2GpjvIDyaxbR2gjsjzn3E8e0gAtCiIM10nbvvAMvGmPoh1dLuYlmHj2YdOQA8wbjkA9jSqe9owbfxfrcEuDA= # from_secret: REGISTRY_USER
# password:
--- # from_secret: REGISTRY_PASSWORD
# drone encrypt Weko/ceiba-scores $AWS_ACCESS_KEY_ID # repo: registry.weko.io/sisa-urfe_fr
kind: secret # registry: registry.weko.io
name: FOURCHE_AWS_ACCESS_KEY_ID # tags:
data: GgpM5vSzE4N4ldcs+Db+sjG/siXmO+sYvw9DJYr0puAIv3jejlzwa3zJGcwGb2fmwCqyxied # - latest
#
--- # image_pull_secrets:
# drone encrypt Weko/ceiba-scores $AWS_SECRET_ACCESS_KEY # - REGISTRY_CONFIG
kind: secret #
name: FOURCHE_AWS_SECRET_ACCESS_KEY # volumes:
data: rEE5ttbao6dla92YOw1vh1VE1sBWAjen+jfP/ZdUSDnFlkZKY56ms+V0jOReGulhwbVRxQijp1fTS43TW/vJbq3XSeTVUwDGTHLZFQ+yGObvr+4DKOVIRqp/rJE= # - name: hugo-theme-lowtech_node_modules
# host:
--- # path: /tmp/drone/cache/weko/scores.ceiba-conseil.com/themes/hugo-theme-lowtech
kind: pipeline
type: docker
name: prod
steps:
- name: install npm
image: node:20.12.2-alpine
volumes:
- name: node_modules
path: /drone/src/node_modules
commands:
- npm i --include dev
- npm run fetchData
#- npm run lint
- npm run build
environment:
NODE_ENV: 'production'
- name: deploy on s3
image: minio/mc
environment:
AWS_ACCESS_KEY_ID:
from_secret: PRODUCTION_AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY:
from_secret: PRODUCTION_AWS_SECRET_ACCESS_KEY
commands:
- mc alias set garage https://s3.garage.resilien.cloud $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY --api S3v4
- mc mirror --overwrite /drone/src/dist garage/scores.ceiba-conseil.com
- name: notify
image: plugins/matrix@sha256:f1affb31b0c86963c97c6f976fa0dcb3cc84272057fd8558d609d28b3064bd7f
settings:
homeserver: https://converser.eu
roomid: "QwOITmkKxRJJyCSDOZ:converser.eu"
userid: "resilien:converser.eu"
accesstoken:
from_secret: MATRIX_ACCESSTOKEN
when:
status: [ failure ]
volumes:
- name: node_modules
host:
path: /tmp/drone/cache/weko/scores.ceiba-conseil.com/node_modules
--- ---
kind: pipeline kind: pipeline
type: docker type: docker
name: staging name: staging
steps: platform:
- name: install npm os: linux
image: node:20.12.2-alpine arch: arm64
volumes:
- name: node_modules
path: /drone/src/node_modules
commands:
- npm i
- npm run fetchData
#- npm run lint
- npm run build
environment:
NODE_ENV: 'staging'
- name: deploy on s3
image: minio/mc
environment:
AWS_ACCESS_KEY_ID:
from_secret: STAGING_AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY:
from_secret: STAGING_AWS_SECRET_ACCESS_KEY
commands:
- mc alias set garage https://s3.garage.resilien.cloud $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY --api S3v4
- mc mirror --overwrite /drone/src/dist garage/staging.scores.ceiba-conseil.com
- name: notify
image: plugins/matrix@sha256:f1affb31b0c86963c97c6f976fa0dcb3cc84272057fd8558d609d28b3064bd7f
settings:
homeserver: https://converser.eu
roomid: "QwOITmkKxRJJyCSDOZ:converser.eu"
userid: "resilien:converser.eu"
accesstoken:
from_secret: MATRIX_ACCESSTOKEN
when:
status: [ failure ]
volumes:
- name: node_modules
host:
path: /tmp/drone/cache/weko/staging.scores.ceiba-conseil.com/node_modules
---
kind: pipeline
type: docker
name: test
steps: steps:
- name: install submodule
image: drone/git
commands:
- git submodule update --init
- name: install npm - name: install npm
image: node:20.12.2-alpine image: node:current-alpine
volumes: volumes:
- name: node_modules - name: hugo-theme-lowtech_node_modules
path: /drone/src/node_modules path: /drone/src/themes/hugo-theme-lowtech/node_modules
commands:
- npm i
- npm run fetchData
#- npm run lint
- npm run build
environment: environment:
NODE_ENV: 'test' DIRECTUS_URL:
from_secret: DIRECTUS_URL
- name: deploy on s3 DIRECTUS_TOKEN:
image: minio/mc from_secret: DIRECTUS_TOKEN
environment:
AWS_ACCESS_KEY_ID:
from_secret: TEST_AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY:
from_secret: TEST_AWS_SECRET_ACCESS_KEY
commands: commands:
- mc alias set garage https://s3.garage.resilien.cloud $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY --api S3v4 - (cd themes/hugo-theme-lowtech && npm i)
- mc mirror --overwrite /drone/src/dist garage/test.scores.ceiba-conseil.com - node scripts/directus-to-markdown/index.js
- name: notify - name: build website
image: plugins/matrix@sha256:f1affb31b0c86963c97c6f976fa0dcb3cc84272057fd8558d609d28b3064bd7f image: jakejarvis/hugo-extended
environment:
HUGO_PARAMS_DIRECTUS_URL:
from_secret: DIRECTUS_URL
HUGO_PARAMS_DIRECTUS_TOKEN:
from_secret: DIRECTUS_TOKEN
commands:
- hugo --minify --buildDrafts --buildFuture --environment staging
- name: typo
image: node:current-alpine
volumes:
- name: hugo-theme-lowtech_node_modules
path: /drone/src/themes/hugo-theme-lowtech/node_modules
commands:
- node themes/hugo-theme-lowtech/scripts/typo
- name: push docker image on registry
image: plugins/docker
settings: settings:
homeserver: https://converser.eu username:
roomid: "QwOITmkKxRJJyCSDOZ:converser.eu" from_secret: REGISTRY_USER
userid: "resilien:converser.eu" password:
accesstoken: from_secret: REGISTRY_PASSWORD
from_secret: MATRIX_ACCESSTOKEN repo: registry.weko.io/scores_ceiba
when: registry: registry.weko.io
status: [ failure ] tags:
- staging
image_pull_secrets:
- REGISTRY_CONFIG
volumes: volumes:
- name: node_modules - name: hugo-theme-lowtech_node_modules
host: host:
path: /tmp/drone/cache/weko/test.scores.ceiba-conseil.com/node_modules path: /tmp/drone/cache/weko/scores.ceiba-conseil.com/themes/hugo-theme-lowtech
---
kind: pipeline
type: docker
name: DMH
steps:
- name: install npm
image: node:20.12.2-alpine
volumes:
- name: node_modules
path: /drone/src/node_modules
commands:
- npm i
- npm run fetchData
#- npm run lint
- apk add --no-cache jq
- echo $(cat src/data.json | jq -c '[.[4]]') > src/data.json
- npm run build
- name: deploy on s3
image: minio/mc
environment:
AWS_ACCESS_KEY_ID:
from_secret: DMH_AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY:
from_secret: DMH_AWS_SECRET_ACCESS_KEY
commands:
- mc alias set garage https://s3.garage.resilien.cloud $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY --api S3v4
- mc mirror --overwrite /drone/src/dist garage/dmh.ceiba-conseil.com
- name: notify
image: plugins/matrix@sha256:f1affb31b0c86963c97c6f976fa0dcb3cc84272057fd8558d609d28b3064bd7f
settings:
homeserver: https://converser.eu
roomid: "QwOITmkKxRJJyCSDOZ:converser.eu"
userid: "resilien:converser.eu"
accesstoken:
from_secret: MATRIX_ACCESSTOKEN
when:
status: [ failure ]
volumes:
- name: node_modules
host:
path: /tmp/drone/cache/weko/dmh.ceiba-conseil.com/node_modules
---
kind: pipeline
type: docker
name: FOURCHE
steps:
- name: install npm
image: node:20.12.2-alpine
volumes:
- name: node_modules
path: /drone/src/node_modules
commands:
- npm i
- npm run fetchData
#- npm run lint
- apk add --no-cache jq
- echo $(cat src/data.json | jq -c '[.[3]]') > src/data.json
- npm run build
- name: deploy on s3
image: minio/mc
environment:
AWS_ACCESS_KEY_ID:
from_secret: FOURCHE_AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY:
from_secret: FOURCHE_AWS_SECRET_ACCESS_KEY
commands:
- mc alias set garage https://s3.garage.resilien.cloud $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY --api S3v4
- mc mirror --overwrite /drone/src/dist garage/fourche.ceiba-conseil.com
- name: notify
image: plugins/matrix@sha256:f1affb31b0c86963c97c6f976fa0dcb3cc84272057fd8558d609d28b3064bd7f
settings:
homeserver: https://converser.eu
roomid: "QwOITmkKxRJJyCSDOZ:converser.eu"
userid: "resilien:converser.eu"
accesstoken:
from_secret: MATRIX_ACCESSTOKEN
when:
status: [ failure ]
volumes:
- name: node_modules
host:
path: /tmp/drone/cache/weko/fourche.ceiba-conseil.com/node_modules

10
.editorconfig Normal file
View File

@ -0,0 +1,10 @@
root = true
[*]
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false

3
.env Normal file
View File

@ -0,0 +1,3 @@
DOCKER_CONTEXT=vert.weko.resilien
NAME=vert.weko.resilien
URL=scores.ceiba-conseil.com

View File

@ -1,15 +0,0 @@
/* eslint-env node */
require("@rushstack/eslint-patch/modern-module-resolution");
module.exports = {
root: true,
extends: [
"plugin:vue/vue3-essential",
"eslint:recommended",
"@vue/eslint-config-prettier",
],
env: {
"vue/setup-compiler-macros": true,
node: true,
},
};

38
.gitignore vendored
View File

@ -1,35 +1,3 @@
# Logs resources
logs public
*.log .hugo_build.lock
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
.DS_Store
dist
dist-ssr
coverage
*.local
/cypress/videos/
/cypress/screenshots/
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
# app
src/data.json
public/answers
public/homepage.webp
public/logo.png
public/favicon/*.png

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "themes/hugo-theme-lowtech"]
path = themes/hugo-theme-lowtech
url = https://git.weko.io/kosssi/hugo-theme-lowtech.git

View File

@ -1,3 +0,0 @@
{
"recommendations": ["johnsoncodehk.volar", "johnsoncodehk.vscode-typescript-vue-plugin"]
}

4
Dockerfile Normal file
View File

@ -0,0 +1,4 @@
FROM registry.weko.io/nginx-lowtech:0.0.9
# Copie des sources du site
COPY public /usr/share/nginx/html

View File

@ -1,42 +0,0 @@
# Scores Ceiba
Vous trouverez ici le code source de l'application de Scores de [Ceiba Conseil](https://www.ceiba-conseil.com/).
## Information
- Le projet est développé par _[Weko](https://weko.io)_ et hébergé par _[RésiLien](https://resilien.fr)_
- L'application utilise [un script](./scripts/fetchData.js) permettant d'importer des contenus depuis [une interface d'administration](https://admin.ceiba-conseil.com)
- [Un outil automatique](https://ci.resilien.fr/Weko/ceiba-scores) permet une compilation automatique du projet lorsqu'un changement est effectué coté administration
- [Les emojis](https://twemoji-cheatsheet.vercel.app/) sont libres de droit proposé par _Twitter_
- _RésiLien_ reçoit des notifications automatiques lorsqu'un problème arrive lors de la compilation sur le canal _Matrix_ suivant https://matrix.to/#/#resilien-monitoring:converser.eu
## Développement
L'application a été développée avec le framework Javascript _[Vue.js](https://vuejs.org/)_ et l'outil _[Vite](https://vitejs.dev/)_.
Il utilise _[NPM](https://www.npmjs.com/)_ pour la gestion des dépendances Javascript.
### Recommandation pour votre environnement de développement
_[VSCode](https://code.visualstudio.com/)_ + _[Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar)_ (et désactiver _Vetur_) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.vscode-typescript-vue-plugin).
Une configuration spécifique à _Vite_ peut être mise en place, voir [la référence](https://vitejs.dev/config/).
### Commandes
- Installation des dépendances : `npm install`
- Import des données de l'administration : `npm run fetchData`
- Compilation avec du _Hot-Reload_ (Rechargement à chaud) pour le développement : `npm run dev`
- Compilation et minification pour la production : `npm run build`
- Les règles de mise en forme sont assurées par _[ESLint](https://eslint.org/)_ : `npm run lint`
## Logiciels utilisés
_RésiLien_ met en place des outils open source eprouvés dans le temps et dont les communautés sont assez grandes pour permettre une perenité de ses projets.
Voici les différentes briques utilisé autour du projet :
- _[Garage](https://garagehq.deuxfleurs.fr/)_ pour l'hébergement développé par l'association [Deuxfleurs](https://deuxfleurs.fr/)
- _[Directus](https://directus.io/)_ pour l'administration
- _[Drone](https://drone.io)_ pour la compilation automatique du projet
- _[Matrix](https://fr.wikipedia.org/wiki/Matrix_(protocole))_ est un protocole ouvert pour de la communication en temps réel
Icon : https://www.svgrepo.com/collection/solar-linear-icons/

79
assets/js/main.js Normal file
View File

@ -0,0 +1,79 @@
import fullpage from "node_modules/fullpage.js/dist/fullpage.js"
// import { createApp } from 'node_modules/vue/dist/vue.esm-browser.js'
// import App from './App.vue'
// createApp(App).mount('#app')
new fullpage('#fullpage', {
//options here
autoScrolling:true,
navigationPosition: 'left',
navigation: true,
paddingTop: '1rem',
paddingBottom: '1rem',
fitToSection: false,
fitToSectionDelay: 10000,
scrollingSpeed: 1000,
slidesNavigation: true
});
if ('serviceWorker' in navigator) {
// Use the window load event to keep the page load performant
window.addEventListener('load', () => {
navigator.serviceWorker.register('/js/sw.js').then(function(reg) {
if(reg.installing) {
console.log('Service worker installing');
} else if(reg.waiting) {
console.log('Service worker installed');
} else if(reg.active) {
console.log('Service worker active');
}
}).catch(function(error) {
// registration failed
console.log('Registration failed with ' + error);
});
});
}
async function main () {
const forms = document.getElementsByClassName('form')
for (const form of forms) {
const fieldsName = [...new Set(Array.from(form.querySelectorAll("input")).map(item => item.name))]
const scoreFields = Array.from(form.querySelectorAll(".score"))
form.addEventListener('change', function() {
const fieldsValue = fieldsName.map(fieldName => {
const field = form.querySelector('input[name="' + fieldName + '"]:checked')
if (field) return field.value
}).filter(item => item !== undefined)
if (fieldsName.length == fieldsValue.length) {
const score = fieldsValue.reduce((accumulator, curr) => parseInt(accumulator) + parseInt(curr))
scoreFields.map(item => {
item.classList.remove('active')
return item
}).filter(item => {
return score >= item.dataset.min && (item.dataset.max == "" || score <= item.dataset.max)
}).map(item => {
item.classList.add('active')
Array.from(item.getElementsByClassName('score_' + form.dataset.id)).map(item => item.innerHTML = score)
})
}
var all = form.querySelectorAll("input")
const scoreField = document.getElementsByClassName('score_' + form.dataset.id)
var score = 0
for (let field of all) {
if (field.type != "submit" && field.type != "button") {
if (field.type=="radio" || field.type=="checkbox") {
if (field.checked) {
score = score + parseInt(field.value)
}
}
}
}
scoreField.innerHTML = score
});
}
}
main()

12
assets/js/sw.js Normal file
View File

@ -0,0 +1,12 @@
self.addEventListener('install', function(event) {
event.waitUntil(
caches.open('v1').then(function(cache) {
return cache.addAll([
'/',
'/index.html',
'/styles/main.css',
'/js/main.js'
]);
})
);
});

674
assets/node_modules/fullpage.js/LICENSE generated vendored Normal file
View File

@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

1057
assets/node_modules/fullpage.js/README.md generated vendored Normal file

File diff suppressed because it is too large Load Diff

237
assets/node_modules/fullpage.js/dist/fullpage.css generated vendored Normal file
View File

@ -0,0 +1,237 @@
/*!
* fullPage 3.1.2
* https://github.com/alvarotrigo/fullPage.js
*
* @license GPLv3 for open source use only
* or Fullpage Commercial License for commercial use
* http://alvarotrigo.com/fullPage/pricing/
*
* Copyright (C) 2018 http://alvarotrigo.com/fullPage - A project by Alvaro Trigo
*/
html.fp-enabled,
.fp-enabled body {
margin: 0;
padding: 0;
overflow:hidden;
/*Avoid flicker on slides transitions for mobile phones #336 */
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
.fp-section {
position: relative;
-webkit-box-sizing: border-box; /* Safari<=5 Android<=3 */
-moz-box-sizing: border-box; /* <=28 */
box-sizing: border-box;
}
.fp-slide {
float: left;
}
.fp-slide, .fp-slidesContainer {
height: 100%;
display: block;
}
.fp-slides {
z-index:1;
height: 100%;
overflow: hidden;
position: relative;
-webkit-transition: all 0.3s ease-out; /* Safari<=6 Android<=4.3 */
transition: all 0.3s ease-out;
}
.fp-section.fp-table, .fp-slide.fp-table {
display: table;
table-layout:fixed;
width: 100%;
}
.fp-tableCell {
display: table-cell;
vertical-align: middle;
width: 100%;
height: 100%;
}
.fp-slidesContainer {
float: left;
position: relative;
}
.fp-controlArrow {
-webkit-user-select: none; /* webkit (safari, chrome) browsers */
-moz-user-select: none; /* mozilla browsers */
-khtml-user-select: none; /* webkit (konqueror) browsers */
-ms-user-select: none; /* IE10+ */
position: absolute;
z-index: 4;
top: 50%;
cursor: pointer;
width: 0;
height: 0;
border-style: solid;
margin-top: -38px;
-webkit-transform: translate3d(0,0,0);
-ms-transform: translate3d(0,0,0);
transform: translate3d(0,0,0);
}
.fp-controlArrow.fp-prev {
left: 15px;
width: 0;
border-width: 38.5px 34px 38.5px 0;
border-color: transparent #fff transparent transparent;
}
.fp-controlArrow.fp-next {
right: 15px;
border-width: 38.5px 0 38.5px 34px;
border-color: transparent transparent transparent #fff;
}
.fp-scrollable {
overflow: hidden;
position: relative;
}
.fp-scroller{
overflow: hidden;
}
.iScrollIndicator{
border: 0 !important;
}
.fp-notransition {
-webkit-transition: none !important;
transition: none !important;
}
#fp-nav {
position: fixed;
z-index: 100;
top: 50%;
opacity: 1;
transform: translateY(-50%);
-ms-transform: translateY(-50%);
-webkit-transform: translate3d(0,-50%,0);
}
#fp-nav.fp-right {
right: 17px;
}
#fp-nav.fp-left {
left: 17px;
}
.fp-slidesNav{
position: absolute;
z-index: 4;
opacity: 1;
-webkit-transform: translate3d(0,0,0);
-ms-transform: translate3d(0,0,0);
transform: translate3d(0,0,0);
left: 0 !important;
right: 0;
margin: 0 auto !important;
}
.fp-slidesNav.fp-bottom {
bottom: 17px;
}
.fp-slidesNav.fp-top {
top: 17px;
}
#fp-nav ul,
.fp-slidesNav ul {
margin: 0;
padding: 0;
}
#fp-nav ul li,
.fp-slidesNav ul li {
display: block;
width: 14px;
height: 13px;
margin: 7px;
position:relative;
}
.fp-slidesNav ul li {
display: inline-block;
}
#fp-nav ul li a,
.fp-slidesNav ul li a {
display: block;
position: relative;
z-index: 1;
width: 100%;
height: 100%;
cursor: pointer;
text-decoration: none;
}
#fp-nav ul li a.active span,
.fp-slidesNav ul li a.active span,
#fp-nav ul li:hover a.active span,
.fp-slidesNav ul li:hover a.active span{
height: 12px;
width: 12px;
margin: -6px 0 0 -6px;
border-radius: 100%;
}
#fp-nav ul li a span,
.fp-slidesNav ul li a span {
border-radius: 50%;
position: absolute;
z-index: 1;
height: 4px;
width: 4px;
border: 0;
background: #333;
left: 50%;
top: 50%;
margin: -2px 0 0 -2px;
-webkit-transition: all 0.1s ease-in-out;
-moz-transition: all 0.1s ease-in-out;
-o-transition: all 0.1s ease-in-out;
transition: all 0.1s ease-in-out;
}
#fp-nav ul li:hover a span,
.fp-slidesNav ul li:hover a span{
width: 10px;
height: 10px;
margin: -5px 0px 0px -5px;
}
#fp-nav ul li .fp-tooltip {
position: absolute;
top: -2px;
color: #fff;
font-size: 14px;
font-family: arial, helvetica, sans-serif;
white-space: nowrap;
max-width: 220px;
overflow: hidden;
display: block;
opacity: 0;
width: 0;
cursor: pointer;
}
#fp-nav ul li:hover .fp-tooltip,
#fp-nav.fp-show-active a.active + .fp-tooltip {
-webkit-transition: opacity 0.2s ease-in;
transition: opacity 0.2s ease-in;
width: auto;
opacity: 1;
}
#fp-nav ul li .fp-tooltip.fp-right {
right: 20px;
}
#fp-nav ul li .fp-tooltip.fp-left {
left: 20px;
}
.fp-auto-height.fp-section,
.fp-auto-height .fp-slide,
.fp-auto-height .fp-tableCell{
height: auto !important;
}
.fp-responsive .fp-auto-height-responsive.fp-section,
.fp-responsive .fp-auto-height-responsive .fp-slide,
.fp-responsive .fp-auto-height-responsive .fp-tableCell {
height: auto !important;
}
/*Only display content to screen readers*/
.fp-sr-only{
position: absolute;
width: 1px;
height: 1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}

File diff suppressed because one or more lines are too long

4242
assets/node_modules/fullpage.js/dist/fullpage.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

11
assets/node_modules/fullpage.js/dist/fullpage.min.css generated vendored Normal file
View File

@ -0,0 +1,11 @@
/*!
* fullPage 3.1.2
* https://github.com/alvarotrigo/fullPage.js
*
* @license GPLv3 for open source use only
* or Fullpage Commercial License for commercial use
* http://alvarotrigo.com/fullPage/pricing/
*
* Copyright (C) 2018 http://alvarotrigo.com/fullPage - A project by Alvaro Trigo
*/.fp-enabled body,html.fp-enabled{margin:0;padding:0;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0)}.fp-section{position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.fp-slide{float:left}.fp-slide,.fp-slidesContainer{height:100%;display:block}.fp-slides{z-index:1;height:100%;overflow:hidden;position:relative;-webkit-transition:all .3s ease-out;transition:all .3s ease-out}.fp-section.fp-table,.fp-slide.fp-table{display:table;table-layout:fixed;width:100%}.fp-tableCell{display:table-cell;vertical-align:middle;width:100%;height:100%}.fp-slidesContainer{float:left;position:relative}.fp-controlArrow{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none;position:absolute;z-index:4;top:50%;cursor:pointer;width:0;height:0;border-style:solid;margin-top:-38px;-webkit-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.fp-controlArrow.fp-prev{left:15px;width:0;border-width:38.5px 34px 38.5px 0;border-color:transparent #fff transparent transparent}.fp-controlArrow.fp-next{right:15px;border-width:38.5px 0 38.5px 34px;border-color:transparent transparent transparent #fff}.fp-scrollable{overflow:hidden;position:relative}.fp-scroller{overflow:hidden}.iScrollIndicator{border:0!important}.fp-notransition{-webkit-transition:none!important;transition:none!important}#fp-nav{position:fixed;z-index:100;top:50%;opacity:1;transform:translateY(-50%);-ms-transform:translateY(-50%);-webkit-transform:translate3d(0,-50%,0)}#fp-nav.fp-right{right:17px}#fp-nav.fp-left{left:17px}.fp-slidesNav{position:absolute;z-index:4;opacity:1;-webkit-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);transform:translate3d(0,0,0);left:0!important;right:0;margin:0 auto!important}.fp-slidesNav.fp-bottom{bottom:17px}.fp-slidesNav.fp-top{top:17px}#fp-nav ul,.fp-slidesNav ul{margin:0;padding:0}#fp-nav ul li,.fp-slidesNav ul li{display:block;width:14px;height:13px;margin:7px;position:relative}.fp-slidesNav ul li{display:inline-block}#fp-nav ul li a,.fp-slidesNav ul li a{display:block;position:relative;z-index:1;width:100%;height:100%;cursor:pointer;text-decoration:none}#fp-nav ul li a.active span,#fp-nav ul li:hover a.active span,.fp-slidesNav ul li a.active span,.fp-slidesNav ul li:hover a.active span{height:12px;width:12px;margin:-6px 0 0 -6px;border-radius:100%}#fp-nav ul li a span,.fp-slidesNav ul li a span{border-radius:50%;position:absolute;z-index:1;height:4px;width:4px;border:0;background:#333;left:50%;top:50%;margin:-2px 0 0 -2px;-webkit-transition:all .1s ease-in-out;-moz-transition:all .1s ease-in-out;-o-transition:all .1s ease-in-out;transition:all .1s ease-in-out}#fp-nav ul li:hover a span,.fp-slidesNav ul li:hover a span{width:10px;height:10px;margin:-5px 0 0 -5px}#fp-nav ul li .fp-tooltip{position:absolute;top:-2px;color:#fff;font-size:14px;font-family:arial,helvetica,sans-serif;white-space:nowrap;max-width:220px;overflow:hidden;display:block;opacity:0;width:0;cursor:pointer}#fp-nav ul li:hover .fp-tooltip,#fp-nav.fp-show-active a.active+.fp-tooltip{-webkit-transition:opacity .2s ease-in;transition:opacity .2s ease-in;width:auto;opacity:1}#fp-nav ul li .fp-tooltip.fp-right{right:20px}#fp-nav ul li .fp-tooltip.fp-left{left:20px}.fp-auto-height .fp-slide,.fp-auto-height .fp-tableCell,.fp-auto-height.fp-section{height:auto!important}.fp-responsive .fp-auto-height-responsive .fp-slide,.fp-responsive .fp-auto-height-responsive .fp-tableCell,.fp-responsive .fp-auto-height-responsive.fp-section{height:auto!important}.fp-sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
/*# sourceMappingURL=fullpage.min.css.map */

File diff suppressed because one or more lines are too long

12
assets/node_modules/fullpage.js/dist/fullpage.min.js generated vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

55
assets/node_modules/fullpage.js/package.json generated vendored Normal file
View File

@ -0,0 +1,55 @@
{
"name": "fullpage.js",
"version": "3.1.2",
"description": "Create beautiful fullscreen snap scrolling websites",
"main": "dist/fullpage.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git@github.com:alvarotrigo/fullPage.js.git"
},
"keywords": [
"jquery",
"javacript",
"scrolling",
"single_page",
"onepage",
"fullpage",
"fullpagejs",
"one_page",
"sliding",
"snap",
"scroll",
"swipe",
"mousewheel",
"sections",
"slides",
"slidehow"
],
"files": [
"vendors",
"dist",
"package.json",
"README.md"
],
"authors": [
"Alvaro Trigo https://github.com/alvarotrigo"
],
"license": "GPL-3.0",
"bugs": {
"url": "https://github.com/alvarotrigo/fullPage.js/issues"
},
"homepage": "https://github.com/alvarotrigo/fullPage.js",
"namespace": "fullpage_api",
"devDependencies": {
"gulp": "^4.0.0",
"gulp-clean-css": "^4.0.0",
"gulp-rename": "^1.2.2",
"gulp-replace": "^1.0.0",
"gulp-sass": "^4.0.2",
"gulp-sourcemaps": "^2.6.4",
"gulp-uglify": "^3.0.0"
}
}

BIN
assets/node_modules/fullpage.js/vendors/.DS_Store generated vendored Normal file

Binary file not shown.

169
assets/node_modules/fullpage.js/vendors/easings.js generated vendored Normal file
View File

@ -0,0 +1,169 @@
/*!
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
*
* Uses the built in easing capabilities added In jQuery 1.1
* to offer multiple easing options
*
* TERMS OF USE - jQuery Easing
*
* Open source under the BSD License.
*
* Copyright 2008 George McGinley Smith
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* Neither the name of the author nor the names of contributors may be used to endorse
* or promote products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
window.fp_easings = {
def: 'easeOutQuad',
linear: function (t, b, c, d) {
return c*t/d + b
},
swing: function (t, b, c, d) {
return window.fp_easings[window.fp_easings.def](t, b, c, d);
},
easeInQuad: function (t, b, c, d) {
return c*(t/=d)*t + b;
},
easeOutQuad: function (t, b, c, d) {
return -c *(t/=d)*(t-2) + b;
},
easeInOutQuad: function (t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t + b;
return -c/2 * ((--t)*(t-2) - 1) + b;
},
easeInCubic: function (t, b, c, d) {
return c*(t/=d)*t*t + b;
},
easeOutCubic: function (t, b, c, d) {
return c*((t=t/d-1)*t*t + 1) + b;
},
easeInOutCubic: function (t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t*t + b;
return c/2*((t-=2)*t*t + 2) + b;
},
easeInQuart: function (t, b, c, d) {
return c*(t/=d)*t*t*t + b;
},
easeOutQuart: function (t, b, c, d) {
return -c * ((t=t/d-1)*t*t*t - 1) + b;
},
easeInOutQuart: function (t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
return -c/2 * ((t-=2)*t*t*t - 2) + b;
},
easeInQuint: function (t, b, c, d) {
return c*(t/=d)*t*t*t*t + b;
},
easeOutQuint: function (t, b, c, d) {
return c*((t=t/d-1)*t*t*t*t + 1) + b;
},
easeInOutQuint: function (t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
return c/2*((t-=2)*t*t*t*t + 2) + b;
},
easeInSine: function (t, b, c, d) {
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
},
easeOutSine: function (t, b, c, d) {
return c * Math.sin(t/d * (Math.PI/2)) + b;
},
easeInOutSine: function (t, b, c, d) {
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
},
easeInExpo: function (t, b, c, d) {
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
},
easeOutExpo: function (t, b, c, d) {
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
},
easeInOutExpo: function (t, b, c, d) {
if (t==0) return b;
if (t==d) return b+c;
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
},
easeInCirc: function (t, b, c, d) {
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
},
easeOutCirc: function (t, b, c, d) {
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
},
easeInOutCirc: function (t, b, c, d) {
if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
},
easeInElastic: function (t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
if (a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
},
easeOutElastic: function (t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
if (a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
},
easeInOutElastic: function (t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
if (a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
},
easeInBack: function (t, b, c, d, s) {
if (s == undefined) s = 1.70158;
return c*(t/=d)*t*((s+1)*t - s) + b;
},
easeOutBack: function (t, b, c, d, s) {
if (s == undefined) s = 1.70158;
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
},
easeInOutBack: function (t, b, c, d, s) {
if (s == undefined) s = 1.70158;
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
},
easeInBounce: function (t, b, c, d) {
return c - window.fp_easings.easeOutBounce (d-t, 0, c, d) + b;
},
easeOutBounce: function (t, b, c, d) {
if ((t/=d) < (1/2.75)) {
return c*(7.5625*t*t) + b;
} else if (t < (2/2.75)) {
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
} else if (t < (2.5/2.75)) {
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
} else {
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
}
},
easeInOutBounce: function (t, b, c, d) {
if (t < d/2) return window.fp_easings.easeInBounce (t*2, 0, c, d) * .5 + b;
return window.fp_easings.easeOutBounce (t*2-d, 0, c, d) * .5 + c*.5 + b;
}
};

View File

@ -0,0 +1,2 @@
window.fp_easings={def:"easeOutQuad",linear:function(n,t,e,u){return e*n/u+t},swing:function(n,t,e,u){return window.fp_easings[window.fp_easings.def](n,t,e,u)},easeInQuad:function(n,t,e,u){return e*(n/=u)*n+t},easeOutQuad:function(n,t,e,u){return-e*(n/=u)*(n-2)+t},easeInOutQuad:function(n,t,e,u){return(n/=u/2)<1?e/2*n*n+t:-e/2*(--n*(n-2)-1)+t},easeInCubic:function(n,t,e,u){return e*(n/=u)*n*n+t},easeOutCubic:function(n,t,e,u){return e*((n=n/u-1)*n*n+1)+t},easeInOutCubic:function(n,t,e,u){return(n/=u/2)<1?e/2*n*n*n+t:e/2*((n-=2)*n*n+2)+t},easeInQuart:function(n,t,e,u){return e*(n/=u)*n*n*n+t},easeOutQuart:function(n,t,e,u){return-e*((n=n/u-1)*n*n*n-1)+t},easeInOutQuart:function(n,t,e,u){return(n/=u/2)<1?e/2*n*n*n*n+t:-e/2*((n-=2)*n*n*n-2)+t},easeInQuint:function(n,t,e,u){return e*(n/=u)*n*n*n*n+t},easeOutQuint:function(n,t,e,u){return e*((n=n/u-1)*n*n*n*n+1)+t},easeInOutQuint:function(n,t,e,u){return(n/=u/2)<1?e/2*n*n*n*n*n+t:e/2*((n-=2)*n*n*n*n+2)+t},easeInSine:function(n,t,e,u){return-e*Math.cos(n/u*(Math.PI/2))+e+t},easeOutSine:function(n,t,e,u){return e*Math.sin(n/u*(Math.PI/2))+t},easeInOutSine:function(n,t,e,u){return-e/2*(Math.cos(Math.PI*n/u)-1)+t},easeInExpo:function(n,t,e,u){return 0==n?t:e*Math.pow(2,10*(n/u-1))+t},easeOutExpo:function(n,t,e,u){return n==u?t+e:e*(1-Math.pow(2,-10*n/u))+t},easeInOutExpo:function(n,t,e,u){return 0==n?t:n==u?t+e:(n/=u/2)<1?e/2*Math.pow(2,10*(n-1))+t:e/2*(2-Math.pow(2,-10*--n))+t},easeInCirc:function(n,t,e,u){return-e*(Math.sqrt(1-(n/=u)*n)-1)+t},easeOutCirc:function(n,t,e,u){return e*Math.sqrt(1-(n=n/u-1)*n)+t},easeInOutCirc:function(n,t,e,u){return(n/=u/2)<1?-e/2*(Math.sqrt(1-n*n)-1)+t:e/2*(Math.sqrt(1-(n-=2)*n)+1)+t},easeInElastic:function(n,t,e,u){var a=1.70158,r=0,i=e;if(0==n)return t;if(1==(n/=u))return t+e;if(r||(r=.3*u),i<Math.abs(e)){i=e;a=r/4}else a=r/(2*Math.PI)*Math.asin(e/i);return-i*Math.pow(2,10*(n-=1))*Math.sin((n*u-a)*(2*Math.PI)/r)+t},easeOutElastic:function(n,t,e,u){var a=1.70158,r=0,i=e;if(0==n)return t;if(1==(n/=u))return t+e;if(r||(r=.3*u),i<Math.abs(e)){i=e;a=r/4}else a=r/(2*Math.PI)*Math.asin(e/i);return i*Math.pow(2,-10*n)*Math.sin((n*u-a)*(2*Math.PI)/r)+e+t},easeInOutElastic:function(n,t,e,u){var a=1.70158,r=0,i=e;if(0==n)return t;if(2==(n/=u/2))return t+e;if(r||(r=u*(.3*1.5)),i<Math.abs(e)){i=e;a=r/4}else a=r/(2*Math.PI)*Math.asin(e/i);return n<1?i*Math.pow(2,10*(n-=1))*Math.sin((n*u-a)*(2*Math.PI)/r)*-.5+t:i*Math.pow(2,-10*(n-=1))*Math.sin((n*u-a)*(2*Math.PI)/r)*.5+e+t},easeInBack:function(n,t,e,u,a){return null==a&&(a=1.70158),e*(n/=u)*n*((a+1)*n-a)+t},easeOutBack:function(n,t,e,u,a){return null==a&&(a=1.70158),e*((n=n/u-1)*n*((a+1)*n+a)+1)+t},easeInOutBack:function(n,t,e,u,a){return null==a&&(a=1.70158),(n/=u/2)<1?e/2*(n*n*((1+(a*=1.525))*n-a))+t:e/2*((n-=2)*n*((1+(a*=1.525))*n+a)+2)+t},easeInBounce:function(n,t,e,u){return e-window.fp_easings.easeOutBounce(u-n,0,e,u)+t},easeOutBounce:function(n,t,e,u){return(n/=u)<1/2.75?e*(7.5625*n*n)+t:n<2/2.75?e*(7.5625*(n-=1.5/2.75)*n+.75)+t:n<2.5/2.75?e*(7.5625*(n-=2.25/2.75)*n+.9375)+t:e*(7.5625*(n-=2.625/2.75)*n+.984375)+t},easeInOutBounce:function(n,t,e,u){return n<u/2?.5*window.fp_easings.easeInBounce(2*n,0,e,u)+t:.5*window.fp_easings.easeOutBounce(2*n-u,0,e,u)+.5*e+t}};
//# sourceMappingURL=easings.min.js.map

File diff suppressed because one or more lines are too long

2608
assets/node_modules/fullpage.js/vendors/scrolloverflow.js generated vendored Executable file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

55
assets/styles/main.sass Normal file
View File

@ -0,0 +1,55 @@
@import "../node_modules/fullpage.js/dist/fillpage.css"
html, body
margin: 0
padding: 0
body
font-family: sans-serif
*
box-sizing: border-box
h1, h2
text-align: center
.score
display: none
margin: 1rem
&.active
display: inherit
$headerHeigth: 150px
.header
height: $headerHeigth
position: fixed
background: #EDE0D4
width: 100%
z-index: 1
#fullpage
margin-top: $headerHeigth
.section
max-height: calc(100vh - $headerHeigth)
padding: 1rem
font-size: 1.5rem
.choice
margin: 1rem
input
padding: 1rem
// https://coolors.co/palette/ede0d4-e6ccb2-ddb892-b08968-7f5539-9c6644
.section0
background: linear-gradient(#EDE0D4, #E6CCB2)
.section1
background: linear-gradient(#E6CCB2, #DDB892)
.section2
background: linear-gradient(#DDB892, #B08968)
.section3
background: linear-gradient(#B08968, #7F5539)
.section4
background: linear-gradient(#7F5539, #9C6644)

View File

@ -0,0 +1,42 @@
languageCode: fr-fr
title: Ceiba App
theme:
- hugo-theme-lowtech
defaultContentLanguage: fr
disableKinds:
- taxonomy
- term
# params:
# FaviconFile: /favicon.svg
# ImageSize: 1040x
# SocialImage: RESILIEN_LOGO_SLOGAN_disc_slogan.svg
# outputs:
# page:
# - json
# section:
# - json
# home:
# - html
minify:
tdewolff:
html:
keepWhitespace: false
markup:
goldmark:
parser:
attribute:
block: true
renderer:
unsafe: true
disableHugoGeneratorInject: true
enableRobotsTXT: true

View File

@ -0,0 +1 @@
baseURL: http://localhost:1313/

View File

@ -0,0 +1 @@
baseURL: https://scores.ceiba-conseil.com/

View File

@ -0,0 +1 @@
baseURL: https://staging.scores.ceiba-conseil.com/

161
content/racine.md Normal file
View File

@ -0,0 +1,161 @@
---
id: 6
sort: null
title: Facteurs de sécurité cavité ouverte sur tronc2
results:
- id: 8
sort: 0
min: 0
max: 2.5
facteur: Très au delà de 5
effets: Capacité de charge très supérieure à la charge de service
pde: Improbable
pde_qtra: 7
- id: 9
sort: 1
min: 3
max: 5.5
facteur: Au delà de 5
effets: Capacité de charge supérieure à la charge de service
pde: Très faible
pde_qtra: 6
- id: 10
sort: 2
min: 6
max: 8.5
facteur: Entre 4 et 5
effets: >-
Capacité de charge normalement (coef moyen) supérieure à la charge de
service
pde: Faible
pde_qtra: 5
- id: 11
sort: 3
min: 9
max: 11.5
facteur: Entre 2 et 4
effets: >-
Capacité de charge supérieure à la charge de service mais sous le coef
moyen
pde: Echec possible sous contraintes très anormales
pde_qtra: 4
- id: 12
sort: 4
min: 12
max: 14.5
facteur: Entre 1 et 2
effets: Capacité de charge s'approchant de la charge de service
pde: Echec possible sous contraintes anormales
pde_qtra: 3
- id: 13
sort: 5
min: 15
max: 17.5
facteur: ~ 1
effets: Capacité de charge plus ou moins égale à la charge de service
pde: Echec possible sous contraintes courantes
pde_qtra: 2
- id: 14
sort: 6
min: 18
max: null
facteur: < 1
effets: Charge de service supérieure à la capacité de charge
pde: Echec imminent sous contraintes courantes ou masse propre
pde_qtra: 1
questions:
- id: 14
sort: 0
title: Matériau résiduel (PRBS)2
answers:
- id: 22
sort: 0
title: De 100% à 75%2
weight: 1
- id: 23
sort: 1
title: De 75% à 25% ou Cavité asymétrique
weight: 1.5
- id: 24
sort: 2
title: de 25 à 10 %
weight: 2
- id: 25
sort: 3
title: < 10 %
weight: 4
- id: 15
sort: 1
title: Adaptations géométriques
answers:
- id: 26
sort: 0
title: Très forte croissance accrue
weight: -1
- id: 27
sort: 1
title: Forte croissance accrue
weight: 0
- id: 28
sort: 2
title: Faibles croissance accrue
weight: 3
- id: 29
sort: 3
title: Sans croissance accrue
weight: 5
- id: 16
sort: 2
title: Rapport H/D
answers:
- id: 30
sort: 0
title: < 15
weight: 0
- id: 31
sort: 1
title: Entre 15 et 30
weight: 1
- id: 32
sort: 2
title: Entre 30 et 50
weight: 2
- id: 33
sort: 3
title: Entre 50 et 70
weight: 3
- id: 34
sort: 4
title: '> 70'
weight: 4
- id: 17
sort: 3
title: Organes de soutien structurel
answers:
- id: 35
sort: 0
title: Caractérisés et intègres
weight: 1
- id: 36
sort: 1
title: Relatifs et intègres
weight: 2
- id: 37
sort: 2
title: Caractérisés, partiellement dégradés
weight: 3
- id: 38
sort: 3
title: Relatifs et partiellement dégradés
weight: 4
- id: 39
sort: 4
title: Insuffisants et intègres
weight: 5
- id: 40
sort: 5
title: Insuffisants et dégradés
weight: 6
---

161
content/tronc.md Normal file
View File

@ -0,0 +1,161 @@
---
id: 1
sort: null
title: Facteurs de sécurité cavité ouverte sur tronc
results:
- id: 1
sort: 0
min: 0
max: 2.5
facteur: Très au delà de 5
effets: Capacité de charge très supérieure à la charge de service
pde: Improbable
pde_qtra: 7
- id: 2
sort: 1
min: 3
max: 5.5
facteur: Au delà de 5
effets: Capacité de charge supérieure à la charge de service
pde: Très faible
pde_qtra: 6
- id: 3
sort: 2
min: 6
max: 8.5
facteur: Entre 4 et 5
effets: >-
Capacité de charge normalement (coef moyen) supérieure à la charge de
service
pde: Faible
pde_qtra: 5
- id: 4
sort: 3
min: 9
max: 11.5
facteur: Entre 2 et 4
effets: >-
Capacité de charge supérieure à la charge de service mais sous le coef
moyen
pde: Echec possible sous contraintes très anormales
pde_qtra: 4
- id: 5
sort: 4
min: 12
max: 14.5
facteur: Entre 1 et 2
effets: Capacité de charge s'approchant de la charge de service
pde: Echec possible sous contraintes anormales
pde_qtra: 3
- id: 6
sort: 5
min: 15
max: 17.5
facteur: ~ 1
effets: Capacité de charge plus ou moins égale à la charge de service
pde: Echec possible sous contraintes courantes
pde_qtra: 2
- id: 7
sort: 6
min: 18
max: null
facteur: < 1
effets: Charge de service supérieure à la capacité de charge
pde: Echec imminent sous contraintes courantes ou masse propre
pde_qtra: 1
questions:
- id: 9
sort: 0
title: Matériau résiduel (PRBS)
answers:
- id: 21
sort: 0
title: De 100% à 75%
weight: 1
- id: 1
sort: 1
title: De 75% à 25% ou Cavité asymétrique
weight: 1.5
- id: 2
sort: 2
title: de 25 à 10 %
weight: 2
- id: 3
sort: 3
title: < 10 %
weight: 4
- id: 11
sort: 1
title: Adaptations géométriques
answers:
- id: 6
sort: 0
title: Très forte croissance accrue
weight: -1
- id: 7
sort: 1
title: Forte croissance accrue
weight: 0
- id: 8
sort: 2
title: Faibles croissance accrue
weight: 3
- id: 9
sort: 3
title: Sans croissance accrue
weight: 5
- id: 12
sort: 2
title: Rapport H/D
answers:
- id: 10
sort: 0
title: < 15
weight: 0
- id: 11
sort: 1
title: Entre 15 et 30
weight: 1
- id: 12
sort: 2
title: Entre 30 et 50
weight: 2
- id: 13
sort: 3
title: Entre 50 et 70
weight: 3
- id: 14
sort: 4
title: '> 70'
weight: 4
- id: 13
sort: 3
title: Organes de soutien structurel
answers:
- id: 15
sort: 0
title: Caractérisés et intègres
weight: 1
- id: 16
sort: 1
title: Relatifs et intègres
weight: 2
- id: 17
sort: 2
title: Caractérisés, partiellement dégradés
weight: 3
- id: 18
sort: 3
title: Relatifs et partiellement dégradés
weight: 4
- id: 19
sort: 4
title: Insuffisants et intègres
weight: 5
- id: 20
sort: 5
title: Insuffisants et dégradés
weight: 6
---

82
data/ceiba.yml Normal file
View File

@ -0,0 +1,82 @@
---
app:
categories:
houppier:
title: Houppier
tronc:
title: Tronc
recinaire:
title: Collet et départs racinaires
kpi:
- id: form_1
title: Matériaux résiduels
choices:
- id: 1
title: 100%
weight: 4
order: 1
- id: 2
title: = 25 %
weight: 3
order: 2
- id: 3
title: De 25 à 10 %
weight: 2
order: 3
- id: 4
title: < 10 %
weight: 1
order: 4
- titles: Adaptations géométriques
choices:
- id: 5
title: Caractérisées
weight: 3
order: 1
- id: 6
title: Adaptatives
weight: 2
order: 2
- id: 7
title: Relatives
weight: 2
order: 3
- id: 8
title: Insuffisantes à nulles
weight: 1
order: 4
- titles: Rapport H/D
choices:
- title: < 15
weight: 3
order: 1
- title: Entre 15 et 30
weight: 2
order: 2
- title: Entre 30 et 50
weight: 2
order: 3
- title: Entre 50 et 70
weight: 1
order: 4
- title: > 70
weight: 0
order: 5
- titles: Symptômes de pourriture évolutive
choices:
- title: Aucun
weight: 3
order: 1
- title: Supperficiels, locaux
weight: 2
order: 2
- title: Superficiels, + de 25 %
weight: 2
order: 3
- title: Dommageables, peu compensés
weight: 1
order: 4
- title: Dommageables, non compensés/démarqués
weight: 0
order: 5

28
docker-compose.prod.yml Normal file
View File

@ -0,0 +1,28 @@
version: "3.8"
volumes:
ceiba-log:
name: ceiba-log
ceiba-stats:
name: ceiba-stats
services:
scores_ceiba-prod:
container_name: ceiba-prod
build: .
image: registry.weko.io/scores_ceiba:latest
restart: always
labels:
traefik.enable: "true"
traefik.http.routers.ceiba.rule: "Host(`${URL}`)"
traefik.http.routers.ceiba.entrypoints: "web"
com.centurylinklabs.watchtower.enable: true
volumes:
- ceiba-log:/var/log/nginx
- ceiba-stats:/usr/share/nginx/html/stats
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
networks:
default:
name: traefik

View File

@ -0,0 +1,20 @@
version: "3.8"
networks:
default:
name: traefik
services:
scores_ceiba-staging:
container_name: ceiba-staging
build: .
image: registry.weko.io/scores_ceiba:staging
restart: always
labels:
traefik.enable: "true"
traefik.http.routers.ceiba-staging.rule: "Host(`staging.${URL}`)"
traefik.http.routers.ceiba-staging.entrypoints: "web"
com.centurylinklabs.watchtower.enable: true
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro

View File

@ -1,33 +0,0 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8" />
<link rel="apple-touch-icon" sizes="57x57" href="/favicon/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/favicon/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/favicon/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/favicon/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/favicon/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/favicon/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/favicon/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/favicon/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="/favicon/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/favicon/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/favicon/ms-icon-144x144.png">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Scores Ceiba</title>
<meta name="description" content="L'application Scores de Ceiba">
<link rel="mask-icon" href="/mask-icon.svg" color="#FFFFFF">
<meta name="theme-color" content="#ffffff">
<link rel="icon" href="/favicon.ico">
<link rel="apple-touch-icon" href="/apple-touch-icon.png" sizes="180x180">
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>

View File

@ -0,0 +1,3 @@
{
"id": 1
}

View File

@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Hello World</title>
<link rel="apple-touch-icon" href="images/pwa-icon-256.png" />
{{ $style := resources.Get "styles/main.sass" }}
{{ with $style }}
{{ $styleCSS := . | toCSS }}
<link rel="stylesheet" href="{{ $styleCSS.Permalink }}">
{{ end }}
<link rel="manifest" href="/manifest.json" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="white" />
</head>
<body>
<header class="header">
<h1>Ceiba App</h1>
<h2>{{ .Title }}</h2>
</header>
{{ partial "scores" . }}
{{/* safeHTML `
<div id="app"></div>
` */}}
{{ $js := resources.Get "js/sw.js" }}
{{ with $js }}
{{ $secureJS := . | js.Build }}
<!--script src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}"></script-->
{{ end }}
{{ $js := resources.Get "js/main.js" }}
{{ with $js }}
{{ $secureJS := . | js.Build }}
<script src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}"></script>
{{ end }}
</body>
</html>

View File

@ -0,0 +1,22 @@
{
"id": {{ .Params.id }},
"sort": {{ .Params.sort }},
"title": "{{ .Title }}",
"questions": [{{ range $index, $question := .Params.questions }}
{{ if $index }}, {{ end }}
{
"id": {{ $question.id }},
"sort": {{ $index }},
"title": "{{ $question.title }}",
"answers": [{{ range $i, $answer := $question.answers }}
{
"id": {{ $answer.id }},
"sort": {{ $i }},
"title": "{{ $answer.title }}",
"weight": "{{ $answer.weight }}",
}
{{ end }}]
}
{{ end }}]
"permalink" : "{{ .Permalink }}"
}

41
layouts/home.html Normal file
View File

@ -0,0 +1,41 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Hello World</title>
<link rel="apple-touch-icon" href="images/pwa-icon-256.png" />
{{ $style := resources.Get "styles/main.sass" }}
{{ with $style }}
{{ $styleCSS := . | toCSS }}
<link rel="stylesheet" href="{{ $styleCSS.Permalink }}">
{{ end }}
<link rel="manifest" href="/manifest.json" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="white" />
</head>
<body>
<header>
<h1>Ceiba App</h1>
</header>
<ul>
{{ range .Pages }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
{{ $js := resources.Get "js/sw.js" }}
{{ with $js }}
{{ $secureJS := . | js.Build }}
<!--script src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}"></script-->
{{ end }}
{{ $js := resources.Get "js/main.js" }}
{{ with $js }}
{{ $secureJS := . | js.Build }}
<script src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}"></script>
{{ end }}
</body>
</html>

View File

@ -0,0 +1,32 @@
{{ $formId := .Params.id }}
<div class="forms">
<form class="form" id="fullpage" data-id="{{ $formId }}">
{{ range $index, $question := .Params.questions }}
{{ with $question }}
<div class="section section{{ $index }}">
<legend>{{ .title }}</legend>
{{ $questionId := .id }}
{{ range .answers }}
<div class="choice">
<label>
<input type="radio" name="form_{{ $formId }}-question_{{ $questionId }}" value="{{ .weight }}" onclick="setTimeout(function(){fullpage_api.moveSectionDown()}, 300)"> {{ .title }}
</label>
</div>
{{ end }}
</div>
{{ end }}
{{ end }}
<div class="scores section section{{ len .Params.questions }}">
{{ range .Params.results }}
<div class="score" data-min="{{ .min }}" data-max="{{ .max }}">
Score : <span class="score_{{ $formId }}"></span><br>
Facteur de sécurité : {{ .facteur }}<br>
Effets sur la capacité de charge : {{ .effets }}<br>
Probabilité d'échec (PdE) : {{ .pde }}<br>
PdE QTRA : {{ .pde_qtra }}
</div>
{{ end }}
</div>
</form>
</div>

7664
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,33 +0,0 @@
{
"name": "scores.ceiba-conseil.com",
"version": "0.1.0",
"type": "module",
"scripts": {
"fetchData": "node --experimental-fetch --no-warnings scripts/fetchData.js",
"dev": "vite --host 0.0.0.0",
"build": "vite build",
"preview": "vite preview --port 5050",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore"
},
"dependencies": {
"@splidejs/vue-splide": "^0.6.12",
"html-to-image": "^1.11.11",
"pinia": "^2.1.7",
"pinia-plugin-persist": "^1.0.0",
"sass": "^1.75.0",
"sass-loader": "^14.2.1",
"sharp": "^0.33.3",
"vite-plugin-pwa": "^0.19.8",
"vue": "^3.4.26",
"vue-router": "^4.3.2"
},
"devDependencies": {
"@rushstack/eslint-patch": "^1.10.2",
"@vitejs/plugin-vue": "^5.0.4",
"@vue/eslint-config-prettier": "^9.0.0",
"eslint": "^8.5.0",
"eslint-plugin-vue": "^8.2.0",
"prettier": "^3.2.5",
"vite": "^5.2.10"
}
}

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path fill="#CCD6DD" d="M3 16v-2h30v2zm0 7v-2h30v2zm0 7v-2h30v2zM3 9V7h30v2z"/><path fill="#D5AB88" d="M35 33V1c0-.552-.448-1-1-1h-1c-.552 0-1 .448-1 1H4c0-.552-.448-1-1-1H2c-.552 0-1 .448-1 1v32h34zM4 4h28v29H4V4z"/><path fill="#3B94D9" d="M19 5.5c-.829 0-1.5.671-1.5 1.5 0-.829-.671-1.5-1.5-1.5s-1.5.671-1.5 1.5c0-.829-.671-1.5-1.5-1.5s-1.5.671-1.5 1.5c0-.829-.671-1.5-1.5-1.5S8.5 6.171 8.5 7c0-.829-.671-1.5-1.5-1.5S5.5 6.171 5.5 7v2c0 .829.671 1.5 1.5 1.5S8.5 9.829 8.5 9c0 .829.671 1.5 1.5 1.5s1.5-.671 1.5-1.5c0 .829.671 1.5 1.5 1.5s1.5-.671 1.5-1.5c0 .829.671 1.5 1.5 1.5s1.5-.671 1.5-1.5c0 .829.671 1.5 1.5 1.5.828 0 1.5-.671 1.5-1.5V7c0-.829-.672-1.5-1.5-1.5z"/><path fill="#BE1931" d="M19 12.5c-.829 0-1.5.671-1.5 1.5 0-.829-.671-1.5-1.5-1.5s-1.5.671-1.5 1.5c0-.829-.671-1.5-1.5-1.5s-1.5.671-1.5 1.5c0-.829-.671-1.5-1.5-1.5s-1.5.671-1.5 1.5c0-.829-.671-1.5-1.5-1.5s-1.5.671-1.5 1.5v2c0 .829.671 1.5 1.5 1.5s1.5-.671 1.5-1.5c0 .829.671 1.5 1.5 1.5s1.5-.671 1.5-1.5c0 .829.671 1.5 1.5 1.5s1.5-.671 1.5-1.5c0 .829.671 1.5 1.5 1.5s1.5-.671 1.5-1.5c0 .829.671 1.5 1.5 1.5.828 0 1.5-.671 1.5-1.5v-2c0-.829-.672-1.5-1.5-1.5z"/><path fill="#5C913B" d="M19 19.5c-.829 0-1.5.672-1.5 1.5 0-.828-.671-1.5-1.5-1.5s-1.5.672-1.5 1.5c0-.828-.671-1.5-1.5-1.5s-1.5.672-1.5 1.5c0-.828-.671-1.5-1.5-1.5s-1.5.672-1.5 1.5c0-.828-.671-1.5-1.5-1.5s-1.5.672-1.5 1.5v2c0 .828.671 1.5 1.5 1.5s1.5-.672 1.5-1.5c0 .828.671 1.5 1.5 1.5s1.5-.672 1.5-1.5c0 .828.671 1.5 1.5 1.5s1.5-.672 1.5-1.5c0 .828.671 1.5 1.5 1.5s1.5-.672 1.5-1.5c0 .828.671 1.5 1.5 1.5.828 0 1.5-.672 1.5-1.5v-2c0-.828-.672-1.5-1.5-1.5z"/><path fill="#FFAC33" d="M19 26.5c-.829 0-1.5.672-1.5 1.5 0-.828-.671-1.5-1.5-1.5s-1.5.672-1.5 1.5c0-.828-.671-1.5-1.5-1.5s-1.5.672-1.5 1.5c0-.828-.671-1.5-1.5-1.5s-1.5.672-1.5 1.5c0-.828-.671-1.5-1.5-1.5s-1.5.672-1.5 1.5v2c0 .828.671 1.5 1.5 1.5s1.5-.672 1.5-1.5c0 .828.671 1.5 1.5 1.5s1.5-.672 1.5-1.5c0 .828.671 1.5 1.5 1.5s1.5-.672 1.5-1.5c0 .828.671 1.5 1.5 1.5s1.5-.672 1.5-1.5c0 .828.671 1.5 1.5 1.5.828 0 1.5-.672 1.5-1.5v-2c0-.828-.672-1.5-1.5-1.5z"/><path fill="#3B94D9" d="M29 10.5c-.828 0-1.5-.671-1.5-1.5V7c0-.829.672-1.5 1.5-1.5s1.5.671 1.5 1.5v2c0 .829-.672 1.5-1.5 1.5z"/><path fill="#BE1931" d="M29 17.5c-.828 0-1.5-.671-1.5-1.5v-2c0-.829.672-1.5 1.5-1.5s1.5.671 1.5 1.5v2c0 .829-.672 1.5-1.5 1.5z"/><path fill="#5C913B" d="M29 24.5c-.828 0-1.5-.672-1.5-1.5v-2c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5v2c0 .828-.672 1.5-1.5 1.5z"/><path fill="#FFAC33" d="M29 31.5c-.828 0-1.5-.672-1.5-1.5v-2c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5v2c0 .828-.672 1.5-1.5 1.5z"/><path fill="#BF6952" d="M35 33H1c-.552 0-1 .448-1 1v1c0 .552.448 1 1 1h34c.552 0 1-.448 1-1v-1c0-.552-.448-1-1-1z"/><script xmlns=""/></svg>

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig><msapplication><tile><square70x70logo src="/favicon/ms-icon-70x70.png"/><square150x150logo src="/favicon/ms-icon-150x150.png"/><square310x310logo src="/favicon/ms-icon-310x310.png"/><TileColor>#ffffff</TileColor></tile></msapplication></browserconfig>

View File

@ -1,41 +0,0 @@
{
"name": "App",
"icons": [
{
"src": "\/favicon\/android-icon-36x36.png",
"sizes": "36x36",
"type": "image\/png",
"density": "0.75"
},
{
"src": "\/favicon\/android-icon-48x48.png",
"sizes": "48x48",
"type": "image\/png",
"density": "1.0"
},
{
"src": "\/favicon\/android-icon-72x72.png",
"sizes": "72x72",
"type": "image\/png",
"density": "1.5"
},
{
"src": "\/favicon\/android-icon-96x96.png",
"sizes": "96x96",
"type": "image\/png",
"density": "2.0"
},
{
"src": "\/favicon\/android-icon-144x144.png",
"sizes": "144x144",
"type": "image\/png",
"density": "3.0"
},
{
"src": "\/favicon\/android-icon-192x192.png",
"sizes": "192x192",
"type": "image\/png",
"density": "4.0"
}
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 KiB

View File

@ -1,3 +0,0 @@
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">
<g><path d="M758.7,873c10.4,17.7,4.6,41.2-13.6,51.1c-18,10.4-40.7,4.3-50.9-13.7c-10.9-17.7-4.5-40.7,13.1-51.1C725.7,848.9,748.3,855.4,758.7,873L758.7,873z M537.9,952.8L537.9,952.8c0,20.4-16.9,37.5-38,37.5c-20.4,0-37.5-16.6-37.5-37.5v-26.2c0-20.9,17.1-37.5,37.5-37.5c20.8,0,38,16.6,38,37.5V952.8L537.9,952.8z M306.6,910.5L306.6,910.5c-10.7,18.5-33.7,24.4-51.4,13.9c-18.2-10.2-24.7-33.2-13.9-51.4l27.8-48.7c10.7-18,33.7-24.1,51.9-13.9c17.7,10.5,24.1,33.7,13.4,51.4L306.6,910.5L306.6,910.5z M127.3,759L127.3,759c-18.2,10.2-41.5,4-51.4-13.9c-10.7-17.7-4.6-41,13.3-51.4l75-43.4c17.9-9.9,41.2-4.3,51.3,13.9c10.2,17.7,4.1,41-13.9,51.4L127.3,759L127.3,759z M47.4,537.6L47.4,537.6c-20.8,0-37.4-16.9-37.4-37.5c0-20.9,16.6-37.7,37.4-37.7h116.8c20.8,0,37.5,16.9,37.5,37.5c0,20.9-16.6,37.7-37.5,37.7H47.4L47.4,537.6z M89.2,306.1L89.2,306.1c-18.2-10.2-24-33.2-13.3-51.1c9.9-18.2,33.2-24.4,51.4-13.9l126.8,73.6c18,10.2,23.9,33.2,14,50.8c-10.7,18.2-33.7,24.1-51.4,13.9L89.2,306.1L89.2,306.1z M241.3,126.7L241.3,126.7l88.3,153.4c10.8,17.9,33.7,24.4,51.7,13.7c17.9-10.2,23.8-33.5,13.3-51.4L306,89.2c-10.2-17.7-33.2-24.1-50.8-13.7C236.9,86,231.1,109.1,241.3,126.7L241.3,126.7z M462.4,47.5L462.4,47.5c0-20.3,17.1-37.7,37.5-37.7c20.8,0,38,16.9,38,37.7v176.7c0,20.9-16.9,37.7-38,38c-20.4,0-37.5-16.6-37.5-38V47.5L462.4,47.5z M693.6,89.2L693.6,89.2c10.7-18.2,33.5-24.1,51.5-13.9c18.2,10.2,24.6,33.2,13.8,51.4l-88.6,153.4c-9.8,17.9-33.4,24.4-51.3,13.9c-18-10.5-23.9-33.7-13.7-51.6L693.6,89.2L693.6,89.2z M873.5,241L873.5,241l-153.6,88.6c-17.9,10.2-24.1,33.2-14,51.4c10.7,17.7,33.8,23.5,51.4,13.7l153.7-88.6c17.6-10.2,24-33.2,13.4-51.1C914.3,236.7,891.2,230.3,873.5,241L873.5,241z M952.5,462.4L952.5,462.4c21.1,0,37.8,16.9,37.5,37.7c0,20.6-16.4,37.5-37.5,37.5h-177c-20.3,0-37.4-16.9-37.4-37.7c0-20.6,17.1-37.5,37.4-37.5H952.5L952.5,462.4z"/></g>
</svg>

Before

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -1,91 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="robots" content="noindex, nofollow">
<style>
body {
padding: 0;
margin: 0;
}
svg:not(:root) {
display: block;
}
.playable-code {
background-color: #f4f7f8;
border: none;
border-left: 6px solid #558abb;
border-width: medium medium medium 6px;
color: #4d4e53;
height: 100px;
width: 90%;
padding: 10px 10px 0;
}
.playable-canvas {
border: 1px solid #4d4e53;
border-radius: 2px;
}
.playable-buttons {
text-align: right;
width: 90%;
padding: 5px 10px 5px 26px;
}
</style>
<title>Navigator: share() method - sharing_files - code sample</title>
</head>
<body>
<div>
<label for="files">Select images to share:</label>
<input id="files" type="file" accept="image/*" multiple />
</div>
<button id="share" type="button">Share your images!</button>
<output id="output"></output>
<script>
const input = document.getElementById("files");
const output = document.getElementById("output");
document.getElementById("share").addEventListener("click", async () => {
const files = input.files;
if (files.length === 0) {
output.textContent = "No files selected.";
return;
}
// feature detecting navigator.canShare() also implies
// the same for the navigator.share()
if (!navigator.canShare) {
output.textContent = `Your browser doesn't support the Web Share API.`;
return;
}
if (navigator.canShare({ files })) {
try {
await navigator.share({
files,
title: "Images",
text: "Beautiful images",
});
output.textContent = "Shared!";
} catch (error) {
output.textContent = `Error: ${error.message}`;
}
} else {
output.textContent = `Your system doesn't support sharing these files.`;
}
});
</script>
</body>
</html>

24
run Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash
# -e Exit immediately if a command exits with a non-zero status.
# -u Treat unset variables as an error when substituting.
set -eu
. ./.env
. ./themes/hugo-theme-lowtech/scripts/run
echo " ____ _ _ _ "
echo "| _ \ ___ ___(_) | (_) ___ _ __ "
echo "| |_) / _ \/ __| | | | |/ _ \ '_ \ "
echo "| _ < __/\__ \ | |___| | __/ | | |"
echo "|_| \_\___||___/_|_____|_|\___|_| |_|"
echo
echo
if [ $# -ge 1 ]; then
$@
else
help_generic
fi
end

View File

@ -0,0 +1,81 @@
import DirectusToMarkdown from '@resilien/directus-to-markdown'
import urlslug from 'url-slug'
const getTranslation = (translations, lang, field) => {
const match = translations.filter(translation => translation.languages_code == lang || translation.languages_id == lang)
return match.length > 0 ? match[0][field] : undefined
}
const formatQuestions = (questions, lang) => {
const formated = []
for (const [i, question] of questions.entries()) {
formated.push({
id: question.questions_id.id,
sort: question.sort,
title: getTranslation(question.questions_id.translations, lang, 'title'),
answers: formatAnswers(question.questions_id.answers, lang)
})
}
return formated
}
const formatAnswers = (answers, lang) => {
const formated = []
for (const [i, answer] of answers.entries()) {
formated.push({
id: answer.answers_id.id,
sort: answer.sort,
title: getTranslation(answer.answers_id.translations, lang, 'title'),
weight: answer.answers_id.weight
})
}
return formated
}
const formatScore = (score, lang) => {
score.title = getTranslation(score.translations, lang, 'title')
delete score.translations
return score
}
const formatResults = (results, lang) => {
const formated = []
for (const [i, result] of results.entries()) {
formated.push({
id: result.results_id.id,
sort: result.sort,
min: result.results_id.min,
max: result.results_id.max,
facteur: getTranslation(result.results_id.translations, lang, 'facteur'),
effets: getTranslation(result.results_id.translations, lang, 'effets'),
pde: getTranslation(result.results_id.translations, lang, 'pde'),
pde_qtra: result.results_id.pde_qtra,
})
}
return formated
}
const config = {
collections: {
scores: {
readByQueryOption: {
fields: ['*', 'translations.*', 'questions.sort', 'questions.questions_id.*', 'questions.questions_id.translations.*', 'questions.questions_id.answers.*', 'questions.questions_id.answers.answers_id.*', 'questions.questions_id.answers.answers_id.translations.*', 'results.*', 'results.results_id.*', 'results.results_id.translations.*']
},
pathBuilder: (score) => {
const lang = 'fr-FR'
score = formatScore(score, lang)
score.questions = formatQuestions(score.questions, lang)
score.results = formatResults(score.results, lang)
return `./content`;
},
deleteFields: ['path']
}
}
}
new DirectusToMarkdown(config).export();

View File

@ -0,0 +1 @@
../../../../themes/hugo-theme-lowtech/node_modules/@resilien/directus-to-markdown

1
scripts/directus-to-markdown/node_modules/url-slug generated vendored Symbolic link
View File

@ -0,0 +1 @@
../../../themes/hugo-theme-lowtech/node_modules/url-slug

View File

@ -0,0 +1,11 @@
{
"name": "directus-to-markdown",
"version": "0.0.0",
"description": "Translates content from Directus.io to gohugo.io",
"main": "index.js",
"type": "module",
"dependencies": {
"@resilien/directus-to-markdown": "file:../../themes/hugo-theme-lowtech/node_modules/@resilien/directus-to-markdown",
"url-slug": "file:../../themes/hugo-theme-lowtech/node_modules/url-slug"
}
}

View File

@ -1,318 +0,0 @@
import { createWriteStream, existsSync, mkdirSync } from "fs";
import sharp from "sharp";
import fs from "fs/promises";
import { pipeline } from "stream";
import { promisify } from "util";
const streamPipeline = promisify(pipeline);
const apiUrl = "https://admin.ceiba-conseil.com";
async function fetchJSONApi(path) {
const url = `${apiUrl}${path}`;
const options = {
method: "GET",
headers: {
"content-type": "application/json",
},
};
console.log(`fetchJSONApi: ${url}`);
const response = await fetch(url, options);
if (!response.ok) {
const errors = await response.json();
throw errors.errors[0].message;
}
return response.json();
}
async function fetchAsset(uuid) {
const url = `${apiUrl}/assets/${uuid}`;
return fetch(url);
}
async function fetchScoresData() {
const fields = [
"*",
"translations.*",
"questions.sort",
"questions.questions_id.*",
"questions.questions_id.translations.*",
"questions.questions_id.answers.*",
"questions.questions_id.answers.answers_id.*",
"questions.questions_id.answers.answers_id.translations.*",
"results.*",
"results.results_id.*",
"results.results_id.translations.*",
];
const url = `/items/scores?${fields
.map((item) => `fields[]=${item}`)
.join("&")}`;
let scores = (await fetchJSONApi(url)).data;
if (process.env.NODE_ENV == "production") {
console.log("Suppresion des scores avec le mode brouillon en production");
scores = scores.filter((score) => !score.draft);
} else if (process.env.NODE_ENV == "test") {
console.log("Suppresion des scores sans l'environnement test");
scores = scores.filter((score) => score.env_test);
}
await fs.writeFile("./src/data.json", JSON.stringify(scores), "utf8");
const folder = "public/answers";
if (!existsSync(folder)) mkdirSync(folder);
for (const score of scores) {
const uuid_score = score.image;
if (uuid_score) {
console.log(`Score image : ${folder}/${uuid_score}`);
const response = await fetchAsset(uuid_score);
try {
const thumbnail = sharp().resize({ height: 200 }).webp();
await streamPipeline(
response.body,
thumbnail,
createWriteStream(`${folder}/${uuid_score}.webp`),
);
} catch (err) {
console.log(err);
}
}
for (const question of score.questions) {
for (const answer of question.questions_id.answers) {
const uuid = answer.answers_id.image;
if (uuid) {
await downloadImage(uuid, `${folder}/${uuid}.webp`, { height: 200 });
}
}
}
}
// await sharp('src/assets/arbre.png').resize({ width: 440, height: 690 }).webp().toFile('public/arbre.webp')
}
async function transformImage(response, path, options, format = "webp") {
try {
let thumbnail;
console.log(path);
if (format == "webp") {
thumbnail = sharp().resize(options).webp();
} else {
thumbnail = sharp().resize(options).toFormat("png");
}
const stream = createWriteStream(path);
await streamPipeline(response.body, thumbnail, stream);
await stream;
} catch (err) {
console.log(err);
}
}
async function downloadImage(uuid, path, options, format = "webp") {
const response = await fetchAsset(uuid);
await transformImage(response, path, options, format);
}
async function fetchHomepageData() {
const fields = ["*"];
const url = `/items/homepage?${fields
.map((item) => `fields[]=${item}`)
.join("&")}`;
const homepage = (await fetchJSONApi(url)).data;
await downloadImage(homepage.image, `public/homepage.webp`, {
width: 1280,
height: 720,
fit: sharp.fit.cover,
});
const favicons = [
{
path: `public/favicon/android-icon-192x192.png`,
options: {
width: 192,
height: 192,
fit: sharp.fit.contain,
background: { r: 255, g: 255, b: 255, alpha: 0 },
},
format: "png",
},
{
path: `public/favicon/apple-icon-57x57.png`,
options: {
width: 57,
height: 57,
fit: sharp.fit.contain,
background: { r: 255, g: 255, b: 255, alpha: 0 },
},
format: "png",
},
{
path: `public/favicon/apple-icon-60x60.png`,
options: {
width: 60,
height: 60,
fit: sharp.fit.contain,
background: { r: 255, g: 255, b: 255, alpha: 0 },
},
format: "png",
},
{
path: `public/favicon/apple-icon-72x72.png`,
options: {
width: 72,
height: 72,
fit: sharp.fit.contain,
background: { r: 255, g: 255, b: 255, alpha: 0 },
},
format: "png",
},
{
path: `public/favicon/apple-icon-76x76.png`,
options: {
width: 76,
height: 76,
fit: sharp.fit.contain,
background: { r: 255, g: 255, b: 255, alpha: 0 },
},
format: "png",
},
{
path: `public/favicon/apple-icon-114x114.png`,
options: {
width: 114,
height: 114,
fit: sharp.fit.contain,
background: { r: 255, g: 255, b: 255, alpha: 0 },
},
format: "png",
},
{
path: `public/favicon/apple-icon-120x120.png`,
options: {
width: 120,
height: 120,
fit: sharp.fit.contain,
background: { r: 255, g: 255, b: 255, alpha: 0 },
},
format: "png",
},
{
path: `public/favicon/apple-icon-144x144.png`,
options: {
width: 144,
height: 144,
fit: sharp.fit.contain,
background: { r: 255, g: 255, b: 255, alpha: 0 },
},
format: "png",
},
{
path: `public/favicon/apple-icon-152x152.png`,
options: {
width: 152,
height: 152,
fit: sharp.fit.contain,
background: { r: 255, g: 255, b: 255, alpha: 0 },
},
format: "png",
},
{
path: `public/favicon/apple-icon-180x180.png`,
options: {
width: 180,
height: 180,
fit: sharp.fit.contain,
background: { r: 255, g: 255, b: 255, alpha: 0 },
},
format: "png",
},
{
path: `public/favicon/favicon-16x16.png`,
options: {
width: 16,
height: 16,
fit: sharp.fit.contain,
background: { r: 255, g: 255, b: 255, alpha: 0 },
},
format: "png",
},
{
path: `public/favicon/favicon-32x32.png`,
options: {
width: 32,
height: 32,
fit: sharp.fit.contain,
background: { r: 255, g: 255, b: 255, alpha: 0 },
},
format: "png",
},
{
path: `public/favicon/favicon-96x96.png`,
options: {
width: 96,
height: 96,
fit: sharp.fit.contain,
background: { r: 255, g: 255, b: 255, alpha: 0 },
},
format: "png",
},
{
path: `public/favicon/favicon-256x256.png`,
options: {
width: 256,
height: 256,
fit: sharp.fit.contain,
background: { r: 255, g: 255, b: 255, alpha: 0 },
},
format: "png",
},
{
path: `public/favicon/ms-icon-70x70.png`,
options: {
width: 70,
height: 70,
fit: sharp.fit.contain,
background: { r: 255, g: 255, b: 255, alpha: 0 },
},
format: "png",
},
{
path: `public/favicon/ms-icon-144x144.png`,
options: {
width: 144,
height: 144,
fit: sharp.fit.contain,
background: { r: 255, g: 255, b: 255, alpha: 0 },
},
format: "png",
},
{
path: `public/favicon/ms-icon-150x150.png`,
options: {
width: 150,
height: 150,
fit: sharp.fit.contain,
background: { r: 255, g: 255, b: 255, alpha: 0 },
},
format: "png",
},
{
path: `public/favicon/ms-icon-310x310.png`,
options: {
width: 310,
height: 310,
fit: sharp.fit.contain,
background: { r: 255, g: 255, b: 255, alpha: 0 },
},
format: "png",
},
];
for (const favicon of favicons) {
downloadImage(homepage.logo, favicon.path, favicon.options, favicon.format);
}
}
async function fetchData() {
await fetchHomepageData();
await fetchScoresData();
}
fetchData();

View File

@ -1,21 +0,0 @@
<script setup>
import { RouterView } from "vue-router";
import { useStore } from "@/stores";
const store = useStore();
if (store.theme == "dark") {
document.body.classList.remove("theme-light");
document.body.classList.add("theme-dark");
} else if (store.theme == "light") {
document.body.classList.remove("theme-dark");
document.body.classList.add("theme-light");
}
</script>
<template>
<RouterView />
</template>
<style>
@import "@/assets/base.css";
</style>

View File

@ -1,125 +0,0 @@
/* color palette from <https://github.com/vuejs/theme> */
:root {
/* #EDE0D4 */
--color-white: #ffffff;
/*--color-black: #181818;*/
--color-black: #000000;
--color-green: rgb(118, 148, 67);
--header-size-small: 64px;
--header-size-big: 128px;
--header-size: var(--header-size-small);
--footer-size: 64px;
}
/* semantic color variables for this project */
:root, body.theme-light {
--color-header-background: var(--color-green);
--color-header-text: var(--color-white);
--color-background: var(--color-white);
--color-text: var(--color-black);
--color-highlight-background: var(--color-green);
--color-highlight-text: var(--color-white);
--color-highlight-text-invert: var(--color-black);
}
body.theme-dark {
--color-header-background: var(--color-green);
--color-header-text: var(--color-black);
--color-background: var(--color-black);
--color-text: var(--color-white);
--color-highlight-background: var(--color-green);
--color-highlight-text: var(--color-black);
--color-highlight-text-invert: var(--color-white);
}
@media (prefers-color-scheme: dark) {
:root {
--color-header-background: var(--color-green);
--color-header-text: var(--color-black);
--color-background: var(--color-black);
--color-text: var(--color-white);
--color-highlight-background: var(--color-green);
--color-highlight-text: var(--color-black);
--color-highlight-text-invert: var(--color-white);
}
}
@media (min-height: 1000px) {
:root {
--header-size: var(--header-size-big);
}
}
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
font-weight: normal;
}
html, body, #app {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
#app {
min-width: 320px;
}
body {
color: var(--color-text);
background: var(--color-background);
line-height: 1.6;
font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
font-size: 16px;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
body.print {
--color-highlight-background: var(--color-white);
--color-highlight-text: var(--color-black);
--color-highlight-text-invert: var(--color-white);
--color-header-background: var(--color-white);
--color-header-text: var(--color-black);
}
.print .no-print {
display: none
}
.btn {
width: 3rem;
height: 3rem;
padding: .5rem;
margin: 0;
display: flex;
justify-content: center;
align-items: center;
border-radius: 100%;
position: absolute;
border: none;
box-shadow: 0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12);
cursor: pointer;
background: white;
}
.btn svg {
width: 100%;
height: 100%;
}
header svg.color-text [stroke] {
stroke: var(--color-header-text);
}
header svg.color-text [fill]:not([fill=none]) {
fill: var(--color-header-text)
}

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 261.76 226.69" xmlns:v="https://vecta.io/nano"><path d="M161.096.001l-30.225 52.351L100.647.001H-.005l130.877 226.688L261.749.001z" fill="#41b883"/><path d="M161.096.001l-30.225 52.351L100.647.001H52.346l78.526 136.01L209.398.001z" fill="#34495e"/></svg>

Before

Width:  |  Height:  |  Size: 308 B

View File

@ -1,339 +0,0 @@
<script setup>
import { ref } from "vue";
import { Splide, SplideSlide } from "@splidejs/vue-splide";
import "@splidejs/splide/dist/css/splide.min.css";
const props = defineProps({
question: {
type: Object,
required: true,
},
});
const emits = defineEmits(["answerSelected", "nextQuestion"]);
const slides = ref();
const answerWeight = ref(props.question.weight);
function selectAnswer(answer) {
const answerIndex = props.question.answers.findIndex(
(a) => a.id === answer.id,
);
slides.value.splide.go(answerIndex);
}
function slideMove(splide, newIndex) {
answerWeight.value = props.question.answers[newIndex].weight;
emits("answerSelected", props.question, answerWeight);
}
const displayPopup = ref(false);
function showHidePopup() {
displayPopup.value = !displayPopup.value;
}
function validatePopup() {
const calcule = Math.round((h.value * 100) / d.value);
const regexp = /[^0-9]*([0-9]{2})/g;
const answersLength = props.question.answers.length;
const answerIndex = props.question.answers.find((answer, index) => {
const values = Array.from(answer.title.matchAll(regexp), (m) => m[1]);
if (values.length > 0) {
const min = values.length == 1 ? 0 : values[0];
const max = values.length == 1 ? values[0] : values[1];
if (calcule >= min && calcule <= max) {
return true;
}
}
if (answersLength == index + 1) {
return true;
}
});
const answer = document.querySelector(
"input[id=" +
`question_${props.question.id}_answer_${answerIndex.id}` +
"]",
);
answer.checked = true;
answer.dispatchEvent(new Event("change"));
showHidePopup();
}
const h = ref();
const d = ref();
</script>
<template>
<div class="main">
<div class="center">
<legend>{{ question.title }}</legend>
<div class="images">
<template v-if="question.answers">
<Splide
@splide:move="slideMove"
class="answers"
:id="`question_${question.id}`"
ref="slides"
>
<SplideSlide v-for="answer in question.answers" :key="answer.id">
<img height="200" :src="`/answers/${answer.image}.webp`" />
</SplideSlide>
</Splide>
</template>
</div>
<template v-if="question.answers">
<ul class="choices">
<li
class="choice"
v-for="answer in question.answers"
:key="answer.id"
>
<input
type="radio"
:data-answerId="answer.id"
:name="`question_${question.id}`"
:id="`question_${question.id}_answer_${answer.id}`"
:value="answer.weight"
v-model="answerWeight"
@change="selectAnswer(answer)"
@click="nextQuestion"
/>
<label :for="`question_${question.id}_answer_${answer.id}`">
<div>
{{ answer.title }}
</div>
</label>
</li>
</ul>
</template>
</div>
</div>
<div class="btns">
<template v-if="question.function == 'rapport_hd'">
<button class="btn calculette" @click="showHidePopup">
<img src="/abacus.svg" alt="" />
</button>
</template>
<button class="btn next" @click="$emit('nextQuestion')">
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 40 40"
width="40"
height="40"
>
<path
d="m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z"
></path>
</svg>
</button>
</div>
<template v-if="displayPopup">
<div class="popup">
<button class="btn close" @click="showHidePopup">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36">
<path
d="M21.529 18.006l8.238-8.238c.977-.976.977-2.559 0-3.535-.977-.977-2.559-.977-3.535 0l-8.238 8.238-8.238-8.238c-.976-.977-2.56-.977-3.535 0-.977.976-.977 2.559 0 3.535l8.238 8.238-8.258 8.258c-.977.977-.977 2.559 0 3.535.488.488 1.128.732 1.768.732s1.28-.244 1.768-.732l8.258-8.259 8.238 8.238c.488.488 1.128.732 1.768.732s1.279-.244 1.768-.732c.977-.977.977-2.559 0-3.535l-8.24-8.237z"
fill="#000"
/>
</svg>
</button>
<label for="H">H (m)</label>
<input v-model="h" type="number" name="H" />
<label for="D">D (cm)</label>
<input v-model="d" type="number" name="D" />
<p v-if="d && d != 0"> {{ Math.round((h * 100) / d) }}</p>
<p v-if="!d || d == 0" class="no-visible"></p>
<button class="btn equal" @click="validatePopup">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36">
<path
fill="#31373D"
d="M34.459 1.375c-1.391-.902-3.248-.506-4.149.884L13.5 28.17l-8.198-7.58c-1.217-1.125-3.114-1.051-4.239.166-1.125 1.216-1.051 3.115.166 4.239l10.764 9.952s.309.266.452.359c.504.328 1.07.484 1.63.484.982 0 1.945-.482 2.52-1.368L35.343 5.524c.902-1.39.506-3.248-.884-4.149z"
/>
</svg>
</button>
</div>
</template>
</template>
<style lang="sass">
.btns
width: 400px
max-width: 100%
min-width: 280px
position: relative
margin: 0 auto
.popup
position: absolute
background: var(--color-highlight-background)
color: var(--color-highlight-text)
top: 0
left: 0
right: 0
bottom: 0
z-index: 100
display: flex
flex-direction: column
padding: 1rem
justify-content: center
align-items: center
p
padding: 1rem
margin: 1rem
border: 1px solid var(--color-highlight-text)
font-size: 2rem
&.no-visible
border: 1px solid transparent
svg path
fill: var(--color-highlight-background)
.close
top: 1rem
right: 1rem
.equal
position: relative
input
padding: .4rem
text-align: center
font-size: 1rem
width: 5rem
.calculette
background: var(--color-highlight-background)
bottom: 1rem
left: 1rem
width: 4rem
height: 4rem
img
width: 80%
height: 80%
.next
background: var(--color-highlight-background)
bottom: 1rem
right: 1rem
width: 3rem
height: 3rem
opacity: .8
&:hover
opacity: 1
svg
width: 80%
height: 80%
transform: rotate(90deg)
fill: var(--color-highlight-text)
.splide__arrow
background: transparent
border: 3px solid var(--color-green)
width: 3rem
height: 3rem
opacity: 1
svg
fill: var(--color-green)
height: 1.6rem
width: 1.6rem
.splide__pagination
bottom: -1.5em
display: none
.splide__pagination__page
width: .7rem
height: .7rem
background: var(--color-green)
&.is-active
background: var(--color-green)
</style>
<style lang="sass" scoped>
legend
text-align: center
font-size: 1.4rem
line-height: 2rem
font-weight: bold
width: 100%
.choices
list-style-type: none
text-align: left
display: inline-block
padding-left: 0
label
cursor: pointer
display: block
input[type=radio]
display: none
& + label > div
position: relative
padding: .2rem .2rem .2rem 2rem
& + label > div::before,
& + label > div::after
display: block
position: absolute
box-sizing: border-box
content:''
border-radius: 1rem
& + label > div::before
top: .5rem
left: 0
background-color: var(--color-green)
width: 1rem
height: 1rem
& + label > div::after
top: calc(3px + .5rem)
left: 3px
width: calc(1rem - 6px)
height: calc(1rem - 6px)
&:checked + label > div
text-shadow: -0.06ex 0 0 currentColor, 0.06ex 0 0 currentColor
&:not(:checked) + label > div::before
background-color: var(--color-green)
&:not(:checked) + label > div::after
background-color: white
.main
height: 100%
max-width: 100%
display: flex
flex-direction: column
justify-content: space-around
align-items: center
.center
width: 100%
text-align: center
.images
margin: 3rem auto
width: 400px
max-width: 100%
min-width: 280px
@media (max-height: 600px)
margin: 1rem auto
h2
font-size: 2rem
.answers
text-align: center
@media only screen and (orientation : landscape)
.main
flex-direction: row
.images
max-width: 50%
</style>

View File

@ -1,441 +0,0 @@
<script setup>
import data from "@/data.json";
import { ref, computed } from "vue";
import { useStore } from "@/stores";
import { Splide, SplideSlide } from "@splidejs/vue-splide";
import Question from "./Question.vue";
import "@splidejs/splide/dist/css/splide.min.css";
import ScoreHeader from "./ScoreHeader.vue";
import { toPng } from "html-to-image";
const props = defineProps({
id: {
type: String,
required: true,
},
});
const score = data.find((score) => score.id == props.id);
const slides = ref();
const store = useStore();
const language = store.language;
function formatAnswers(answers) {
return answers
.map((answer) => answer.answers_id)
.map((answer) => {
const translation = answer.translations.filter(
(item) => item.languages_code == language,
);
return {
id: answer.id,
title: translation.length > 0 ? translation[0].title : answer.title,
weight: answer.weight,
image: answer.image,
};
});
}
function formatScore(score) {
return score.questions
.map((question) => question.questions_id)
.map((question) => {
const translation = question.translations.filter(
(item) => item.languages_code == language,
);
const answers = formatAnswers(question.answers);
return {
id: question.id,
weight: answers[0].weight,
title: translation.length > 0 ? translation[0].title : question.title,
function: question.function,
answers: answers,
splide: ref(),
};
});
}
function getTranslation(translations, key) {
return translations.find((translation) => translation[key] == store.language);
}
const trad = getTranslation(score.translations, "languages_id");
const title = score ? trad.title : "";
const link = score ? trad.link : "";
const questions = ref(formatScore(score));
const scoreSum = computed(() => {
return questions.value
.map((question) => question.weight)
.reduce((value, currentValue) => value + currentValue, 0);
});
const displayScoreResult = computed(
() => !questions.value.filter((q) => q.weight == null).length,
);
function getResultsFromScore(score) {
return score.results
.map((result) => result.results_id)
.map((result) => {
const translation = result.translations.filter(
(item) => item.languages_code == language,
);
return {
id: result.id,
max: result.max,
min: result.min,
pde_qtra: result.pde_qtra,
effets: translation.length > 0 ? translation[0].effets : "",
facteur: translation.length > 0 ? translation[0].facteur : "",
pde: translation.length > 0 ? translation[0].pde : "",
title: translation.length > 0 ? translation[0].title : "",
};
})
.reverse();
}
const results = ref(getResultsFromScore(score));
const result = computed(() =>
displayScoreResult.value
? results.value
.filter((r) => !r.min || r.min <= scoreSum.value)
.filter((r) => !r.max || r.max >= scoreSum.value)[0]
: null,
);
function goQuestionSlide(question) {
console.log(slides.value);
slides.value.go(
questions.value.findIndex((element) => element.id === question.id),
);
}
function answerSelected(question, answerWeight) {
questions.value.find((q) => q.id === question.id).weight = answerWeight;
}
function nextQuestion() {
setTimeout(() => {
slides.value.go(">");
console.log(slides);
}, 100);
}
const saveAs = (blob, fileName) => {
var elem = window.document.createElement("a");
elem.href = blob;
elem.download = fileName;
elem.style = "display:none;";
(document.body || document.documentElement).appendChild(elem);
if (typeof elem.click === "function") {
elem.click();
} else {
elem.target = "_blank";
elem.dispatchEvent(
new MouseEvent("click", {
view: window,
bubbles: true,
cancelable: true,
}),
);
}
URL.revokeObjectURL(elem.href);
elem.remove();
};
const sharing = ref(false);
async function share() {
sharing.value = true;
const filter = (node) => {
const exclusionClasses = ["btn"];
return !exclusionClasses.some((classname) =>
node.classList?.contains(classname),
);
};
const body = document.querySelector("body");
body.classList.add("print");
const dataUrl = await toPng(body, { filter: filter });
body.classList.remove("print");
const fileName = new Date()
.toISOString()
.replace(/T/, "_")
.replace(/\..+/, "")
.replaceAll(":", "-");
saveAs(dataUrl, `Ceiba-score-${fileName}.png`);
sharing.value = false;
}
</script>
<template>
<ScoreHeader v-if="title" :title="title" :link="link" />
<Splide
ref="slides"
class="questions"
v-if="questions"
:options="{
pagination: false,
speed: 700,
height: '100%',
arrows: false,
direction: 'ttb',
wheel: true,
releaseWheel: true,
}"
>
<SplideSlide v-for="question in questions" :key="question.id">
<Question
:question="question"
@answerSelected="answerSelected"
@nextQuestion="nextQuestion"
/>
</SplideSlide>
<SplideSlide class="latest">
<template v-if="displayScoreResult && result">
<div>
<h2 class="center">{{ trad.result_title }}</h2>
<h2 class="center">{{ result.title }}</h2>
<div :class="'gradient size-' + results.length">
<div
v-for="item in results"
:class="{ active: result && result.pde_qtra === item.pde_qtra }"
:key="item"
:data-title="trad.result_sigle"
>
{{ item.title }}
</div>
</div>
<div class="details">
<p>{{ trad.result_params }} :</p>
<br />
<ul>
<li v-for="question in questions" :key="question.id">
{{ question.title }} :
{{
question.answers.find(
(answer) => answer.weight === question.weight,
).title
}}
</li>
</ul>
</div>
<button class="btn download" @click="() => share()" v-if="!sharing">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36">
<path
fill="#D99E82"
d="M36 32c0 2.209-1.791 4-4 4H4c-2.209 0-4-1.791-4-4v-9c0-2.209.791-3 3-3h30c2.209 0 3 .791 3 3v9z"
/>
<path
fill="#662113"
d="M25 20c0 3.866-3.134 7-7 7s-7-3.134-7-7h14z"
/>
<path
fill="#C1694F"
d="M4 36h28c2.209 0 4-1.791 4-4H0c0 2.209 1.791 4 4 4z"
/>
<path
fill="#77B255"
d="M26.716 8h-4.783V2c0-1.105-.896-2-2-2h-4.001c-1.104 0-1.999.896-1.999 2v6H9.148c-1.223 0-1.516.623-.651 1.489l7.863 7.863c.865.865 2.28.865 3.146 0l7.863-7.863C28.232 8.623 27.94 8 26.716 8z"
/>
</svg>
</button>
<button class="btn spin" v-if="sharing">
<img src="/spin.svg" />
</button>
</div>
</template>
<template v-else>
<div class="noscore">
<p>
Aucun score ne peut vous être proposé, vous devez faire une
sélection sur les paramètres suivants :
</p>
<ul>
<li
v-for="question in questions.filter((q) => q.weight == null)"
:key="question.id"
>
<a
@click="
(event) => {
goQuestionSlide(question);
return false;
}
"
href="javascript:;"
>{{ question.title }}</a
>
</li>
</ul>
</div>
</template>
</SplideSlide>
</Splide>
</template>
<style lang="sass" scoped>
.spin
bottom: 1.5rem
right: 1.5rem
img
position: absolute
top: 50%
left: 50%
width: 30px
height: 30px
margin: -15px 0 0 -15px
-webkit-animation: spin 2s linear infinite
-moz-animation: spin 2s linear infinite
animation: spin 2s linear infinite
@-moz-keyframes spin
100%
-moz-transform: rotate(360deg)
@-webkit-keyframes spin
100%
-webkit-transform: rotate(360deg)
@keyframes spin
100%
-webkit-transform: rotate(360deg)
transform: rotate(360deg)
.center
text-align: center
.download
bottom: 1.5rem
right: 1.5rem
opacity: .7
.noscore
display: flex
justify-content: center
align-items: center
height: 100%
color: var(--color-text)
flex-direction: column
p
font-size: 1rem
text-align: center
margin-bottom: 1rem
a
color: var(--color-text)
.questions
position: fixed
top: var(--header-size)
left: 0
right: 0
bottom: 0
background: transparent
.splide__slide
position: relative
padding: 1rem
.splide__track
overflow: visible!important
legend
font-size: 1.1rem
font-weight: bold
label
display: inline-block
width: 100%
padding: .3rem
.latest
background-color: var(--color-highlight-background)
color: var(--color-highlight-text)
display: flex
align-items: center
justify-content: center
h2
font-size: 2rem
font-weight: bold
line-height: 2.4rem
& + h2
line-height: 3rem
font-size: 2.6rem
@media (max-height: 600px)
font-size: 1.5rem
& + h2
font-size: 2rem
ul
text-align: left
padding-left: 1.5rem
list-style-type: disc
.details
text-align: left !important
font-size: 1.1rem
line-height: normal
background: var(--color-highlight-background)
border: 1px solid var(--color-highlight-text)
padding: 1rem
background: rgba(0,0,0,0.2)
li
line-height: 1.5rem
.gradient
padding: 0 1rem
height: 3rem
background-image: linear-gradient(to right, red, red, rgb(255, 255, 0), rgb(255, 255, 0), green, green)
display: flex
margin: 2.5rem auto
align-items: center
border-radius: 3px
max-width: 30rem
text-shadow: 1px 1px 4px var(--color-highlight-text-invert),-1px -1px 4px var(--color-highlight-text-invert), -1px 1px 4px var(--color-highlight-text-invert), 1px -1px 4px var(--color-highlight-text-invert)
color: var(--color-highlight-text)
&.size-3 div
width: calc(100%/3)
&.size-4 div
width: calc(100%/4)
&.size-5 div
width: calc(100%/5)
&.size-6 div
width: calc(100%/6)
&.size-7 div
width: calc(100%/7)
div
text-align: center
align-self: center
font-weight: bold
.active
position: relative
&:before
content: ""
border: 1px solid var(--color-highlight-text)
border-radius: 3px
top: -2.8rem
bottom: -1.5rem
position: absolute
width: 100%
font-weight: bold
display: flex
align-items: center
justify-content: center
&::after
content: attr(data-title)
position: absolute
font-size: 1rem
top: -2rem
bottom: -1.5rem
left: 0
right: 0
line-height: .7rem
text-shadow: none
.splide__arrows
position: inherit
</style>

View File

@ -1,154 +0,0 @@
<script setup>
defineProps({
title: {
type: String,
required: true,
},
link: {
type: String,
},
});
</script>
<template>
<header>
<router-link :to="{ name: 'home' }">
<svg
class="color-text"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M22 22L2 22"
stroke="white"
stroke-width="1.5"
stroke-linecap="round"
/>
<path
d="M2 11L10.1259 4.49931C11.2216 3.62279 12.7784 3.62279 13.8741 4.49931L22 11"
stroke="white"
stroke-width="1.5"
stroke-linecap="round"
/>
<path
d="M15.5 5.5V3.5C15.5 3.22386 15.7239 3 16 3H18.5C18.7761 3 19 3.22386 19 3.5V8.5"
stroke="white"
stroke-width="1.5"
stroke-linecap="round"
/>
<path
d="M4 22V9.5"
stroke="white"
stroke-width="1.5"
stroke-linecap="round"
/>
<path
d="M20 22V9.5"
stroke="white"
stroke-width="1.5"
stroke-linecap="round"
/>
<path
d="M15 22V17C15 15.5858 15 14.8787 14.5607 14.4393C14.1213 14 13.4142 14 12 14C10.5858 14 9.87868 14 9.43934 14.4393C9 14.8787 9 15.5858 9 17V22"
stroke="white"
stroke-width="1.5"
/>
<path
d="M14 9.5C14 10.6046 13.1046 11.5 12 11.5C10.8954 11.5 10 10.6046 10 9.5C10 8.39543 10.8954 7.5 12 7.5C13.1046 7.5 14 8.39543 14 9.5Z"
stroke="white"
stroke-width="1.5"
/>
</svg>
</router-link>
<h1>{{ title }}</h1>
<a v-if="link" :href="link">
<svg
class="color-text"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M12 17V11"
stroke="white"
stroke-width="1.5"
stroke-linecap="round"
/>
<circle
cx="1"
cy="1"
r="1"
transform="matrix(1 0 0 -1 11 9)"
fill="white"
/>
<path
stroke="white"
stroke-width="1.5"
d="M2 12C2 7.28595 2 4.92893 3.46447 3.46447C4.92893 2 7.28595 2 12 2C16.714 2 19.0711 2 20.5355 3.46447C22 4.92893 22 7.28595 22 12C22 16.714 22 19.0711 20.5355 20.5355C19.0711 22 16.714 22 12 22C7.28595 22 4.92893 22 3.46447 20.5355C2 19.0711 2 16.714 2 12Z"
/>
</svg>
</a>
</header>
</template>
<style lang="sass" scoped>
header
height: var(--header-size)
position: fixed
background: var(--color-header-background)
color: var(--color-header-text)
width: 100%
z-index: 1
top: 0
border-bottom: 1px solid var(--color-header-text)
display: flex
align-items: center
align-content: center
a:first-child
border-right: 1px solid var(--color-header-text)
a:last-child
border-left: 1px solid var(--color-header-text)
a:hover svg, a:focus svg, a:active svg
transform: scale(1.1)
a
height: 100%
width: var(--header-size)
min-width: var(--header-size)
margin: 0
display: flex
align-items: center
text-align: center
align-content: center
text-decoration: none
p
margin: 0 auto
font-size: 2rem
color: var(--color-header-text)
h1
margin: 0 1rem
line-height: 0.9
flex: 1
font-size: 1.2rem
font-weight: bold
text-align: center
svg
width: 2rem
margin: 0 auto
@media (min-height: 1000px)
p
font-size: 4rem
h1
font-size: 2rem
svg
width: 4rem
</style>

View File

@ -1,366 +0,0 @@
<script setup>
import data from "@/data.json";
import { useStore } from "@/stores";
const store = useStore();
const translationKey = "languages_id";
const scores = data.filter((score) => {
return (
!!score.translations.find(
(translation) => translation[translationKey] == store.language,
) &&
score.results.length &&
score.questions.length
);
});
function getTranslation(translations, key) {
return translations.find((translation) => translation[key] == store.language);
}
</script>
<template>
<header>
<ul>
<li
v-if="store.theme == ''"
@click="store.switchTheme"
title="Thème de votre système"
>
<svg
class="color-text"
version="1.1"
id="Icons"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 32 32"
xml:space="preserve"
>
<line
fill="none"
stroke="#000000"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
stroke-miterlimit="10"
x1="16"
y1="3"
x2="16"
y2="29"
/>
<path
fill="none"
stroke="#000000"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
stroke-miterlimit="10"
d="M16,23c-3.87,0-7-3.13-7-7s3.13-7,7-7"
/>
<line
fill="none"
stroke="#000000"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
stroke-miterlimit="10"
x1="6.81"
y1="6.81"
x2="8.93"
y2="8.93"
/>
<line
fill="none"
stroke="#000000"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
stroke-miterlimit="10"
x1="3"
y1="16"
x2="6"
y2="16"
/>
<line
fill="none"
stroke="#000000"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
stroke-miterlimit="10"
x1="6.81"
y1="25.19"
x2="8.93"
y2="23.07"
/>
<path
fill="none"
stroke="#000000"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
stroke-miterlimit="10"
d="M16,12.55C17.2,10.43,19.48,9,22.09,9c0.16,0,0.31,0.01,0.47,0.02c-1.67,0.88-2.8,2.63-2.8,4.64
c0,2.9,2.35,5.25,5.25,5.25c1.6,0,3.03-0.72,3.99-1.85C28.48,20.43,25.59,23,22.09,23c-2.61,0-4.89-1.43-6.09-3.55"
/>
</svg>
</li>
<li
v-if="store.theme == 'dark'"
@click="store.switchTheme"
title="Thème sombre"
>
<svg
class="color-text"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill="white"
d="M21.0672 11.8568L20.4253 11.469L21.0672 11.8568ZM12.1432 2.93276L11.7553 2.29085V2.29085L12.1432 2.93276ZM21.25 12C21.25 17.1086 17.1086 21.25 12 21.25V22.75C17.9371 22.75 22.75 17.9371 22.75 12H21.25ZM12 21.25C6.89137 21.25 2.75 17.1086 2.75 12H1.25C1.25 17.9371 6.06294 22.75 12 22.75V21.25ZM2.75 12C2.75 6.89137 6.89137 2.75 12 2.75V1.25C6.06294 1.25 1.25 6.06294 1.25 12H2.75ZM15.5 14.25C12.3244 14.25 9.75 11.6756 9.75 8.5H8.25C8.25 12.5041 11.4959 15.75 15.5 15.75V14.25ZM20.4253 11.469C19.4172 13.1373 17.5882 14.25 15.5 14.25V15.75C18.1349 15.75 20.4407 14.3439 21.7092 12.2447L20.4253 11.469ZM9.75 8.5C9.75 6.41182 10.8627 4.5828 12.531 3.57467L11.7553 2.29085C9.65609 3.5593 8.25 5.86509 8.25 8.5H9.75ZM12 2.75C11.9115 2.75 11.8077 2.71008 11.7324 2.63168C11.6686 2.56527 11.6538 2.50244 11.6503 2.47703C11.6461 2.44587 11.6482 2.35557 11.7553 2.29085L12.531 3.57467C13.0342 3.27065 13.196 2.71398 13.1368 2.27627C13.0754 1.82126 12.7166 1.25 12 1.25V2.75ZM21.7092 12.2447C21.6444 12.3518 21.5541 12.3539 21.523 12.3497C21.4976 12.3462 21.4347 12.3314 21.3683 12.2676C21.2899 12.1923 21.25 12.0885 21.25 12H22.75C22.75 11.2834 22.1787 10.9246 21.7237 10.8632C21.286 10.804 20.7293 10.9658 20.4253 11.469L21.7092 12.2447Z"
/>
</svg>
</li>
<li
v-if="store.theme == 'light'"
@click="store.switchTheme"
title="Thème clair"
>
<svg
class="color-text"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<circle cx="12" cy="12" r="5" stroke="#1C274C" stroke-width="1.5" />
<path
d="M12 2V4"
stroke="#1C274C"
stroke-width="1.5"
stroke-linecap="round"
/>
<path
d="M12 20V22"
stroke="#1C274C"
stroke-width="1.5"
stroke-linecap="round"
/>
<path
d="M4 12L2 12"
stroke="#1C274C"
stroke-width="1.5"
stroke-linecap="round"
/>
<path
d="M22 12L20 12"
stroke="#1C274C"
stroke-width="1.5"
stroke-linecap="round"
/>
<path
d="M19.7778 4.22266L17.5558 6.25424"
stroke="#1C274C"
stroke-width="1.5"
stroke-linecap="round"
/>
<path
d="M4.22217 4.22266L6.44418 6.25424"
stroke="#1C274C"
stroke-width="1.5"
stroke-linecap="round"
/>
<path
d="M6.44434 17.5557L4.22211 19.7779"
stroke="#1C274C"
stroke-width="1.5"
stroke-linecap="round"
/>
<path
d="M19.7778 19.7773L17.5558 17.5551"
stroke="#1C274C"
stroke-width="1.5"
stroke-linecap="round"
/>
</svg>
</li>
</ul>
<h1>Scores Ceiba</h1>
<ul>
<li v-if="store.language == 'fr-FR'" @click="store.switchLanguage">
<svg
xmlns="http://www.w3.org/2000/svg"
id="flag-icons-fr"
viewBox="0 0 640 480"
>
<path fill="#fff" d="M0 0h640v480H0z" />
<path fill="#000091" d="M0 0h213.3v480H0z" />
<path fill="#e1000f" d="M426.7 0H640v480H426.7z" />
</svg>
</li>
<li v-if="store.language == 'en-US'" @click="store.switchLanguage">
<svg
xmlns="http://www.w3.org/2000/svg"
id="flag-icons-gb"
viewBox="0 0 640 480"
>
<path fill="#012169" d="M0 0h640v480H0z" />
<path
fill="#FFF"
d="m75 0 244 181L562 0h78v62L400 241l240 178v61h-80L320 301 81 480H0v-60l239-178L0 64V0z"
/>
<path
fill="#C8102E"
d="m424 281 216 159v40L369 281zm-184 20 6 35L54 480H0zM640 0v3L391 191l2-44L590 0zM0 0l239 176h-60L0 42z"
/>
<path fill="#FFF" d="M241 0v480h160V0zM0 160v160h640V160z" />
<path fill="#C8102E" d="M0 193v96h640v-96zM273 0v480h96V0z" />
</svg>
</li>
</ul>
</header>
<main>
<img src="/homepage.webp" class="homeImage" />
<div class="container" v-if="scores">
<ul>
<template v-for="(score, index) in scores" :key="score.id">
<li class="white" v-if="index % 2 === 0">
<router-link :to="{ name: 'score', params: { id: score.id } }">
<img height="200" :src="`/answers/${score.image}.webp`" />
</router-link>
</li>
<li>
<router-link
:to="{ name: 'score', params: { id: score.id } }"
class="link"
>{{
getTranslation(score.translations, "languages_id").title
}}</router-link
>
</li>
<li class="white" v-if="index % 2 !== 0">
<router-link :to="{ name: 'score', params: { id: score.id } }">
<img height="200" :src="`/answers/${score.image}.webp`" />
</router-link>
</li>
</template>
</ul>
</div>
</main>
<footer>
<p v-if="store.language == 'fr-FR'">
Scores & Appli par <a href="https://ceiba-conseil.com">Ceiba</a>
</p>
<p v-if="store.language == 'en-US'">
Scores & App by <a href="https://ceiba-conseil.com">Ceiba</a>
</p>
</footer>
</template>
<style lang="sass" scoped>
footer
background: var(--color-header-background)
text-align: center
padding: 1rem
color: var(--color-header-text)
height: var(--footer-size)
display: flex
justify-content: space-around
align-items: center
a
color: var(--color-header-text)
header
height: var(--header-size)
overflow: hidden
display: flex
justify-content: space-around
align-items: center
border-bottom: 2px solid var(--color-header-text)
color: var(--color-header-text)
background: var(--color-header-background)
h1
text-align: center
text-transform: uppercase
ul
margin: 0
padding: 0
list-style: none
text-align: center
font-size: 1.5rem
width: 1.5rem
height: 2rem
a
text-decoration: none
.hidden
display: none
svg
height: 32px
width: 32px
main
width: 100%
min-height: calc(100% - var(--header-size) - var(--footer-size))
background-color: var(--color-background)
overflow-x: hidden
overflow-y: auto
text-align: center
display: flex
flex-direction: column
justify-content: space-evenly
.homeImage
height: 30vh
width: 100%
max-width: 600px
object-fit: contain
margin: 1rem auto 0
.container
display: flex
justify-content: center
align-items: center
overflow: hidden
padding: 1rem
ul
margin: 0
padding: 0
list-style: none
display: flex
flex-wrap: wrap
justify-content: center
max-width: 404px
border: 1px solid var(--color-green)
li
height: 202px
width: 202px
max-width: 50%
border: 1px solid var(--color-green)
img
max-width: 100%
object-fit: contain
.white
background: white
a.link
font-size: 2rem
line-height: 2rem
color: var(--color-green)
display: block
width: 100%
height: 100%
display: flex
align-items: center
justify-content: center
text-align: center
padding: 1rem
text-decoration: none
</style>

View File

@ -1,21 +0,0 @@
import { createApp } from "vue";
import { createPinia } from "pinia";
import piniaPersist from "pinia-plugin-persist";
import { registerSW } from "virtual:pwa-register";
import App from "@/App.vue";
import router from "@/router";
if ("serviceWorker" in navigator) {
// && !/localhost/.test(window.location)) {
registerSW();
}
const app = createApp(App);
const pinia = createPinia();
pinia.use(piniaPersist);
app.use(pinia);
app.use(router);
app.mount("#app");

View File

@ -1,21 +0,0 @@
import { createRouter, createWebHashHistory } from "vue-router";
import HomeView from "@/views/HomeView.vue";
const router = createRouter({
history: createWebHashHistory(import.meta.env.BASE_URL),
routes: [
{
path: "/",
name: "home",
component: HomeView,
},
{
path: "/scores/:id",
name: "score",
props: true,
component: () => import("./views/ScoreView.vue"),
},
],
});
export default router;

View File

@ -1,32 +0,0 @@
import { defineStore } from "pinia";
export const useStore = defineStore({
id: "counter",
state: () => ({
language: "fr-FR",
theme: "",
}),
persist: {
enabled: true,
},
actions: {
switchLanguage() {
this.language = this.language == "fr-FR" ? "en-US" : "fr-FR";
},
switchTheme() {
if (this.theme == "") {
this.theme = "dark";
document.body.classList.remove("theme-light");
document.body.classList.add("theme-dark");
} else if (this.theme == "dark") {
this.theme = "light";
document.body.classList.remove("theme-dark");
document.body.classList.add("theme-light");
} else {
this.theme = "";
document.body.classList.remove("theme-light");
document.body.classList.remove("theme-dark");
}
},
},
});

View File

@ -1,7 +0,0 @@
<script setup>
import ScoresList from "@/components/ScoresList.vue";
</script>
<template>
<ScoresList />
</template>

View File

@ -1,7 +0,0 @@
<script setup>
import Score from "@/components/Score.vue";
</script>
<template>
<Score :id="$route.params.id" />
</template>

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

25
static/manifest.json Normal file
View File

@ -0,0 +1,25 @@
{
"name": "My First Progressive Web app",
"short_name": "First PWA",
"theme_color": "#eb5252",
"background_color": "#000000",
"display": "fullscreen",
"Scope": "/",
"orientation": "portrait",
"icons": [
{
"src": "/images/pwa-icon-256.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "any maskable"
},
{
"src": "/images/pwa-icon-512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "any maskable"
}
],
"lang": "fr-FR",
"start_url": "index.html"
}

@ -0,0 +1 @@
Subproject commit d5c0ebda145e1c4c6c474d0e58823332ab3d8b1e

View File

@ -1,60 +0,0 @@
import { fileURLToPath, URL } from "url";
import { VitePWA } from "vite-plugin-pwa";
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
// https://vitejs.dev/config/
export default defineConfig({
// publicDir: 'public',
// includeAssets: ['public/answers/*.web'],
plugins: [
vue(),
VitePWA({
name: "My First Progressive Web app",
short_name: "First PWA",
theme_color: "#eb5252",
background_color: "#000000",
registerType: "autoUpdate",
injectRegister: "auto",
// add this to cache all the imports
workbox: {
globPatterns: ["**/*"],
},
// add this to cache all the
// static assets in the public folder
includeAssets: [
"**/*",
],
useCredentials: true,
manifest: {
theme_color: "#eb5252",
orientation: "portrait",
display: "fullscreen",
scope: "/",
icons: [
{
"src": "/images/pwa-icon-256.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "any maskable"
},
{
"src": "/images/pwa-icon-512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "any maskable"
},
],
},
devOptions: {
enabled: true,
},
}),
],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
});