Skip to content

Commit

Permalink
Merge pull request #156 from datalab-mi/fix/dsfr
Browse files Browse the repository at this point in the history
📦 Update dsfr
  • Loading branch information
victorjourne authored Jan 20, 2023
2 parents cea9234 + 0f01fef commit eaa0686
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
5 changes: 4 additions & 1 deletion docker-compose-frontend-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ services:
container_name: ${FRONTEND_DEV_HOST}
volumes:
- ${FRONTEND}/src:/app/src
- ${FRONTEND}/static:/app/static
- ${FRONTEND}/static/favicon.ico:/app/static/favicon.ico
- ${FRONTEND}/static/manifest.json:/app/static/manifest.json
- ${FRONTEND}/static/tailwind.css:/app/static/tailwind.css
- ${FRONTEND}/static/global.css:/app/static/global.css
- ${FRONTEND_STATIC_USER}:/app/static/user
ports:
- "${FRONTEND_PORT}:3000"
Expand Down
1 change: 1 addition & 0 deletions frontend/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
!/static
/static/user/notice.md
/static/user/env.json
/static/dsfr
13 changes: 10 additions & 3 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,16 @@ RUN unzip viewerjs-${VIEWERJS_VERSION}.zip
RUN mv viewerjs-${VIEWERJS_VERSION}/* ViewerJS

#DSFR (Design de l'Etat)
RUN npm install @gouvfr/dsfr
RUN mkdir static/fonts
RUN mv node_modules/@gouvfr/dsfr/dist/fonts/* static/fonts
RUN mkdir -p static/dsfr \
&& cp node_modules/@gouvfr/dsfr/dist/dsfr.module.min.js static/dsfr \
&& cp node_modules/@gouvfr/dsfr/dist/dsfr.module.min.js.map static/dsfr \
&& cp node_modules/@gouvfr/dsfr/dist/dsfr.nomodule.min.js static/dsfr \
&& cp node_modules/@gouvfr/dsfr/dist/dsfr.nomodule.min.js.map static/dsfr \
&& cp node_modules/@gouvfr/dsfr/dist/dsfr.min.css static/dsfr \
&& cp -r node_modules/@gouvfr/dsfr/dist/utility static/dsfr \
&& cp -r node_modules/@gouvfr/dsfr/dist/favicon static/dsfr \
&& cp -r node_modules/@gouvfr/dsfr/dist/icons static/dsfr \
&& cp -r node_modules/@gouvfr/dsfr/dist/fonts static/dsfr

# For production, see https://github.com/mikenikles/sapper-on-cloud-run/blob/master/Dockerfile
################################
Expand Down
1 change: 0 additions & 1 deletion frontend/src/routes/_layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import Nav from '../layouts/Nav.svelte';
import EmoRating from '../components/emoRating/starrating.svelte'
import { clickOutside } from '../components/click-outside.action';
import "../../node_modules/@gouvfr/dsfr/dist/css/dsfr.css"
export let segment;
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

<link rel='manifest' href='manifest.json' crossorigin='use-credentials'>
<link rel='icon' href='favicon.ico'>
<link rel="icon" href="dsfr/favicon/favicon.svg" type="image/svg+xml">
<link rel="shortcut icon" href="dsfr/favicon/favicon.ico" type="image/x-icon"><!-- 32×32 -->
<link rel="manifest" href="dsfr/favicon/manifest.webmanifest" crossorigin="use-credentials">
<!-- Sapper generates a <style> tag containing critical CSS
for the current page. CSS for the rest of the app is
lazily loaded when it precaches secondary pages -->
Expand Down

0 comments on commit eaa0686

Please sign in to comment.