@gov-cy/govcy-frontend-renderer 1.14.0 → 1.14.2
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
|
@@ -14,11 +14,11 @@ The rendered HTML should:
|
|
|
14
14
|
- Allow multiple languages
|
|
15
15
|
- Be tested
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Though the project is not intended to be used for production purposes and does provide any guaranties, your welcome to try it.
|
|
18
18
|
|
|
19
19
|
The project uses [nunjucks](https://mozilla.github.io/nunjucks/) templates to built the html.
|
|
20
20
|
|
|
21
|
-
The package currently works with the **version 3.
|
|
21
|
+
The package currently works with the **version 3.2.0** of the design system.
|
|
22
22
|
|
|
23
23
|
## Features
|
|
24
24
|
|
|
@@ -3731,7 +3731,6 @@ context.addExport("ofLabel", t_18);
|
|
|
3731
3731
|
;
|
|
3732
3732
|
}
|
|
3733
3733
|
if(runtime.contextOrFrameLookup(context, frame, "current") && runtime.contextOrFrameLookup(context, frame, "total")) {
|
|
3734
|
-
t_2 += "<style>\r\n.govcy-step-indicator {\r\n margin-left: 0px;\r\n margin-right: 0px;\r\n margin-bottom: .5rem !important;\r\n}\r\n.govcy-step-indicator__segments {\r\n display: flex;\r\n list-style: none;\r\n margin: 0px;\r\n padding: 0px;\r\n}\r\n\r\n.govcy-step-indicator__segment {\r\n flex: 1 1 0%;\r\n margin-left: 1px;\r\n margin-right: 1px;\r\n max-width: 15rem;\r\n min-height: 0.5rem;\r\n position: relative;\r\n}\r\n\r\n.govcy-step-indicator__segment::after {\r\n background-color: #A6A8AA;\r\n content: \"\";\r\n display: block;\r\n height: 0.5rem;\r\n left: 0px;\r\n position: absolute;\r\n right: 0px;\r\n top: 0px;\r\n}\r\n.govcy-step-indicator__segment--complete::after {\r\n background-color: #254355;\r\n}\r\n.govcy-step-indicator__segment--current::after {\r\n background-color: #1D70B8;\r\n}\r\n\r\n/* Label */\r\n.govcy-step-indicator__label {\r\n padding-left: 0.5rem;\r\n padding-right: 0.5rem;\r\n text-align: center;\r\n color: #6d6e70;\r\n line-height:1.1rem;\r\n margin-top: calc(0.75rem);\r\n}\r\n\r\n.govcy-step-indicator__segment--complete .govcy-step-indicator__label {\r\n color: #254355;\r\n}\r\n\r\n.govcy-step-indicator__segment--current .govcy-step-indicator__label {\r\n color: #1D70B8;\r\n font-weight: 700;\r\n}\r\n\r\n@media (min-width: 0px) {\r\n .govcy-step-indicator__counter {\r\n margin-bottom: .5rem !important;\r\n }\r\n .govcy-step-indicator__current-counter {\r\n width: 24px;\r\n height: 24px;\r\n border:1px solid #1D70B8;\r\n background: #1D70B8;\r\n color:#fff;\r\n border-radius: 9999px;\r\n font-weight: 600;\r\n display:inline-block;\r\n text-align:center;\r\n }\r\n /* Hide label on small screens */\r\n .govcy-step-indicator__label {\r\n display:none;\r\n }\r\n}\r\n@media (min-width: 768px) {\r\n .govcy-step-indicator__counter {\r\n font-size:20px;\r\n line-height:19px;\r\n margin-bottom: .5rem !important;\r\n }\r\n .govcy-step-indicator__current-counter {\r\n border-radius:9999px;\r\n border:1px solid #1D70B8;\r\n background: #1D70B8;\r\n color:#fff;\r\n padding:10px;\r\n line-height:19px;\r\n font-weight:600;\r\n font-size:20px;\r\n display:inline-block;\r\n width:40px;\r\n height:40px;\r\n text-align:center;\r\n }\r\n /* Show label on big screens */\r\n .govcy-step-indicator__label {\r\n display:block;\r\n }\r\n}\r\n</style>";
|
|
3735
3734
|
if(runtime.contextOrFrameLookup(context, frame, "showSteps")) {
|
|
3736
3735
|
t_2 += "\r\n <div ";
|
|
3737
3736
|
if(runtime.memberLookup((l_params),"id")) {
|
|
@@ -3747,10 +3746,10 @@ t_2 += runtime.suppressValue(runtime.memberLookup((l_params),"classes"), env.opt
|
|
|
3747
3746
|
;
|
|
3748
3747
|
}
|
|
3749
3748
|
t_2 += "\"";
|
|
3750
|
-
t_2 += runtime.suppressValue((lineno =
|
|
3749
|
+
t_2 += runtime.suppressValue((lineno = 55, colno = 167, runtime.callWrap(t_7, "govcyLangAttribute", context, [runtime.memberLookup((l_params),"lang")])), env.opts.autoescape);
|
|
3751
3750
|
t_2 += ">\r\n <ol class=\"govcy-step-indicator__segments\">";
|
|
3752
3751
|
frame = frame.push();
|
|
3753
|
-
var t_21 = (lineno =
|
|
3752
|
+
var t_21 = (lineno = 57, colno = 26, runtime.callWrap(runtime.contextOrFrameLookup(context, frame, "range"), "range", context, [1,runtime.contextOrFrameLookup(context, frame, "total") + 1]));
|
|
3754
3753
|
if(t_21) {t_21 = runtime.fromIterator(t_21);
|
|
3755
3754
|
var t_20 = t_21.length;
|
|
3756
3755
|
for(var t_19=0; t_19 < t_21.length; t_19++) {
|
|
@@ -3780,7 +3779,7 @@ t_2 += " aria-current=\"step\"";
|
|
|
3780
3779
|
t_2 += ">";
|
|
3781
3780
|
if(runtime.memberLookup((l_params),"steps") && runtime.memberLookup((runtime.memberLookup((l_params),"steps")),t_22 - 1) && runtime.memberLookup((runtime.memberLookup((runtime.memberLookup((l_params),"steps")),t_22 - 1)),"text")) {
|
|
3782
3781
|
t_2 += "<span class=\"govcy-step-indicator__label\">\r\n ";
|
|
3783
|
-
t_2 += runtime.suppressValue((lineno =
|
|
3782
|
+
t_2 += runtime.suppressValue((lineno = 61, colno = 47, runtime.callWrap(t_6, "govcyLocalizeContent", context, [runtime.memberLookup((runtime.memberLookup((runtime.memberLookup((l_params),"steps")),t_22 - 1)),"text"),runtime.memberLookup((l_params),"lang")])), env.opts.autoescape);
|
|
3784
3783
|
if(t_22 < runtime.contextOrFrameLookup(context, frame, "current")) {
|
|
3785
3784
|
t_2 += "\r\n <span class=\"govcy-visually-hidden\">";
|
|
3786
3785
|
t_2 += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "completedLabel"), env.opts.autoescape);
|
|
@@ -3815,7 +3814,7 @@ t_2 += "-counter\" ";
|
|
|
3815
3814
|
;
|
|
3816
3815
|
}
|
|
3817
3816
|
t_2 += "class=\"govcy-step-indicator__counter\"";
|
|
3818
|
-
t_2 += runtime.suppressValue((lineno =
|
|
3817
|
+
t_2 += runtime.suppressValue((lineno = 74, colno = 125, runtime.callWrap(t_7, "govcyLangAttribute", context, [runtime.memberLookup((l_params),"lang")])), env.opts.autoescape);
|
|
3819
3818
|
t_2 += ">\r\n <span class=\"govcy-visually-hidden\">";
|
|
3820
3819
|
t_2 += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "stepLabel"), env.opts.autoescape);
|
|
3821
3820
|
t_2 += " </span>\r\n <span class=\"govcy-step-indicator__current-counter\">";
|
package/package.json
CHANGED
|
@@ -52,111 +52,6 @@
|
|
|
52
52
|
{%- endif -%}
|
|
53
53
|
{#- current and total are mandatory -#}
|
|
54
54
|
{%- if current and total %}
|
|
55
|
-
{#- style to be removed after included in the UDS -#}
|
|
56
|
-
<style>
|
|
57
|
-
.govcy-step-indicator {
|
|
58
|
-
margin-left: 0px;
|
|
59
|
-
margin-right: 0px;
|
|
60
|
-
margin-bottom: .5rem !important;
|
|
61
|
-
}
|
|
62
|
-
.govcy-step-indicator__segments {
|
|
63
|
-
display: flex;
|
|
64
|
-
list-style: none;
|
|
65
|
-
margin: 0px;
|
|
66
|
-
padding: 0px;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.govcy-step-indicator__segment {
|
|
70
|
-
flex: 1 1 0%;
|
|
71
|
-
margin-left: 1px;
|
|
72
|
-
margin-right: 1px;
|
|
73
|
-
max-width: 15rem;
|
|
74
|
-
min-height: 0.5rem;
|
|
75
|
-
position: relative;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.govcy-step-indicator__segment::after {
|
|
79
|
-
background-color: #A6A8AA;
|
|
80
|
-
content: "";
|
|
81
|
-
display: block;
|
|
82
|
-
height: 0.5rem;
|
|
83
|
-
left: 0px;
|
|
84
|
-
position: absolute;
|
|
85
|
-
right: 0px;
|
|
86
|
-
top: 0px;
|
|
87
|
-
}
|
|
88
|
-
.govcy-step-indicator__segment--complete::after {
|
|
89
|
-
background-color: #254355;
|
|
90
|
-
}
|
|
91
|
-
.govcy-step-indicator__segment--current::after {
|
|
92
|
-
background-color: #1D70B8;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/* Label */
|
|
96
|
-
.govcy-step-indicator__label {
|
|
97
|
-
padding-left: 0.5rem;
|
|
98
|
-
padding-right: 0.5rem;
|
|
99
|
-
text-align: center;
|
|
100
|
-
color: #6d6e70;
|
|
101
|
-
line-height:1.1rem;
|
|
102
|
-
margin-top: calc(0.75rem);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.govcy-step-indicator__segment--complete .govcy-step-indicator__label {
|
|
106
|
-
color: #254355;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.govcy-step-indicator__segment--current .govcy-step-indicator__label {
|
|
110
|
-
color: #1D70B8;
|
|
111
|
-
font-weight: 700;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
@media (min-width: 0px) {
|
|
115
|
-
.govcy-step-indicator__counter {
|
|
116
|
-
margin-bottom: .5rem !important;
|
|
117
|
-
}
|
|
118
|
-
.govcy-step-indicator__current-counter {
|
|
119
|
-
width: 24px;
|
|
120
|
-
height: 24px;
|
|
121
|
-
border:1px solid #1D70B8;
|
|
122
|
-
background: #1D70B8;
|
|
123
|
-
color:#fff;
|
|
124
|
-
border-radius: 9999px;
|
|
125
|
-
font-weight: 600;
|
|
126
|
-
display:inline-block;
|
|
127
|
-
text-align:center;
|
|
128
|
-
}
|
|
129
|
-
/* Hide label on small screens */
|
|
130
|
-
.govcy-step-indicator__label {
|
|
131
|
-
display:none;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
@media (min-width: 768px) {
|
|
135
|
-
.govcy-step-indicator__counter {
|
|
136
|
-
font-size:20px;
|
|
137
|
-
line-height:19px;
|
|
138
|
-
margin-bottom: .5rem !important;
|
|
139
|
-
}
|
|
140
|
-
.govcy-step-indicator__current-counter {
|
|
141
|
-
border-radius:9999px;
|
|
142
|
-
border:1px solid #1D70B8;
|
|
143
|
-
background: #1D70B8;
|
|
144
|
-
color:#fff;
|
|
145
|
-
padding:10px;
|
|
146
|
-
line-height:19px;
|
|
147
|
-
font-weight:600;
|
|
148
|
-
font-size:20px;
|
|
149
|
-
display:inline-block;
|
|
150
|
-
width:40px;
|
|
151
|
-
height:40px;
|
|
152
|
-
text-align:center;
|
|
153
|
-
}
|
|
154
|
-
/* Show label on big screens */
|
|
155
|
-
.govcy-step-indicator__label {
|
|
156
|
-
display:block;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
</style>
|
|
160
55
|
{%- if showSteps %}
|
|
161
56
|
<div {% if params.id %}id="{{ params.id }}" {% endif %}class="govcy-step-indicator{% if params.classes %} {{ params.classes }}{% endif %}"{{ govcyLangAttribute(params.lang) }}>
|
|
162
57
|
<ol class="govcy-step-indicator__segments">
|
|
@@ -72,7 +72,7 @@ To use this template you need to pass the following data:
|
|
|
72
72
|
<link rel="apple-touch-icon-precomposed" href="{{ site.cdn.dist }}/img/apple-touch-icon-57x57-precomposed.png">
|
|
73
73
|
|
|
74
74
|
<!-- CSS -->
|
|
75
|
-
<link rel="stylesheet" href="{{ site.cdn.dist }}/css/govcy.uds.min.css" integrity="{{ site.cdn.cssIntegrity }}" crossorigin="anonymous">
|
|
75
|
+
<link rel="stylesheet" href="{{ site.cdn.dist }}/css/govcy.uds.min.css"{% if site.cdn.cssIntegrity %} integrity="{{ site.cdn.cssIntegrity }}" crossorigin="anonymous"{% endif%}>
|
|
76
76
|
|
|
77
77
|
<title>{% if pageData.title %}{{ govcyLocalizeContent(pageData.title, site.lang) }} - {% endif %}{% if site.title %}{{ govcyLocalizeContent(site.title, site.lang) }} - {% endif %}gov.cy</title>
|
|
78
78
|
<meta name="description" content="{{ govcyLocalizeContent(site.description, site.lang) }}">
|
|
@@ -178,6 +178,6 @@ To use this template you need to pass the following data:
|
|
|
178
178
|
{% block bodyEnd %}{% endblock %}
|
|
179
179
|
</section>
|
|
180
180
|
{%- if site.lang == 'en' -%}<script src="{{ site.cdn.dist }}/js/locales/govcy.datepicker.en.min.js"></script>{%- elseif site.lang == 'el' -%}<script src="{{ site.cdn.dist }}/js/locales/govcy.datepicker.el.min.js"></script>{%- endif -%}
|
|
181
|
-
<script src="{{ site.cdn.dist }}/js/govcy.uds.min.js" integrity="{{ site.cdn.jsIntegrity }}" crossorigin="anonymous"></script>
|
|
181
|
+
<script src="{{ site.cdn.dist }}/js/govcy.uds.min.js"{% if site.cdn.jsIntegrity %} integrity="{{ site.cdn.jsIntegrity }}" crossorigin="anonymous"{% endif %}></script>
|
|
182
182
|
</body>
|
|
183
183
|
</html>
|