commit 77c81dc4d39298af5c458d5a73c54e52d35bcceb Author: Emmanuel Cazenave Date: Tue Nov 27 19:52:14 2018 +0100 start rouen-publik-theme diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2e223a9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,21 @@ +/sdist/ +/static/*/style.css +/static/*/style.css.map +/static/minint/css/styles.css +/static/minint/css/styles.css.map +/src/tmp-*.svg +.sass-cache +/static/*/_data_uris.scss +/static/grandlyon/img/ +/static/grandlyon-gnm/img/signalement/*.png +/static/orleans/img/ +/static/publik/img/ +/static/somme-cd80/img/ +/static/tournai/img/ +/static/chateauroux/img/ +/debian/publik-base-theme/ +/debian/publik-base-theme.substvars +/debian/publik-base-theme.debhelper.log +/debian/.debhelper/ +*.patch +*~ diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..9c5b854 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "publik-base-theme"] + path = publik-base-theme + url = https://git.entrouvert.org/publik-base-theme.git diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6a92bc9 --- /dev/null +++ b/Makefile @@ -0,0 +1,47 @@ +VERSION=`git describe | sed 's/^v//; s/-/./g' ` +NAME="rouen-publik-theme" + +prefix = /usr + +all: css + +publik-base-theme/static/includes/_data_uris.scss: $(wildcard publik-base-theme/static/includes/img/*) + cd publik-base-theme + python make_data_uris.py static/includes/ + +css: publik-base-theme/static/includes/_data_uris.scss + cd static/rouen/ && sass style.scss:style.css + rm -rf static/*/.sass-cache/ + +clean: + rm -rf sdist publik-base-theme/static/includes/_data_uris.scss + +DIST_FILES = \ + Makefile static\ + templates themes.json \ + publik-base-theme + +dist: clean + -mkdir sdist + rm -rf sdist/$(NAME)-$(VERSION) + mkdir -p sdist/$(NAME)-$(VERSION) + for i in $(DIST_FILES); do \ + cp -R "$$i" sdist/$(NAME)-$(VERSION); \ + done + +install: + mkdir -p $(DESTDIR)$(prefix)/share/publik/themes/rouen + cp -r static templates themes.json $(DESTDIR)$(prefix)/share/publik/themes/rouen + +dist-bzip2: dist + -mkdir sdist + cd sdist && tar cfj ../sdist/$(NAME)-$(VERSION).tar.bz2 $(NAME)-$(VERSION) + +version: + @(echo $(VERSION)) + +name: + @(echo $(NAME)) + +fullname: + @(echo $(NAME)-$(VERSION)) diff --git a/publik-base-theme b/publik-base-theme new file mode 160000 index 0000000..77fa333 --- /dev/null +++ b/publik-base-theme @@ -0,0 +1 @@ +Subproject commit 77fa333633022c9b9e08d220a81384096f55c556 diff --git a/static/rouen/README b/static/rouen/README new file mode 100644 index 0000000..2999166 --- /dev/null +++ b/static/rouen/README @@ -0,0 +1,4 @@ +This theme is derived from the rouen.fr theme, created by Rouen, Direction de +la Communication et des Relations Publiques. + +Its design is *not* covered by the GNU Affero General Public License. diff --git a/static/rouen/_custom.scss b/static/rouen/_custom.scss new file mode 100644 index 0000000..153d9d2 --- /dev/null +++ b/static/rouen/_custom.scss @@ -0,0 +1,434 @@ +@import '../../publik-base-theme/static/includes/font-roboto'; + + +@font-face { + font-family: 'MarsIcons'; + src: url('fonts/marsicons12.ttf') format('truetype'), + url('fonts/marsicons12.woff') format('woff'), + url('fonts/marsicons12.woff2') format('woff2'); + font-weight: normal; + font-style: normal; +} + + +h1, h2, h3, h4, div.textcell h3, div.textcell h4 { + font-weight: bold; + line-height: 1.5em; + margin-bottom: 0.6em; + margin-top: 1em; +} + +h1 { + color: $red; + font-size: 237%; +} + +h2 { + color: $red; + font-size: 187%; +} + +h3 { + color: $link-color; + font-size: 162%; +} + +h4 { + font-size: 137%; +} + +h1#logo a { + background: url(img/logo.png) no-repeat left bottom; + background-size: contain; + display: block; + height: 83px; + text-indent: -9999px; +} + +div#nav li { + border-right: 0.1em solid #FFF; +} + +@media screen and (max-width: $custom-very-small-screen) { + div#footer { + margin: 0 1em; + } +} + +div#footer > div > div > div { + @include flexbox(); + @include vendor-prefix(flex-wrap, wrap); + @media screen and (max-width: $custom-very-small-screen) { + @include vendor-prefix(flex-direction, column); + } +} + +div#footer div#footer-logos { + @include flex(1); + @media screen and (max-width: $custom-very-small-screen) { + flex-basis: auto; + } + background: $primary-color; + margin: 0 0.4em 0 0; + padding: 2em 0 2em 0; + @media screen and (max-width: $custom-very-small-screen) { + margin: 0; + } + ul.menu{ + list-style: none; + margin-left: 0; + margin-top: 0; + li { + font-weight: bold; + float: left; + line-height: 1.3em; + margin-bottom: 0.5em; + } + li.rs-link a, li.logorouen span { + display: block; + height: 2.5em; + margin-right: 0.8em; + overflow: hidden; + position: relative; + } + li.rs-link a { + width: 2.5em; + } + li.logorouen span { + width: 9.110em; + &::after { + background-image: url(img/logo-h.svg); + } + } + li.rs-link a::after, li.logorouen span::after { + background-size: 100% 100%; + background-repeat: no-repeat; + content: ' '; + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; + } + + li.rs-facebook a::after { + background-image: url(img/rs-facebook.svg); + } + li.rs-twitter a::after { + background-image: url(img/rs-twitter.svg); + } + li.rs-googleplus a::after { + background-image: url(img/rs-googleplus.svg); + } + li.rs-youtube a::after { + background-image: url(img/rs-youtube.svg); + } + li.rs-flickr a::after { + background-image: url(img/rs-flickr.svg); + } + } +} + +div#footer div#footer-content { + @include flex(3); + @media screen and (max-width: $custom-very-small-screen) { + flex-basis: auto; + } + background: $primary-color; + padding: 2em 2em 2em 2em; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; + ul.menu { + border: 0; + font-size: 100%; + margin-top: 0; + margin-left: 0; + list-style: none; + padding: 0; + li { + display: inline; + font-weight: bold; + line-height: 1.6em; + margin-bottom: 0; + a { + border-bottom: none; + color: $black; + } + } + li::after { + color: $black; + content: $icon-mars-bullet; + font-family: MarsIcons; + } + li:last-child::after { + display: none; + } + } +} + +div#rub_service h2 { + color: #C64A59; + font-size: 237%; + padding-left: 0; + text-align: left; +} + +button { + font-weight: bold; +} + +%icon-common { + font-family: MarsIcons; + font-size: 200%; + margin-right: 0.2em; + vertical-align: middle; +} + +div.RadiobuttonsWidget div.content label { + display: block; + & input[type="radio"] { + display: none; + & + span::before { + @extend %icon-common; + content: $icon-mars-circle; + } + &:checked + span::before { + content: $icon-mars-circle-dotted; + } + } +} + +div.CheckboxWidget div.content label, +div.CheckboxesWidget div.content label { + display: block; + & input[type="checkbox"] { + left: -99999999px; + position: absolute; + & + span::before { + @extend %icon-common; + content: $icon-mars-square; + } + &:checked + span::before { + content: $icon-mars-square-checked; + } + } +} + +%border-style { + border: 1px solid #2D2D2D; +} + +select { + @extend %border-style; +} + +input[type=text], input[type=password], input[type=email], input[type=color], input[type=date], input[type=datetime], input[type=datetime-local], input[type=month], input[type=number], input[type=range], input[type=search], input[type=tel], input[type=time], input[type=url], input[type=week], textarea { + @extend %border-style; + background-color: #FFF; + display: inline-block; + font-size: 100%; + padding: 0.7em 1em; + -webkit-appearance: none; +} + +form.quixote div.title label{ + display: block; + font-weight: bold; + font-size: 122%; + margin-bottom: 0.5em; +} + +div#content div.SubmitWidget { + button[name=submit][value=Suivant], button[name=submit][value=Valider], button[name=previous] { + background-color: $primary-color; + background-repeat: no-repeat; + background-position: right; + background-size: auto 100%; + border: none; + cursor: pointer; + padding-right: 3.5em; + &[name=submit][value=Suivant] { + background-image: url(img/avant.svg); + } + &[name=submit][value=Valider] { + background-image: url(img/valider.svg); + } + &[name=previous] { + background-image: url(img/retour.svg); + } + } +} + +div#nav #nav-button.toggled + ul li { + border-bottom: 0.1em solid $white; + text-align: center; + a { + padding-left: 0; + span { + font-weight: 400; + } + } +} + +div#toplinks { + border: none; + border-radius: 0; + box-shadow: none; + margin-top: 0.5em; + padding: 0; + right: 0.2em; + a.login,a.logout { + @include flexbox(); + @include vendor-prefix(justify-content, flex-end); + div.logtext { + background: $primary-color; + color: $black; + font-size: 122%; + font-weight: 700; + height: 2em; + padding: 0 0.5em; + text-align: center; + line-height: 2em; + } + div.logicon { + background-color: $black; + background-image: url(img/picto_btn_connexion.svg); + background-position: center; + background-repeat: no-repeat; + background-size: 70%; + content: ""; + width: 2em; + } + } + a.registration { + @include flexbox(); + @include vendor-prefix(justify-content, flex-end); + color: $red; + font-weight: 500; + margin-top: 0.4em; + span.pre-register { + color: $light-black; + margin-right: 0.2em; + } + span.register { + text-decoration: underline; + } + } +} + +div#gauche { + clear: both; + width: auto; + float: none; +} + +div#gauche + div#rub_service { + width: auto; + float: none; +} + +div#tracking-code { + text-align: center; + h3 { + margin: 0; + padding: 0; + @media screen and (max-width: $mobile-limit) { + padding-right: 1ex; + } + } + a { + padding: 0; + } + margin-bottom: 2rem; + @media screen and (max-width: $mobile-limit) { + order: 0; + margin-bottom: 0; + } +} + +div#steps ol { + display: -ms-flexbox; + display: flex; + li { + position: relative; + -ms-flex: 1; + flex: 1; + padding: 0; + text-transform: uppercase; + color: $primary-color; + font-size: 24px; + margin-bottom: 0; + border: none; + min-width: 30px; + min-height: 40px; + &::after { + content: ''; + height: 5px; + width: 100%; + display: block; + position: absolute; + left: 0; + bottom: 5px; + background: #9b9b9b; + @media screen and (max-width: $mobile-limit) { + bottom: 15px; + } + } + &:first-child::after { + left: 50%; + width: 50%; + } + &:last-child::after { + right: 50%; + width: 50%; + } + span.marker { + position: absolute; + bottom: 0; + overflow: hidden; + left: 50%; + text-indent: -1000px; + border: none; + color: $primary-color; + background: white; + width: 15px; + height: 15px; + box-shadow: 0 0 0 5px #9b9b9b; + border-radius: 10px; + z-index: 100; + @media screen and (max-width: $mobile-limit) { + padding: 0; + bottom: 10px; + } + } + span.label { + display: block; + width: 100%; + text-align: center; + font-size: $font-size; + padding-right: 0; + text-transform: none; + color: #9b9b9b; + padding-bottom: 30px; + @media screen and (max-width: $mobile-limit) { + display: none; + } + } + &.current { + span.marker { + background: $primary-color; + box-shadow: 0 0 0 5px $primary-color; + @media screen and (max-width: $mobile-limit) { + border-radius: 10px; + } + } + } + &.step-before { + span.marker { + background: #9b9b9b; + } + } + } +} diff --git a/static/rouen/_vars.scss b/static/rouen/_vars.scss new file mode 100644 index 0000000..8d65d56 --- /dev/null +++ b/static/rouen/_vars.scss @@ -0,0 +1,32 @@ +$black: #000; +$light-black: #333; +$pale-primary-color: #F4A7AA; +$primary-color: #EE787C; +$red: #C64A59; +$white: #FFF; + +$button-background: $primary-color; +$button-border-radius: unset; +$cell-border: none; +$font-color: $black; +$font-family: Roboto, sans-serif; +$font-size: 18px; +$footer-background: #FFFFFF; +$icon-fa-circle: "\f111"; +$icon-mars-bullet: "\e05c"; +$icon-mars-circle: "\e02f"; +$icon-mars-circle-dotted: "\e030"; +$icon-mars-square: "\e02d"; +$icon-mars-square-checked: "\e02e"; +$link-color: #198468; +$mobile-limit: 800px; +$nav-background: $primary-color; +$nav-border-color: $white; +$nav-button-background: $black; +$nav-item-selected-background: #2D2D2D; +$nav-mobile-menu-background: $pale-primary-color; +$sidebar-width: 240px; +$steps-color: #9B9B9B; +$title-weight: bold; +$width: 1243.97px; +$custom-very-small-screen: 480px; diff --git a/static/rouen/fonts/marsicons12.ttf b/static/rouen/fonts/marsicons12.ttf new file mode 100644 index 0000000..55be038 Binary files /dev/null and b/static/rouen/fonts/marsicons12.ttf differ diff --git a/static/rouen/fonts/marsicons12.woff b/static/rouen/fonts/marsicons12.woff new file mode 100644 index 0000000..6bc87a0 Binary files /dev/null and b/static/rouen/fonts/marsicons12.woff differ diff --git a/static/rouen/fonts/marsicons12.woff2 b/static/rouen/fonts/marsicons12.woff2 new file mode 100644 index 0000000..b922db0 Binary files /dev/null and b/static/rouen/fonts/marsicons12.woff2 differ diff --git a/static/rouen/img/avant.svg b/static/rouen/img/avant.svg new file mode 100644 index 0000000..857ced5 --- /dev/null +++ b/static/rouen/img/avant.svg @@ -0,0 +1 @@ + diff --git a/static/rouen/img/logo-h.svg b/static/rouen/img/logo-h.svg new file mode 100644 index 0000000..37a2374 --- /dev/null +++ b/static/rouen/img/logo-h.svg @@ -0,0 +1,2 @@ + + diff --git a/static/rouen/img/logo.png b/static/rouen/img/logo.png new file mode 100644 index 0000000..b6604cb Binary files /dev/null and b/static/rouen/img/logo.png differ diff --git a/static/rouen/img/picto_btn_connexion.svg b/static/rouen/img/picto_btn_connexion.svg new file mode 100644 index 0000000..f34ed2d --- /dev/null +++ b/static/rouen/img/picto_btn_connexion.svg @@ -0,0 +1,14 @@ + + + + + + + + diff --git a/static/rouen/img/retour.svg b/static/rouen/img/retour.svg new file mode 100644 index 0000000..8961301 --- /dev/null +++ b/static/rouen/img/retour.svg @@ -0,0 +1 @@ + diff --git a/static/rouen/img/rs-facebook.svg b/static/rouen/img/rs-facebook.svg new file mode 100644 index 0000000..4afa969 --- /dev/null +++ b/static/rouen/img/rs-facebook.svg @@ -0,0 +1,2 @@ + + diff --git a/static/rouen/img/rs-flickr.svg b/static/rouen/img/rs-flickr.svg new file mode 100644 index 0000000..c267802 --- /dev/null +++ b/static/rouen/img/rs-flickr.svg @@ -0,0 +1,2 @@ + + diff --git a/static/rouen/img/rs-googleplus.svg b/static/rouen/img/rs-googleplus.svg new file mode 100644 index 0000000..3143143 --- /dev/null +++ b/static/rouen/img/rs-googleplus.svg @@ -0,0 +1,2 @@ + + diff --git a/static/rouen/img/rs-twitter.svg b/static/rouen/img/rs-twitter.svg new file mode 100644 index 0000000..a8949d9 --- /dev/null +++ b/static/rouen/img/rs-twitter.svg @@ -0,0 +1,2 @@ + + diff --git a/static/rouen/img/rs-youtube.svg b/static/rouen/img/rs-youtube.svg new file mode 100644 index 0000000..ca27f2b --- /dev/null +++ b/static/rouen/img/rs-youtube.svg @@ -0,0 +1,2 @@ + + diff --git a/static/rouen/img/valider.svg b/static/rouen/img/valider.svg new file mode 100644 index 0000000..35edff6 --- /dev/null +++ b/static/rouen/img/valider.svg @@ -0,0 +1 @@ + diff --git a/static/rouen/style.scss b/static/rouen/style.scss new file mode 100644 index 0000000..1b85f31 --- /dev/null +++ b/static/rouen/style.scss @@ -0,0 +1,6 @@ +@charset "UTF-8"; + +@import 'vars'; +@import '../../publik-base-theme/static/includes/publik'; +@import '../../publik-base-theme/static/includes/flexbox_mixins'; +@import 'custom'; diff --git a/themes.json b/themes.json new file mode 100644 index 0000000..9426533 --- /dev/null +++ b/themes.json @@ -0,0 +1,10 @@ +[ + {"id": "rouen", + "label": "Rouen", + "variables": { + "css_variant": "rouen", + "no_extra_js": true, + "theme_color": "#EE787C" + } + } +]