infotorg-api-jekyll-theme 0.1.1 → 0.1.7

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 (46) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.md +21 -0
  3. data/README.md +528 -3
  4. data/_config.yml +33 -2
  5. data/_includes/documentation_links.html +18 -0
  6. data/_includes/footer.html +12 -2
  7. data/_includes/head-app-css.html +2 -2
  8. data/_includes/head-favicon.html +85 -0
  9. data/_includes/navigation.html +65 -56
  10. data/_layouts/default.html +7 -3
  11. data/_layouts/documentation.html +9 -0
  12. data/_layouts/services.html +88 -0
  13. data/_layouts/swagger-ui.html +8 -3
  14. data/_sass/_bootstrap_variables.scss +16 -63
  15. data/_sass/_typography.scss +22 -0
  16. data/_sass/_variables.scss +1 -0
  17. data/assets/css/main.scss +51 -11
  18. data/assets/images/favicon/android-chrome-192x192.png +0 -0
  19. data/assets/images/favicon/apple-touch-icon-114x114.png +0 -0
  20. data/assets/images/favicon/apple-touch-icon-120x120.png +0 -0
  21. data/assets/images/favicon/apple-touch-icon-144x144.png +0 -0
  22. data/assets/images/favicon/apple-touch-icon-152x152.png +0 -0
  23. data/assets/images/favicon/apple-touch-icon-180x180.png +0 -0
  24. data/assets/images/favicon/apple-touch-icon-57x57.png +0 -0
  25. data/assets/images/favicon/apple-touch-icon-60x60.png +0 -0
  26. data/assets/images/favicon/apple-touch-icon-72x72.png +0 -0
  27. data/assets/images/favicon/apple-touch-icon-76x76.png +0 -0
  28. data/assets/images/favicon/favicon-16x16.png +0 -0
  29. data/assets/images/favicon/favicon-194x194.png +0 -0
  30. data/assets/images/favicon/favicon-32x32.png +0 -0
  31. data/assets/images/favicon/favicon-96x96.png +0 -0
  32. data/assets/images/favicon/favicon.ico +0 -0
  33. data/assets/images/favicon/safari-pinned-tab.svg +1 -0
  34. data/assets/images/icons/action-go-outline.svg +12 -0
  35. data/assets/images/icons/action-go.svg +12 -0
  36. data/assets/images/icons/services/employee.svg +11 -0
  37. data/assets/images/icons/services/movables.svg +12 -0
  38. data/assets/images/icons/services/phone.svg +12 -0
  39. data/assets/images/icons/services/placeholder.svg +12 -0
  40. data/assets/images/onboarding-process.svg +23 -0
  41. data/assets/{bootstrap.min.js → js/bootstrap.min.js} +0 -0
  42. data/assets/{bootstrap.min.js.map → js/bootstrap.min.js.map} +0 -0
  43. data/assets/openapi/.gitkeep +0 -0
  44. data/assets/openapi/eiendom.json +136 -136
  45. metadata +48 -6
  46. data/_includes/services.html +0 -75
@@ -1,23 +1,54 @@
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
+
38
+ # Sets an url to the main APIs page (a list of services, also called a lending page).
39
+ # Should be shown only on a concrete API documentation page
40
+ main_page_url: 'https://infotorg.github.io/'
41
+ # Sets an title to APIs page link. Default: Infotorg APIs
42
+ main_page_url_title: 'Infotorg APIs'
43
+
44
+
17
45
  # Your Google Analytics GTM-XXXX code
18
46
  google_analytics_tag_manager: ''
19
47
 
48
+
20
49
  # --- Swagger UI configuration ---
50
+ # Make sense for REST services.
51
+
21
52
  # Path to Open API file name, used for Swagger UI.
22
53
  # As a convention, all Open API files should be stored in the /assets/openapi folder.
23
54
  openapi: '/assets/openapi/eiendom.json'
