@forsakringskassan/docs-generator 1.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +24 -0
- package/README.md +311 -0
- package/dist/compile-example.js +13406 -0
- package/dist/generator.d.ts +512 -0
- package/dist/generator.js +84168 -0
- package/dist/markdown.d.ts +243 -0
- package/dist/markdown.js +19369 -0
- package/dist/runtime.d.ts +1 -0
- package/dist/runtime.js +206572 -0
- package/dist/style/core.css +840 -0
- package/dist/style/index.css +927 -0
- package/dist/style/site.css +86 -0
- package/dist/tsdoc-metadata.json +11 -0
- package/package.json +68 -0
- package/templates/base.template.html +132 -0
- package/templates/component.template.html +28 -0
- package/templates/content-with-menu.template.html +15 -0
- package/templates/content-without-menu.template.html +10 -0
- package/templates/default.template.html +10 -0
- package/templates/example.template.html +70 -0
- package/templates/json.template.json +1 -0
- package/templates/macro/menu.html +39 -0
- package/templates/partials/footer.html +3 -0
- package/templates/partials/header.html +14 -0
- package/templates/partials/livereload.html +1 -0
- package/templates/partials/matomo.html +29 -0
- package/templates/partials/search-dialog.html +25 -0
- package/templates/partials/search-toolbar.html +9 -0
- package/templates/partials/selectable-version.html +28 -0
- package/templates/partials/spritesheet.html +44 -0
- package/templates/partials/theme-select.html +68 -0
- package/templates/partials/topnav.html +22 -0
- package/templates/partials/version-banner.html +14 -0
- package/templates/partials/version.html +3 -0
- package/templates/pattern.template.html +19 -0
- package/tsconfig-examples.json +9 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
*,
|
|
2
|
+
*::before,
|
|
3
|
+
*::after {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
html,
|
|
8
|
+
body {
|
|
9
|
+
margin: 0;
|
|
10
|
+
padding: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
p {
|
|
14
|
+
margin-top: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
article,
|
|
18
|
+
aside,
|
|
19
|
+
figcaption,
|
|
20
|
+
figure,
|
|
21
|
+
footer,
|
|
22
|
+
header,
|
|
23
|
+
hgroup,
|
|
24
|
+
main,
|
|
25
|
+
nav,
|
|
26
|
+
section {
|
|
27
|
+
display: block;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
select::-ms-expand {
|
|
31
|
+
display: none;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
select:focus::-ms-value {
|
|
35
|
+
background: none;
|
|
36
|
+
color: #000;
|
|
37
|
+
outline: 1px dotted #000;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
ul,
|
|
41
|
+
ol {
|
|
42
|
+
padding-left: 1rem;
|
|
43
|
+
margin-top: 0;
|
|
44
|
+
margin-bottom: 1rem;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
a {
|
|
48
|
+
text-decoration: none;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
button,
|
|
52
|
+
input,
|
|
53
|
+
optgroup,
|
|
54
|
+
select,
|
|
55
|
+
textarea {
|
|
56
|
+
color: inherit;
|
|
57
|
+
font: inherit;
|
|
58
|
+
margin: 0;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
html {
|
|
62
|
+
--docs-font-family: -apple-system, blinkmacsystemfont, "Segoe UI", roboto, "Helvetica Neue", ubuntu, arial, sans-serif;
|
|
63
|
+
--docs-menu-width-expanded: 230px;
|
|
64
|
+
scroll-behavior: smooth;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
html,
|
|
68
|
+
body {
|
|
69
|
+
font-family: var(--docs-font-family);
|
|
70
|
+
font-weight: normal;
|
|
71
|
+
font-size: var(--f-font-size-default-rem);
|
|
72
|
+
min-width: 400px;
|
|
73
|
+
}
|
|
74
|
+
@media (width >= 1024px) {
|
|
75
|
+
html,
|
|
76
|
+
body {
|
|
77
|
+
font-size: var(--f-font-size-default-large-up-rem);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
body {
|
|
82
|
+
color: var(--f-text-color-default);
|
|
83
|
+
font-size: var(--f-font-size-standard);
|
|
84
|
+
font-weight: var(--f-font-weight-normal);
|
|
85
|
+
line-height: var(--f-line-height-large);
|
|
86
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
+
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
+
{
|
|
4
|
+
"tsdocVersion": "0.12",
|
|
5
|
+
"toolPackages": [
|
|
6
|
+
{
|
|
7
|
+
"packageName": "@microsoft/api-extractor",
|
|
8
|
+
"packageVersion": "7.43.0"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@forsakringskassan/docs-generator",
|
|
3
|
+
"version": "1.24.0",
|
|
4
|
+
"description": "Documentation generator",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"documentation"
|
|
7
|
+
],
|
|
8
|
+
"homepage": "https://github.com/Forsakringskassan/docs-generator",
|
|
9
|
+
"bugs": "https://github.com/Forsakringskassan/docs-generator/issues",
|
|
10
|
+
"repository": {
|
|
11
|
+
"url": "https://github.com/Forsakringskassan/docs-generator.git"
|
|
12
|
+
},
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"author": "Försäkringskassan",
|
|
15
|
+
"sideEffects": [
|
|
16
|
+
"dist/runtime.js",
|
|
17
|
+
"src/runtime/**/*"
|
|
18
|
+
],
|
|
19
|
+
"exports": {
|
|
20
|
+
".": "./dist/generator.js",
|
|
21
|
+
"./markdown": "./dist/markdown.js",
|
|
22
|
+
"./runtime": "./dist/runtime.js",
|
|
23
|
+
"./docs.css": "./dist/style/index.css",
|
|
24
|
+
"./style.css": "./dist/style/index.css",
|
|
25
|
+
"./style/*.css": "./dist/style/*.css"
|
|
26
|
+
},
|
|
27
|
+
"main": "dist/generator.js",
|
|
28
|
+
"files": [
|
|
29
|
+
"dist",
|
|
30
|
+
"tsconfig-examples.json",
|
|
31
|
+
"templates"
|
|
32
|
+
],
|
|
33
|
+
"scripts": {
|
|
34
|
+
"prebuild": "npm run --workspaces --if-present build",
|
|
35
|
+
"build": "tsc && node build.js",
|
|
36
|
+
"postbuild": "node generate-docs.mjs",
|
|
37
|
+
"build:docs": "node generate-docs.mjs",
|
|
38
|
+
"eslint": "eslint --cache .",
|
|
39
|
+
"eslint:fix": "eslint --fix .",
|
|
40
|
+
"lint": "run-s prettier:check eslint stylelint",
|
|
41
|
+
"prepack": "release-prepack --bundle --retain-scripts",
|
|
42
|
+
"postpack": "release-postpack",
|
|
43
|
+
"prepare": "husky",
|
|
44
|
+
"prepublishOnly": "release-prepublish --bundle --retain-scripts",
|
|
45
|
+
"prettier:check": "prettier --check .",
|
|
46
|
+
"prettier:write": "prettier --write .",
|
|
47
|
+
"postpublish": "release-postpublish",
|
|
48
|
+
"start": "http-server public",
|
|
49
|
+
"stylelint": "stylelint \"src/**/*.scss\"",
|
|
50
|
+
"pretest": "run-s prettier:check eslint stylelint",
|
|
51
|
+
"test": "jest"
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"livereload-js": "4.0.2",
|
|
55
|
+
"nunjucks": "3.2.4",
|
|
56
|
+
"piscina": "2.2.0",
|
|
57
|
+
"vue-docgen-api": "4.78.0"
|
|
58
|
+
},
|
|
59
|
+
"peerDependencies": {
|
|
60
|
+
"esbuild": "0.x",
|
|
61
|
+
"he": "^1.2",
|
|
62
|
+
"sass": "^1.54",
|
|
63
|
+
"vue": "^2 || ^3"
|
|
64
|
+
},
|
|
65
|
+
"engines": {
|
|
66
|
+
"node": ">= 16.17"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="{{ site.lang }}" class="layout--{{ doc.template }}">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
|
7
|
+
<title>{{ doc.attributes.title }} - {{ site.name }}</title>
|
|
8
|
+
|
|
9
|
+
<!-- prettier-ignore -->
|
|
10
|
+
{%- for asset in injectHead | take("type", "css") %}
|
|
11
|
+
<link
|
|
12
|
+
rel="stylesheet"
|
|
13
|
+
href="{{ asset.publicPath | relative(doc) }}"
|
|
14
|
+
crossorigin
|
|
15
|
+
integrity="{{ asset.integrity }}"
|
|
16
|
+
{{
|
|
17
|
+
asset.attrs
|
|
18
|
+
}}
|
|
19
|
+
/>
|
|
20
|
+
{%- endfor %}
|
|
21
|
+
|
|
22
|
+
<!-- prettier-ignore -->
|
|
23
|
+
{%- for asset in injectHead | take("type", "js") %}
|
|
24
|
+
<script
|
|
25
|
+
src="{{ asset.publicPath | relative(doc) }}"
|
|
26
|
+
crossorigin
|
|
27
|
+
integrity="{{ asset.integrity }}"
|
|
28
|
+
{{
|
|
29
|
+
asset.attrs
|
|
30
|
+
}}
|
|
31
|
+
></script>
|
|
32
|
+
{%- endfor %}
|
|
33
|
+
|
|
34
|
+
<!-- prettier-ignore -->
|
|
35
|
+
{% container "head" %}
|
|
36
|
+
|
|
37
|
+
<link rel="preload" href="{{ searchDataUrl | relative(doc) }}" as="fetch" crossorigin id="search-data" />
|
|
38
|
+
</head>
|
|
39
|
+
<body>
|
|
40
|
+
<!-- prettier-ignore -->
|
|
41
|
+
{% container "body:begin" %}
|
|
42
|
+
|
|
43
|
+
<div class="layout-wrapper">
|
|
44
|
+
<header>
|
|
45
|
+
<!-- prettier-ignore -->
|
|
46
|
+
{%- include "partials/header.html" -%}
|
|
47
|
+
</header>
|
|
48
|
+
|
|
49
|
+
<div id="primary">
|
|
50
|
+
<!-- prettier-ignore -->
|
|
51
|
+
{%- block sidenav %}
|
|
52
|
+
{%- endblock %}
|
|
53
|
+
|
|
54
|
+
<!-- prettier-ignore -->
|
|
55
|
+
{%- for asset in vendors %}
|
|
56
|
+
<script src="{{ asset.publicPath | relative(doc) }}"></script>
|
|
57
|
+
{%- endfor %}
|
|
58
|
+
|
|
59
|
+
<!-- prettier-ignore -->
|
|
60
|
+
{%- for asset in injectBody | take("type", "css") %}
|
|
61
|
+
<link
|
|
62
|
+
rel="stylesheet"
|
|
63
|
+
href="{{ asset.publicPath | relative(doc) }}"
|
|
64
|
+
crossorigin
|
|
65
|
+
integrity="{{ asset.integrity }}"
|
|
66
|
+
{{
|
|
67
|
+
asset.attrs
|
|
68
|
+
}}
|
|
69
|
+
/>
|
|
70
|
+
{%- endfor -%}
|
|
71
|
+
|
|
72
|
+
<main>
|
|
73
|
+
<h1 id="title">{{ doc.attributes.title }}</h1>
|
|
74
|
+
{% set arr = ['component', 'pattern'] %} {% if doc.attributes.layout in arr %}
|
|
75
|
+
<div id="aside">
|
|
76
|
+
<!-- prettier-ignore -->
|
|
77
|
+
{%- block aside %}
|
|
78
|
+
{%- endblock %}
|
|
79
|
+
|
|
80
|
+
<div id="outline">
|
|
81
|
+
<h2 class="outline__heading">Innehåll</h2>
|
|
82
|
+
<ul>
|
|
83
|
+
{% for heading in doc.outline %}
|
|
84
|
+
<li><a href="#{{ heading.anchor }}">{{ heading.title | escape }}</a></li>
|
|
85
|
+
{% endfor %}
|
|
86
|
+
</ul>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
{% endif %}
|
|
90
|
+
|
|
91
|
+
<div id="content">
|
|
92
|
+
<!-- prettier-ignore -->
|
|
93
|
+
{%- block content %}
|
|
94
|
+
{%- endblock %}
|
|
95
|
+
</div>
|
|
96
|
+
</main>
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
<footer>
|
|
100
|
+
<!-- prettier-ignore -->
|
|
101
|
+
{%- include "partials/footer.html" -%}
|
|
102
|
+
</footer>
|
|
103
|
+
</div>
|
|
104
|
+
|
|
105
|
+
<!-- prettier-ignore -->
|
|
106
|
+
{%- include "partials/spritesheet.html" -%}
|
|
107
|
+
|
|
108
|
+
<!-- prettier-ignore -->
|
|
109
|
+
{% container "body:end" %}
|
|
110
|
+
|
|
111
|
+
<!-- prettier-ignore -->
|
|
112
|
+
{%- for asset in injectBody | take("type", "js") %}
|
|
113
|
+
<script
|
|
114
|
+
src="{{ asset.publicPath | relative(doc) }}"
|
|
115
|
+
crossorigin
|
|
116
|
+
integrity="{{ asset.integrity }}"
|
|
117
|
+
{{
|
|
118
|
+
asset.attrs
|
|
119
|
+
}}
|
|
120
|
+
></script>
|
|
121
|
+
{%- endfor %}
|
|
122
|
+
</body>
|
|
123
|
+
|
|
124
|
+
<!--
|
|
125
|
+
|
|
126
|
+
Source file: {{ doc.fileInfo.fullPath }}
|
|
127
|
+
Document ID: {{ doc.id }}
|
|
128
|
+
Document name: {{ doc.name }}
|
|
129
|
+
Document alias: {% for alias in doc.alias %}{{ alias }}{% if not loop.last %}, {% endif %}{% endfor %}
|
|
130
|
+
|
|
131
|
+
-->
|
|
132
|
+
</html>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{% extends "content-with-menu.template.html" %}
|
|
2
|
+
|
|
3
|
+
<!-- prettier-ignore -->
|
|
4
|
+
{% block aside %}
|
|
5
|
+
<dl>
|
|
6
|
+
<!-- prettier-ignore -->
|
|
7
|
+
{% if doc.attributes.component %}
|
|
8
|
+
<dt>Komponent</dt>
|
|
9
|
+
<dd>
|
|
10
|
+
{% for component in doc.attributes.component %}
|
|
11
|
+
<code>{{ component }}</code>{% if not loop.last %}, {% endif %} {% endfor %}
|
|
12
|
+
</dd>
|
|
13
|
+
{% endif %}
|
|
14
|
+
|
|
15
|
+
<!-- prettier-ignore -->
|
|
16
|
+
{% if doc.attributes.status %}
|
|
17
|
+
<dt>Status</dt>
|
|
18
|
+
<dd>
|
|
19
|
+
<div class="badge badge--{{ doc.attributes.badge }}">{{ doc.attributes.status }}</div>
|
|
20
|
+
</dd>
|
|
21
|
+
{% endif %}
|
|
22
|
+
</dl>
|
|
23
|
+
{% endblock %}
|
|
24
|
+
|
|
25
|
+
<!-- prettier-ignore -->
|
|
26
|
+
{% block content %}
|
|
27
|
+
{{ doc.body | marked }}
|
|
28
|
+
{% endblock %}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!-- prettier-ignore -->
|
|
2
|
+
{% import "macro/menu.html" as menu %}
|
|
3
|
+
|
|
4
|
+
<!-- prettier-ignore -->
|
|
5
|
+
{% extends "base.template.html" %}
|
|
6
|
+
|
|
7
|
+
<!-- prettier-ignore -->
|
|
8
|
+
{% block sidenav %}
|
|
9
|
+
<div id="sidenav">{%- if sidenav -%} {{ menu.sidenav(doc, sidenav, "Sekundär") }} {%- endif -%}</div>
|
|
10
|
+
{% endblock %}
|
|
11
|
+
|
|
12
|
+
<!-- prettier-ignore -->
|
|
13
|
+
{% block content %}
|
|
14
|
+
{{ doc.body | marked }}
|
|
15
|
+
{% endblock %}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="{{ site.lang }}" class="layout--example">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
|
7
|
+
<title>{{ doc.attributes.title }} - {{ site.name }}</title>
|
|
8
|
+
|
|
9
|
+
<!-- prettier-ignore -->
|
|
10
|
+
{%- for asset in injectHead | take("type", "css") %}
|
|
11
|
+
<link
|
|
12
|
+
rel="stylesheet"
|
|
13
|
+
href="{{ asset.publicPath | relative(doc) }}"
|
|
14
|
+
crossorigin
|
|
15
|
+
integrity="{{ asset.integrity }}"
|
|
16
|
+
{{
|
|
17
|
+
asset.attrs
|
|
18
|
+
}}
|
|
19
|
+
/>
|
|
20
|
+
{%- endfor %}
|
|
21
|
+
|
|
22
|
+
<!-- prettier-ignore -->
|
|
23
|
+
{%- for asset in injectHead | take("type", "js") %}
|
|
24
|
+
<script
|
|
25
|
+
src="{{ asset.publicPath | relative(doc) }}"
|
|
26
|
+
crossorigin
|
|
27
|
+
integrity="{{ asset.integrity }}"
|
|
28
|
+
{{
|
|
29
|
+
asset.attrs
|
|
30
|
+
}}
|
|
31
|
+
></script>
|
|
32
|
+
{%- endfor %}
|
|
33
|
+
|
|
34
|
+
<!-- prettier-ignore -->
|
|
35
|
+
{% container "head" %}
|
|
36
|
+
</head>
|
|
37
|
+
<body>
|
|
38
|
+
<!-- prettier-ignore -->
|
|
39
|
+
{%- for asset in vendors %}
|
|
40
|
+
<script src="{{ asset.publicPath | relative(doc) }}"></script>
|
|
41
|
+
{%- endfor %}
|
|
42
|
+
|
|
43
|
+
<!-- prettier-ignore -->
|
|
44
|
+
{%- for asset in injectBody | take("type", "css") %}
|
|
45
|
+
<link
|
|
46
|
+
rel="stylesheet"
|
|
47
|
+
href="{{ asset.publicPath | relative(doc) }}"
|
|
48
|
+
crossorigin
|
|
49
|
+
integrity="{{ asset.integrity }}"
|
|
50
|
+
{{
|
|
51
|
+
asset.attrs
|
|
52
|
+
}}
|
|
53
|
+
/>
|
|
54
|
+
{%- endfor -%}
|
|
55
|
+
|
|
56
|
+
<!-- prettier-ignore -->
|
|
57
|
+
{%- for asset in injectBody | take("type", "js") %}
|
|
58
|
+
<script
|
|
59
|
+
src="{{ asset.publicPath | relative(doc) }}"
|
|
60
|
+
crossorigin
|
|
61
|
+
integrity="{{ asset.integrity }}"
|
|
62
|
+
{{
|
|
63
|
+
asset.attrs
|
|
64
|
+
}}
|
|
65
|
+
></script>
|
|
66
|
+
{%- endfor %}
|
|
67
|
+
|
|
68
|
+
<main>{{ content }}</main>
|
|
69
|
+
</body>
|
|
70
|
+
</html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{{ doc.body }}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{% macro sidenav_item(doc, node) %}
|
|
2
|
+
<ol>
|
|
3
|
+
<!-- prettier-ignore -->
|
|
4
|
+
{%- for item in node.children -%}
|
|
5
|
+
|
|
6
|
+
<!-- prettier-ignore -->
|
|
7
|
+
{# section node #}
|
|
8
|
+
{%- if item.children -%}
|
|
9
|
+
<li class="expandable {% if item.active %}active{% endif %}">
|
|
10
|
+
<details {% if item.active %}open{% endif %}>
|
|
11
|
+
<summary>{{ item.title }}</summary>
|
|
12
|
+
<!-- prettier-ignore -->
|
|
13
|
+
{% if item.children.length > 0 %}
|
|
14
|
+
{{ sidenav_item(doc, item) }}
|
|
15
|
+
{% endif %}
|
|
16
|
+
</details>
|
|
17
|
+
</li>
|
|
18
|
+
{%- endif -%}
|
|
19
|
+
|
|
20
|
+
<!-- prettier-ignore -->
|
|
21
|
+
{# leaf node #}
|
|
22
|
+
{%- if not item.children -%}
|
|
23
|
+
<li class="link {% if item.active %}active{% endif %}">
|
|
24
|
+
<a href="{{ item.path | relative(doc) }}" {% if item.external %} target="_blank" rel="external" {% endif %}>
|
|
25
|
+
{{ item.title }}
|
|
26
|
+
</a>
|
|
27
|
+
</li>
|
|
28
|
+
{%- endif -%}
|
|
29
|
+
|
|
30
|
+
<!-- prettier-ignore -->
|
|
31
|
+
{%- endfor -%}
|
|
32
|
+
</ol>
|
|
33
|
+
{% endmacro %}
|
|
34
|
+
|
|
35
|
+
<!-- prettier-ignore -->
|
|
36
|
+
{% macro sidenav(doc, node, label) %}
|
|
37
|
+
<input type="checkbox" class="sidenav__toggle" aria-label="Open/close navigation" />
|
|
38
|
+
<nav class="navigation" aria-label="{{ label }}">{{ sidenav_item(doc, node) }}</nav>
|
|
39
|
+
{% endmacro %}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<div class="page-header__root">
|
|
2
|
+
<div class="page-header">
|
|
3
|
+
<a class="page-header__logo" href="{{ './index.html' | relative(doc) }}">
|
|
4
|
+
<span aria-label="Försäkringskassan" role="img" class="page-header__logo--small"> </span>
|
|
5
|
+
</a>
|
|
6
|
+
<a class="page-header__app-name" href="{{ './index.html' | relative(doc) }}"> {{ site.name }} </a>
|
|
7
|
+
<div class="page-header__right">
|
|
8
|
+
{%- include "partials/topnav.html" %}
|
|
9
|
+
<div class="page-header__right-slot">
|
|
10
|
+
<div class="toolbar">{% container "toolbar" %}</div>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<script src="//localhost:35729/livereload.js"></script>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
(() => {
|
|
3
|
+
const allowedHostnames = {{ hostname | json }};
|
|
4
|
+
if (allowedHostnames.length === 0 || allowedHostnames.includes(location.hostname)) {
|
|
5
|
+
/* Matomo */
|
|
6
|
+
var _paq = (window._paq = window._paq || []);
|
|
7
|
+
_paq.push(["setAPIUrl", "{{ apiUrl }}"]);
|
|
8
|
+
_paq.push(["trackPageView"]);
|
|
9
|
+
_paq.push(["enableLinkTracking"]);
|
|
10
|
+
(function () {
|
|
11
|
+
var u = "{{ trackerUrl }}";
|
|
12
|
+
_paq.push(["setTrackerUrl", u + "matomo.php"]);
|
|
13
|
+
_paq.push(["setSiteId", "{{ siteId }}"]);
|
|
14
|
+
var d = document,
|
|
15
|
+
g = d.createElement("script"),
|
|
16
|
+
s = d.getElementsByTagName("script")[0];
|
|
17
|
+
g.async = true;
|
|
18
|
+
g.src = u + "matomo.js";
|
|
19
|
+
s.parentNode.insertBefore(g, s);
|
|
20
|
+
})();
|
|
21
|
+
/* End Matomo Code */
|
|
22
|
+
} else {
|
|
23
|
+
console.error(
|
|
24
|
+
"Matomo analytics disabled as we are not running on one of the configured hostnames",
|
|
25
|
+
allowedHostnames,
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
})();
|
|
29
|
+
</script>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<dialog id="search-dialog">
|
|
2
|
+
<!-- [html-validate-disable-next wcag/h32 -- handled via script] -->
|
|
3
|
+
<form id="search-form">
|
|
4
|
+
<div class="text-field">
|
|
5
|
+
<label for="search-field" class="label"> Sök </label>
|
|
6
|
+
<div class="text-field__input-wrapper">
|
|
7
|
+
<div class="text-field__icon-wrapper">
|
|
8
|
+
<input
|
|
9
|
+
autofocus
|
|
10
|
+
autocomplete="off"
|
|
11
|
+
autocapitalize="off"
|
|
12
|
+
autocorrect="off"
|
|
13
|
+
id="search-field"
|
|
14
|
+
type="text"
|
|
15
|
+
class="text-field__input"
|
|
16
|
+
maxlength="50"
|
|
17
|
+
placeholder="Skriv för att börja söka"
|
|
18
|
+
/>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
<div id="search-results"></div>
|
|
23
|
+
<p><kbd>Esc</kbd> för att stänga <kbd>Pil upp/ner</kbd> för att navigera <kbd>Enter</kbd> för att välja</p>
|
|
24
|
+
</form>
|
|
25
|
+
</dialog>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<div class="toolbar__item">
|
|
2
|
+
<form id="search" role="search" data-root-url="{{ rootUrl(doc) }}">
|
|
3
|
+
<button class="text-field__input" type="submit">
|
|
4
|
+
<svg focusable="false" class="icon button__icon">
|
|
5
|
+
<use xlink:href="#docs-icon-search"></use></svg
|
|
6
|
+
>Sök <kbd>ctrl-k</kbd>
|
|
7
|
+
</button>
|
|
8
|
+
</form>
|
|
9
|
+
</div>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<div class="toolbar__item">
|
|
2
|
+
<form id="version">
|
|
3
|
+
<button type="submit" class="anchor">
|
|
4
|
+
<span id="version-info" class="version"> Byt version </span>
|
|
5
|
+
</button>
|
|
6
|
+
</form>
|
|
7
|
+
|
|
8
|
+
<dialog id="version-dialog">
|
|
9
|
+
<div id="version-dialog-head">
|
|
10
|
+
<h1>Välj version</h1>
|
|
11
|
+
<button type="button" class="button button--discrete button--discrete--black">
|
|
12
|
+
<span>Stäng</span>
|
|
13
|
+
<svg class="button__icon icon" focusable="false" aria-hidden>
|
|
14
|
+
<use xlink:href="#docs-icon-close"></use>
|
|
15
|
+
</svg>
|
|
16
|
+
</button>
|
|
17
|
+
</div>
|
|
18
|
+
<div id="version-list">
|
|
19
|
+
<p>Var god vänta, laddar versionsdata...</p>
|
|
20
|
+
</div>
|
|
21
|
+
</dialog>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<template id="version-list-item">
|
|
25
|
+
<li class="list__item">
|
|
26
|
+
<a class="list__item__itempane">template</a>
|
|
27
|
+
</li>
|
|
28
|
+
</template>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<div aria-hidden="true" style="display: none">
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" focusable="false">
|
|
3
|
+
<symbol id="docs-icon-search" viewBox="0 0 512 512">
|
|
4
|
+
<!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->
|
|
5
|
+
<path
|
|
6
|
+
fill="currentColor"
|
|
7
|
+
d="M505 442.7 405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34M208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128"
|
|
8
|
+
></path>
|
|
9
|
+
</symbol>
|
|
10
|
+
<symbol id="docs-icon-close" viewBox="0 0 512 512">
|
|
11
|
+
<path
|
|
12
|
+
fill="currentColor"
|
|
13
|
+
d="m322.72 256 100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L256 189.28 155.93 89.21c-12.28-12.28-32.19-12.28-44.48 0l-22.24 22.24c-12.28 12.28-12.28 32.19 0 44.48L189.28 256 89.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L256 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48z"
|
|
14
|
+
></path>
|
|
15
|
+
</symbol>
|
|
16
|
+
<symbol id="docs-icon-arrow-down" viewBox="0 0 512 512">
|
|
17
|
+
<path
|
|
18
|
+
fill="currentColor"
|
|
19
|
+
d="M239.373 380.982 45.03 186.638c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04l154.746 154.021L411.089 129.99c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L273.315 380.982c-9.373 9.372-24.569 9.372-33.942 0"
|
|
20
|
+
></path>
|
|
21
|
+
</symbol>
|
|
22
|
+
<symbol id="docs-icon-circle" xml:space="preserve" viewBox="0 0 512 512">
|
|
23
|
+
<path
|
|
24
|
+
d="M489.5 256c0 129-104.6 233.5-233.5 233.5C127 489.5 22.5 385 22.5 256S127 22.5 256 22.5 489.5 127 489.5 256"
|
|
25
|
+
style="fill: currentColor"
|
|
26
|
+
></path>
|
|
27
|
+
<path
|
|
28
|
+
d="M512 256c0 141.4-114.6 256-256 256S0 397.4 0 256 114.6 0 256 0s256 114.6 256 256M256 469.3c117.8 0 213.3-95.5 213.3-213.3S373.8 42.7 256 42.7 42.7 138.2 42.7 256 138.2 469.3 256 469.3"
|
|
29
|
+
style="fill-rule: evenodd; clip-rule: evenodd"
|
|
30
|
+
></path>
|
|
31
|
+
</symbol>
|
|
32
|
+
<symbol id="docs-icon-i" xml:space="preserve" x="0" y="0" version="1.1" viewBox="0 0 512 512">
|
|
33
|
+
<style>
|
|
34
|
+
.i {
|
|
35
|
+
fill: currentColor;
|
|
36
|
+
}
|
|
37
|
+
</style>
|
|
38
|
+
<path
|
|
39
|
+
d="M228.25 243.12c0-15.33 12.42-27.75 27.75-27.75s27.75 12.43 27.75 27.75v117.19c0 15.33-12.43 27.75-27.75 27.75-15.33 0-27.75-12.43-27.75-27.75zM285.09 153.03c0 16.07-13.02 29.09-29.09 29.09s-29.09-13.02-29.09-29.09 13.02-29.09 29.09-29.09 29.09 13.02 29.09 29.09"
|
|
40
|
+
class="i"
|
|
41
|
+
></path>
|
|
42
|
+
</symbol>
|
|
43
|
+
</svg>
|
|
44
|
+
</div>
|