infotorg-api-jekyll-theme 0.1.0 → 0.1.5

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.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.md +21 -0
  3. data/README.md +447 -3
  4. data/_config.yml +25 -2
  5. data/_includes/footer.html +6 -2
  6. data/_includes/head-app-css.html +2 -2
  7. data/_includes/head-favicon.html +85 -0
  8. data/_includes/navigation.html +65 -56
  9. data/_layouts/default.html +4 -3
  10. data/_layouts/services.html +82 -0
  11. data/_layouts/swagger-ui.html +5 -3
  12. data/_sass/_bootstrap_variables.scss +16 -63
  13. data/_sass/_typography.scss +22 -0
  14. data/_sass/_variables.scss +1 -0
  15. data/assets/css/main.scss +27 -9
  16. data/assets/images/favicon/android-chrome-192x192.png +0 -0
  17. data/assets/images/favicon/apple-touch-icon-114x114.png +0 -0
  18. data/assets/images/favicon/apple-touch-icon-120x120.png +0 -0
  19. data/assets/images/favicon/apple-touch-icon-144x144.png +0 -0
  20. data/assets/images/favicon/apple-touch-icon-152x152.png +0 -0
  21. data/assets/images/favicon/apple-touch-icon-180x180.png +0 -0
  22. data/assets/images/favicon/apple-touch-icon-57x57.png +0 -0
  23. data/assets/images/favicon/apple-touch-icon-60x60.png +0 -0
  24. data/assets/images/favicon/apple-touch-icon-72x72.png +0 -0
  25. data/assets/images/favicon/apple-touch-icon-76x76.png +0 -0
  26. data/assets/images/favicon/favicon-16x16.png +0 -0
  27. data/assets/images/favicon/favicon-194x194.png +0 -0
  28. data/assets/images/favicon/favicon-32x32.png +0 -0
  29. data/assets/images/favicon/favicon-96x96.png +0 -0
  30. data/assets/images/favicon/favicon.ico +0 -0
  31. data/assets/images/favicon/safari-pinned-tab.svg +1 -0
  32. data/assets/images/onboarding-process.svg +23 -0
  33. data/assets/openapi/.gitkeep +0 -0
  34. data/assets/openapi/eiendom.json +136 -136
  35. metadata +40 -6
  36. data/_includes/services.html +0 -75
@@ -1,23 +1,46 @@
1
- # --- Jekyll configuration ---
1
+ # If you use the them as a remote one, uncomment `remote_theme` configuration.
2
+ # Set a branch name or version at the `remote_theme` value e.g. `@main` or `@v1.0.0`.
3
+ # Be careful if you omit the branch then automatically will be used `master`.
4
+ #remote_theme: "infotorg/infotorg-api-jekyll-theme@main"
5
+
6
+ # --- Site default configuration ---
2
7
  defaults:
3
8
  - scope:
4
9
  path: ""
5
10
  values:
6
11
  layout: "default"
12
+ show_navigation: true
7
13
  sass:
8
14
  style: compressed # possible values: nested expanded compact compressed
9
15
  plugins:
10
16
  # See the documentation for Jekyll SEO Tag: https://github.com/jekyll/jekyll-seo-tag
11
17
  - jekyll-seo-tag
12
18
 
19
+
13
20
  # --- Site data configuration ---
14
- lang: en-US
21
+
22
+ # Sets a page language in the `<html lang="YOUR-LOCALE">` tag
23
+ lang: "en-US"
24
+
25
+ # Sets a visible site title in a page header.
26
+ # As well used as a part of title in a <title> tag.
27
+ # For a "Security" page will looks: <title>Security | infotorg API</title>
15
28
  title: infotorg API
29
+
30
+ # Sets a visible subtitle under the title on the page
16
31
  subtitle: Onboarding guidelines and documentation
32
+
33
+ # Sets a direct url to a product on the Infotorg.no website. Default: https://www.infotorg.no/
34
+ product_url: ''
35
+ # Sets the product link title. Default: Infotorg.no
36
+ product_url_title: ''
37
+
17
38
  # Your Google Analytics GTM-XXXX code
