infotorg-api-jekyll-theme 0.1.2 → 0.1.3

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 +40 -1
  4. data/_config.yml +1 -1
  5. data/_includes/footer.html +3 -1
  6. data/_includes/head-app-css.html +2 -2
  7. data/_includes/head-favicon.html +85 -0
  8. data/_includes/navigation.html +5 -5
  9. data/_layouts/default.html +3 -2
  10. data/_layouts/services.html +82 -0
  11. data/_layouts/swagger-ui.html +3 -1
  12. data/_sass/_bootstrap_variables.scss +16 -0
  13. data/_sass/_typography.scss +22 -0
  14. data/_sass/_variables.scss +1 -0
  15. data/assets/css/main.scss +15 -0
  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/list.txt +16 -0
  32. data/assets/images/favicon/safari-pinned-tab.svg +1 -0
  33. data/assets/images/onboarding-process.svg +23 -0
  34. data/assets/openapi/eiendom.json +6817 -0
  35. metadata +37 -3
  36. data/_includes/services.html +0 -75
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 717b7d207f91d28db853e13264fd2f508c4c567a6badefec130896a8dcfa359d
4
- data.tar.gz: 986add89717e2844e8bec65487f2fd0ef0b49c3ed3cafd81ea6ba0a6e7836e32
3
+ metadata.gz: cba7c91f77b12e7b42e66927fe584aa719cade56c4884bfb9aa57a666f19f799
4
+ data.tar.gz: edc3fd8edb0ca5f7dfa095f471efcbd81b480f9a34118f39eb2b57804d06159a
5
5
  SHA512:
