merge fonts

This commit is contained in:
hugogogo
2021-05-16 20:30:20 +02:00
14 changed files with 97 additions and 39 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,9 @@
@font-face {
font-family: 'Larsseit';
src: local('Larsseit Light'), local('Larsseit-Light'),
url('Larsseit-Light.woff2') format('woff2'),
url('Larsseit-Light.woff') format('woff'),
url('Larsseit-Light.ttf') format('truetype');
font-weight: 300;
font-style: normal;
}

View File

@@ -10,6 +10,7 @@
<link href="./styles/style.css" type="text/css" rel="stylesheet">
<link href="./styles/actualites.css" type="text/css" rel="stylesheet">
<style> html {visibility: hidden; opacity: 0;} </style>
<script src="./fr/script.js" defer></script>
</head>
<body>

View File

@@ -10,6 +10,7 @@
<link href="./styles/style.css" type="text/css" rel="stylesheet">
<link href="./styles/lettres.css" type="text/css" rel="stylesheet">
<style> html {visibility: hidden; opacity: 0;} </style>
<script src="./fr/script.js" defer></script>
</head>
<body>

View File

@@ -10,6 +10,7 @@
<link href="./styles/style.css" type="text/css" rel="stylesheet">
<link href="./styles/lettres_2021.css" type="text/css" rel="stylesheet">
<style> html {visibility: hidden; opacity: 0;} </style>
<script src="./fr/script.js" defer></script>
</head>
<body>

View File

@@ -10,6 +10,7 @@
<link href="./styles/litterall.css" type="text/css" rel="stylesheet">
<link href="./styles/style.css" type="text/css" rel="stylesheet">
<style> html {visibility: hidden; opacity: 0;} </style>
<script src="./fr/script.js" defer></script>
</head>
<body>

View File

@@ -1,6 +1,46 @@
let nav = document.getElementsByClassName("nav_left");
let anchor = document.createElement("a");
anchor.innerHTML = "test";
/*
nav[0].appendChild(anchor);
*/
fonts();
function fonts()
{
let url = window.location.href.match(/\#.*/);
if (url == "#fonts")
{
// go to the div "nav"
let nav = document.getElementsByClassName("nav_left");
// add an anchor
let anchor = document.createElement("a");
anchor.setAttribute('id', "fonts");
anchor.innerHTML = `
<p>fonts</p>
<div id="fonts_dropdown">
<button onclick="change_font()">louisgeorge (defaut)</button>
<button onclick="change_font()">cabrion</button>
<button onclick="change_font()">paradroid (titres)</button>
<button onclick="change_font()">evolvanta</button>
<button onclick="change_font()">ptroot</button>
<button onclick="change_font()">tgalcefun</button>
<button onclick="change_font()">bentonsansbook (payant)</button>
<button onclick="change_font()">larsseitlight (payant)</button>
</div>
`;
nav[0].appendChild(anchor);
}
}
function change_font()
{
let name = event.target.textContent.split(' ')[0];
console.log(name);
document.documentElement.style.cssText = "--font-texts: " + name;
/*
let content = getComputedStyle(document.documentElement).getPropertyValue('font-family');
let content = getComputedStyle(document.documentElement).getPropertyValue('@font-face');
let content = Array.from(document.styleSheets);
console.log(content);
*/
}

View File

@@ -19,37 +19,6 @@
url('../fonts/louisgeorge/louis_george_cafe.woff') format('woff');
url('../fonts/louisgeorge/louis_george_cafe.ttf') format('truetype');
}
@font-face {
font-family: 'louisgeorge_bold';
src: url('../fonts/louisgeorge/louis_george_cafe_bold.woff2') format('woff2'),
url('../fonts/louisgeorge/louis_george_cafe_bold.woff') format('woff');
url('../fonts/louisgeorge/louis_george_cafe_bold.ttf') format('truetype');
}
@font-face {
font-family: 'louisgeorge_bolditalic';
src: url('../fonts/louisgeorge/louis_george_cafe_bold_italic.woff2') format('woff2'),
url('../fonts/louisgeorge/louis_george_cafe_bold_italic.woff') format('woff');
url('../fonts/louisgeorge/louis_george_cafe_bold_italic.ttf') format('truetype');
}
@font-face {
font-family: 'louisgeorge_italic';
src: url('../fonts/louisgeorge/louis_george_cafe_italic.woff2') format('woff2'),
url('../fonts/louisgeorge/louis_george_cafe_italic.woff') format('woff');
url('../fonts/louisgeorge/louis_george_cafe_italic.ttf') format('truetype');
}
@font-face {
font-family: 'louisgeorge_light';
src: url('../fonts/louisgeorge/louis_george_cafe_light.woff2') format('woff2'),
url('../fonts/louisgeorge/louis_george_cafe_light.woff') format('woff');
url('../fonts/louisgeorge/louis_george_cafe_light.ttf') format('truetype');
}
@font-face {
font-family: 'louisgeorge_lightitalic';
src: url('../fonts/louisgeorge/louis_george_cafe_light_italic.woff2') format('woff2'),
url('../fonts/louisgeorge/louis_george_cafe_light_italic.woff') format('woff');
url('../fonts/louisgeorge/louis_george_cafe_light_italic.ttf') format('truetype');
}
/*test fonts*/
@@ -65,6 +34,14 @@
font-family: 'tgalcefun';
src: url('../fonts/tgalcefun/TG_Alcefun.ttf') format('truetype');
}
@font-face {
font-family: 'bentonsansbook';
src: url('../fonts/bentonsansbook/BentonSansBook.otf') format('opentype');
}
@font-face {
font-family: 'larsseitlight';
src: url('../fonts/larsseitlight/Larsseit-Light.ttf') format('truetype');
}

View File

@@ -45,7 +45,6 @@
--font-titles: 'paradroid';
--font-texts: 'louisgeorge';
--font-fallback: 'cabrion';
--font-fallback2: 'ptroot';
/* colors texts */
@@ -61,3 +60,4 @@
--footer-height: 150px;
}

28
styles/skeleton.css vendored
View File

@@ -80,3 +80,31 @@ footer iframe {
}
/*- - - - - - - - - - - - - - - - - - - - -*/
/* test for fonts */
/*- - - - - - - - - - - - - - - - - - - - -*/
.nav_left #fonts {
flex-direction: column;
position: relative;
}
.nav_left #fonts:hover #fonts_dropdown {
display: flex;
}
.nav_left #fonts #fonts_dropdown {
position: absolute;
top: 100%;
left: 0px;
flex-direction: column;
display: none;
}
.nav_left #fonts #fonts_dropdown button {
margin-left: 0px;
}

View File

@@ -5,7 +5,7 @@ h1, h2, h3, h4, h5, h6, em {
font-family: var(--font-titles), var(--font-fallback), sans-serif;
}
a, p, li {
font-family: var(--font-texts), var(--font-fallback), var(--font-fallback2), sans-serif;
font-family: var(--font-texts), var(--font-fallback), sans-serif;
}
code {
font-family: monospace;