Integrate font config into scss + use Fantasque Sans Mono as mono font

This commit is contained in:
nemunaire 2020-05-06 17:02:55 +02:00
parent d7ae098021
commit 1d884a129f
5 changed files with 71 additions and 6 deletions

View File

@ -12,6 +12,9 @@ $enable-shadows: true;
$enable-gradients: true;
$enable-responsive-font-sizes: true;
$font-family-sans-serif: Montserrat,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
$font-family-monospace: 'Fantasque Sans Mono', SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
@import '~bootstrap';
@import '~bootstrap-vue';
@ -25,3 +28,63 @@ nav.navbar {
footer {
border-top: 3px solid #9332bb;
}
@font-face {
font-family: 'Montserrat';
font-style: normal;
font-weight: 400;
src: local('Montserrat Regular'), local('Montserrat-Regular'), url(/fonts/Montserrat.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Fortheenas01';
font-style: normal;
font-weight: 400;
src: local('Fortheenas 01'), local('Fortheenas01'), local('Fortheenas_01'), url(/fonts/Fortheenas_01.woff2) format('woff2');
unicode-range: U+0000-00FF;
}
@font-face {
font-family: 'Fortheenas01 Bold';
font-style: normal;
font-weight: bold;
src: local('Fortheenas 01 Bold'), local('Fortheenas01 Bold'), local('Fortheenas_01 Bold'), url('/fonts/Fortheenas_01 Bold.woff2') format('woff2');
unicode-range: U+0000-00FF;
}
@font-face {
font-family: 'Fantasque Sans Mono';
src: local('Fantasque Sans Mono Bold'),
url('/fonts/FantasqueSansMono-Bold.woff2') format('woff2'),
url('/fonts/FantasqueSansMono-Bold.woff') format('woff'), /* Firefox >= 3.6, any other modern browser */
url('/fonts/FantasqueSansMono-Bold.svg#FantasqueSansMono-Bold') format('svg'); /* Chrome < 4, Legacy iOS */
font-weight: 700;
font-style: normal;
}
@font-face {
font-family: 'Fantasque Sans Mono';
src: local('Fantasque Sans Mono BoldItalic'),
url('/fonts/FantasqueSansMono-BoldItalic.woff2') format('woff2'),
url('/fonts/FantasqueSansMono-BoldItalic.woff') format('woff'), /* Firefox >= 3.6, any other modern browser */
url('/fonts/FantasqueSansMono-BoldItalic.svg#FantasqueSansMono-BoldItalic') format('svg'); /* Chrome < 4, Legacy iOS */
font-weight: 700;
font-style: italic;
}
@font-face {
font-family: 'Fantasque Sans Mono';
src: local('Fantasque Sans Mono Italic'),
url('/fonts/FantasqueSansMono-Italic.woff2') format('woff2'),
url('/fonts/FantasqueSansMono-Italic.woff') format('woff'), /* Firefox >= 3.6, any other modern browser */
url('/fonts/FantasqueSansMono-Italic.svg#FantasqueSansMono-Italic') format('svg'); /* Chrome < 4, Legacy iOS */
font-weight: 400;
font-style: italic;
}
@font-face {
font-family: 'Fantasque Sans Mono';
src: local('Fantasque Sans Mono'),
local('Fantasque Sans Mono Regular'),
url('/fonts/FantasqueSansMono-Regular.woff2') format('woff2'),
url('/fonts/FantasqueSansMono-Regular.woff') format('woff'), /* Firefox >= 3.6, any other modern browser */
url('/fonts/FantasqueSansMono-Regular.svg#FantasqueSansMono-Regular') format('svg'); /* Chrome < 4, Legacy iOS */
font-weight: 400;
font-style: normal;
}

View File

@ -41,8 +41,10 @@
<b-spinner variant="primary" label="Spinning" class="mr-3"></b-spinner> Retrieving your domains...
</b-list-group-item>
<b-list-group-item :to="'/domains/' + domain.domain" v-for="(domain, index) in domains" v-bind:key="index" class="d-flex justify-content-between align-items-center">
<div>
<img :src="'/api/source_specs/' + sources[domain.id_source]._srctype + '.png'" :alt="sources[domain.id_source]._srctype" :title="sources[domain.id_source]._srctype" style="max-width: 100%; max-height: 2.5em; margin: -.6em .4em -.6em -.6em" v-if="sources[domain.id_source]">
<div class="text-monospace">
<div class="d-inline-block text-center" style="width: 50px;">
<img :src="'/api/source_specs/' + sources[domain.id_source]._srctype + '.png'" :alt="sources[domain.id_source]._srctype" :title="sources[domain.id_source]._srctype" style="max-width: 100%; max-height: 2.5em; margin: -.6em .4em -.6em -.6em" v-if="sources[domain.id_source]">
</div>
{{ domain.domain }}
</div>
<b-badge variant="success">OK</b-badge>
@ -57,7 +59,7 @@
<b-icon icon="plus" style="width: 2.3em; height: 2.3rem; margin-left: -.5em"></b-icon>
</b-input-group-prepend>
</template>
<b-form-input placeholder="my.new.domain" ref="newdomain" v-model="newDomain" @update="validateNewDomain" :state="newDomainState" style="border:none;box-shadow:none;z-index:0"></b-form-input>
<b-form-input placeholder="my.new.domain" ref="newdomain" v-model="newDomain" @update="validateNewDomain" :state="newDomainState" class="text-monospace" style="border:none;box-shadow:none;z-index:0"></b-form-input>
<template v-slot:append>
<b-input-group-append v-show="newDomain.length">
<b-button type="submit" variant="outline-primary">Add new domain</b-button>

View File

@ -36,7 +36,7 @@
<h1 class="text-center mb-4">
<button type="button" @click="$router.go(-1)" class="btn font-weight-bolder"><b-icon icon="chevron-left"></b-icon></button>
Select the source where lives your domain <code>{{ $route.params.domain }}</code>
Select the source where lives your domain <span class="text-monospace">{{ $route.params.domain }}</span>
</h1>
<hr style="margin-bottom:0">

View File

@ -38,7 +38,7 @@
</div>
<div v-if="!isLoading">
<h2 class="mt-3 mb-3">
{{ domain.domain }}
<span class="text-monospace">{{ domain.domain }}</span>
<small class="text-muted">
Source parameters
</small>

View File

@ -39,7 +39,7 @@
<b-button :pressed.sync="showDNSSEC">DNSSEC</b-button>
</b-button-group>
<router-link :to="'/domains/' + domain.domain" class="btn"><b-icon icon="chevron-left"></b-icon></router-link>
{{ domain.domain }}
<span class="text-monospace">{{ domain.domain }}</span>
<small class="text-muted">Resource Records <span v-if="rrs && rrs.length">({{ rrsFiltered.length }}/{{ rrs.length }})</span></small>
</h2>
<b-alert variant="danger" :show="error.length != 0"><strong>Error:</strong> {{ error }}</b-alert>