@gov-cy/govcy-frontend-renderer 1.25.1 → 1.26.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/README.md CHANGED
@@ -468,6 +468,7 @@ The `inputData` object has the following structure:
468
468
  - **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)
469
469
  - **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.
470
470
  - **site.cdn.jsIntegrity**: the integrity of the JS file. It is used to define the integrity of the JS 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.
471
+ - **site.customCSSFile**: the custom CSS file. It is used to add a custom CSS file to the page. This comes after the default CSS file so it will override the default CDN CSS file.
471
472
  - **pageData.title**: the title of the page. It is used in the `<title>`, `<meta property="og:title"` and `<meta property="twitter:title"` tags of the head.
472
473
  - **pageData.layout**: the layout of the page. It is used to define the layout (or page template) of the page, which is defined in the `layouts/govcyBase.njk` template.
473
474
  - **pageData.mainLayout**: the main layout of the page. It can be either `two-thirds` or `max-width`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gov-cy/govcy-frontend-renderer",
3
- "version": "1.25.1",
3
+ "version": "1.26.0",
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",
@@ -102,7 +102,8 @@ To use this template you need to pass the following data:
102
102
  "dist": "https://cdn.jsdelivr.net/gh/gov-cy/govcy-design-system@3.0.0/dist",
103
103
  "cssIntegrity": 'sha384-1zLHWOtnS0hOIz5mVEPZp0UH5gUE6eo0CQcCGA3sF2TyYhHyKOd3Ni8Iy/NjEASU",
104
104
  "jsIntegrity": "sha384-zOuDuogVaaTveh/Ou2iYwCk14zFiSmMk7Ax8yRnXDtOJMyKZH5+ZNibNVwZSKtw+"
105
- }
105
+ },
106
+ "customCSSFile": "/css/custom.css",
106
107
  },
107
108
  "pageData": {
108
109
  "title": {"en": "Page title", "el": "Τιτλός σελιδας"},
@@ -151,19 +152,9 @@ To use this template you need to pass the following data:
151
152
 
152
153
  <!-- CSS -->
153
154
  <link rel="stylesheet" href="{{ site.cdn.dist }}/css/govcy.uds.min.css"{% if site.cdn.cssIntegrity %} integrity="{{ site.cdn.cssIntegrity }}" crossorigin="anonymous"{% endif%}>
154
- <style>
155
- dl.govcy-summary-list-row-internal:not(:first-of-type) {
156
- margin-top: 0.5rem !important;
157
- }
158
-
159
- .list-inline-item:not(:last-child) {
160
- margin-right: 0 !important;
161
- }
162
- .list-inline-item:not(:first-child) {
163
- margin-left: .5rem;
164
- }
165
-
166
- </style>
155
+ {%- if site.customCSSFile %}
156
+ <link rel="stylesheet" href="{{ site.customCSSFile }}">
157
+ {%- endif %}
167
158
  <title>{% if pageData.title %}{{ govcyLocalizeContent(pageData.title, site.lang) }} - {% endif %}{% if site.title %}{{ govcyLocalizeContent(site.title, site.lang) }} - {% endif %}gov.cy</title>
168
159
  <meta name="description" content="{{ govcyLocalizeContent(site.description, site.lang) }}">
169
160
  {% if site.matomo and site.matomo.url and site.matomo.siteId %}