6
- metadata.gz: 7045b2aaab1355f5fe104c27c40c69296cc7890800a7436f72921bbde57bbe4128651060916c8a66c5ce885315be01c128f1ded4ccdbc28fa5c2952e025e5d1f
7
- data.tar.gz: f1ef1380cbb6994cba17835c19a39c132fb3790b8c6c3740973a5753cfb8888455dbf9f35ecf8b7514cbf049e0709ebd30142e216ff4ea0328d4053206760f93
6
+ metadata.gz: 064adbe8b0973b79f6d393e815838ac400f99a9a078516923908282be9cafa4ca1f4a9f9f471669a3f8d22626c1082ce411a33904148f996b59a98dc9884a012
7
+ data.tar.gz: '080b7722f01466f75aac1c1f8e3c9abf81e621de4d5e3bd82f13f1de5e70c6d4dc2a285e5c75ee05577af6bab2c6c668c90dba008b6c8991a362ecf1477cccec'
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020-2021 Volodymyr Chumak
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md CHANGED
@@ -1,2 +1,41 @@
1
- # Jekyll theme for Infotorg APIs
1
+ # Jekyll Infotorg APIs theme Quickstart
2
+ > Scaffold for a basic Jekyll theme for use as a reference or template
3
+
4
+ [![Ruby - >=2.3](https://img.shields.io/badge/Ruby->=2.3-green?logo=ruby&logoColor=white)](https://ruby-lang.org)
5
+ [![Jekyll - 3.9](https://img.shields.io/badge/Jekyll-3.9-green?logo=jekyll&logoColor=white)](https://jekyllrb.com)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green)](#license)
7
+
2
8
  ![Theme screenshot](screenshot.png)
9
+
10
+ ## How to use this project
11
+
12
+ ### Quickstart
13
+
14
+ Create a new project from this template. Or just use the code or docs here as a reference.
15
+
16
+ <div align="center">
17
+
18
+ [![Use this template](https://img.shields.io/badge/Use_this_template-2ea44f?style=for-the-badge&logo=github)](https://github.com/coderua/infotorg-api-jekyll-theme/generate)
19
+
20
+ </div>
21
+
22
+ ### Demo
23
+
24
+ View a live demo on GH Pages:
25
+
26
+ <div align="center">
27
+
28
+ [![GH Pages - View demo](https://img.shields.io/badge/GH_Pages-View_demo-green?style=for-the-badge)](https://coderua.github.io/infotorg-api-jekyll-theme/)
29
+
30
+ </div>
31
+
32
+ ## What is a Jekyll theme?
33
+
34
+ If you build a Jekyll site, you'll typically use a theme to style your site or at least give a base which you and customize on top of.
35
+
36
+ A theme is a way of packaging layout files, CSS styling and includes files to be installed in another Jekyll project. A theme might be made from scratch or based on a static HTML. A theme is a great way of making styling reusable across projects by you and other people.
37
+
38
+ A good example of a theme is Minima, which is the default theme used when running `jekyll new PATH`.
39
+
40
+ [![jekyll - minima](https://img.shields.io/static/v1?label=jekyll&message=minima&color=blue&logo=github)](https://github.com/jekyll/minima)
41
+
@@ -21,7 +21,7 @@ google_analytics_tag_manager: ''
21
21
  # --- Swagger UI configuration ---
22
22
  # Path to Open API file name, used for Swagger UI.
23
23
  # As a convention, all Open API files should be stored in the /assets/openapi folder.
24
- openapi: ''
24
+ openapi: '/assets/openapi/eiendom.json'
25
25
 
26
26
  # Swagger UI Theme
27
27
  # If not set will fetch the latest default theme css from an official CDN.
@@ -5,7 +5,9 @@
5
5
  </div>
6
6
  <div class="company">
7
7
  <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>
8
+ <a href="https://www.tietoevry.com/">
9
+ <img src="{{ 'assets/images/tieto-evry-logo.svg' | relative_url }}" width="100px" alt="TietoEVRY"/>
10
+ </a>
9
11
  </div>
10
12
  </div>
11
13
  </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,19 +1,19 @@
1
- <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 }}">
2
2
  <div class="container-lg">
3
- {% if page.show_navigation %}
4
3
  <a
5
4
  href="/"
6
5
  class="navbar-brand infotorg-developer-logo"
7
6
  >
8
7
  <img
9
- src="assets/images/infotorg-developer.png"
10
- srcset="assets/images/infotorg-developer@2x.png 2x,
11
- assets/images/infotorg-developer@3x.png 3x"
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"
12
11
  width="232"
13
12
  height="40"
14
13
  alt="infotorg developer"
15
14
  />
16
15
  </a>
16
+ {% if page.show_navigation %}
17
17
  <button
18
18
  class="navbar-toggler"
19
19
  type="button"
@@ -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 %}
@@ -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,7 +44,7 @@
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>
@@ -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.
@@ -13,3 +13,25 @@ body {
13
13
  h1, .h1 {
14
14
  font-weight: normal;
15
15
  }
16
+
17
+ main .layout-default {
18
+ & h1:first-child {
19
+ font-size: 1.75rem;
20
+ margin-bottom: 2rem;
21
+ }
22
+
23
+ h2 {
24
+ @extend .mt-6;
25
+ }
26
+
27
+ h3 {
28
+ color: $color-calm-grey-darkest;
29
+ @extend .mt-5;
30
+ }
31
+
32
+ @include media-breakpoint-up(lg) {
33
+ & h1:first-child {
34
+ font-size: $font-size-h1;
35
+ }
36
+ }
37
+ }
@@ -12,6 +12,7 @@ $color-happy-green-lightest: rgb(232, 252, 232);
12
12
  $color-navy-blue: rgb(6, 58, 86);
13
13
  $color-clear-blue-lightest: rgb(222, 242, 253);
14
14
  $color-calm-grey-lighter: rgb(224, 228, 230);
15
+ $color-nice-grey: rgb(247, 248, 250); // #f7f8fa
15
16
  $color-clear-blue: rgb(12, 113, 167);
16
17
  $color-happy-green: rgb(68, 153, 51);
17
18
  $color-clear-purple: rgb(89, 41, 137);
@@ -14,6 +14,7 @@
14
14
  background-image: url('../images/it-gears.svg');
15
15
  background-repeat: no-repeat;
16
16
  padding: 20px 0;
17
+ margin-bottom: 1.3rem;
17
18
  background-position: right top;
18
19
  background-size: 40%;
19
20
  }
@@ -58,11 +59,13 @@
58
59
  @include media-breakpoint-up(lg) {
59
60
  #navbarNav {
60
61
  margin-left: -12px;
62
+ white-space: nowrap;
61
63
  }
62
64
 
63
65
  .navbar {
64
66
  padding-top: 38px;
65
67
  padding-bottom: 0;
68
+ margin-bottom: 2rem;
66
69
  background-color: #dfe3e6;
67
70
  background-image: url('../images/it-gears.svg');
68
71
  background-repeat: no-repeat;
@@ -191,6 +194,10 @@
191
194
  color: $color-clear-blue;
192
195
  }
193
196
 
197
+ .accordion-button:hover {
198
+ background-color: $color-nice-grey;
199
+ }
200
+
194
201
  .service-item:last-child .accordion-button.collapsed {
195
202
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
196
203
  }
@@ -206,6 +213,10 @@
206
213
  font-size: 0.875rem;
207
214
  }
208
215
 
216
+ .btn-hide-details:hover {
217
+ background-color: $color-nice-grey;
218
+ }
219
+
209
220
  .btn-hide-details:after {
210
221
  content: "";
211
222
  width: 24px;
@@ -215,3 +226,7 @@
215
226
  margin-left: 4px;
216
227
  }
217
228
  }
229
+
230
+ .table thead > tr > th {
231
+ vertical-align: middle;
232
+ }