docs(site): i18n handler, prettier code blocks and highlighting (#951)

* fix: sirv, commonjs plugin, add rollup sig

* replace deprecated rollup plugins

* remove dollarsign

* fix i18n setting, code snippet styling, lng switch

* fix segment, rm unused styles
This commit is contained in:
Max Peintner
2020-11-11 16:12:09 +01:00
committed by GitHub
parent 8dbf0cfee0
commit b5a7263124
8 changed files with 39 additions and 22 deletions

View File

@@ -1,5 +1,4 @@
<script context="module">
import { setCookie } from '../modules/cookie.js';
import { goto } from '@sapper/app';
import { docLanguages } from '../modules/language-store.js'
import {LANGUAGES} from '../../config.js';
@@ -40,7 +39,6 @@
height: var(--height);
margin: .5rem 1rem;
font-size: 12px;
color: white;
display: flex;
align-items: center;
cursor: pointer;
@@ -49,12 +47,12 @@
}
button.current {
color: var(--prime);
color: var(--grey-text);
}
</style>
<div class="language-switcher">
{#each LANGUAGES as lang}
<button on:click="{() => reload(lang)}" class="{lang == group ? 'current': ''}">{lang == 'de'? 'Deutsch' : 'English'}</button>
<button on:click="{() => reload(lang)}" disabled="{lang == group}" class="{lang == group ? 'current': ''}">{lang == 'de'? 'Deutsch' : 'English'}</button>
{/each}
</div>