mirror of
https://github.com/RetroShare/RSNewWebUI.git
synced 2026-09-12 19:50:04 +05:00
feat: remove google font and use local font included with webui
This commit is contained in:
parent
ca26e85364
commit
7bd9812a61
@ -37,6 +37,7 @@
|
||||
@mixin blockquote($type) {
|
||||
position: relative;
|
||||
line-height: 1.2;
|
||||
|
||||
@if ($type == 'info') {
|
||||
color: transparentize($dark-color, 0.2);
|
||||
border: 1px solid transparentize($primary-retro-color, 0.2);
|
||||
@ -45,11 +46,13 @@
|
||||
} @else if ($type == 'danger') {
|
||||
border: 1px solid transparentize($red-color, 0.2);
|
||||
}
|
||||
|
||||
&::before {
|
||||
font-family: 'Font Awesome 5 Free';
|
||||
position: absolute;
|
||||
top: 0.5rem;
|
||||
left: 0.5rem;
|
||||
|
||||
@if ($type == 'info') {
|
||||
content: '\f05a';
|
||||
color: $primary-color;
|
||||
@ -65,16 +68,28 @@
|
||||
|
||||
@mixin flex($direction: '', $justify: '', $align: '', $gap: 0) {
|
||||
display: flex;
|
||||
|
||||
@if ($direction != '') {
|
||||
flex-direction: $direction;
|
||||
}
|
||||
|
||||
@if ($justify != '') {
|
||||
justify-content: $justify;
|
||||
}
|
||||
|
||||
@if ($align != '') {
|
||||
align-items: $align;
|
||||
}
|
||||
@if ($gap != 0) {
|
||||
|
||||
@if ($gap !=0) {
|
||||
gap: $gap;
|
||||
}
|
||||
}
|
||||
|
||||
// Font
|
||||
@mixin fontdef-woff($FontPath, $FontName, $FontVersion: '1.0.0', $FontType: 'Regular') {
|
||||
src:
|
||||
url('#{$FontPath}/#{$FontName}-#{$FontType}.woff2') format('woff2'),
|
||||
url('#{$FontPath}/#{$FontName}-#{$FontType}.woff') format('woff'),
|
||||
url('#{$FontPath}/#{$FontName}-#{$FontType}.ttf') format('truetype');
|
||||
}
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// This file contains all application-wide Sass variables.
|
||||
// -----------------------------------------------------------------------------
|
||||
$FontPath: './webfonts' !default;
|
||||
$FontName: 'Roboto' !default;
|
||||
$FontVersion: '3.008' !default;
|
||||
|
||||
@ -43,6 +43,7 @@ body {
|
||||
text-rendering: optimizeSpeed;
|
||||
line-height: 1.5;
|
||||
font-family: 'Roboto', Arial, Helvetica, sans-serif !important;
|
||||
letter-spacing: -0.025ch;
|
||||
}
|
||||
|
||||
/* A elements that don't have a class get default styles */
|
||||
@ -70,6 +71,7 @@ select {
|
||||
html:focus-within {
|
||||
scroll-behavior: auto;
|
||||
}
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
|
||||
18
webui-src/app/scss/fontface/_Bold.scss
Normal file
18
webui-src/app/scss/fontface/_Bold.scss
Normal file
@ -0,0 +1,18 @@
|
||||
@use '../abstracts' as *;
|
||||
|
||||
/* BEGIN Bold */
|
||||
@font-face {
|
||||
font-family: Roboto;
|
||||
@include fontdef-woff($FontPath, $FontName, $FontVersion, 'Bold');
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: Roboto;
|
||||
@include fontdef-woff($FontPath, $FontName, $FontVersion, 'Bold');
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* END Bold */
|
||||
18
webui-src/app/scss/fontface/_BoldItalic.scss
Normal file
18
webui-src/app/scss/fontface/_BoldItalic.scss
Normal file
@ -0,0 +1,18 @@
|
||||
@use '../abstracts' as *;
|
||||
|
||||
/* BEGIN Bold Italic */
|
||||
@font-face {
|
||||
font-family: Roboto;
|
||||
@include fontdef-woff($FontPath, $FontName, $FontVersion, 'BoldItalic');
|
||||
font-weight: 700;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: Roboto;
|
||||
@include fontdef-woff($FontPath, $FontName, $FontVersion, 'BoldItalic');
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* END Bold Italic */
|
||||
18
webui-src/app/scss/fontface/_Italic.scss
Normal file
18
webui-src/app/scss/fontface/_Italic.scss
Normal file
@ -0,0 +1,18 @@
|
||||
@use '../abstracts' as *;
|
||||
|
||||
/* BEGIN Italic */
|
||||
@font-face {
|
||||
font-family: Roboto;
|
||||
@include fontdef-woff($FontPath, $FontName, $FontVersion, 'Italic');
|
||||
font-weight: 400;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: Roboto;
|
||||
@include fontdef-woff($FontPath, $FontName, $FontVersion, 'Italic');
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* END Italic */
|
||||
11
webui-src/app/scss/fontface/_Light.scss
Normal file
11
webui-src/app/scss/fontface/_Light.scss
Normal file
@ -0,0 +1,11 @@
|
||||
@use '../abstracts' as *;
|
||||
|
||||
/* BEGIN Light */
|
||||
@font-face {
|
||||
font-family: Roboto;
|
||||
@include fontdef-woff($FontPath, $FontName, $FontVersion, 'Light');
|
||||
font-weight: 300;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* END Light */
|
||||
11
webui-src/app/scss/fontface/_LightItalic.scss
Normal file
11
webui-src/app/scss/fontface/_LightItalic.scss
Normal file
@ -0,0 +1,11 @@
|
||||
@use '../abstracts' as *;
|
||||
|
||||
/* BEGIN Light Italic */
|
||||
@font-face {
|
||||
font-family: Roboto;
|
||||
@include fontdef-woff($FontPath, $FontName, $FontVersion, 'LightItalic');
|
||||
font-weight: 300;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* END Light Italic */
|
||||
11
webui-src/app/scss/fontface/_Medium.scss
Normal file
11
webui-src/app/scss/fontface/_Medium.scss
Normal file
@ -0,0 +1,11 @@
|
||||
@use '../abstracts' as *;
|
||||
|
||||
/* BEGIN Medium */
|
||||
@font-face {
|
||||
font-family: Roboto;
|
||||
@include fontdef-woff($FontPath, $FontName, $FontVersion, 'Medium');
|
||||
font-weight: 500;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* END Medium */
|
||||
11
webui-src/app/scss/fontface/_MediumItalic.scss
Normal file
11
webui-src/app/scss/fontface/_MediumItalic.scss
Normal file
@ -0,0 +1,11 @@
|
||||
@use '../abstracts' as *;
|
||||
|
||||
/* BEGIN Medium Italic */
|
||||
@font-face {
|
||||
font-family: Roboto;
|
||||
@include fontdef-woff($FontPath, $FontName, $FontVersion, 'MediumItalic');
|
||||
font-weight: 500;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* END Medium Italic */
|
||||
18
webui-src/app/scss/fontface/_Regular.scss
Normal file
18
webui-src/app/scss/fontface/_Regular.scss
Normal file
@ -0,0 +1,18 @@
|
||||
@use '../abstracts' as *;
|
||||
|
||||
/* BEGIN Regular */
|
||||
@font-face {
|
||||
font-family: Roboto;
|
||||
@include fontdef-woff($FontPath, $FontName, $FontVersion, 'Regular');
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: Roboto;
|
||||
@include fontdef-woff($FontPath, $FontName, $FontVersion, 'Regular');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* END Regular */
|
||||
8
webui-src/app/scss/fontface/_index.scss
Normal file
8
webui-src/app/scss/fontface/_index.scss
Normal file
@ -0,0 +1,8 @@
|
||||
@forward 'Bold';
|
||||
@forward 'BoldItalic';
|
||||
@forward 'Medium';
|
||||
@forward 'MediumItalic';
|
||||
@forward 'Regular';
|
||||
@forward 'Italic';
|
||||
@forward 'Light';
|
||||
@forward 'LightItalic';
|
||||
@ -1,20 +1,22 @@
|
||||
@charset "UTF-8";
|
||||
|
||||
// 1. Configuration and helpers
|
||||
@use "abstracts";
|
||||
@use 'abstracts';
|
||||
|
||||
// 2. Font faces
|
||||
@use 'fontface';
|
||||
|
||||
// 2. Vendors specific files
|
||||
@use "vendors";
|
||||
@use 'vendors';
|
||||
|
||||
// 3. Base stuff
|
||||
@use "base";
|
||||
@use 'base';
|
||||
|
||||
// 4. Components
|
||||
@use "components";
|
||||
@use 'components';
|
||||
|
||||
// 5. Layout-related sections
|
||||
@use "layouts";
|
||||
@use 'layouts';
|
||||
|
||||
// 6. Page-specific styles
|
||||
@use "pages";
|
||||
|
||||
@use 'pages';
|
||||
|
||||
BIN
webui-src/assets/webfonts/Roboto-Bold.ttf
Normal file
BIN
webui-src/assets/webfonts/Roboto-Bold.ttf
Normal file
Binary file not shown.
BIN
webui-src/assets/webfonts/Roboto-Bold.woff
Normal file
BIN
webui-src/assets/webfonts/Roboto-Bold.woff
Normal file
Binary file not shown.
BIN
webui-src/assets/webfonts/Roboto-Bold.woff2
Normal file
BIN
webui-src/assets/webfonts/Roboto-Bold.woff2
Normal file
Binary file not shown.
BIN
webui-src/assets/webfonts/Roboto-BoldItalic.ttf
Normal file
BIN
webui-src/assets/webfonts/Roboto-BoldItalic.ttf
Normal file
Binary file not shown.
BIN
webui-src/assets/webfonts/Roboto-BoldItalic.woff
Normal file
BIN
webui-src/assets/webfonts/Roboto-BoldItalic.woff
Normal file
Binary file not shown.
BIN
webui-src/assets/webfonts/Roboto-BoldItalic.woff2
Normal file
BIN
webui-src/assets/webfonts/Roboto-BoldItalic.woff2
Normal file
Binary file not shown.
BIN
webui-src/assets/webfonts/Roboto-Italic.ttf
Normal file
BIN
webui-src/assets/webfonts/Roboto-Italic.ttf
Normal file
Binary file not shown.
BIN
webui-src/assets/webfonts/Roboto-Italic.woff
Normal file
BIN
webui-src/assets/webfonts/Roboto-Italic.woff
Normal file
Binary file not shown.
BIN
webui-src/assets/webfonts/Roboto-Italic.woff2
Normal file
BIN
webui-src/assets/webfonts/Roboto-Italic.woff2
Normal file
Binary file not shown.
BIN
webui-src/assets/webfonts/Roboto-Light.ttf
Normal file
BIN
webui-src/assets/webfonts/Roboto-Light.ttf
Normal file
Binary file not shown.
BIN
webui-src/assets/webfonts/Roboto-Light.woff
Normal file
BIN
webui-src/assets/webfonts/Roboto-Light.woff
Normal file
Binary file not shown.
BIN
webui-src/assets/webfonts/Roboto-Light.woff2
Normal file
BIN
webui-src/assets/webfonts/Roboto-Light.woff2
Normal file
Binary file not shown.
BIN
webui-src/assets/webfonts/Roboto-LightItalic.ttf
Normal file
BIN
webui-src/assets/webfonts/Roboto-LightItalic.ttf
Normal file
Binary file not shown.
BIN
webui-src/assets/webfonts/Roboto-LightItalic.woff
Normal file
BIN
webui-src/assets/webfonts/Roboto-LightItalic.woff
Normal file
Binary file not shown.
BIN
webui-src/assets/webfonts/Roboto-LightItalic.woff2
Normal file
BIN
webui-src/assets/webfonts/Roboto-LightItalic.woff2
Normal file
Binary file not shown.
BIN
webui-src/assets/webfonts/Roboto-Medium.ttf
Normal file
BIN
webui-src/assets/webfonts/Roboto-Medium.ttf
Normal file
Binary file not shown.
BIN
webui-src/assets/webfonts/Roboto-Medium.woff
Normal file
BIN
webui-src/assets/webfonts/Roboto-Medium.woff
Normal file
Binary file not shown.
BIN
webui-src/assets/webfonts/Roboto-Medium.woff2
Normal file
BIN
webui-src/assets/webfonts/Roboto-Medium.woff2
Normal file
Binary file not shown.
BIN
webui-src/assets/webfonts/Roboto-MediumItalic.ttf
Normal file
BIN
webui-src/assets/webfonts/Roboto-MediumItalic.ttf
Normal file
Binary file not shown.
BIN
webui-src/assets/webfonts/Roboto-MediumItalic.woff
Normal file
BIN
webui-src/assets/webfonts/Roboto-MediumItalic.woff
Normal file
Binary file not shown.
BIN
webui-src/assets/webfonts/Roboto-MediumItalic.woff2
Normal file
BIN
webui-src/assets/webfonts/Roboto-MediumItalic.woff2
Normal file
Binary file not shown.
BIN
webui-src/assets/webfonts/Roboto-Regular.ttf
Normal file
BIN
webui-src/assets/webfonts/Roboto-Regular.ttf
Normal file
Binary file not shown.
BIN
webui-src/assets/webfonts/Roboto-Regular.woff
Normal file
BIN
webui-src/assets/webfonts/Roboto-Regular.woff
Normal file
Binary file not shown.
BIN
webui-src/assets/webfonts/Roboto-Regular.woff2
Normal file
BIN
webui-src/assets/webfonts/Roboto-Regular.woff2
Normal file
Binary file not shown.
@ -3,12 +3,6 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<link rel="stylesheet" href="styles.css" />
|
||||
<link href="images/retroshare.svg" rel="icon" data-n-head="true" type="image/svg" />
|
||||
<title>RetroShare</title>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user