Commit 183da668 authored by cynddl's avatar cynddl

Improve pipeline for static assets (yarn+webpack+postcss) 😇

parent 7426dcc9
{
"name": "lqdn-rp",
"version": "0.1.0",
"description": "Revue de presse de La Quadrature du Net",
"main": "index.js",
"repository": "gitlab@git.laquadrature.net:la-quadrature-du-net/rpteam/rp.git",
"author": "Luc Rocher <luc@rocher.lc>",
"license": "MIT",
"dependencies": {
"bootstrap": "4.0.0-alpha.6",
"font-awesome": "^4.7.0",
"postcss-font-magician": "^1.6.1"
},
"devDependencies": {
"css-loader": "^0.28.0",
"extract-text-webpack-plugin": "beta",
"file-loader": "^0.11.1",
"node-sass": "^4.5.2",
"postcss": "^5.2.17",
"postcss-cssnext": "^2.10.0",
"postcss-import": "^9.1.0",
"postcss-loader": "^1.3.3",
"url-loader": "^0.5.8",
"webpack": "^2.4.1",
"webpack-dev-server": "2"
}
}
module.exports = {
plugins: {
'postcss-import': {},
'postcss-cssnext': {
browsers: ['last 2 versions', '> 5%'],
},
},
};
......@@ -14,6 +14,7 @@ STATIC_ROOT = os.path.join(BASE_DIR, "static", "static_root")
# by collectstatic
STATICFILES_DIRS = (
os.path.join(BASE_DIR, "static", "build"),
os.path.join(BASE_DIR, "static", "dist"),
)
MEDIA_URL = "/media/"
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* Shared styles */
@import "shared/colors.css";
@import "shared/fonts.css";
@import "shared/typography.css";
/* Shared components */
@import "components/layout.css";
@import "components/modals.css";
@import "components/navigation.css";
@import "components/table.css";
// Vendor styles and scripts
global.$ = global.jQuery = require('jquery');
global.Tether = require('tether');
require('bootstrap/dist/js/bootstrap.js');
require('font-awesome/css/font-awesome.css');
require('bootstrap/dist/css/bootstrap.css');
// Local styles
import styles from './admin.css';
.btn {
border-radius: 0px;
padding-left: 38px;
padding-right: 38px;
font-family: FiraSansRegular;
}
.btn-lg {
font-size: 20px;
height: 60px;
line-height: 25px;
padding-top: 15px;
}
.btn em {
font-size: 28px;
font-family: SansusWebissimoRegular;
}
.btn-default,
.btn-default:hover {
color: #2f5188;
background-color: #ffffff;
}
.btn-icon {
padding-left: 15px;
}
.btn-icon:after {
vertical-align: top;
}
.btn-modal .btn-icon-right:after,
.dark-blue .btn-icon-right:after,
.blue .btn-icon-right:after,
.light-blue .btn-icon-right:after {
content: url('/static/img/arrow_right-white.png');
}
.btn-accordions .btn-icon-right:after {
content: url('/static/img/arrow_right_lightblue.png');
}
.btn-accordions:hover .btn-icon-right:after {
content: url('/static/img/arrow_right-white.png');
}
.btn-bottom .btn-icon-top:after {
content: url('/static/img/arrow_up_darkblue.png');
vertical-align: bottom;
}
.btn-bottom .btn-icon-pig:after {
content: url('/static/img/cochon-01.png');
vertical-align: top;
position: relative;
top: -5px;
}
.btn-lg .btn-icon {
max-height: 60px;
max-width: 60px;
line-height: 25px;
}
.pull-right.btn-default .btn-icon {
padding-left: 0px;
padding-right: 15px;
}
.btn-modal {
color: #ffffff;
background-color: #497ed5;
}
.btn-modal:hover {
color: #ffffff;
}
.btn-accordions {
background-color: #DDE5F1;
color: #497ED5 !important;
border: solid 2px #497ED5;
}
.btn-accordions:hover {
background-color: #3B68B0;
color: #DDE5F1 !important;
border: solid 2px #497ED5;
}
.light-blue .btn-default {
color: #ffffff;
background-color: #497ed5;
border: solid 2px #3b68b0;
}
.light-blue .btn-default:hover {
color: #ffffff;
background-color: #3b68b0;
border: solid 2px #3b68b0;
}
.blue .btn-default {
color: #ffffff;
background-color: #3b68b0;
border: solid 2px #2f5188;
}
.blue .btn-default:hover {
color: #ffffff;
background-color: #2f5188;
border: solid 2px #2f5188;
}
.dark-blue .btn-default {
color: #ffffff;
background-color: #2f5188;
border: solid 2px #497ed5;
}
.dark-blue .btn-default:hover {
color: #ffffff;
background-color: #497ed5;
border: solid 2px #497ed5;
}
.btn-bottom {
position: relative;
margin-top: -60px;
top: 0px;
width: 100%;
height: 0px;
}
.input {
width : 100%;
background-color: white;
}
textarea.form-control.bold {
font-size: 20px;
}
.page-header {
border: none;
margin-top: 8px;
margin-bottom: 8px;
hr {
border-color: #ccd3dd;
}
h1 span {
text-transform: uppercase;
}
}
section {
margin: 0px !important;
& .white-pure {
padding: 34px;
}
& .white {
padding-bottom: 52px;
}
}
@media only screen and (min-width: 768px) {
section.container-fluid {
padding-left: 10%;
padding-right: 10%;
}
section:last-of-type {
padding-bottom: 90px;
}
.container-fluid .navbar-header {
margin-left: 10%;
}
}
.text-center {
margin-top: 0;
margin-bottom: O;
}
.well, .well-lg, .well-sm {
border-radius: 0px;
box-shadow: none;
border: 0px;
}
.well {
padding: 34px;
}
/* Navigation */
.navbar-nav.blue > li > a {
background-color: #3b68b0;
color: #ffffff;
font-size: 18px;
padding-left: 5px;
padding-right: 5px;
}
.navbar-default {
background-color: white;
color: #3b68b0;
margin-bottom: 0px;
min-height: 35px;
border: none;
border-radius: 0px;
}
.navbar-default .navbar-nav > li > a {
color: #3b68b0;
font-size: 18px;
font-family: FiraSansBook;
}
.navbar-default:not(#up-bar) .navbar-nav > li > a.on,
.navbar-default:not(#up-bar) .navbar-nav > li > a:hover {
color: #3b68b0;
font-family: FiraSansMedium;
font-size: 18px;
}
section {
padding-bottom: 24px;
padding-top: 24px;
}
.dark-blue, .dark-blue .navbar-nav > li > a {
background-color: #2f5188;
color: #ffffff;
}
nav.dark-blue {
/*padding-right: 5%;*/
}
#up-bar, #up-bar > .navbar-nav, #up-bar > .navbar-nav > li, #up-bar > .navbar-nav > li > a {
height: 38px;
}
#up-bar > .navbar-nav > li > a {
padding-top: 7px;
padding-bottom: 7px;
}
.navbar-brand {
padding: 0;
z-index: 1000;
position: absolute;
}
.dark-blue .navbar-nav > li > a,
.navbar-nav.blue > li > a {
font-weight: bold;
font-size: 13px;
}
.dark-blue .navbar-nav > li > a:hover,
.navbar-nav.blue > li > a:hover {
color: #ffffff;
}
.dark-blue .navbar-nav > li > a:hover {
font-size: 13px;
}
.navbar-nav.blue > li > a:hover {
font-size: 18px;
}
.nav-white, .nav-white .navbar-nav > li > a {
background-color: #ffffff;
color: #3b68b0;
}
.nav.nav-integrated {
display: flex;
justify-content: space-around;
position: absolute;
top: 0; right: 0; left: 0;
background-color: #ebf3ff;
border: 0 solid #ffffff;
border-width: 4px 4px 0 0;
}
ul.nav.nav-integrated li{
flex-grow: 1;
border: 0 solid #ffffff;
border-width: 0 0 4px 4px;
}
ul.nav.nav-integrated li a {
padding: 1rem;
font-weight: bold;
text-align: center;
}
ul.nav.nav-integrated li.active {
background-color: #ffffff;
}
.nav-integrated .badge {
vertical-align: middle;
background-color: #3b68b0;
padding: .4rem .8rem;
margin-left: .5rem;
}
.panel-default {
border-radius: 0px;
padding: 0px !important;
border: none;
}
.panel-default .panel-body {
background-color: #dde5f1;
color: #3B68B0;
padding: 34px;
}
.panel-default .panel-body.white-pure {
background-color: #ffffff;
color: #3B68B0;
}
.panel-body {
height: 100%;
}
.panel-body > div {
vertical-align: middle;
display: inline-block;
}
.panel-default .panel-footer {
background-color: #dde5f1;
border: none;
border-radius: 0px;
padding: 0px 50px 34px;
}
.panel-default .panel-heading,
.panel-default label.panel-heading {
color: #fff;
background-color: #3B68B0;
display: block;
font-family: FiraSansRegular;
font-size: 18px;
line-height: 50px;
width: 100%;
border-radius: 0;
border: none;
}
.panel-default > .panel-heading label {
font-size: 18px;
display: block;
padding: 0 25px;
}
.progress-wrapper {
height: 70px;
padding: 25px;
}
.progress {
background-color: #ffffff;
height: 10px;
padding: 0px;
overflow: visible;
}
.progress-bar {
border-radius: 5px;
box-shadow: none;
}
.progress-bar span {
font-family: FiraSansMedium;
font-size: 25px;
position: relative;
text-align: right;
top: 20px;
right: -50%;
white-space: nowrap;
}
.progress-bar-provisional {
background-color: #528eef;
color: #528eef;
padding-left: 15px;
position: relative;
left: -15px;
z-index: 99;
box-sizing: padding-box;
}
.progress-bar-concrete {
background-color: #3b68b0;
color: #3b68b0;
position: relative;
min-width: 15px;
z-index: 100;
}
.progress-step {
height: 20px;
width: 20px;
background-color: #fff;
border-radius: 20px;
position: absolute;
top: 20px;
}
.p20 {
left: 20%;
}
.p40 {
left: 40%;
}
.p60 {
left: 60%;
}
.p80 {
left: 80%;
}
.progress-step-concrete {
background-color: #3b68b0;
z-index: 101;
}
.progress-step-provisional {
background-color: #528eef;
z-index: 101;
}
:root {
--color-dark-blue: #2f5188;
--color-medium-blue: #3b68b0;
--color-light-blue: #497ed5;
--color-black: #000000;
--color-white: #ffffff;
--color-light-gray: #ccd3dd;
}
.white {
background-color: #ebf3ff;
color: var(--color-dark-blue);
}
.light-blue a, .blue a {
color: var(--color-dark-blue);
}
.medium-blue {
background-color: var(--color-medium-blue);