@madgex/fert 7.2.0 → 7.3.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 +50 -0
- package/bin/cli.js +4 -0
- package/bin/commands/build.js +4 -1
- package/bin/commands/dev-server.js +2 -2
- package/bin/commands/init-template-tasks/copy-theme-files.js +61 -0
- package/bin/commands/init-template-tasks/generate-entry-nunjucks-file.js +64 -0
- package/bin/commands/init-template-tasks/get-macro-name-from-nunjucks.js +13 -0
- package/bin/commands/init-template-tasks/get-nunjucks-dependencies.js +58 -0
- package/bin/commands/init-template-tasks/get-out-dir.js +6 -0
- package/bin/commands/init-template.js +94 -0
- package/bin/commands/validate.js +1 -1
- package/bin/utils/cpid-lookup.js +2 -1
- package/bin/utils/get-assets-path.js +4 -4
- package/bin/utils/index.js +1 -26
- package/bin/utils/validation.js +2 -1
- package/bin/validators/redirects-csv.validator.js +147 -0
- package/constants.js +1 -2
- package/docs/FAQ.md +1 -0
- package/docs/README.md +30 -11
- package/package.json +2 -2
- package/repo-template/services/jobseekers-frontend/templates/footer.njk +18 -19
- package/repo-template/services/jobseekers-frontend/templates/header.njk +19 -74
- package/repo-template/services/recruiterservices-frontend/templates/footer.njk +19 -18
- package/repo-template/services/recruiterservices-frontend/templates/header.njk +19 -82
- package/types.d.ts +1 -0
- package/repo-template/services/jobseekers-frontend/templates/context/footer-nav.njk +0 -27
- package/repo-template/services/jobseekers-frontend/templates/context/main-nav.njk +0 -41
- package/repo-template/services/jobseekers-frontend/templates/context/user-nav.njk +0 -17
- package/repo-template/services/jobseekers-frontend/templates/includes/footer-nav.njk +0 -15
- package/repo-template/services/jobseekers-frontend/templates/includes/main-nav.njk +0 -19
- package/repo-template/services/jobseekers-frontend/templates/includes/user-nav/authenticated.njk +0 -34
- package/repo-template/services/jobseekers-frontend/templates/includes/user-nav/unauthenticated.njk +0 -9
- package/repo-template/services/jobseekers-frontend/templates/translations/da.njk +0 -26
- package/repo-template/services/jobseekers-frontend/templates/translations/de.njk +0 -26
- package/repo-template/services/jobseekers-frontend/templates/translations/en.njk +0 -27
- package/repo-template/services/jobseekers-frontend/templates/translations/es.njk +0 -26
- package/repo-template/services/jobseekers-frontend/templates/translations/fr.njk +0 -26
- package/repo-template/services/jobseekers-frontend/templates/translations/nb.njk +0 -26
- package/repo-template/services/jobseekers-frontend/templates/translations/nl.njk +0 -26
- package/repo-template/services/jobseekers-frontend/templates/translations/sv.njk +0 -26
- package/repo-template/services/jobseekers-frontend/templates/translations/zh-cn.njk +0 -26
- package/repo-template/services/recruiterservices-frontend/templates/context/links.njk +0 -136
- package/repo-template/services/recruiterservices-frontend/templates/includes/basket-nav.njk +0 -25
- package/repo-template/services/recruiterservices-frontend/templates/includes/footer/footer-nav.njk +0 -35
- package/repo-template/services/recruiterservices-frontend/templates/includes/footer/social-links.njk +0 -14
- package/repo-template/services/recruiterservices-frontend/templates/includes/primary-nav.njk +0 -18
- package/repo-template/services/recruiterservices-frontend/templates/includes/user-nav/authenticated.njk +0 -36
- package/repo-template/services/recruiterservices-frontend/templates/includes/user-nav/switch-recruiters.njk +0 -13
- package/repo-template/services/recruiterservices-frontend/templates/includes/user-nav/unauthenticated.njk +0 -11
- package/repo-template/services/recruiterservices-frontend/templates/includes/user-nav/user-nav.njk +0 -9
- package/repo-template/services/recruiterservices-frontend/templates/translations/en.njk +0 -29
package/docs/README.md
CHANGED
|
@@ -12,14 +12,28 @@ Check out [Branding Repository Overview](BRANDING_REPO_OVERVIEW.md) for the stru
|
|
|
12
12
|
|
|
13
13
|
Find out your `Client Property ID` by visiting [Madgexverse](https://madgexverse.job.madgexhosting.net). If your CPID does not exist, you can not work on this Branding Repo right now.
|
|
14
14
|
|
|
15
|
-
This will give you your repository `https://github.com/wiley/madgex-<CPID>` e.g. https://github.com/wiley/madgex-ff6102ff-0f4b-43d1-a2c7-83b835b8dee5. If this is a brand new client, the Branding Repo
|
|
15
|
+
This will give you your repository `https://github.com/wiley/madgex-<CPID>` e.g. https://github.com/wiley/madgex-ff6102ff-0f4b-43d1-a2c7-83b835b8dee5. If this is a brand new client, the Branding Repo will have no branches. See below for empty Branding Repo instructions.
|
|
16
16
|
|
|
17
17
|
> **Ask Systems why, if this is not automatically created**
|
|
18
18
|
|
|
19
|
-
### If you have an **empty** Branding Repo (e.g. a git repository has been set up but has no files)
|
|
19
|
+
### If you have an **empty** Branding Repo (e.g. a git repository has been set up but has no branches or files)
|
|
20
|
+
|
|
21
|
+
To begin with, lets make sure the `master` branch exists (even without commits yet!). Its important that a branch named `master` exists for our infrastructure to work (e.g. jenkins)
|
|
22
|
+
|
|
23
|
+
- After you have checked out an empty Branding Repo, `cd` into your empty git repo folder
|
|
24
|
+
|
|
25
|
+
> Although this should not happen on new Branding Repos: if the current branch says `main` instead of `master`, we need to fix this.
|
|
26
|
+
>
|
|
27
|
+
> - Rename the `main` branch to `master` (I use vscode and right click on the branch and select `rename branch`) or cli `git branch -m main master`
|
|
28
|
+
|
|
29
|
+
- Now we have an empty branch called `master` on our local machine, we can make an empty commit to this branch, then push it to github remote.
|
|
30
|
+
- `git commit --allow-empty -m "init"`
|
|
31
|
+
- `git push -u origin master`
|
|
32
|
+
|
|
33
|
+
Now `master` branch is properly created _and_ exists on github remote (although we have not committed to it yet!), lets do our first bit of work in a new branch. `master` should only be merged into from other branches via PRs in github.
|
|
20
34
|
|
|
21
35
|
- Switch into a new branch
|
|
22
|
-
-
|
|
36
|
+
- Use `npx @madgex/fert init .` and follow the prompts, this will populate your directory, including at least one `service` where the majority of the work will be done.
|
|
23
37
|
- `npm i` install packages.
|
|
24
38
|
|
|
25
39
|
### If you have an existing Branding Repo
|
|
@@ -63,15 +77,20 @@ Themes work better on V5 than Custom templates. If you must create Custom templa
|
|
|
63
77
|
|
|
64
78
|
### Custom template
|
|
65
79
|
|
|
66
|
-
|
|
80
|
+
If the client has pushed us to design a Custom design, then we can create a good starting point by cloning an existing Theme into a branding repo service.
|
|
81
|
+
Then you will have your own copy of the Theme files to modify to match the design.
|
|
82
|
+
|
|
83
|
+
Run the FERT command `init-template` like so `npx @madgex/fert init-template`, in the root of an existing branding repo, and follow the prompts to select the Theme you would like to clone, and which service it will be for.
|
|
84
|
+
|
|
85
|
+
### Available global Nunjucks context
|
|
67
86
|
|
|
68
|
-
|
|
87
|
+
Variables and functions available in the Nunjucks templates.
|
|
69
88
|
|
|
70
|
-
- `templatePath: string`: Required prefix for
|
|
71
|
-
- `path: string`: current page relative URL
|
|
72
|
-
- `normaliseUrl: Filter`: removes trailing slash from a URL, e.g. `{{path === myNavLink | normaliseUrl }}`
|
|
73
|
-
- `getServiceRoute(serviceRouterId,routeId,paramsObj,queryObj):Function` : [
|
|
74
|
-
- `getAbsoluteServiceRoute(serviceRouterId,routeId,paramsObj,queryObj):Function` : [
|
|
89
|
+
- `templatePath: string`: **Required** prefix for `import`/`include` additional Nunjucks files e.g. `{%- from './include/my-other-file.njk' import myOtherFileMacro with context -%} {%- include templatePath + './include/my-other-file.njk' -%}`
|
|
90
|
+
- `path: string`: current page relative URL, (does not have trailing slash!) - use in navigation for current page check
|
|
91
|
+
- `normaliseUrl: Filter`: removes trailing slash from a URL, good for comparison with `path`, e.g. `{{path === myNavLink | normaliseUrl }}`
|
|
92
|
+
- `getServiceRoute(serviceRouterId,routeId,paramsObj,queryObj):Function` : recommended to generate _relative_ URLs from V5 source of truth, instead of hand-written [usage](https://github.com/wiley/madgex-hapi-reverse-router/blob/master/packages/@madgex.hapi-reverse-router/README.md#usage-example)
|
|
93
|
+
- `getAbsoluteServiceRoute(serviceRouterId,routeId,paramsObj,queryObj):Function` : recommended to generate _absolute_ URLs from V5 source of truth, instead of hand-written [usage](https://github.com/wiley/madgex-hapi-reverse-router/blob/master/packages/@madgex.hapi-reverse-router/README.md#usage-example)
|
|
75
94
|
- routeId reference for [`"jobseekersite"`](https://jobseekers-frontend.job.madgexhosting.net/api/routing-table/ff6102ff-0f4b-43d1-a2c7-83b835b8dee5)
|
|
76
95
|
- routeId reference for [`"recruitersite"`](https://recruiterservices-frontend.job.madgexhosting.net/api/routing-table/ff6102ff-0f4b-43d1-a2c7-83b835b8dee5)
|
|
77
96
|
- e.g. `{{getServiceRoute('jobseekersite', 'account.login', {}, {Pipline: path})}}`
|
|
@@ -79,7 +98,7 @@ Available global Nunjucks context:
|
|
|
79
98
|
|
|
80
99
|
## 🔠 Service V6 translations
|
|
81
100
|
|
|
82
|
-
Each `service` in a branding repo may have **optional** translation overrides.
|
|
101
|
+
Each `service` in a branding repo may have **optional** translation overrides. These are consumed by the V6 service (so not consumed by the header/footer)
|
|
83
102
|
|
|
84
103
|
These live at `<root>/services/<SERVICE_NAME>/public/translation.json`, e.g. https://github.com/wiley/madgex-ff6102ff-0f4b-43d1-a2c7-83b835b8dee5/blob/901e5b2295892747015bd1c9bab7ac307b4e2112/services/jobseekers-frontend/public/translation.json .
|
|
85
104
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@madgex/fert",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0",
|
|
4
4
|
"description": "Tool to help build the V6 branding",
|
|
5
5
|
"bin": {
|
|
6
6
|
"fert": "./bin/cli.js"
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"prompts": "2.4.2",
|
|
49
49
|
"rimraf": "6.1.3",
|
|
50
50
|
"sass": "1.98.0",
|
|
51
|
-
"simple-git": "3.
|
|
51
|
+
"simple-git": "3.36.0",
|
|
52
52
|
"simple-update-notifier": "2.0.0",
|
|
53
53
|
"uuid-validate": "0.0.3",
|
|
54
54
|
"vite": "7.3.2",
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
{
|
|
1
|
+
{# Populate this entry file with a Theme generated from https://header-footer-podlet.job.madgexhosting.net/storybook/
|
|
2
|
+
{{ FooterThemeColumns( <-- macro name which is globally accessible without doing an import, see Storybook for Theme's macro name
|
|
3
|
+
{
|
|
4
|
+
"macroName": "FooterThemeColumns",
|
|
5
|
+
"serviceName": "jobseekers-frontend", <-- ensure serviceName is correct for this service
|
|
6
|
+
"locale": "en",
|
|
7
|
+
"cssVarColorText": "#000",
|
|
8
|
+
...more args generated from Header Footer Podlet's Storybook
|
|
9
|
+
}
|
|
10
|
+
)}}
|
|
11
|
+
#}
|
|
2
12
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
</div>
|
|
11
|
-
</div>
|
|
12
|
-
<div class="wrapper content">
|
|
13
|
-
{% include templatePath + './includes/footer-nav.njk' %}
|
|
14
|
-
|
|
15
|
-
<p class="copyright no-margin">
|
|
16
|
-
© 2008 - {{ dayjs().format('YYYY') }} bigworkbag.com, all rights reserved. Powered by Madgex Job Board Software
|
|
17
|
-
</p>
|
|
18
|
-
</div>
|
|
19
|
-
</footer>
|
|
20
|
-
</div>
|
|
13
|
+
{#
|
|
14
|
+
Alternatively, if this client has pushed for a Custom non-Theme design, you can run `npx @madgex/fert init-template` from the root of this branding repo and follow the prompts.
|
|
15
|
+
This will clone a custom version of one of the Themes from header-footer-podlet which you can modify completely.
|
|
16
|
+
|
|
17
|
+
🚨🚨🚨 Remember Custom non-Theme designs are discourage and should only happen if the client really pushed for it.
|
|
18
|
+
If there are only minor differences from a Theme and the design, then pushed back and get back into a standard Theme 🚨🚨🚨
|
|
19
|
+
#}
|
|
@@ -1,74 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
{
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
</mdgx-togglable-nav>
|
|
21
|
-
</li>
|
|
22
|
-
|
|
23
|
-
<li class="nav-toggles__item nav-toggles__item--secondary">
|
|
24
|
-
<mdgx-togglable-nav aria-controls="secondary-nav">
|
|
25
|
-
<a href="#secondary-nav" title="User menu" class="js-togglable-nav-trigger">
|
|
26
|
-
<i class="icon-after" data-icon="☺" aria-hidden="true"></i>
|
|
27
|
-
<span class="hidden">{{ translations.header["skip-to-user-menu"] }}</span>
|
|
28
|
-
</a>
|
|
29
|
-
</mdgx-togglable-nav>
|
|
30
|
-
</li>
|
|
31
|
-
</ul>
|
|
32
|
-
|
|
33
|
-
<nav aria-label="{{ translations.header["user"] }}" id="secondary-nav" class="secondary-nav togglable-nav cf js-togglable-nav">
|
|
34
|
-
<ul class="secondary-nav__items togglable-nav__items cf">
|
|
35
|
-
<li class="togglable-nav__item secondary-nav__item secondary-nav--jobseekers jobseekers jobseekers-nav">
|
|
36
|
-
{# User Nav #}
|
|
37
|
-
{%- ifAsync auth.isAuthenticated %}
|
|
38
|
-
{% include templatePath + './includes/user-nav/authenticated.njk' %}
|
|
39
|
-
{%- else %}
|
|
40
|
-
{% include templatePath + './includes/user-nav/unauthenticated.njk' %}
|
|
41
|
-
{% endif -%}
|
|
42
|
-
</li>
|
|
43
|
-
<li class="togglable-nav__item secondary-nav__item secondary-nav--recruiters recruiters recruiters-nav">
|
|
44
|
-
<ul class="recruiters__items cf">
|
|
45
|
-
<li class="togglable-nav__item recruiters__item recruiters__item--button">
|
|
46
|
-
<a
|
|
47
|
-
href="https://bigworkbag-rs.madgexjb.com/" {# Add recruiter site link var #}
|
|
48
|
-
data-icon="▶"
|
|
49
|
-
class="button button--brand icon-after icon-white js-recruiter-link recruiters__item--link">{{ translations.header["recruiters"] }}
|
|
50
|
-
</a>
|
|
51
|
-
</li>
|
|
52
|
-
</ul>
|
|
53
|
-
</li>
|
|
54
|
-
</ul>
|
|
55
|
-
</nav>
|
|
56
|
-
|
|
57
|
-
</div>
|
|
58
|
-
</div>
|
|
59
|
-
<div id="ad-mobileleaderboard" class="ad--mobileleaderboard ad--mobileleaderboard--empty"></div>
|
|
60
|
-
|
|
61
|
-
<div class="wrapper cf">
|
|
62
|
-
<div class="primary-logo">
|
|
63
|
-
<a href="/">
|
|
64
|
-
<img src="/public/images/logo.png" alt="Bigworkbag Home"/>
|
|
65
|
-
</a>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
|
|
69
|
-
{% include templatePath + './includes/main-nav.njk' %}
|
|
70
|
-
|
|
71
|
-
</header>
|
|
72
|
-
</div>
|
|
73
|
-
|
|
74
|
-
<!-- END HEADER FRAGMENT -->
|
|
1
|
+
{# Populate this entry file with a Theme generated from https://header-footer-podlet.job.madgexhosting.net/storybook/
|
|
2
|
+
{{ HeaderThemeInlineUserNav( <-- macro name which is globally accessible without doing an import, see Storybook for Theme's macro name
|
|
3
|
+
{
|
|
4
|
+
"macroName": "HeaderThemeInlineUserNav",
|
|
5
|
+
"serviceName": "jobseekers-frontend", <-- ensure serviceName is correct for this service
|
|
6
|
+
"locale": "en",
|
|
7
|
+
"cssVarColorText": "#000",
|
|
8
|
+
...more args generated from Header Footer Podlet's Storybook
|
|
9
|
+
}
|
|
10
|
+
)}}
|
|
11
|
+
#}
|
|
12
|
+
|
|
13
|
+
{#
|
|
14
|
+
Alternatively, if this client has pushed for a Custom non-Theme design, you can run `npx @madgex/fert init-template` from the root of this branding repo and follow the prompts.
|
|
15
|
+
This will clone a custom version of one of the Themes from header-footer-podlet which you can modify completely.
|
|
16
|
+
|
|
17
|
+
🚨🚨🚨 Remember Custom non-Theme designs are discourage and should only happen if the client really pushed for it.
|
|
18
|
+
If there are only minor differences from a Theme and the design, then pushed back and get back into a standard Theme 🚨🚨🚨
|
|
19
|
+
#}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
{
|
|
2
|
-
{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
{# Populate this entry file with a Theme generated from https://header-footer-podlet.job.madgexhosting.net/storybook/
|
|
2
|
+
{{ FooterThemeColumns( <-- macro name which is globally accessible without doing an import, see Storybook for Theme's macro name
|
|
3
|
+
{
|
|
4
|
+
"macroName": "FooterThemeColumns",
|
|
5
|
+
"serviceName": "recruiterservices-frontend", <-- ensure serviceName is correct for this service
|
|
6
|
+
"locale": "en",
|
|
7
|
+
"cssVarColorText": "#000",
|
|
8
|
+
...more args generated from Header Footer Podlet's Storybook
|
|
9
|
+
}
|
|
10
|
+
)}}
|
|
11
|
+
#}
|
|
12
|
+
|
|
13
|
+
{#
|
|
14
|
+
Alternatively, if this client has pushed for a Custom non-Theme design, you can run `npx @madgex/fert init-template` from the root of this branding repo and follow the prompts.
|
|
15
|
+
This will clone a custom version of one of the Themes from header-footer-podlet which you can modify completely.
|
|
16
|
+
|
|
17
|
+
🚨🚨🚨 Remember Custom non-Theme designs are discourage and should only happen if the client really pushed for it.
|
|
18
|
+
If there are only minor differences from a Theme and the design, then pushed back and get back into a standard Theme 🚨🚨🚨
|
|
19
|
+
#}
|
|
@@ -1,82 +1,19 @@
|
|
|
1
|
-
{
|
|
2
|
-
{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
</svg>
|
|
21
|
-
</mds-dropdown-nav>
|
|
22
|
-
<div id="primary-nav_mobile" class="toggle-nav_content">
|
|
23
|
-
{% include templatePath + 'includes/primary-nav.njk' %}
|
|
24
|
-
</div>
|
|
25
|
-
|
|
26
|
-
{# Basket Navigation #}
|
|
27
|
-
{%- if isAuthenticated -%}
|
|
28
|
-
<mds-dropdown-nav target="basket-nav_mobile" aria-label="{{ translations["basket-nav-button"] }}" class="toggle-nav_button toggle-nav--basket-nav">
|
|
29
|
-
<svg aria-hidden="true" focusable="false" class="icon" alt="">
|
|
30
|
-
<use href="/public/icons/icons.svg#icon-cart"></use>
|
|
31
|
-
</svg>
|
|
32
|
-
</mds-dropdown-nav>
|
|
33
|
-
<div id="basket-nav_mobile" class="toggle-nav_content">
|
|
34
|
-
{% include templatePath + 'includes/basket-nav.njk' %}
|
|
35
|
-
</div>
|
|
36
|
-
{%- endif -%}
|
|
37
|
-
|
|
38
|
-
{# User Navigation #}
|
|
39
|
-
<mds-dropdown-nav target="user-nav_mobile" aria-label="{{ translations["user-nav-button"] }}" class="toggle-nav_button toggle-nav--user-nav">
|
|
40
|
-
<svg aria-hidden="true" focusable="false" class="icon" alt="">
|
|
41
|
-
<use href="/public/icons/icons.svg#icon-user"></use>
|
|
42
|
-
</svg>
|
|
43
|
-
</mds-dropdown-nav>
|
|
44
|
-
<div id="user-nav_mobile" class="toggle-nav_content">
|
|
45
|
-
{{ UserNavigation({ switchCompanyForm: false, isAuthenticated: isAuthenticated, primaryRecruiter: primaryRecruiter }) }}
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
|
|
49
|
-
{# Main Banner #}
|
|
50
|
-
<div>
|
|
51
|
-
<div class="site-width-wrapper main-banner">
|
|
52
|
-
|
|
53
|
-
{# Primary Logo #}
|
|
54
|
-
<div class="primary-logo">
|
|
55
|
-
<a href="/">
|
|
56
|
-
<img src="/public/images/logo.png" alt="{{ translations["logo-alt"] }}"/>
|
|
57
|
-
</a>
|
|
58
|
-
</div>
|
|
59
|
-
|
|
60
|
-
<div class="secondary-navs">
|
|
61
|
-
|
|
62
|
-
{# User Navigation #}
|
|
63
|
-
{{ UserNavigation({ switchCompanyForm: true, isAuthenticated: isAuthenticated, primaryRecruiter: primaryRecruiter }) }}
|
|
64
|
-
|
|
65
|
-
{# Basket #}
|
|
66
|
-
{%- if isAuthenticated -%}
|
|
67
|
-
{% include templatePath + 'includes/basket-nav.njk' %}
|
|
68
|
-
{%- endif -%}
|
|
69
|
-
</div>
|
|
70
|
-
</div>
|
|
71
|
-
|
|
72
|
-
{# Primary Navigation #}
|
|
73
|
-
<div>
|
|
74
|
-
<div class="site-width-wrapper main-nav">
|
|
75
|
-
{% include templatePath + 'includes/primary-nav.njk' %}
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
</div>
|
|
79
|
-
</header>
|
|
80
|
-
</div>
|
|
81
|
-
|
|
82
|
-
<!-- END HEADER FRAGMENT -->
|
|
1
|
+
{# Populate this entry file with a Theme generated from https://header-footer-podlet.job.madgexhosting.net/storybook/
|
|
2
|
+
{{ HeaderThemeInlineUserNav( <-- macro name which is globally accessible without doing an import, see Storybook for Theme's macro name
|
|
3
|
+
{
|
|
4
|
+
"macroName": "HeaderThemeInlineUserNav",
|
|
5
|
+
"serviceName": "recruiterservices-frontend", <-- ensure serviceName is correct for this service
|
|
6
|
+
"locale": "en",
|
|
7
|
+
"cssVarColorText": "#000",
|
|
8
|
+
...more args generated from Header Footer Podlet's Storybook
|
|
9
|
+
}
|
|
10
|
+
)}}
|
|
11
|
+
#}
|
|
12
|
+
|
|
13
|
+
{#
|
|
14
|
+
Alternatively, if this client has pushed for a Custom non-Theme design, you can run `npx @madgex/fert init-template` from the root of this branding repo and follow the prompts.
|
|
15
|
+
This will clone a custom version of one of the Themes from header-footer-podlet which you can modify completely.
|
|
16
|
+
|
|
17
|
+
🚨🚨🚨 Remember Custom non-Theme designs are discourage and should only happen if the client really pushed for it.
|
|
18
|
+
If there are only minor differences from a Theme and the design, then pushed back and get back into a standard Theme 🚨🚨🚨
|
|
19
|
+
#}
|
package/types.d.ts
CHANGED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
{% set footerNavigation = [
|
|
2
|
-
{
|
|
3
|
-
"href": "/about-us",
|
|
4
|
-
"label": "About us",
|
|
5
|
-
"openInNewWindow": false
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
"href": "/contact-us",
|
|
9
|
-
"label": "Contact us",
|
|
10
|
-
"openInNewWindow": false
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"href": "/terms-and-conditions/",
|
|
14
|
-
"label": "Terms & conditions",
|
|
15
|
-
"openInNewWindow": false
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"href": "/privacy-policy",
|
|
19
|
-
"label": "Privacy Policy",
|
|
20
|
-
"openInNewWindow": false
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"href": "https://bigworkbag-rs.madgexjb.com/",
|
|
24
|
-
"label": "Advertise with us",
|
|
25
|
-
"openInNewWindow": false
|
|
26
|
-
}
|
|
27
|
-
] %}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
{% set mainNavigation = [
|
|
2
|
-
{
|
|
3
|
-
"href": "/",
|
|
4
|
-
"label": "Home",
|
|
5
|
-
"openInNewWindow": false
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
"href": "/jobs",
|
|
9
|
-
"label": "Find a job",
|
|
10
|
-
"openInNewWindow": false
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"href": "/newalert",
|
|
14
|
-
"label": "Job alerts",
|
|
15
|
-
"openInNewWindow": false
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"href": "/employers",
|
|
19
|
-
"label": "Search recruiters",
|
|
20
|
-
"openInNewWindow": false
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"href": "/careers",
|
|
24
|
-
"label": "Career advice",
|
|
25
|
-
"openInNewWindow": false
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"href": "/careerfairs",
|
|
29
|
-
"label": "Career fairs",
|
|
30
|
-
"openInNewWindow": false
|
|
31
|
-
}, {
|
|
32
|
-
"href": "/cp/role-explorer",
|
|
33
|
-
"label": "Role Insights",
|
|
34
|
-
"openInNewWindow": false
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"href": "/forum",
|
|
38
|
-
"label": "Forum",
|
|
39
|
-
"openInNewWindow": false
|
|
40
|
-
}
|
|
41
|
-
] %}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{% set userNavigation = [
|
|
2
|
-
{
|
|
3
|
-
"href": "/your-jobs",
|
|
4
|
-
"label": "Your jobs",
|
|
5
|
-
"openInNewWindow": false
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
"href": "/profile",
|
|
9
|
-
"label": "Your profile",
|
|
10
|
-
"openInNewWindow": false
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"href": "/account",
|
|
14
|
-
"label": "Your account",
|
|
15
|
-
"openInNewWindow": false
|
|
16
|
-
}
|
|
17
|
-
] %}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{%- from templatePath + 'context/footer-nav.njk' import footerNavigation -%}
|
|
2
|
-
|
|
3
|
-
{%- if footerNavigation.length -%}
|
|
4
|
-
<nav aria-label="{{ translations.footer["footer"] }}" class="tertiary-nav block">
|
|
5
|
-
<ul class="tertiary-nav__items cf">
|
|
6
|
-
{%- for item in footerNavigation -%}
|
|
7
|
-
<li class="tertiary-nav__item tertiary-nav__item--index-{{loop.index0}}">
|
|
8
|
-
<a class="tertiary-nav__link" href="{{ item.href }}" {%- if item.openInNewWindow -%} target="_blank" rel="noopener" {% endif %}>
|
|
9
|
-
{{ item.label | safe }}{%- if item.openInNewWindow %} <span class="mds-visually-hidden">{{ translations.header["link-new-window"] }}</span>{%- endif -%}
|
|
10
|
-
</a>
|
|
11
|
-
</li>
|
|
12
|
-
{%- endfor -%}
|
|
13
|
-
</ul>
|
|
14
|
-
</nav>
|
|
15
|
-
{%- endif -%}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{%- from templatePath + 'context/main-nav.njk' import mainNavigation -%}
|
|
2
|
-
|
|
3
|
-
<nav aria-label="{{ translations.header["main"] }}" id="primary-nav" class="primary-nav togglable-nav js-togglable-nav">
|
|
4
|
-
<div class="wrapper">
|
|
5
|
-
{% if mainNavigation.length %}
|
|
6
|
-
<ul class="primary-nav__items togglable-nav__items cf">
|
|
7
|
-
{% for item in mainNavigation %}
|
|
8
|
-
<li class="togglable-nav__item primary-nav__item primary-nav__item--index-{{loop.index0}}
|
|
9
|
-
{%- if item.href | normaliseUrl === path %} primary-nav__item--active{% endif -%}
|
|
10
|
-
{%- if loop.last %} primary-nav__item--last{% endif -%}">
|
|
11
|
-
<a class="primary-nav__link" href="{{ item.href }}" {%- if item.openInNewWindow -%} target="_blank" rel="noopener" {% endif %}><span class="primary-nav__label">{{- item.label | safe -}}</span>{%- if item.openInNewWindow %}<span class="hidden">{{ translations.header["link-new-window"] }}</span>{% endif %}
|
|
12
|
-
</a>
|
|
13
|
-
</li>
|
|
14
|
-
{% endfor %}
|
|
15
|
-
</ul>
|
|
16
|
-
{% endif %}
|
|
17
|
-
<div class="sector-nav--smallscreen" data-set="sector-nav"></div>
|
|
18
|
-
</div>
|
|
19
|
-
</nav>
|
package/repo-template/services/jobseekers-frontend/templates/includes/user-nav/authenticated.njk
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{%- from templatePath + 'context/user-nav.njk' import userNavigation -%}
|
|
2
|
-
<ul class="jobseekers__items cf">
|
|
3
|
-
<li class="user-nav togglable-nav__item jobseekers__item jobseekers__item--username">
|
|
4
|
-
<a
|
|
5
|
-
href="#user-nav-items"
|
|
6
|
-
title="User menu"
|
|
7
|
-
data-icon="☺"
|
|
8
|
-
class="user-nav__toggle icon-before js-togglable-nav-trigger"
|
|
9
|
-
data-hj-suppress>
|
|
10
|
-
<span data-icon="▼" class="user-nav__triangle icon-after" data-hj-suppress>{{ auth.credentials.username | safe }}</span>
|
|
11
|
-
</a>
|
|
12
|
-
<ul id="user-nav-items" class="user-nav__items togglable-nav togglable-nav--secondary z-index-bump js-togglable-nav">
|
|
13
|
-
<li
|
|
14
|
-
class="user-nav__item user-nav__item--first user-nav__item--label togglable-nav__item togglable-nav__item--first"
|
|
15
|
-
data-hj-suppress>
|
|
16
|
-
{{ auth.credentials.username | safe }}
|
|
17
|
-
</li>
|
|
18
|
-
{% for item in userNavigation %}
|
|
19
|
-
<li class="user-nav__item togglable-nav__item">
|
|
20
|
-
<a class="user-nav__link" href="{{ item.href }}">{{ item.label }}</a>
|
|
21
|
-
</li>
|
|
22
|
-
{% endfor %}
|
|
23
|
-
</ul>
|
|
24
|
-
</li>
|
|
25
|
-
<li class="togglable-nav__item jobseekers__item jobseekers__item--shortlist">
|
|
26
|
-
<a href="/your-jobs?ActiveSection=ShortList">
|
|
27
|
-
<span aria-hidden="true" class="icon-after js-shortlist-counter" data-icon="★" title="Your shortlist">{{ auth.artifacts.shortlistedJobs | length | default(0) }}</span>
|
|
28
|
-
<span class="hidden">{{ translations.header["your-shortlist"] }} (<span class="js-shortlist-counter">{{ auth.artifacts.shortlistedJobs | length | default(0) }}</span>)</span>
|
|
29
|
-
</a>
|
|
30
|
-
</li>
|
|
31
|
-
<li class="togglable-nav__item togglable-nav__item--last jobseekers__item jobseekers__item--sign-out">
|
|
32
|
-
<a href="{{ getServiceRoute('jobseekersite', 'account.logoff') }}">{{ translations.header["sign-out"] }}</a>
|
|
33
|
-
</li>
|
|
34
|
-
</ul>
|
package/repo-template/services/jobseekers-frontend/templates/includes/user-nav/unauthenticated.njk
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<ul class="jobseekers__items cf">
|
|
2
|
-
<li class="togglable-nav__item jobseekers__item jobseekers__item--sign-in">
|
|
3
|
-
<a href="{{ getServiceRoute('jobseekersite', 'account.login') }}">{{ translations.header["sign-in"] }}</a>
|
|
4
|
-
<span class="text or">{{ translations.header["or"] }}</span>
|
|
5
|
-
</li>
|
|
6
|
-
<li class="togglable-nav__item togglable-nav__item--last jobseekers__item jobseekers__item--create-account">
|
|
7
|
-
<a href="{{ getServiceRoute('jobseekersite', 'account.signup') }}">{{ translations.header["create-account"] }}</a>
|
|
8
|
-
</li>
|
|
9
|
-
</ul>
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{% set translations = {
|
|
2
|
-
header: {
|
|
3
|
-
"sign-in": "Log ind",
|
|
4
|
-
"sign-out": "Log ud",
|
|
5
|
-
"or": "eller",
|
|
6
|
-
"create-account": "Opret konto",
|
|
7
|
-
"link-new-window": "(Dette vil åbne i et nyt vindue)",
|
|
8
|
-
"your-shortlist": "Din jobliste",
|
|
9
|
-
"user-menu": "Brugermenu",
|
|
10
|
-
|
|
11
|
-
"skip-to-main-menu": "Gå direkte til hovedmenu",
|
|
12
|
-
"skip-to-user-menu": "Skip to user menu",
|
|
13
|
-
|
|
14
|
-
"recruiters": "Hververe",
|
|
15
|
-
"jobseekers": "Jobsøgende",
|
|
16
|
-
|
|
17
|
-
"user": "Bruger",
|
|
18
|
-
"homepage": "Forsiden",
|
|
19
|
-
"main": "Hovedmenu"
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
footer: {
|
|
23
|
-
"back-to-top": "Tilbage til toppen",
|
|
24
|
-
"footer": "Sidefod"
|
|
25
|
-
}
|
|
26
|
-
} %}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{% set translations = {
|
|
2
|
-
header: {
|
|
3
|
-
"sign-in": "Log ind",
|
|
4
|
-
"sign-out": "Log ud",
|
|
5
|
-
"or": "eller",
|
|
6
|
-
"create-account": "Opret konto",
|
|
7
|
-
"link-new-window": "(Dette vil åbne i et nyt vindue)",
|
|
8
|
-
"your-shortlist": "Din jobliste",
|
|
9
|
-
"user-menu": "Brugermenu",
|
|
10
|
-
|
|
11
|
-
"skip-to-main-menu": "Überspringen und zur Hauptseite zurückkehren",
|
|
12
|
-
"skip-to-user-menu": "Skip to user menu",
|
|
13
|
-
|
|
14
|
-
"recruiters": "Stellenanbieter",
|
|
15
|
-
"jobseekers": "Bewerber",
|
|
16
|
-
|
|
17
|
-
"user": "Benutzer",
|
|
18
|
-
"homepage": "Startseite",
|
|
19
|
-
"main": "Hauptmenü"
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
footer: {
|
|
23
|
-
"back-to-top": "Nach oben",
|
|
24
|
-
"footer": "Fusszeile"
|
|
25
|
-
}
|
|
26
|
-
} %}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
{% set translations = {
|
|
2
|
-
|
|
3
|
-
header: {
|
|
4
|
-
"sign-in": "Sign in",
|
|
5
|
-
"sign-out": "Sign out",
|
|
6
|
-
"or": "or",
|
|
7
|
-
"create-account": "Create account",
|
|
8
|
-
"link-new-window": "(This link will open in a new window)",
|
|
9
|
-
"your-shortlist": "Your shortlist",
|
|
10
|
-
"user-menu": "User menu",
|
|
11
|
-
|
|
12
|
-
"skip-to-main-menu": "Skip to main menu",
|
|
13
|
-
"skip-to-user-menu": "Skip to user menu",
|
|
14
|
-
|
|
15
|
-
"recruiters": "Recruiters",
|
|
16
|
-
"jobseekers": "Jobseekers",
|
|
17
|
-
|
|
18
|
-
"user": "User",
|
|
19
|
-
"homepage": "Homepage",
|
|
20
|
-
"main": "Main menu"
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
footer: {
|
|
24
|
-
"back-to-top": "Back to top",
|
|
25
|
-
"footer": "Footer"
|
|
26
|
-
}
|
|
27
|
-
} %}
|