@@ -0,0 +1,18 @@
1
+ {% assign links = include.links | where:'show', true %}
2
+
3
+ {% if links.size > 0 %}
4
+ <p class="mb-3">Refer to the documentation by the links below:</p>
5
+
6
+ <div class="pt-3">
7
+ {% for item in links %}
8
+ <a
9
+ href="{{ item.link }}"
10
+ {% if item.target %}target="{{ item.target }}"{% endif %}
11
+ {% if item.direct_download and item.direct_download == true %}download="{{ item.link | split: '/' | last }}"{% endif %}
12
+ class="btn btn-outline-secondary action-go"
13
+ >
14
+ {{ item.name }}
15
+ </a>
16
+ {% endfor %}
17
+ </div>
18
+ {% endif %}
@@ -1,11 +1,21 @@
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>
7
+
8
+ {% if page.layout != 'services' and site.main_page_url and site.main_page_url != '' %}
9
+ <a href="{{ site.main_page_url | default: '..' }}" class="ms-3">
10
+ {{ site.main_page_url_title | default: 'Infotorg APIs' }}
11
+ </a>
12
+ {% endif %}
5
13
  </div>
6
14
  <div class="company">
7
15
  <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>
16
+ <a href="https://www.tietoevry.com/">
17
+ <img src="{{ 'assets/images/tieto-evry-logo.svg' | relative_url }}" width="100px" alt="TietoEVRY"/>
18
+ </a>
9
19
  </div>
10
20
  </div>
11
21
  </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,15 +25,18 @@
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
 
31
+ {% if page.show_cube_bg == true %}
30
32
  <div class="bg-cube"></div>
33
+ {% endif %}
31
34
  </div>
32
35
  </main>
33
36
 
34
37
  <!-- Footer -->
35
38
  {% include footer.html %}
36
- <script src="assets/bootstrap.min.js"></script>
39
+
40
+ <script src="{{ 'assets/js/bootstrap.min.js' | relative_url }}"></script>
37
41
  </body>
38
42
  </html>
@@ -0,0 +1,9 @@
1
+ ---
2
+ layout: default
3
+ comment: Infotorg Services APIs layout for External documentation resources
4
+ ---
5
+ <h1>{{ page.title }}</h1>
6
+
7
+ {% include documentation_links.html links=site.data.documentation_links %}
8
+
9
+ {{ content }}
@@ -3,3 +3,91 @@ 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 icon_exists = false %}
22
+ {% assign icons_dir = "assets/images/icons/services/" %}
23
+ {% assign icon_path = icons_dir | prepend: '/' | append: item.icon %}
24
+
25
+ {% if item.icon and item.icon != '' %}
26
+ {% for static_file in site.static_files %}
27
+ {% if static_file.path == icon_path %}
28
+ {% assign icon_exists = true %}
29
+
30
+ {% break %}
31
+ {% endif %}
32
+ {% endfor %}
33
+ {% endif %}
34
+
35
+
36
+ <button
37
+ id="collapse-item-toggler-{{ forloop.index }}"
38
+ class="accordion-button collapsed"
39
+ type="button"
40
+ data-bs-toggle="collapse"
41
+ data-bs-target="#collapse-{{ forloop.index }}"
42
+ aria-expanded="false"
43
+ aria-controls="collapse-{{ forloop.index }}"
44
+ >
45
+ <span class="service-icon">
46
+ {% if icon_exists %}
47
+ <img src="{{ icons_dir }}{{ item.icon }}">
48
+ {% else %}
49
+ <img src="{{ icons_dir }}placeholder.svg">
50
+ {% endif %}
51
+ </span>
52
+
53
+ {{ item.name }}
54
+ </button>
55
+ </h2>
56
+ <div
57
+ id="collapse-{{ forloop.index }}"
58
+ class="collapse"
59
+ aria-labelledby="heading-{{ forloop.index }}"
60
+ >
61
+ <div class="accordion-body">
62
+ {{ item.info }}
63
+
64
+ {% if item.url %}
65
+ <p class="d-flex justify-content-between align-items-center pt-3">
66
+ {% comment %} Link to a documentation page {% endcomment %}
67
+ <a
68
+ href="{{ item.url }}"
69
+ class="btn btn-outline-secondary"
70
+ role="button"
71
+ >
72
+ {{ item.name }} API pages
73
+ </a>
74
+
75
+ <button
76
+ type="button"
77
+ class="btn btn-link btn-hide-details d-flex align-items-center"
78
+ role="button"
79
+ onclick="document.getElementById('collapse-item-toggler-{{ forloop.index }}').click()"
80
+ >
81
+ Hide details
82
+ </button>
83
+ </p>
84
+ {% endif %}
85
+ </div>
86
+ </div>
87
+ </div>
88
+ {% endfor %}
89
+ </div>
90
+ {% else %}
91
+ <p>There are no API services. To add an API service create file <code>/_data/services.yml</code>.</p>
92
+ <p>For more information please read the theme documentation.</p>
93
+ {% endif %}