@gov-cy/govcy-frontend-renderer 1.15.0 → 1.16.1

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/README.md CHANGED
@@ -5,14 +5,16 @@
5
5
 
6
6
  Use this package to render HTML for gov.cy elements, as they are defined in the [Unified Design System](https://gov-cy.github.io/govcy-design-system-docs/), using njk or json templates.
7
7
 
8
- The rendered HTML should:
9
- - Be as close of a representation as possible of the design elements as they are defined in the [Unified Design System](https://gov-cy.github.io/govcy-design-system-docs/)
10
- - Include the gov.cy branding
11
- - Use the [govcy design system](https://gov-cy.github.io/govcy-design-system-docs/) css classes and javascript functions
12
- - Use HTML best practices and be valid HTML
13
- - Use accessibility best practices
14
- - Allow multiple languages
15
- - Be tested
8
+ ![govcy-frontend-renderer](DSF-govcy-frontend-renderer.png)
9
+
10
+ The project was developed to support the [gov.cy Unified Design System](https://gov-cy.github.io/govcy-design-system-docs/), so that the rendered HTML:
11
+ - is as close of a representation as possible of the design elements as they are defined in the [Unified Design System](https://gov-cy.github.io/govcy-design-system-docs/)
12
+ - includes the gov.cy branding
13
+ - uses the [govcy design system](https://gov-cy.github.io/govcy-design-system-docs/) css classes and javascript functions
14
+ - uses HTML best practices and be valid HTML
15
+ - uses accessibility best practices
16
+ - allows multiple languages
17
+ - is tested
16
18
 
17
19
  Though the project is not intended to be used for production purposes and does provide any guaranties, your welcome to try it.
18
20
 
@@ -82,6 +84,7 @@ const inputData =
82
84
  "headerTitle" : {"en":"Header title", "el":"Τιτλός επικεφαλιδας"},
83
85
  "description" : {"en":"Service description", "el":"Περιγραφή υπηρεσίας"},
84
86
  "url" : "https://gov.cy",
87
+ "manifest": "/manifest.json",
85
88
  "matomo": {
86
89
  "url": "//wp.matomo.dits.dmrid.gov.cy/",
87
90
  "siteId": "1234"
@@ -175,6 +178,7 @@ const inputData =
175
178
  "headerTitle" : {"en":"Header title", "el":"Τιτλός επικεφαλιδας"},
176
179
  "description" : {"en":"Service description", "el":"Περιγραφή υπηρεσίας"},
177
180
  "url" : "https://gov.cy",
181
+ "manifest": "manifest.json",
178
182
  "matomo": {
179
183
  "url": "//wp.matomo.dits.dmrid.gov.cy/",
180
184
  "siteId": "1234"
@@ -315,6 +319,7 @@ The `inputData` object has the following structure:
315
319
  - **site.title**: the title of the site. It is used in the `<title>`, `<meta property="og:title"` and `<meta property="twitter:title"` tags of the head.
316
320
  - **site.description**: the description of the site. It is used in the `<meta name="description"`, `<meta property="og:description"` and `<meta property="twitter:description"` tags of the head.
317
321
  - **site.url**: the URL of the site. It is used in the `<meta property="og:url"` and `<meta property="twitter:url"` tags of the head.
322
+ - **site.manifest**: the manifest of the site. It is used to add the manifest location to the page.
318
323
  - **site.matomo**: the matomo data. It is used to add the Matomo code to the page. If you don't want to use Matomo tracking, you can remove this value. Use `site.matomo.url` to define the URL of the Matomo server and `site.matomo.siteId` to define the site ID to be tracked.
319
324
  - **site.cdn.dist**: the CDN of the site. It is used to define the URL of the CDN used for the CSS and JS files. If you need to change the version of the CDN, you can do it by changing this value (in this case you will need to change the `site.cdn.cssIntegrity` and `site.cdn.jsIntegrity` values as well)
320
325
  - **site.cdn.cssIntegrity**: the integrity of the CSS file. It is used to define the integrity of the CSS file. If you need to change the version of the CDN, you will need to change this value. https://www.srihash.org/ can help you generate the integrity value.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gov-cy/govcy-frontend-renderer",
3
- "version": "1.15.0",
3
+ "version": "1.16.1",
4
4
  "description": "Render html for design elements of the Unified design system using njk or json template.",
5
5
  "author": "DMRID - DSF Team",
6
6
  "license": "MIT",
@@ -22,6 +22,7 @@ To use this template you need to pass the following data:
22
22
  "description" : {"en":"Service description", "el":"Περιγραφή υπηρεσίας"},
23
23
  "isTesting" : true,
24
24
  "url": "https://gov.cy",
25
+ "manifest": "manifest.json",
25
26
  "matomo": {
26
27
  "url": "//wp.matomo.dits.dmrid.gov.cy/",
27
28
  "siteId": 1234
@@ -63,7 +64,9 @@ To use this template you need to pass the following data:
63
64
  <meta property="twitter:image" content="{{ site.cdn.dist }}/img/icons-512.png">
64
65
 
65
66
  <!-- Theme -->
66
- {# <link rel="manifest" href="manifest.json"> #}
67
+ {% if site.manifest %}
68
+ <link rel="manifest" href="{{ site.manifest }}">
69
+ {% endif %}
67
70
  <meta name="theme-color" content="#31576F">
68
71
  <link rel="icon" type="image/png" sizes="48x48" href="{{ site.cdn.dist }}/img/favicon-48x48.png">
69
72
  <link rel="icon" type="image/png" sizes="32x32" href="{{ site.cdn.dist }}/img/favicon-32x32.png">