feat(documentation): svelte app as document generator (#566)

* check in full site application

* rm unused assets components

* change base css

* i18n

* new doc workflow

* fix crosslink to doc in github

* nav, console link, assets, console brand

* edit configjs server

* rm go struct references

* cleanup input output bindings

* working dir

* export path

* always trigger

* rel paths

* cname

* rev workdir

* fix fallbacklanguage, home on large screens

* remove mit from site
This commit is contained in:
Max Peintner
2020-08-11 09:53:09 +02:00
committed by GitHub
parent 5efcd7b2f9
commit 2c517d6278
70 changed files with 6483 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
export function getCookie(name, cookies) {
if (cookies == null) {
if (typeof window === 'undefined') {
return undefined;
}
cookies = document.cookie;
}
const kv = cookies.split(';').find((part) => part.trim().startsWith(name));
if (!kv) return undefined;
const cookieValue = kv.split('=')[1];
if (!cookieValue) return undefined;
return decodeURIComponent(cookieValue.trim());
}
export function setCookie(name, value, options = {}) {
if (options.expires instanceof Date) {
options.expires = options.expires.toUTCString();
}
let updatedCookie = {
[encodeURIComponent(name)]: encodeURIComponent(value),
sameSite: 'strict',
...options,
};
document.cookie = Object.entries(updatedCookie)
.map((kv) => kv.join('='))
.join(';');
}
+8
View File
@@ -0,0 +1,8 @@
import { writable } from 'svelte/store';
export const docLanguages = writable(['de', 'en']);
export function storeValue(lngs) {
console.log('lngs: ' + lngs);
docLanguages.set(lngs);
}