18
39
  google_analytics_tag_manager: ''
19
40
 
41
+
20
42
  # --- Swagger UI configuration ---
43
+
21
44
  # Path to Open API file name, used for Swagger UI.
22
45
  # As a convention, all Open API files should be stored in the /assets/openapi folder.
23
46
  openapi: '/assets/openapi/eiendom.json'
@@ -1,11 +1,15 @@
1
1
  <footer class="footer mt-auto py-4">
2
2
  <div class="container pt-4 d-flex">
3
3
  <div class="flex-grow-1">
4
- <a href="https://www.infotorg.no/">Infotorg.no</a>
4
+ <a href="{{ site.product_url | default: 'https://www.infotorg.no/' }}">
5
+ {{ site.product_url_title | default: 'Infotorg.no' }}
6
+ </a>
5
7
  </div>
6
8
  <div class="company">
7
9
  <span class="service-from-text">En tjeneste fra</span>
8
- <a href="https://www.tietoevry.com/"><img src="assets/images/tieto-evry-logo.svg" width="100px" alt="TietoEVRY"/></a>
10
+ <a href="https://www.tietoevry.com/">
11
+ <img src="{{ 'assets/images/tieto-evry-logo.svg' | relative_url }}" width="100px" alt="TietoEVRY"/>
12
+ </a>
9
13
  </div>
10
14
  </div>
11
15
  </footer>
@@ -1,2 +1,2 @@
1
- <link rel="stylesheet" href="{{ 'assets/css/main.css?v=' | append: site.github.build_revision }}">
2
- <link rel="stylesheet" href="{{ 'assets/css/print.css?v=' | append: site.github.build_revision }}">
1
+ <link rel="stylesheet" href="{{ 'assets/css/main.css?v=' | append: site.github.build_revision | relative_url }}">
2
+ <link rel="stylesheet" href="{{ 'assets/css/print.css?v=' | append: site.github.build_revision | relative_url }}">
@@ -0,0 +1,85 @@
1
+ <!-- Favicons -->
2
+ <link
3
+ rel="shortcut icon"
4
+ href="{{ 'assets/images/favicon/favicon.ico' | relative_url }}"
5
+ type="image/x-icon"
6
+ />
7
+ <link
8
+ rel="apple-touch-icon"
9
+ sizes="57x57"
10
+ href="{{ 'assets/images/favicon/apple-touch-icon-57x57.png' | relative_url }}"
11
+ />
12
+ <link
13
+ rel="apple-touch-icon"
14
+ sizes="60x60"
15
+ href="{{ 'assets/images/favicon/apple-touch-icon-60x60.png' | relative_url }}"
16
+ />
17
+ <link
18
+ rel="apple-touch-icon"
19
+ sizes="72x72"
20
+ href="{{ 'assets/images/favicon/apple-touch-icon-72x72.png' | relative_url }}"
21
+ />
22
+ <link
23
+ rel="apple-touch-icon"
24
+ sizes="76x76"
25
+ href="{{ 'assets/images/favicon/apple-touch-icon-76x76.png' | relative_url }}"
26
+ />
27
+ <link
28
+ rel="apple-touch-icon"
29
+ sizes="114x114"
30
+ href="{{ 'assets/images/favicon/apple-touch-icon-114x114.png' | relative_url }}"
31
+ />
32
+ <link
33
+ rel="apple-touch-icon"
34
+ sizes="120x120"
35
+ href="{{ 'assets/images/favicon/apple-touch-icon-120x120.png' | relative_url }}"
36
+ />
37
+ <link
38
+ rel="apple-touch-icon"
39
+ sizes="144x144"
40
+ href="{{ 'assets/images/favicon/apple-touch-icon-144x144.png' | relative_url }}"
41
+ />
42
+ <link
43
+ rel="apple-touch-icon"
44
+ sizes="152x152"
45
+ href="{{ 'assets/images/favicon/apple-touch-icon-152x152.png' | relative_url }}"
46
+ />
47
+ <link
48
+ rel="apple-touch-icon"
49
+ sizes="180x180"
50
+ href="{{ 'assets/images/favicon/apple-touch-icon-180x180.png' | relative_url }}"
51
+ />
52
+ <link
53
+ rel="icon"
54
+ type="image/png"
55
+ sizes="32x32"
56
+ href="{{ 'assets/images/favicon/favicon-32x32.png' | relative_url }}"
57
+ />
58
+ <link
59
+ rel="icon"
60
+ type="image/png"
61
+ sizes="194x194"
62
+ href="{{ 'assets/images/favicon/favicon-194x194.png' | relative_url }}"
63
+ />
64
+ <link
65
+ rel="icon"
66
+ type="image/png"
67
+ sizes="96x96"
68
+ href="{{ 'assets/images/favicon/favicon-96x96.png' | relative_url }}"
69
+ />
70
+ <link
71
+ rel="icon"
72
+ type="image/png"
73
+ sizes="192x192"
74
+ href="{{ 'assets/images/favicon/android-chrome-192x192.png' | relative_url }}"
75
+ />
76
+ <link
77
+ rel="icon"
78
+ type="image/png"
79
+ sizes="16x16"
80
+ href="{{ 'assets/images/favicon/favicon-16x16.png' | relative_url }}"
81
+ />
82
+ <link
83
+ rel="mask-icon" color="#505f6c"
84
+ href="{{ 'assets/images/favicon/safari-pinned-tab.svg' | relative_url }}"
85
+ />
@@ -1,58 +1,67 @@
1
- {% assign items = site.data.navigation | where:'show', true %}
2
-
3
- <nav class="navbar navbar-expand-lg navbar-light {{ include.class | default: 'mb-3' }}">
1
+ <nav class="navbar navbar-expand-lg navbar-light flex-shrink-0 {{ include.class }}">
4
2
  <div class="container-lg">
