feat: optimisation css généré

This commit is contained in:
Kazhnuz Klappsthul 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();
$category_parent_id = $category[0]->category_parent;
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 } else { ?>
<h1 class="sr-only"><?php the_title(); ?></h1>

View File

@ -22,12 +22,12 @@
<div class="flex-that mb">
<div class="article-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>
<time itemprop="datePublished"><em><?php the_time('j F Y') ?></em></time>
</div>
<?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>
<?php endwhile; ?> <?php wp_reset_query(); /*4*/ ?>

View File

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

View File

@ -61,4 +61,4 @@
</ul>
</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>
<ul>
<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>
</a>
</li>
@ -10,7 +10,7 @@
$listmenu = get_nav_menu_locations();
$menu = wp_get_nav_menu_items($listmenu['top-navbar']);
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>
@ -20,22 +20,22 @@
$listmenu = get_nav_menu_locations();
$menu = wp_get_nav_menu_items($listmenu['top-navbar-2']);
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>
<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
$listmenu = get_nav_menu_locations();
$menu = wp_get_nav_menu_items($listmenu['link-menu']);
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>
</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>
</nav>

View File

@ -1,10 +1,10 @@
<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
<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="article-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>
<time itemprop="datePublished"><em><?php the_time('j F Y') ?></em></time>
</div>

View File

@ -25,13 +25,13 @@
<div><?php
if (!has_category('chapters')) {
$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 {
$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><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 class="comment-text">
<?php $category = get_the_category();

View File

@ -21,13 +21,13 @@
<div><?php
if (!has_category('chapters')) {
$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 {
$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><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 class="comment-text">
<?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">
<!-- 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"/>
<!-- CSS -->
<link href="<?php bloginfo('stylesheet_url'); ?>?f43dse" rel="stylesheet"/>
<link href="<?php bloginfo('stylesheet_url'); ?>?f43dsf" rel="stylesheet"/>
<!-- Viewer -->
<script src="<?php echo get_template_directory_uri();?>/dep/viewerjs/viewer.min.js"></script>

View File

@ -1,9 +1,5 @@
/* 0. CORE
** All the basic functions from the stylesheet
*/
@import 'core/normalize';
@import 'core/box-sizing';
//@import 'core/normalize';
@import 'core/bases';
@import 'core/typography';
@import 'core/containers';
@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/btn-groups';
@import 'components/breadcrumb';
@import 'components/badges';
@import 'components/pagination';
@import 'components/cards';
@import 'components/menus';
@import 'components/toasts';
@import 'components/tables';
//@import 'components/previews';
@import 'components/sidebar';
@import 'components/input';

View File

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

View File

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

View File

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

View File

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

View File

@ -1,36 +1,138 @@
/*
* 3. Buttons and labels
* All clickable elements
*
*/
@mixin button($size) {
@include button-layout($size);
@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 {
@include button($button_large);
&:hover, &:active {
@include borders();
@include shape-style($button_large);
text-decoration: none;
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);
}
p &:last-child {
margin-bottom:0;
outline-color: var(--accent-color-hover);
box-shadow: none;
}
font-weight: $fontweight_base;
p &:last-child {
margin-bottom:0;
}
.fake {
background-color: transparent !important;
&::before {
background-color: transparent !important;
}
color:var(--text-color);
}
}
.btn-small, .badge {
@include button($button_small);
padding-left: $button_small;
padding-right: $button_small;
text-decoration:none;
line-height: 1.5em;
.btn.disabled, .btn:disabled {
opacity: 0.8;
background-color: var(--accent-color)!important;
outline-color: var(--accent-color)!important;
color: var(--text-color-contrast)!important;
}
// COLORIZE BUTTONS
strong.btn-fake {
@include button($button_large);
@include button-fullcontrol(transparent, transparent, rgba(0,0,0,1));
.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 {
@include button-fullcontrol(transparent, accentuate($color-background-alt), $color-primary);
@include prefer-no-borders();
color: var(--link-color);
&: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-smallpad: $lineheight_rel / 4;
@ -20,16 +13,17 @@ $card-smallpad: $lineheight_rel / 4;
&-header {
@include panel-header($card-bigpad);
.fa {
margin-right: 0.5em;
.icon {
margin-right: 0.25em;
}
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) {
li.list-element {
list-style: none;
@ -67,8 +61,3 @@ ul.card-list, .card > ul {
&-success{@include list-color($color-success);}
}
.smallcard {
&-header {
@include panel-header($card-bigpad);
}
}

View File

@ -2,12 +2,99 @@ input,
textarea {
width: 100%;
background-color: $color-background-alt;
border-radius: $btn-radius;
border-radius: $well-radius;
border: 0px solid rgba(0, 0, 0, 0);
padding: $lineheight_rel / 4;
line-height: $lineheight_rel;
overflow: auto;
.card & {
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 {
display: flex;
flex-direction: column;
@ -13,7 +11,6 @@
a,
a:visited {
@include shape-style($lineheight_half);
display: flex;
line-height: $lineheight_rel;
padding: $lineheight_rel / 4;
@ -26,47 +23,19 @@
text-overflow: ellipsis;
overflow: hidden;
@include shape-style($lineheight_half);
//@include button-hover();
@include prefer-no-borders();
.badge {
margin: 0;
}
}
&.fg-light,
.fg-light & {
a {
color: $color-font-light;
outline-color: $color-font-light;
a {
color: var(--text-color);
outline-color: var(--text-color);
&:hover,
&:active,
&.submenu:focus {
background-color: transparentize($color-font-light, 0.7);
}
}
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;
&:hover,
&:active,
&.submenu:focus {
background-color: var(--link-color-hover);
}
}
}
@ -98,9 +67,7 @@
strong,
&.toolbar-element {
display: block;
padding: $lineheight_rel/3;
padding-left: $lineheight_rel/2;
padding-right: $lineheight_rel/2;
padding: $lineheight_rel/3 $lineheight_rel/2;
}
ul {
@ -113,6 +80,7 @@
display: none;
padding:0.33rem;
z-index:2;
background-color: $color-background-alt;
}
&:hover ul,
@ -147,7 +115,6 @@ ul.menu h2 {
}
.menu-label {
@include shape-style($button_small);
@include button-hover();
padding-left: $button_small;
padding-right: $button_small;

View File

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

View File

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

View File

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

View File

@ -1,8 +1,25 @@
.toast {
@include panel($card-smallpad);
padding:$card-smallpad;
font-size: 0.8rem;
a {
margin: 0;
}
@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 {
background-color: var(--accent-color);
color: var(--text-color-contrast);
}
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,10 +1,14 @@
@mixin column($size) {
grid-column: span $size;
width:100%;
margin:0;
}
& > *:last-child {
margin-bottom:0!important;
[class*=" col-"],
[class^=col-] {
width: 100%;
margin: 0;
&>*:last-child {
margin-bottom: 0 !important;
}
}

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 {
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
========================================================================== */

View File

@ -1,24 +1,24 @@
/* 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() {
padding:0;
padding-bottom: $lineheight;
margin: 0;
}
html, body {
font-family: $basefont;
text-align: left;
font-size: $fontsize;
line-height: $lineheight;
color: getFontColor();
font-weight: $fontweight_base;
}
:root {
@include accent-color($color-primary);
--text-color:#{$color-font};
--link-color-hover:#{transparentize($color-font, 0.85)};
--link-color:#{darken($color-link, 10%)};
}
// html, body {
// font-family: $basefont;
// text-align: left;
// font-size: $fontsize;
// line-height: $lineheight;
// color: getFontColor();
// font-weight: $fontweight_base;
// }
strong {
font-weight: $fontweight_bold;
@ -34,27 +34,24 @@ mark {
border-radius: 0.1rem;
}
img {
border-style: none;
}
a {
color: darken($color-link, 10%);
color: var(--link-color);
outline-color: $color-link;
padding: 0.05rem;
border-radius: 0.1rem;
text-decoration: underline dashed;
&:visited {
color: darken($color-link, 10%);
color: var(--link-color);
}
&:hover, &:active {
&, &.fg-dark, .fg-light & {
background-color: transparentize($color-font, 0.9);
text-decoration:none;
}
.fg-light &, &.fg-light {
background-color: transparentize($color-font-light, 0.8);
text-decoration: none;
}
background-color: var(--link-color-hover);
text-decoration: none;
}
}
@ -105,8 +102,6 @@ ul, ol {
@include background-color($color-selection);
}
/* 2.3 - Titles */
@mixin newTitle($size, $weight) {
$lineNumber: ceil($size / 1.5);
font-size: $size * 1rem;
@ -168,50 +163,24 @@ h6, .title-6 {
@include newTitle(1, $fontweight_hyper);
}
/* 2.4 - hr */
hr {
border: 0px solid rgba(1, 1, 1, 0.15);
border-bottom: 1px;
margin: 1.5em;
box-sizing: content-box;
height: 0;
overflow: visible;
}
/* 2.5 - Wells and quotes */
@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;
pre {
font-family: monospace, monospace;
font-size: 1em;
}
blockquote, .quote {
&:before {
content:"";
}
}
blockquote, .quote, .well, pre, .pre, .well-pre {
@include well();
}
code {
background:transparent;
color: $color-danger;
}
.small-text {
.small-text, small {
font-size: 0.9em;
}
/* 2.6 - Special styling */
.time {
font-style: italic;
text-align: right;

View File

@ -1,10 +1,3 @@
/* --- 03. GLOBAL STYLING --- */
/*
* Les styles "globaux" touchant toute la page.
*
*/
@mixin li-no-margin() {
li {
margin: 0;
@ -42,8 +35,6 @@
}
}
/* ------------------ HEADERS ------------------- */
#page-header {
background: get-color("skyblue") url('img/background.png');
border-top: 6px solid get-color("dark");
@ -121,7 +112,6 @@ header h1 {
.dropdown-menu {
box-shadow: $narrow-shadow, $inset-shadow;
}
/* ------------------ CONTAINERS ------------------- */
.container-big {
@include container-big();
@ -190,49 +180,10 @@ ul.tag-list {
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 {
background-color: $color-background;
}
/* ------------------ FOOTER ------------------- */
$color-footer-back: get-color("dark");
$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;
// 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
@function list-colors() {
@return $semantics;
@ -58,3 +51,9 @@
background-color: $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) {
font-family: $basefont;
font-size:1em;
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;
margin:$card-header-hmargin;
margin-bottom:$lineheight_rel / 2;
margin-top:$lineheight_rel / 2;
margin:$lineheight_rel / 2 $card-header-hmargin;
// margin-bottom:$lineheight_rel / 2;
// margin-top:$lineheight_rel / 2;
line-height:1;
position:relative;
@ -51,14 +52,4 @@
border-bottom-left-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 {
visibility: collapse;
font-size:0;

View File

@ -1,7 +1,3 @@
/* 1.1 - Alignement classes
* Handle easily alignement and flexboxes
**/
.flex-that {
display: flex;
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) {
& .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,
$color in list-colors() {
&-#{$name} {
@include bg-color(get-color($name));
&:hover {
@include bg-color(get-color($name));
}
@include accent-color(get-color($name));
}
}
}
.text {
// .head {
@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));
}
}
}
.head {
@each $name,
$color in list-colors() {
&-#{$name} {
@include heading-color(get-color($name));
}
}
}
// @each $name,
// $color in list-colors() {
// &-#{$name} {
// @include heading-color(get-color($name));
// }
// }
// }
.fg-light {
color: $color-font-light;
--text-color:#{$color-font-light};
--link-color-hover:#{transparentize($color-font-light, 0.7)};
}
.fg-dark {
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 {
list-style:none;
}

View File

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

2025
style.css

File diff suppressed because it is too large Load Diff