feat: optimisation css généré

This commit is contained in:
Kazhnuz 2023-10-13 09:11:42 +02:00
parent 91423c73ce
commit 91472e83d1
39 changed files with 807 additions and 2440 deletions

View file

@ -9,7 +9,7 @@
<?php $category = get_the_category(); <?php $category = get_the_category();
$category_parent_id = $category[0]->category_parent; $category_parent_id = $category[0]->category_parent;
if ( get_term( $category_parent_id, 'category' )->slug != "3-gallerie" ) {?> if ( get_term( $category_parent_id, 'category' )->slug != "3-gallerie" ) {?>
<p class="align-right pr-half"><span class="btn-small btn-secondary"> <?php echo reading_time(); ?> </span></p> <p class="align-right pr-half"><span class="btn btn-small c-secondary"> <?php echo reading_time(); ?> </span></p>
<?php }?> <?php }?>
<?php } else { ?> <?php } else { ?>
<h1 class="sr-only"><?php the_title(); ?></h1> <h1 class="sr-only"><?php the_title(); ?></h1>

View file

@ -22,12 +22,12 @@
<div class="flex-that mb"> <div class="flex-that mb">
<div class="article-category"> <div class="article-category">
<?php $category = get_the_category(); <?php $category = get_the_category();
echo"<a href= '" . esc_url( get_category_link( $category[0]->term_id ) ) . "' class='btn-small btn-info'><i class='icon icon-folder'></i> " . $category[0]->cat_name . "</a>"; ?> echo"<a href= '" . esc_url( get_category_link( $category[0]->term_id ) ) . "' class='btn btn-small c-info'><i class='icon icon-folder'></i> " . $category[0]->cat_name . "</a>"; ?>
</div> </div>
<time itemprop="datePublished"><em><?php the_time('j F Y') ?></em></time> <time itemprop="datePublished"><em><?php the_time('j F Y') ?></em></time>
</div> </div>
<?php the_excerpt(); ?> <?php the_excerpt(); ?>
<p class="align-center"> <a href="<?php the_permalink(); ?>" class="btn btn-readmore" title="<?php the_title();?>">Lire l'article</a> </p> <p class="align-center"> <a href="<?php the_permalink(); ?>" class="btn btn-link" title="<?php the_title();?>">Lire l'article</a> </p>
</article> </article>
<?php endwhile; ?> <?php wp_reset_query(); /*4*/ ?> <?php endwhile; ?> <?php wp_reset_query(); /*4*/ ?>

View file

@ -1,4 +1,4 @@
<footer> <footer class="fg-light">
<ul class="social"> <ul class="social">
<?php <?php
$listmenu = get_nav_menu_locations(); $listmenu = get_nav_menu_locations();

View file

@ -61,4 +61,4 @@
</ul> </ul>
</nav> </nav>
<button id="mobile-button" class="menu-button"><i class="icon icon-navicon" aria-hidden="true"></i> <span class="sr-only">Afficher le menu</span></button> <button id="mobile-button" class="menu-button"><i class="icon icon-bars" aria-hidden="true"></i> <span class="sr-only">Afficher le menu</span></button>

View file

@ -2,7 +2,7 @@
<h2 class="sr-only">Menu des pages</h2> <h2 class="sr-only">Menu des pages</h2>
<ul> <ul>
<li> <li>
<a href="<?php echo site_url(); ?>" class="btn btn-navbar"> <a href="<?php echo site_url(); ?>" >
<i class="icon icon-home" aria-hidden="true"></i><span class="sr-only">Accueil</span> <i class="icon icon-home" aria-hidden="true"></i><span class="sr-only">Accueil</span>
</a> </a>
</li> </li>
@ -10,7 +10,7 @@
$listmenu = get_nav_menu_locations(); $listmenu = get_nav_menu_locations();
$menu = wp_get_nav_menu_items($listmenu['top-navbar']); $menu = wp_get_nav_menu_items($listmenu['top-navbar']);
foreach ($menu as $menuElement) { foreach ($menu as $menuElement) {
echo '<li><a href="' . $menuElement->url . '" class="btn btn-navbar">'. $menuElement->title . '</a></li>'; echo '<li><a href="' . $menuElement->url . '" >'. $menuElement->title . '</a></li>';
} }
?> ?>
</ul> </ul>
@ -20,22 +20,22 @@
$listmenu = get_nav_menu_locations(); $listmenu = get_nav_menu_locations();
$menu = wp_get_nav_menu_items($listmenu['top-navbar-2']); $menu = wp_get_nav_menu_items($listmenu['top-navbar-2']);
foreach ($menu as $menuElement) { foreach ($menu as $menuElement) {
echo '<li class="d-none d-block-sm"><a href="' . $menuElement->url . '" class="btn btn-navbar">'. $menuElement->title . '</a></li>'; echo '<li class="d-none d-block-sm"><a href="' . $menuElement->url . '">'. $menuElement->title . '</a></li>';
} }
?> ?>
<li> <li>
<a class="menu-item submenu" href="#">Mes sites <i class="icon icon-caret-down" aria-hidden="true"></i></a> <a class="menu-item submenu" href="#">Mes sites <i class="icon icon-caret-down" aria-hidden="true"></i></a>
<ul class="bg-light menu fg-dark"> <ul class="menu fg-dark">
<?php <?php
$listmenu = get_nav_menu_locations(); $listmenu = get_nav_menu_locations();
$menu = wp_get_nav_menu_items($listmenu['link-menu']); $menu = wp_get_nav_menu_items($listmenu['link-menu']);
foreach ($menu as $menuElement) { foreach ($menu as $menuElement) {
echo '<li><a href="' . $menuElement->url . '" class="btn btn-navbar">'. $menuElement->title . '</a></li>'; echo '<li><a href="' . $menuElement->url . '">'. $menuElement->title . '</a></li>';
} }
?> ?>
</ul> </ul>
</li> </li>
<li><a href="<?php bloginfo('rss2_url'); ?>" class="btn btn-navbar"><i class="icon icon-rss" aria-hidden="true"></i><span class="sr-only">Flux RSS du site</span></a></li> <li><a href="<?php bloginfo('rss2_url'); ?>" ><i class="icon icon-rss" aria-hidden="true"></i><span class="sr-only">Flux RSS du site</span></a></li>
</ul> </ul>
</nav> </nav>

View file

@ -1,10 +1,10 @@
<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?> <?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
<div class="card head-primary" id="post-<?php the_ID(); ?>"> <div class="card head-primary" id="post-<?php the_ID(); ?>">
<div class="card-header"><h1><?php the_title(); ?></h1></div> <h1 class="card-header"><?php the_title(); ?></h1>
<div class="flex-that mb"> <div class="flex-that mb">
<div class="article-category"> <div class="article-category">
<?php $category = get_the_category(); <?php $category = get_the_category();
echo"<a href= '" . esc_url( get_category_link( $category[0]->term_id ) ) . "' class='btn-small btn-info'><i class='icon icon-folder'></i> " . $category[0]->cat_name . "</a>"; ?> echo"<a href= '" . esc_url( get_category_link( $category[0]->term_id ) ) . "' class='btn btn-small btn-info'><i class='icon icon-folder'></i> " . $category[0]->cat_name . "</a>"; ?>
</div> </div>
<time itemprop="datePublished"><em><?php the_time('j F Y') ?></em></time> <time itemprop="datePublished"><em><?php the_time('j F Y') ?></em></time>
</div> </div>

View file

@ -25,13 +25,13 @@
<div><?php <div><?php
if (!has_category('chapters')) { if (!has_category('chapters')) {
$category = get_the_category(); $category = get_the_category();
echo"<span class='btn-small btn-info small-text'>" . $category[0]->cat_name . "</span>"; echo"<span class='badge c-info small-text'>" . $category[0]->cat_name . "</span>";
} else { } else {
$romans = get_the_terms($post->ID, 'roman'); $romans = get_the_terms($post->ID, 'roman');
echo"<span class='btn-small btn-info small-text'>" . $romans[0]->name . "</span>"; echo"<span class='badge c-info small-text'>" . $romans[0]->name . "</span>";
} }
?></div> ?></div>
<div><time><span class="btn-small btn-info small-text"><?php the_time('d/m/Y') ?></span></time></div> <div><time><span class="badge c-info small-text"><?php the_time('d/m/Y') ?></span></time></div>
</div> </div>
<div class="comment-text"> <div class="comment-text">
<?php $category = get_the_category(); <?php $category = get_the_category();

View file

@ -21,13 +21,13 @@
<div><?php <div><?php
if (!has_category('chapters')) { if (!has_category('chapters')) {
$category = get_the_category(); $category = get_the_category();
echo"<span class='btn-small btn-info small-text'>" . $category[0]->cat_name . "</span>"; echo"<span class='badge c-info small-text'>" . $category[0]->cat_name . "</span>";
} else { } else {
$romans = get_the_terms($post->ID, 'roman'); $romans = get_the_terms($post->ID, 'roman');
echo"<span class='btn-small btn-info small-text'>" . $romans[0]->name . "</span>"; echo"<span class='badge c-info small-text'>" . $romans[0]->name . "</span>";
} }
?></div> ?></div>
<div><time><span class="btn-small btn-info small-text"><?php the_time('d/m/Y') ?></span></time></div> <div><time><span class="badge c-info small-text"><?php the_time('d/m/Y') ?></span></time></div>
</div> </div>
<div class="comment-text"> <div class="comment-text">
<?php $category = get_the_category(); <?php $category = get_the_category();

View file

@ -15,11 +15,11 @@
<link rel="shortcut icon" href="<?php echo get_template_directory_uri();?>/img/favicon.png"> <link rel="shortcut icon" href="<?php echo get_template_directory_uri();?>/img/favicon.png">
<!-- Dépendances --> <!-- Dépendances -->
<link href="<?php echo get_template_directory_uri() . "/dep/iconfont/style.css?f43dse"; ?>" rel="stylesheet"/> <link href="<?php echo get_template_directory_uri() . "/dep/iconfont/style.css?f43dsf"; ?>" rel="stylesheet"/>
<link href="<?php echo get_template_directory_uri() . "/dep/viewerjs/viewer.min.css"; ?>" rel="stylesheet"/> <link href="<?php echo get_template_directory_uri() . "/dep/viewerjs/viewer.min.css"; ?>" rel="stylesheet"/>
<!-- CSS --> <!-- CSS -->
<link href="<?php bloginfo('stylesheet_url'); ?>?f43dse" rel="stylesheet"/> <link href="<?php bloginfo('stylesheet_url'); ?>?f43dsf" rel="stylesheet"/>
<!-- Viewer --> <!-- Viewer -->
<script src="<?php echo get_template_directory_uri();?>/dep/viewerjs/viewer.min.js"></script> <script src="<?php echo get_template_directory_uri();?>/dep/viewerjs/viewer.min.js"></script>

View file

@ -1,9 +1,5 @@
/* 0. CORE //@import 'core/normalize';
** All the basic functions from the stylesheet @import 'core/bases';
*/
@import 'core/normalize';
@import 'core/box-sizing';
@import 'core/typography'; @import 'core/typography';
@import 'core/containers'; @import 'core/containers';
@import 'core/columns'; @import 'core/columns';

View file

@ -1,18 +1,11 @@
/* --- 04. COMPOSANTS --- */
/*
* Les différents composants réutilisables de la page.
*
*/
@import 'components/buttons'; @import 'components/buttons';
@import 'components/btn-groups'; @import 'components/btn-groups';
@import 'components/breadcrumb'; @import 'components/breadcrumb';
@import 'components/badges';
@import 'components/pagination'; @import 'components/pagination';
@import 'components/cards'; @import 'components/cards';
@import 'components/menus'; @import 'components/menus';
@import 'components/toasts'; @import 'components/toasts';
@import 'components/tables'; @import 'components/tables';
//@import 'components/previews';
@import 'components/sidebar'; @import 'components/sidebar';
@import 'components/input'; @import 'components/input';

View file

@ -1,7 +1,3 @@
/* 4 - Custom styling
* Styles that are custom to this particular theme
**/
@import 'custom/global'; @import 'custom/global';
@import 'components/previews'; @import 'components/previews';
@import 'custom/featured'; @import 'custom/featured';

View file

@ -5,6 +5,6 @@
@import 'mixins/responsive'; @import 'mixins/responsive';
@import 'mixins/borders'; @import 'mixins/borders';
@import 'mixins/shape'; @import 'mixins/shape';
@import 'mixins/btns'; //@import 'mixins/btns';
@import 'mixins/panels'; @import 'mixins/panels';
@import 'mixins/li'; @import 'mixins/li';

View file

@ -1,7 +1,3 @@
/* 1. Utils
** All the utilities class of the stylesheet
*/
@import 'utils/a11y'; @import 'utils/a11y';
@import 'utils/align'; @import 'utils/align';
@import 'utils/borders'; @import 'utils/borders';

View file

@ -1,7 +1,8 @@
.badge { .badge {
@include button(0rem);
line-height: 1.5em; line-height: 1.5em;
padding-left: $button_small; padding-left: $button_small;
padding-right: $button_small; padding-right: $button_small;
text-decoration:none!important; text-decoration:none!important;
background-color:var(--accent-color);
color:var(--text-color-contrast);
} }

View file

@ -1,36 +1,138 @@
/* @mixin button($size) {
* 3. Buttons and labels @include button-layout($size);
* All clickable elements @include shape-style($size);
* @include button-hover();
*/ font-weight: $fontweight_base;
}
@mixin button-layout($size) {
padding: $size;
padding-top: $size/3;
padding-bottom: $size/3;
margin: $size/2;
margin-top: $size/3;
margin-bottom: $lineheight;
//font-size: 4.75mm;
line-height: $lineheight;
height: auto;
}
@mixin button-hover() {
transition: background-color .2s, border .2s, box-shadow .2s, color .2s;
&:hover,
&:active {
background-color: transparent;
}
}
@mixin button-fullcontrol($background-color, $hover-color, $text-color) {
@include colorize-shape($background-color);
outline-color: $background-color;
color: $text-color;
&:visited {
@include colorize-shape($background-color);
color: $text-color;
}
&,
&:visited,
&:not(.disabled):not(:disabled) {
&:hover,
&:active {
@include colorize-shape($hover-color);
color: lighten($text-color, 5%);
outline-color: $hover-color;
box-shadow: none;
}
}
}
@mixin button-color($background-color) {
@include button-fullcontrol($background-color, mix($background-color, getTextColorFromBackground($background-color), 85%), getTextColorFromBackground($background-color));
box-shadow: $narrow-shadow;
}
.btn { .btn {
@include button($button_large); @include shape-style($button_large);
&:hover, &:active { text-decoration: none;
@include borders(); padding: $button_large/3 $button_large;
margin: $button_large/3 $button_large/2 $lineheight;
line-height: $lineheight;
height: auto;
transition: background-color .2s, border .2s, box-shadow .2s, color .2s;
outline-color: var(--accent-color);
color: var(--text-color-contrast);
&::before {
background-color: var(--accent-color);
} }
&:visited {
color: var(--text-color-contrast);
}
&:hover,
&:active {
&::before {
background-color: var(--accent-color-hover);
}
outline-color: var(--accent-color-hover);
box-shadow: none;
}
font-weight: $fontweight_base;
p &:last-child { p &:last-child {
margin-bottom:0; margin-bottom:0;
} }
.fake {
background-color: transparent !important;
&::before {
background-color: transparent !important;
} }
.btn-small, .badge { color:var(--text-color);
@include button($button_small); }
padding-left: $button_small;
padding-right: $button_small;
text-decoration:none;
line-height: 1.5em;
} }
// COLORIZE BUTTONS .btn.disabled, .btn:disabled {
opacity: 0.8;
strong.btn-fake { background-color: var(--accent-color)!important;
@include button($button_large); outline-color: var(--accent-color)!important;
@include button-fullcontrol(transparent, transparent, rgba(0,0,0,1)); color: var(--text-color-contrast)!important;
} }
.btn-small {
padding: $button_small/3 $button_small/2;
margin: $button_small/3 $button_small/2 $lineheight;
&:before {
left: -$button_small/2;
right: -$button_small/2;
}
}
.btn-readmore, .btn-link { .btn-readmore, .btn-link {
@include button-fullcontrol(transparent, accentuate($color-background-alt), $color-primary); color: var(--link-color);
@include prefer-no-borders(); &:visited {
color: var(--link-color);
}
background-color: transparent!important;
&::before {
background-color: transparent;
}
&:hover,
&:active {
&::before {
background-color: var(--link-color-hover);
}
}
} }