5
- <a
6
- href="/"
7
- class="navbar-brand infotorg-developer-logo"
8
- >
9
- <img
10
- src="assets/images/infotorg-developer.png"
11
- srcset="assets/images/infotorg-developer@2x.png 2x,
12
- assets/images/infotorg-developer@3x.png 3x"
13
- width="232"
14
- height="40"
15
- alt="infotorg developer"
16
- />
17
- </a>
18
- <button
19
- class="navbar-toggler"
20
- type="button"
21
- data-bs-toggle="collapse"
22
- data-bs-target="#navbarNav"
23
- aria-controls="navbarNav"
24
- aria-expanded="false"
25
- aria-label="Toggle navigation"
26
- >
27
- <span class="navbar-toggler-icon"></span>
28
- </button>
29
- <div class="d-none d-lg-block py-4">
30
- {% include title.html %}
31
- </div>
32
- <div
33
- id="navbarNav"
34
- class="mcollapse navbar-collapse collapse"
35
- >
36
- <ul class="navbar-nav ml-auto">
37
- {% for item in items %}
38
- <li class="nav-item">
39
- {% if item.link contains '://' %}
40
- {{ # External link }}
41
- {% assign item_url = item.link %}
42
- {% else %}
43
- {{ # Internal link }}
44
- {% assign item_url = item.link | prepend: site.baseurl %}
45
- {% endif %}
46
- <a
47
- href="{{ item_url }}"
48
- class="nav-link{% if page.url == item.link %} active{% endif %}"
49
- {% if item.target %}target="{{item.target}}"{% endif %}
50
- >
51
- {{ item.name }}
52
- </a>
53
- </li>
54
- {% endfor %}
55
- </ul>
56
- </div>
3
+ <a
4
+ href="/"
5
+ class="navbar-brand infotorg-developer-logo"
6
+ >
7
+ <img
8
+ src="{{ 'assets/images/infotorg-developer.png' | relative_url }}"
9
+ srcset="{{ 'assets/images/infotorg-developer@2x.png' | relative_url }} 2x,
10
+ {{ 'assets/images/infotorg-developer@3x.png' | relative_url }} 3x"
11
+ width="232"
12
+ height="40"
13
+ alt="infotorg developer"
14
+ />
15
+ </a>
16
+ {% if page.show_navigation %}
17
+ <button
18
+ class="navbar-toggler"
19
+ type="button"
20
+ data-bs-toggle="collapse"
21
+ data-bs-target="#navbarNav"
22
+ aria-controls="navbarNav"
23
+ aria-expanded="false"
24
+ aria-label="Toggle navigation"
25
+ >
26
+ <span class="navbar-toggler-icon"></span>
27
+ </button>
28
+ {% endif %}
29
+
30
+ <div class="header-info-wrapper d-none d-lg-block pt-4">
31
+ {% include title.html %}
32
+ </div>
33
+
34
+ {% if page.show_navigation %}
35
+ <div
36
+ id="navbarNav"
37
+ class="mcollapse navbar-collapse collapse"
38
+ >
39
+ {% comment %}
40
+ * Items will contain only visible elements
41
+ {% endcomment %}
42
+ {% assign items = site.data.navigation | where:'show', true %}
43
+
44
+ <ul class="navbar-nav ml-auto">
45
+ {% for item in items %}
46
+ <li class="nav-item">
47
+ {% if item.link contains '://' %}
48
+ {{ # External link }}
49
+ {% assign item_url = item.link %}
50
+ {% else %}
51
+ {{ # Internal link }}
52
+ {% assign item_url = item.link | prepend: site.baseurl %}
53
+ {% endif %}
54
+ <a
55
+ href="{{ item_url }}"
56
+ class="nav-link{% if page.url == item.link %} active{% endif %}"
57
+ {% if item.target %}target="{{ item.target }}"{% endif %}
58
+ >
59
+ {{ item.name }}
60
+ </a>
61
+ </li>
62
+ {% endfor %}
63
+ </ul>
64
+ </div>
65
+ {% endif %}
57
66
  </div>
58
- </nav>
67
+ </nav>
@@ -1,5 +1,5 @@
1
1
  <!doctype html>
2
- <html lang="{{ site.lang | default: "en-US" }}" class="h-100">
2
+ <html lang="{{ page.lang | default: site.lang | default: "en-US" }}" class="h-100">
3
3
  <head>
4
4
  <meta charset="UTF-8">
5
5
  <meta name="viewport"
@@ -10,6 +10,7 @@
10
10
 
11
11
  {% include head-fonts.html %}
12
12
  {% include head-app-css.html %}
13
+ {% include head-favicon.html %}
13
14
  {% include head-google-analytics.html %}
14
15
  </head>
15
16
  <body class="d-flex flex-column h-100">
@@ -24,7 +25,7 @@
24
25
 
25
26
  <!-- Main content -->
26
27
  <main class="flex-shrink-0 mt-3">
27
- <div class="container">
28
+ <div class="container layout-{{ page.layout }}">
28
29
  {{ content }}
29
30
 
30
31
  <div class="bg-cube"></div>
@@ -33,6 +34,6 @@
33
34
 
34
35
  <!-- Footer -->
35
36
  {% include footer.html %}
36
- <script src="assets/bootstrap.min.js"></script>
37
+ <script src="{{ 'assets/bootstrap.min.js' | relative_url }}"></script>
37
38
  </body>
38
39
  </html>
@@ -3,3 +3,85 @@ layout: default
3
3
  comment: Infotorg Services APIs layout
4
4
  ---
5
5
  {{ content }}
6
+
7
+ {% comment %} Visible Services List {% endcomment %}
8
+ {% assign services = site.data.services | where:'show', true %}
9
+
10
+ {% if services and services.size > 0 %}
11
+ <div
12
+ id="services-list"
13
+ class="services-list accordion accordion-flush"
14
+ >
15
+ {% for item in services %}
16
+ <div class="service-item">
17
+ <h2
18
+ id="heading-{{ forloop.index }}"
19
+ class="accordion-header"
20
+ >
21
+ {% assign icons_dir = "assets/images/icons/services/" %}
22
+ {% assign icon_path = icons_dir | prepend: '/' | append: item.icon %}
23
+
24
+ {% for static_file in site.static_files %}
25
+ {% if static_file.path == icon_path %}
26
+ {% assign icon_exists = true %}
27
+
28
+ {% break %}
29
+ {% endif %}
30
+ {% endfor %}
31
+
32
+ <button
33
+ id="collapse-item-toggler-{{ forloop.index }}"
34
+ class="accordion-button collapsed"
35
+ type="button"
36
+ data-bs-toggle="collapse"
37
+ data-bs-target="#collapse-{{ forloop.index }}"
38
+ aria-expanded="false"
39
+ aria-controls="collapse-{{ forloop.index }}"
40
+ >
41
+ <span class="service-icon">
42
+ {% if icon_exists == true %}
43
+ <img src="{{ icons_dir }}{{ item.icon }}">
44
+ {% endif %}
45
+ </span>
46
+
47
+ {{ item.name }}
48
+ </button>
49
+ </h2>
50
+ <div
51
+ id="collapse-{{ forloop.index }}"
52
+ class="collapse"
53
+ aria-labelledby="heading-{{ forloop.index }}"
54
+ >
55
+ <div class="accordion-body">
56
+ {{ item.info }}
57
+
58
+ {% if item.url %}
59
+ <p class="d-flex justify-content-between align-items-center pt-3">
60
+ {% comment %} Link to a documentation page {% endcomment %}
61
+ <a
62
+ href="{{ item.url }}"
63
+ class="btn btn-outline-secondary"
64
+ role="button"
65
+ >
66
+ {{ item.name }} API pages
67
+ </a>
68
+
69
+ <button
70
+ type="button"
71
+ class="btn btn-link btn-hide-details d-flex align-items-center"
72
+ role="button"
73
+ onclick="document.getElementById('collapse-item-toggler-{{ forloop.index }}').click()"
74
+ >
75
+ Hide details
76
+ </button>
77
+ </p>
78
+ {% endif %}
79
+ </div>
80
+ </div>
81
+ </div>
82
+ {% endfor %}
83
+ </div>
84
+ {% else %}
85
+ <p>There are no API services. To add an API service create file <code>/_data/services.yml</code>.</p>
86
+ <p>For more information please read the theme documentation.</p>
87
+ {% endif %}
@@ -1,5 +1,5 @@
1
1
  <!doctype html>
2
- <html lang="{{ site.lang | default: "en-US" }}" class="h-100">
2
+ <html lang="{{ page.lang | default: site.lang | default: "en-US" }}" class="h-100">
3
3
  <head>
4
4
  <meta charset="UTF-8">
5
5
  <meta name="viewport"
@@ -10,6 +10,8 @@
10
10
 
11
11
  {% include head-fonts.html %}
12
12
  {% include head-app-css.html %}
13
+ {% include head-favicon.html %}
14
+
13
15
  {% include head-google-analytics.html %}
14
16
 
15
17
  {% if site.swaggerui_theme and site.swaggerui_theme != '' %}
@@ -42,14 +44,14 @@
42
44
  <!-- Footer -->
43
45
  {% include footer.html %}
44
46
 
45
- <script src="assets/bootstrap.min.js"></script>
47
+ <script src="{{ 'assets/bootstrap.min.js' | relative_url }}"></script>
46
48
  <script src="https://unpkg.com/swagger-ui-dist@3/swagger-ui-standalone-preset.js"></script>
47
49
  <script src="https://unpkg.com/swagger-ui-dist@3/swagger-ui-bundle.js" charset="UTF-8"></script>
48
50
  <script>
49
51
  window.onload = function() {
50
52
  // Build a system
51
53
  window.ui = SwaggerUIBundle({
52
- url: '{{ site.openapi | relative_url }}',
54
+ url: '{{ page.openapi | default: site.openapi | relative_url }}',
53
55
  dom_id: '#swagger-ui',
54
56
  deepLinking: true,
55
57
  presets: [
@@ -18,6 +18,22 @@ $danger: $color-error-red;
18
18
  //$light: #f8f9fa;
19
19
  //$dark: #343a40;
20
20
 
21
+ // Spacing
22
+ //
23
+ // Control the default styling of most Bootstrap elements by modifying these
24
+ // variables. Mostly focused on spacing.
25
+ // You can add more entries to the $spacers map, should you need more variation.
26
+ $spacer: 1rem;
27
+ $spacers: (
28
+ 0: 0,
29
+ 1: $spacer / 4,
30
+ 2: $spacer / 2,
31
+ 3: $spacer,
32
+ 4: $spacer * 1.5,
33
+ 5: $spacer * 3,
34
+ 6: $spacer * 4
35
+ );
36
+
21
37
  // Body
22
38
  //
23
39
  // Settings for the `<body>` element.
@@ -59,66 +75,3 @@ $h6-font-size: $font_size_h6;
59
75
  $headings-margin-bottom: 1rem;
60
76
  $headings-font-family: $font_heading;
61
77
  $headings-color: rgb(80,95,108);
62
-
63
-
64
- /* !Update this by design needs
65
-
66
- // Navs
67
-
68
- $nav-link-padding-y: .5rem !default;
69
- $nav-link-padding-x: 1rem !default;
70
- $nav-link-disabled-color: $gray-600 !default;
71
-
72
- $nav-tabs-border-color: $gray-300 !default;
73
- $nav-tabs-border-width: $border-width !default;
74
- $nav-tabs-border-radius: $border-radius !default;
75
- $nav-tabs-link-hover-border-color: $gray-200 $gray-200 $nav-tabs-border-color !default;
76
- $nav-tabs-link-active-color: $gray-700 !default;
77
- $nav-tabs-link-active-bg: $body-bg !default;
78
- $nav-tabs-link-active-border-color: $gray-300 $gray-300 $nav-tabs-link-active-bg !default;
79
-
80
- $nav-pills-border-radius: $border-radius !default;
81
- $nav-pills-link-active-color: $component-active-color !default;
82
- $nav-pills-link-active-bg: $component-active-bg !default;
83
-
84
- $nav-divider-color: $gray-200 !default;
85
- $nav-divider-margin-y: $spacer / 2 !default;
86
-
87
-
88
- // Navbar
89
-
90
- $navbar-padding-y: $spacer / 2 !default;
91
- $navbar-padding-x: $spacer !default;
92
-
93
- $navbar-nav-link-padding-x: .5rem !default;
94
-
95
- $navbar-brand-font-size: $font-size-lg !default;
96
- // Compute the navbar-brand padding-y so the navbar-brand will have the same height as navbar-text and nav-link
97
- $nav-link-height: $font-size-base * $line-height-base + $nav-link-padding-y * 2 !default;
98
- $navbar-brand-height: $navbar-brand-font-size * $line-height-base !default;
99
- $navbar-brand-padding-y: ($nav-link-height - $navbar-brand-height) / 2 !default;
100
-
101
- $navbar-toggler-padding-y: .25rem !default;
102
- $navbar-toggler-padding-x: .75rem !default;
103
- $navbar-toggler-font-size: $font-size-lg !default;
104
- $navbar-toggler-border-radius: $btn-border-radius !default;
105
-
106
- $navbar-dark-color: rgba($white, .5) !default;
107
- $navbar-dark-hover-color: rgba($white, .75) !default;
108
- $navbar-dark-active-color: $white !default;
109
- $navbar-dark-disabled-color: rgba($white, .25) !default;
110
- $navbar-dark-toggler-icon-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'><path stroke='#{$navbar-dark-color}' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/></svg>") !default;
111
- $navbar-dark-toggler-border-color: rgba($white, .1) !default;
112
-
113
- $navbar-light-color: rgba($black, .5) !default;
114
- $navbar-light-hover-color: rgba($black, .7) !default;
115
- $navbar-light-active-color: rgba($black, .9) !default;
116
- $navbar-light-disabled-color: rgba($black, .3) !default;
117
- $navbar-light-toggler-icon-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'><path stroke='#{$navbar-light-color}' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/></svg>") !default;
118
- $navbar-light-toggler-border-color: rgba($black, .1) !default;
119
-
120
- $navbar-light-brand-color: $navbar-light-active-color !default;
121
- $navbar-light-brand-hover-color: $navbar-light-active-color !default;
122
- $navbar-dark-brand-color: $navbar-dark-active-color !default;
123
- $navbar-dark-brand-hover-color: $navbar-dark-active-color !default;
124
- */