premier draft html sympathique
This commit is contained in:
parent
95b7780800
commit
a9f083983b
10 changed files with 1617 additions and 5 deletions
|
@ -2,6 +2,13 @@
|
|||
|
||||
> Par Adrien pour commencer. Si ça vous plaît, hésitez pas à contribuer ! Sinon, faites des contre-propositions dans un autre dossier :)
|
||||
|
||||
## Features
|
||||
|
||||
* Responsive mobile-first design.
|
||||
* Un header avec des onglets sur PC et un « menu-sandwich » sur téléphone.
|
||||
* Des images envoyées adaptées à la taille des viewports.
|
||||
* Des bouts de branches et de canopée qui défilent lors du scroll, contenant des éléments de texte ou autre contenu.
|
||||
|
||||
## Framework HTML
|
||||
|
||||
### Pourquoi ?
|
||||
|
@ -26,21 +33,31 @@ Non-goals :
|
|||
|
||||
### Qui sont les candidats ?
|
||||
|
||||
Après une recherche web "small html responsive framework", voilà ce qui sort :
|
||||
Sources : une recherche web "small html responsive framework" et [Awesome CSS](https://github.com/troxler/awesome-css-frameworks)
|
||||
|
||||
* [mini.css](https://minicss.org/) (dépôt archivé, flexible reponsive grid, CSS variables, flexbox)
|
||||
|
||||
Essayé. Je voudrais un menu header à onglets sur PC qui se transforme en menu « [drawer](https://minicss.org/docs#drawer) » sur le côté pour mobile.
|
||||
Il y a des briques pour faire à peu près ça, mais la complexité de la doc me décourage. Je préfère essayer quelque chose qui ait moins d'ambitions mais soit plus facile à utiliser. Go Chota.
|
||||
|
||||
* [mini.css](https://minicss.org/) (flexible reponsive grid)
|
||||
* [Skeleton](http://getskeleton.com/) (12 cols grid, but not responsive: either follow the defined number of columns, or full-size for small viewports)
|
||||
* [Pure](https://purecss.io/) (flexible responsive grid, with shitty class names)
|
||||
* [Awesome CSS](https://github.com/troxler/awesome-css-frameworks) (listing de frameworks sur GitHub)
|
||||
* **[Chota](https://jenil.github.io/chota/)** (flexible reponsive grid, CSS variables means recent browser versions only)
|
||||
* [Turret.css](https://turretcss.com/) (orienté accessibilité, pas de grille ?)
|
||||
|
||||
* **[Chota](https://jenil.github.io/chota/)** (flexible reponsive grid, CSS variables means recent browser versions only)
|
||||
* [Turret.css](https://turretcss.com/) (orienté accessibilité, pas de grille ?)
|
||||
### Décision
|
||||
|
||||
On part sur [mini.css](https://minicss.org/), parce qu'il les features que j'aime, est pas verbeux, bien minifié, et est supporté par des navigateurs assez anciens.
|
||||
|
||||
* Le menu-sandwich s'appelle .
|
||||
|
||||
|
||||
## Réflexions sur le style du code
|
||||
|
||||
### Semantic HTML
|
||||
|
||||
Utiliser des bannières qui donnent du sens au contenu. Cf [W3C Semantic HTML](https://www.w3schools.com/html/html5_semantic_elements.asp).
|
||||
|
||||
### Semantic CSS
|
||||
|
||||
Le fait de ne pas donner d'éléments de graphisme dans notre markup HTML, mais seulement dans le CSS. Par exemple, mettre une classe "text-center" à un <p> est considéré une mauvaise pratique.
|
||||
|
|
1014
draft_site_adrien/assets/css/chota.css
Normal file
1014
draft_site_adrien/assets/css/chota.css
Normal file
File diff suppressed because it is too large
Load diff
1
draft_site_adrien/assets/css/chota.min.css
vendored
Normal file
1
draft_site_adrien/assets/css/chota.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
109
draft_site_adrien/assets/css/deuxfleurs-chato.css
Normal file
109
draft_site_adrien/assets/css/deuxfleurs-chato.css
Normal file
|
@ -0,0 +1,109 @@
|
|||
@import 'normalize.css';
|
||||
@import 'chota.min.css';
|
||||
|
||||
/* font-size:
|
||||
* HTML font size is 16px on most browsers, sometimes 14px.
|
||||
* Chota sets `font-size: 62.5%;`, that is 10px on most browsers.
|
||||
*/
|
||||
|
||||
:root {
|
||||
/* Blanc cassé (offset autour de #main-page) */
|
||||
--bg-color: #f4f4f4;
|
||||
/* Bleu turquoise du ciel au lion */
|
||||
--bg-secondary-color: #cafaef;
|
||||
/* Gris violet du sol */
|
||||
--bg-secondary-color: #c7c9e2;
|
||||
--bg-canopee-color: #151a05;
|
||||
--color-canopee: #a0c43c;
|
||||
--bg-branche-color: #381e02;
|
||||
--color-branche: #fafafa;
|
||||
--color-primary: #14854F;
|
||||
--color-lightGrey: #d2d6dd;
|
||||
--color-grey: #747681;
|
||||
--color-darkGrey: #3f4144;
|
||||
--color-error: #d43939;
|
||||
--color-success: #28bd14;
|
||||
--grid-maxWidth: 120rem;
|
||||
--grid-gutter: 2rem;
|
||||
--font-size: 1.6rem;
|
||||
--font-color: #333333;
|
||||
--font-family-sans: -apple-system, BlinkMacSystemFont, Avenir, "Avenir Next",
|
||||
"Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans",
|
||||
"Droid Sans", "Helvetica Neue", sans-serif;
|
||||
--font-family-mono: monaco, "Consolas", "Lucida Console", monospace;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: var(--bg-color);
|
||||
}
|
||||
|
||||
#main-page {
|
||||
background-color: var(--bg-secondary-color);
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
header {
|
||||
margin-bottom: 4rem;
|
||||
}
|
||||
|
||||
header>nav {
|
||||
padding-left: 1rem;
|
||||
padding-right: 1rem;
|
||||
}
|
||||
|
||||
#logo {
|
||||
font-size: 3.2rem;
|
||||
}
|
||||
|
||||
section div {
|
||||
padding-left: 4rem;
|
||||
padding-right: 4rem;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
section p {
|
||||
padding-left: 2rem;
|
||||
padding-right: 2rem;
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
section .canopee {
|
||||
border-radius: 3rem;
|
||||
background-color: var(--bg-canopee-color);
|
||||
color: var(--color-canopee);
|
||||
margin-bottom: 4rem;
|
||||
}
|
||||
|
||||
section .canopee.left {
|
||||
margin-left: 0;
|
||||
padding-left: 6rem;
|
||||
border-top-left-radius: 0rem;
|
||||
border-bottom-left-radius: 0rem;
|
||||
}
|
||||
|
||||
section .canopee.right {
|
||||
margin-right: 0;
|
||||
border-top-right-radius: 0rem;
|
||||
border-bottom-right-radius: 0rem;
|
||||
}
|
||||
|
||||
section .canopee p {
|
||||
font-size: 1.6rem;
|
||||
}
|
||||
|
||||
section .branche {
|
||||
background-color: var(--bg-branche-color);
|
||||
color: var(--color-branche);
|
||||
padding-bottom: 4rem;
|
||||
padding-top: 4rem;
|
||||
}
|
||||
|
||||
section .branche p {
|
||||
font-size: 2.6rem;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
footer {
|
||||
padding: 4rem;
|
||||
border-top: 1px solid var(--bg-color);
|
||||
}
|
1
draft_site_adrien/assets/css/mini-default.min.css
vendored
Normal file
1
draft_site_adrien/assets/css/mini-default.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
349
draft_site_adrien/assets/css/normalize.css
vendored
Normal file
349
draft_site_adrien/assets/css/normalize.css
vendored
Normal file
|
@ -0,0 +1,349 @@
|
|||
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
|
||||
|
||||
/* Document
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Correct the line height in all browsers.
|
||||
* 2. Prevent adjustments of font size after orientation changes in iOS.
|
||||
*/
|
||||
|
||||
html {
|
||||
line-height: 1.15; /* 1 */
|
||||
-webkit-text-size-adjust: 100%; /* 2 */
|
||||
}
|
||||
|
||||
/* Sections
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the margin in all browsers.
|
||||
*/
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the `main` element consistently in IE.
|
||||
*/
|
||||
|
||||
main {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the font size and margin on `h1` elements within `section` and
|
||||
* `article` contexts in Chrome, Firefox, and Safari.
|
||||
*/
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
/* Grouping content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in Firefox.
|
||||
* 2. Show the overflow in Edge and IE.
|
||||
*/
|
||||
|
||||
hr {
|
||||
box-sizing: content-box; /* 1 */
|
||||
height: 0; /* 1 */
|
||||
overflow: visible; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
pre {
|
||||
font-family: monospace, monospace; /* 1 */
|
||||
font-size: 1em; /* 2 */
|
||||
}
|
||||
|
||||
/* Text-level semantics
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the gray background on active links in IE 10.
|
||||
*/
|
||||
|
||||
a {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Remove the bottom border in Chrome 57-
|
||||
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
||||
*/
|
||||
|
||||
abbr[title] {
|
||||
border-bottom: none; /* 1 */
|
||||
text-decoration: underline; /* 2 */
|
||||
text-decoration: underline dotted; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font weight in Chrome, Edge, and Safari.
|
||||
*/
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: monospace, monospace; /* 1 */
|
||||
font-size: 1em; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font size in all browsers.
|
||||
*/
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent `sub` and `sup` elements from affecting the line height in
|
||||
* all browsers.
|
||||
*/
|
||||
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
/* Embedded content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the border on images inside links in IE 10.
|
||||
*/
|
||||
|
||||
img {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
/* Forms
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Change the font styles in all browsers.
|
||||
* 2. Remove the margin in Firefox and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {
|
||||
font-family: inherit; /* 1 */
|
||||
font-size: 100%; /* 1 */
|
||||
line-height: 1.15; /* 1 */
|
||||
margin: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the overflow in IE.
|
||||
* 1. Show the overflow in Edge.
|
||||
*/
|
||||
|
||||
button,
|
||||
input { /* 1 */
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inheritance of text transform in Edge, Firefox, and IE.
|
||||
* 1. Remove the inheritance of text transform in Firefox.
|
||||
*/
|
||||
|
||||
button,
|
||||
select { /* 1 */
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the inability to style clickable types in iOS and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
[type="button"],
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner border and padding in Firefox.
|
||||
*/
|
||||
|
||||
button::-moz-focus-inner,
|
||||
[type="button"]::-moz-focus-inner,
|
||||
[type="reset"]::-moz-focus-inner,
|
||||
[type="submit"]::-moz-focus-inner {
|
||||
border-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore the focus styles unset by the previous rule.
|
||||
*/
|
||||
|
||||
button:-moz-focusring,
|
||||
[type="button"]:-moz-focusring,
|
||||
[type="reset"]:-moz-focusring,
|
||||
[type="submit"]:-moz-focusring {
|
||||
outline: 1px dotted ButtonText;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the padding in Firefox.
|
||||
*/
|
||||
|
||||
fieldset {
|
||||
padding: 0.35em 0.75em 0.625em;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the text wrapping in Edge and IE.
|
||||
* 2. Correct the color inheritance from `fieldset` elements in IE.
|
||||
* 3. Remove the padding so developers are not caught out when they zero out
|
||||
* `fieldset` elements in all browsers.
|
||||
*/
|
||||
|
||||
legend {
|
||||
box-sizing: border-box; /* 1 */
|
||||
color: inherit; /* 2 */
|
||||
display: table; /* 1 */
|
||||
max-width: 100%; /* 1 */
|
||||
padding: 0; /* 3 */
|
||||
white-space: normal; /* 1 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
||||
*/
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the default vertical scrollbar in IE 10+.
|
||||
*/
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in IE 10.
|
||||
* 2. Remove the padding in IE 10.
|
||||
*/
|
||||
|
||||
[type="checkbox"],
|
||||
[type="radio"] {
|
||||
box-sizing: border-box; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the cursor style of increment and decrement buttons in Chrome.
|
||||
*/
|
||||
|
||||
[type="number"]::-webkit-inner-spin-button,
|
||||
[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the odd appearance in Chrome and Safari.
|
||||
* 2. Correct the outline style in Safari.
|
||||
*/
|
||||
|
||||
[type="search"] {
|
||||
-webkit-appearance: textfield; /* 1 */
|
||||
outline-offset: -2px; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner padding in Chrome and Safari on macOS.
|
||||
*/
|
||||
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inability to style clickable types in iOS and Safari.
|
||||
* 2. Change font properties to `inherit` in Safari.
|
||||
*/
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
-webkit-appearance: button; /* 1 */
|
||||
font: inherit; /* 2 */
|
||||
}
|
||||
|
||||
/* Interactive
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* Add the correct display in Edge, IE 10+, and Firefox.
|
||||
*/
|
||||
|
||||
details {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add the correct display in all browsers.
|
||||
*/
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
/* Misc
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 10+.
|
||||
*/
|
||||
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 10.
|
||||
*/
|
||||
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 1.3 MiB |
Binary file not shown.
After Width: | Height: | Size: 4.3 MiB |
BIN
draft_site_adrien/assets/images/illustration-ronce_800x510px.png
Normal file
BIN
draft_site_adrien/assets/images/illustration-ronce_800x510px.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 646 KiB |
121
draft_site_adrien/index.html
Normal file
121
draft_site_adrien/index.html
Normal file
|
@ -0,0 +1,121 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<title>Deuxfleurs</title>
|
||||
|
||||
<!--<link rel="stylesheet" href="assets/css/chota.min.css">-->
|
||||
<link rel="stylesheet" href="assets/css/deuxfleurs-chato.css">
|
||||
<!--<link rel="stylesheet" href="assets/css/mini-default.min.css">-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="main-page" class="container">
|
||||
|
||||
<header>
|
||||
<nav class="nav">
|
||||
<div class="nav-left">
|
||||
<a id="logo" href="#">Deuxfleurs</a>
|
||||
</div>
|
||||
<div class="nav-right">
|
||||
<div class="tabs">
|
||||
<a>Services</a>
|
||||
<a class="active">Infrastructure</a>
|
||||
<a>Logiciels</a>
|
||||
<a>Vision</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<img src="assets/images/illustration-ronce_1200x765px.png">
|
||||
</header>
|
||||
|
||||
<section class="row">
|
||||
<div class="col-12">
|
||||
<h1>Bienvenue chez Deuxfleurs !</h1>
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
<p>
|
||||
Nous sommes une association pour<br>
|
||||
une informatique <b>écologique</b> et <b>humaine</b>,<br>
|
||||
et nous sommes en <b>colère</b>.<br>
|
||||
<small>Nous avons donc pris le maquis.</small>
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="row">
|
||||
<div class="col-12-sm col-6-md">
|
||||
<h2>Nous hébergeons</h2>
|
||||
<p>
|
||||
Celles et ceux qui ont besoin d'<b>outils libres</b><br>
|
||||
pour discuter, collaborer, s'organiser, se divertir...
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="col-2-md"></div> <!-- vertical space -->
|
||||
|
||||
<div class="canopee right col-12-sm col-4-md">
|
||||
<h2><small>Sans parasite !</small></h2>
|
||||
<p>
|
||||
Toutes nos constructions loufoques<br>
|
||||
sont garanties <b>sans ver espion</b>.<br>
|
||||
<small>Nous préférons le bon goût d'un logiciel bien fait.</small>
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="row">
|
||||
<div class="canopee left col-12-sm col-4-md">
|
||||
<h2><small>Infrastructure raisonnée</small></h2>
|
||||
<p>
|
||||
On essaye d'héberger nos ordinateurs <b>à la maison</b>.<br>
|
||||
<small>Et c'est pas si facile !</small>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="col-2-md"></div> <!-- vertical space -->
|
||||
|
||||
<div class="col-12-sm col-6-md">
|
||||
<h2>Nous créons</h2>
|
||||
<p>
|
||||
Des logiciels pour améliorer<br>
|
||||
et <b>interconnecter nos cabanes</b>.
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="row">
|
||||
<div class="col-2-md"></div> <!-- vertical space -->
|
||||
<div class="col-12-sm col-10-md">
|
||||
<h2>Nous recrutons</h2>
|
||||
|
||||
<p>
|
||||
Des bâtisseuses de cabanes ou <b>des évadés</b>...
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<div class="branche row">
|
||||
<div class="col-3-md"></div> <!-- vertical space -->
|
||||
<div class="col-12-sm col-6-md">
|
||||
<p>... des mondes d'en bas.</p>
|
||||
</div>
|
||||
<div class="col-3-md"></div> <!-- vertical space -->
|
||||
</div> <!-- .branche -->
|
||||
</section>
|
||||
|
||||
<footer class="is-right">
|
||||
<small>Tous droits réservés à notre pangolin alcoolique.</small>
|
||||
</footer>
|
||||
|
||||
</div> <!-- #main-page -->
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Reference in a new issue