View file

@ -1,10 +1,3 @@
/*
* 2. Cards and containers
* All elements that are supposed to contain other stuff
*
*
*/
$card-bigpad: $lineheight_rel * 1.25; $card-bigpad: $lineheight_rel * 1.25;
$card-smallpad: $lineheight_rel / 4; $card-smallpad: $lineheight_rel / 4;
@ -20,15 +13,16 @@ $card-smallpad: $lineheight_rel / 4;
&-header { &-header {
@include panel-header($card-bigpad); @include panel-header($card-bigpad);
.fa { .icon {
margin-right: 0.5em; margin-right: 0.25em;
} }
font-family: $basefont; font-family: $basefont;
color: var(--text-color-contrast);
&::before {
background-color: var(--accent-color);
}
} }
} }
/* CARD LIST - Make a list part of a card */
@mixin list-symbol($symbol) { @mixin list-symbol($symbol) {
li.list-element { li.list-element {
@ -67,8 +61,3 @@ ul.card-list, .card > ul {
&-success{@include list-color($color-success);} &-success{@include list-color($color-success);}
} }
.smallcard {
&-header {
@include panel-header($card-bigpad);
}
}

View file

@ -2,12 +2,99 @@ input,
textarea { textarea {
width: 100%; width: 100%;
background-color: $color-background-alt; background-color: $color-background-alt;
border-radius: $btn-radius; border-radius: $well-radius;
border: 0px solid rgba(0, 0, 0, 0); border: 0px solid rgba(0, 0, 0, 0);
padding: $lineheight_rel / 4; padding: $lineheight_rel / 4;
line-height: $lineheight_rel; line-height: $lineheight_rel;
overflow: auto;
.card & { .card & {
background-color: $color-background; background-color: $color-background;
} }
} }
button,
input,
optgroup,
select,
textarea {
font-family: inherit;
font-size: 100%;
line-height: inherit;
margin: 0;
}
button,
select {
text-transform: none;
}
button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 2px dotted var(--accent-color);
}
fieldset {
padding: 0.35em 0.75em 0.625em;
}
legend {
box-sizing: border-box;
color: inherit;
display: table;
max-width: 100%;
padding: 0;
white-space: normal;
}
progress {
vertical-align: baseline;
}
textarea {
overflow: auto;
}
[type="checkbox"],
[type="radio"] {
box-sizing: border-box;
/* 1 */
padding: 0;
/* 2 */
}
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
[type="search"] {
-webkit-appearance: textfield;
outline-offset: -2px;
}
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-file-upload-button {
-webkit-appearance: button;
font: inherit;
}

View file

@ -1,5 +1,3 @@
/* Menu handling */
.menu { .menu {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -13,7 +11,6 @@
a, a,
a:visited { a:visited {
@include shape-style($lineheight_half);
display: flex; display: flex;
line-height: $lineheight_rel; line-height: $lineheight_rel;
padding: $lineheight_rel / 4; padding: $lineheight_rel / 4;
@ -26,47 +23,19 @@
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
@include shape-style($lineheight_half);
//@include button-hover();
@include prefer-no-borders();
.badge { .badge {
margin: 0; margin: 0;
} }
} }
&.fg-light,
.fg-light & {
a { a {
color: $color-font-light; color: var(--text-color);
outline-color: $color-font-light; outline-color: var(--text-color);
&:hover, &:hover,
&:active, &:active,
&.submenu:focus { &.submenu:focus {
background-color: transparentize($color-font-light, 0.7); background-color: var(--link-color-hover);
}
}
input {
outline-color: $color-font-light;
}
}
&.fg-dark,
.fg-dark & {
a {
color: $color-font;
outline-color: $color-font;
&:hover,
&:active,
&.submenu:focus {
background-color: transparentize($color-font, 0.85);
}
}
input {
outline-color: $color-font;
} }
} }
} }
@ -98,9 +67,7 @@
strong, strong,
&.toolbar-element { &.toolbar-element {
display: block; display: block;
padding: $lineheight_rel/3; padding: $lineheight_rel/3 $lineheight_rel/2;
padding-left: $lineheight_rel/2;
padding-right: $lineheight_rel/2;
} }
ul { ul {
@ -113,6 +80,7 @@
display: none; display: none;
padding:0.33rem; padding:0.33rem;
z-index:2; z-index:2;
background-color: $color-background-alt;
} }
&:hover ul, &:hover ul,
@ -147,7 +115,6 @@ ul.menu h2 {
} }
.menu-label { .menu-label {
@include shape-style($button_small);
@include button-hover(); @include button-hover();
padding-left: $button_small; padding-left: $button_small;
padding-right: $button_small; padding-right: $button_small;

View file

@ -5,17 +5,19 @@ nav.pagination {
width:100%; width:100%;
} }
.page-numbers, .next, .prev { .page-numbers, .next, .prev {
@include button($button_small); @include shape-style($button_small);
padding-left: $button_small; padding: $button_small/2 $button_small;
padding-right: $button_small; margin : $button_small / 2;
margin-right : $button_small / 2;
margin-left: $button_small / 2;
text-decoration: none; text-decoration: none;
&:not(.current):not(.dots) { &:not(.current):not(.dots) {
@include button-color($color-background-alt); outline-color: var(--accent-color);
outline-color: mix($color-background-alt, getTextColorFromBackground($color-background-alt), 85%); color: var(--link-color);
&:hover {
&::before {
background-color: var(--link-color-hover);
}
}
} }
&.current { &.current {

View file

@ -1,8 +1,3 @@
/*
* 4. Previews
* Special style for previews cards
*
*/
$preview-height: 8*$lineheight; $preview-height: 8*$lineheight;
$preview-content-height:165px; $preview-content-height:165px;
$comment-peek-height:0px; $comment-peek-height:0px;
@ -66,12 +61,13 @@ $comment-peek-height:0px;
height: $preview-height; height: $preview-height;
.card-header { .card-header {
font-family: $basefont; padding: $lineheight_half/2 $card-header-padding;
font-size: 1em; padding-bottom: $lineheight_half/2 !important;
@include panel-header($lineheight_half); &:before {
@include colorize-shape($color-primary); left: -$lineheight_half/2;
color: getTextColorFromBackground($color-primary); right: -$lineheight_half/2;
font-weight: $fontweight_bold; }
position:absolute; position:absolute;
margin:0; margin:0;
top:0.5rem; top:0.5rem;

View file

@ -1,7 +1,3 @@
/* TABLE
* Style tables
*/
table { table {
border-collapse: collapse; border-collapse: collapse;
} }

View file

@ -1,8 +1,25 @@
@mixin well() {
border: 0;
border-radius: $well-radius;
margin: 0 0 $lineheight 0;
padding: $lineheight 1rem $lineheight 1rem;
max-width: 100%;
font-style: italic;
@include background-color($color-background-alt);
box-shadow: $narrow-shadow;
}
blockquote, .quote, .well, pre, .pre, .well-pre, .toast, .code {
@include well();
}
.toast { .toast {
@include panel($card-smallpad); background-color: var(--accent-color);
padding:$card-smallpad; color: var(--text-color-contrast);
font-size: 0.8rem;
a {
margin: 0;
} }
code {
font-family: monospace, monospace;
} }

47
scss/core/_bases.scss Normal file
View file

@ -0,0 +1,47 @@
*,
*::before,
*::after {
box-sizing: inherit;
}
html {
// Text initialization
font-family: $basefont;
text-align: left;
font-size: $fontsize;
line-height: $lineheight;
font-weight: $fontweight_base;
// Normalization
box-sizing: border-box;
-webkit-text-size-adjust: 100%;
}
body {
margin: 0;
overflow-x: hidden;
text-rendering: optimizeLegibility;
color: var(--text-color);
}
abbr[title] {
border-bottom: none;
text-decoration: underline;
text-decoration: underline dotted;
}
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}

View file

@ -1,18 +0,0 @@
/* 0.2 - Box-sizing
* Make sure that everything have its box-sizing to border-box
**/
*,
*::before,
*::after {
box-sizing: inherit;
}
html {
box-sizing: border-box;
}
body {
overflow-x: hidden;
text-rendering: optimizeLegibility;
}

View file

@ -1,5 +1,9 @@
@mixin column($size) { @mixin column($size) {
grid-column: span $size; grid-column: span $size;
}
[class*=" col-"],
[class^=col-] {
width: 100%; width: 100%;
margin: 0; margin: 0;

View file

@ -1,315 +1,10 @@
/*! 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 { main {
display: block; 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 /* 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 /* Interactive
========================================================================== */ ========================================================================== */

View file

@ -1,25 +1,25 @@
/* 0.3 - Typography
* This part of the (s)css handle everything related to the typography
* like paragraphs, blockquote, etc.
**/
/* 2.2 - Global Typography */
@mixin paragraph() { @mixin paragraph() {
padding:0; padding:0;
padding-bottom: $lineheight; padding-bottom: $lineheight;
margin: 0; margin: 0;
} }
html, body { :root {
font-family: $basefont; @include accent-color($color-primary);
text-align: left; --text-color:#{$color-font};
font-size: $fontsize; --link-color-hover:#{transparentize($color-font, 0.85)};
line-height: $lineheight; --link-color:#{darken($color-link, 10%)};
color: getFontColor();
font-weight: $fontweight_base;
} }
// html, body {
// font-family: $basefont;
// text-align: left;
// font-size: $fontsize;
// line-height: $lineheight;
// color: getFontColor();
// font-weight: $fontweight_base;
// }
strong { strong {
font-weight: $fontweight_bold; font-weight: $fontweight_bold;
} }
@ -34,28 +34,25 @@ mark {
border-radius: 0.1rem; border-radius: 0.1rem;
} }
img {
border-style: none;
}
a { a {
color: darken($color-link, 10%); color: var(--link-color);
outline-color: $color-link; outline-color: $color-link;
padding: 0.05rem; padding: 0.05rem;
border-radius: 0.1rem; border-radius: 0.1rem;
text-decoration: underline dashed; text-decoration: underline dashed;
&:visited { &:visited {
color: darken($color-link, 10%); color: var(--link-color);
} }
&:hover, &:active { &:hover, &:active {
&, &.fg-dark, .fg-light & { background-color: var(--link-color-hover);
background-color: transparentize($color-font, 0.9);
text-decoration: none; text-decoration: none;
} }
.fg-light &, &.fg-light {
background-color: transparentize($color-font-light, 0.8);
text-decoration: none;
}
}
} }
a:focus-visible, input:focus-visible { a:focus-visible, input:focus-visible {
@ -105,8 +102,6 @@ ul, ol {
@include background-color($color-selection); @include background-color($color-selection);
} }
/* 2.3 - Titles */
@mixin newTitle($size, $weight) { @mixin newTitle($size, $weight) {
$lineNumber: ceil($size / 1.5); $lineNumber: ceil($size / 1.5);
font-size: $size * 1rem; font-size: $size * 1rem;
@ -168,50 +163,24 @@ h6, .title-6 {
@include newTitle(1, $fontweight_hyper); @include newTitle(1, $fontweight_hyper);
} }
/* 2.4 - hr */
hr { hr {
border: 0px solid rgba(1, 1, 1, 0.15); border: 0px solid rgba(1, 1, 1, 0.15);
border-bottom: 1px; border-bottom: 1px;
margin: 1.5em; margin: 1.5em;
box-sizing: content-box;
height: 0;
overflow: visible;
} }
/* 2.5 - Wells and quotes */ pre {
font-family: monospace, monospace;
@mixin well() { font-size: 1em;
border: 0;
border-radius: $well-radius;
margin: 0 0 $lineheight 0;
padding: $lineheight 1rem $lineheight 1rem;
max-width: 100%;
font-style: italic;
@include background-color($color-background-alt);
box-shadow: $narrow-shadow;
} }
blockquote, .quote { .small-text, small {
&:before {
content:"";
}
}
blockquote, .quote, .well, pre, .pre, .well-pre {
@include well();
}
code {
background:transparent;
color: $color-danger;
}
.small-text {
font-size: 0.9em; font-size: 0.9em;
} }
/* 2.6 - Special styling */
.time { .time {
font-style: italic; font-style: italic;
text-align: right; text-align: right;

View file

@ -1,10 +1,3 @@
/* --- 03. GLOBAL STYLING --- */
/*
* Les styles "globaux" touchant toute la page.
*
*/
@mixin li-no-margin() { @mixin li-no-margin() {
li { li {
margin: 0; margin: 0;
@ -42,8 +35,6 @@
} }
} }
/* ------------------ HEADERS ------------------- */
#page-header { #page-header {
background: get-color("skyblue") url('img/background.png'); background: get-color("skyblue") url('img/background.png');
border-top: 6px solid get-color("dark"); border-top: 6px solid get-color("dark");
@ -121,7 +112,6 @@ header h1 {
.dropdown-menu { .dropdown-menu {
box-shadow: $narrow-shadow, $inset-shadow; box-shadow: $narrow-shadow, $inset-shadow;
} }
/* ------------------ CONTAINERS ------------------- */
.container-big { .container-big {
@include container-big(); @include container-big();
@ -190,49 +180,10 @@ ul.tag-list {
padding-bottom: $lineheight; padding-bottom: $lineheight;
} }
.container-personnage {
@include container-big();
display: grid;
grid-template-columns: repeat(6, 1fr);
grid-template-rows: auto;
row-gap: 3rem;
column-gap: 3rem;
grid-template-areas:
"nomp nomp nomp nomp nomp nomp"
"info info info info meta meta"
"goss goss look look look look"
"aime aime aime dete dete dete"
"hist hist hist hist hist hist";
.card {
margin:0;
}
h1 {
padding:0;
}
}
.personnage {
&-nomp {grid-area: nomp;}
&-info {grid-area: info;}
&-meta {grid-area: meta;}
&-goss {grid-area: goss;}
&-look {grid-area: look;}
&-aime {grid-area: aime;}
&-dete {grid-area: dete;}
&-hist {grid-area: hist;}
}
/* ------------------ PAGE ------------------- */
#wrapper { #wrapper {
background-color: $color-background; background-color: $color-background;
} }
/* ------------------ FOOTER ------------------- */
$color-footer-back: get-color("dark"); $color-footer-back: get-color("dark");
$color-footer-text: get-color("light"); $color-footer-text: get-color("light");

View file

@ -1,93 +0,0 @@
.preview-grid {
display: grid;
grid-template-columns: 1fr;
grid-template-rows: auto;
grid-gap: $lineheight / 3;
margin: -$lineheight / 3;
padding-bottom: $lineheight;
@include md() {
grid-template-columns: 1fr 1fr;
}
@include lg() {
grid-template-columns: 1fr 1fr 1fr;
}
@include xl() {
grid-template-columns: 1fr 1fr 1fr 1fr;
}
}
.preview-list {
.preview {
display: block;
}
@include sm() {
.preview-thumbnail {
width: min-content;
img {
width: 240px;
margin-right: $lineheight /2;
}
}
.preview {
display: flex;
align-items: start;
margin-bottom: $lineheight;
}
}
@include xl() {
.preview-thumbnail img {
width: 320px;
}
}
}
.preview {
font-size: 0.8rem;
text-decoration: none;
padding: $lineheight / 3;
border-radius: $card-radius;
}
.preview-thumbnail {
display:block;
width: 100%;
background-color:transparent;
object-fit: cover;
padding:0;
line-height:0;
img {
width:100%;
object-fit: cover;
height: auto;
aspect-ratio: 16/9;
border-radius: $card-radius;
}
}
.preview h2, .preview-featured h2 {
font-size:1.25rem;
line-height: 1.5rem;
font-family: $titlefont;
font-weight: 800;
height:3rem;
color: $color-font;
a {
background-color:transparent!important;
color:$color-font;
}
}
.preview-featured h2 {
color: $color-font-light;
}
.preview-excerpt {
margin-top: $lineheight / 2;
font-size:0.8rem;
line-height:1.25rem;
color:transparentize($color-font, 0.2);
}

View file

@ -1,14 +1,3 @@
/* --- 00. PALETTE --- */
/*
* Les définitions globales des couleurs du theme.
*
* Elle permettent de définir rapidement à la fois les couleurs
* de base qui seront utilisée pour tout le theme, mais
* également celles spécifiques pour certains sujets (liens, texte)
*
*/
$whiteness_value: 0.8; $whiteness_value: 0.8;
// Couleurs de base du theme : // Couleurs de base du theme :

View file

@ -1,10 +1,3 @@
/* --- 00. COLORS --- */
/*
* La gestion des couleurs dans le theme. Cette partie de la stylesheet est
* automatique et n'a pas besoin d'être modifiée
*/
// FUNCTIONS TO GET MORE EASILY COLORS // FUNCTIONS TO GET MORE EASILY COLORS
@function list-colors() { @function list-colors() {
@return $semantics; @return $semantics;
@ -58,3 +51,9 @@
background-color: $background-color; background-color: $background-color;
color: getTextColorFromBackground($background-color); color: getTextColorFromBackground($background-color);
} }
@mixin accent-color($accent-color) {
--accent-color: #{$accent-color};
--text-color-contrast: #{getTextColorFromBackground($accent-color)};
--accent-color-hover: #{accentuate($accent-color)};
}

View file

@ -26,15 +26,16 @@
} }
@mixin panel-header($size) { @mixin panel-header($size) {
font-family: $basefont;
font-size:1em; font-size:1em;
font-weight: $fontweight_bold; font-weight: $fontweight_bold;
padding: $size/2;
padding-left:$card-header-padding;
padding-right:$card-header-padding; padding: $size/2 $card-header-padding;
padding-bottom: $size/2!important; padding-bottom: $size/2!important;
margin:$card-header-hmargin; margin:$lineheight_rel / 2 $card-header-hmargin;
margin-bottom:$lineheight_rel / 2; // margin-bottom:$lineheight_rel / 2;
margin-top:$lineheight_rel / 2; // margin-top:$lineheight_rel / 2;
line-height:1; line-height:1;
position:relative; position:relative;
@ -51,14 +52,4 @@
border-bottom-left-radius: $card-radius; border-bottom-left-radius: $card-radius;
border-bottom-right-radius: $card-radius; border-bottom-right-radius: $card-radius;
} }
h1, h2, h3, h4, h5, h6, h7, h8, h9, h10 {
font-family:$basefont;
font-size:1em;
padding:0px;
margin:0px;
color:$color-font-light;
font-weight: $fontweight_big;
line-height:$lineheight_rel;
}
} }

View file

@ -1,7 +1,3 @@
/* 1.0 - Accessibility classes
* Some classes to help accessibility
**/
.screen-reader-text, .sr-only { .screen-reader-text, .sr-only {
visibility: collapse; visibility: collapse;
font-size:0; font-size:0;

View file

@ -1,7 +1,3 @@
/* 1.1 - Alignement classes
* Handle easily alignement and flexboxes
**/
.flex-that { .flex-that {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;

View file

@ -1,7 +1,3 @@
/* 1.2 - Colorization classes
* Colorize some aspect of a class
**/
@mixin heading-color($background-color) { @mixin heading-color($background-color) {
& .card-header, & .card-header,
@ -25,53 +21,69 @@
} }
} }
.bg { .bg-accent {
$background-color: var(--accent-color);
}
// .bg {
// @each $name,
// $color in list-colors() {
// &-#{$name} {
// @include bg-color(get-color($name));
// &:hover {
// @include bg-color(get-color($name));
// }
// }
// }
// }
// .text {
// @each $name,
// $color in list-colors() {
// &-#{$name} {
// @include text-color(get-color($name));
// }
// }
// }
// .btn {
// @each $name,
// $color in list-colors() {
// &-#{$name} {
// @include button-color(get-color($name));
// }
// }
// }
.c, .btn, .head, .text {
@each $name, @each $name,
$color in list-colors() { $color in list-colors() {
&-#{$name} { &-#{$name} {
@include bg-color(get-color($name)); @include accent-color(get-color($name));
&:hover {
@include bg-color(get-color($name));
}
}
}
}
.text {
@each $name,
$color in list-colors() {
&-#{$name} {
@include text-color(get-color($name));
} }
} }
} }
.btn { // .head {
@each $name, // @each $name,
$color in list-colors() { // $color in list-colors() {
&-#{$name} { // &-#{$name} {
@include button-color(get-color($name)); // @include heading-color(get-color($name));
} // }
} // }
} // }
.head {
@each $name,
$color in list-colors() {
&-#{$name} {
@include heading-color(get-color($name));
}
}
}
.fg-light { .fg-light {
color: $color-font-light; --text-color:#{$color-font-light};
--link-color-hover:#{transparentize($color-font-light, 0.7)};
} }
.fg-dark { .fg-dark {
color: $color-font; color: $color-font;
--text-color:#{$color-font};
--link-color-hover:#{transparentize($color-font, 0.85)};
} }

View file

@ -1,7 +1,3 @@
/* 1.3 - List classes
* Handle more easily list
**/
.no-pills { .no-pills {
list-style:none; list-style:none;
} }

View file

@ -1,7 +1,3 @@
/* 1.3 - Sizing classes
* Handle sizing and margin
**/
@mixin addmargins($name, $size) { @mixin addmargins($name, $size) {
&-#{$name} { &-#{$name} {
margin:$size; margin:$size;

2005
style.css

File diff suppressed because it is too large Load diff