@madgex/fert 7.2.1 → 7.4.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/bin/cli.js +4 -0
- package/bin/commands/build.js +1 -1
- package/bin/commands/dev-server.js +10 -3
- 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/publish.js +6 -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 +22 -1
- package/bin/validators/css.validator.js +73 -0
- package/bin/validators/nav-links.validator.js +74 -0
- package/bin/validators/required-assets.validator.js +34 -0
- package/bin/validators/service-config.validator.js +121 -0
- package/constants.js +0 -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
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import * as validation from '../utils/validation.js';
|
|
3
|
+
import { exists } from '../utils/index.js';
|
|
4
|
+
|
|
5
|
+
export const name = 'required-assets';
|
|
6
|
+
export const description = 'Validates that required asset files exist in the service public directory';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Main validation function.
|
|
10
|
+
* Checks for required assets like favicon.ico
|
|
11
|
+
* @property {object} options
|
|
12
|
+
* @property {FertConfig} options.fertConfig - Resolved config
|
|
13
|
+
* @returns {Promise<Array<ValidationResult>>} Array of validation results
|
|
14
|
+
*/
|
|
15
|
+
export async function validate({ fertConfig }) {
|
|
16
|
+
const resultsCollection = validation.createResultCollection();
|
|
17
|
+
|
|
18
|
+
const publicDir = path.resolve(fertConfig.workingDir, 'public');
|
|
19
|
+
|
|
20
|
+
// Check for favicon.ico (ERROR if missing)
|
|
21
|
+
const faviconPath = path.join(publicDir, 'images', 'favicon.ico');
|
|
22
|
+
if (!(await exists(faviconPath))) {
|
|
23
|
+
resultsCollection
|
|
24
|
+
.addResult('Missing required favicon.ico')
|
|
25
|
+
.err()
|
|
26
|
+
.filePath(faviconPath)
|
|
27
|
+
.detail('Every service must include a favicon.ico file at public/images/favicon.ico');
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// TODO: Add font file validation (WARNING) if referenced in brand.json or CSS
|
|
31
|
+
// TODO: Add icon file validation (WARNING) if referenced in templates or CSS
|
|
32
|
+
|
|
33
|
+
return resultsCollection.results;
|
|
34
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import * as validation from '../utils/validation.js';
|
|
3
|
+
import { FERT_SERVICE_CONFIG_FILENAME } from '../../constants.js';
|
|
4
|
+
import { exists, loadConfigFromFile } from '../utils/index.js';
|
|
5
|
+
|
|
6
|
+
export const name = 'service-config';
|
|
7
|
+
export const description = 'Validates fert.service.config.js structure and required fields';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Main validation function.
|
|
11
|
+
* Validates the raw service config file (not the merged/resolved fertConfig).
|
|
12
|
+
* @property {object} options
|
|
13
|
+
* @property {FertConfig} options.fertConfig - Resolved config (used to locate the raw config file)
|
|
14
|
+
* @returns {Promise<Array<ValidationResult>>} Array of validation results
|
|
15
|
+
*/
|
|
16
|
+
export async function validate({ fertConfig }) {
|
|
17
|
+
const resultsCollection = validation.createResultCollection();
|
|
18
|
+
|
|
19
|
+
const configPath = path.resolve(fertConfig.workingDir, FERT_SERVICE_CONFIG_FILENAME);
|
|
20
|
+
|
|
21
|
+
// Load raw service config from file
|
|
22
|
+
if (!(await exists(configPath))) {
|
|
23
|
+
resultsCollection
|
|
24
|
+
.addResult(`Service config file not found: ${FERT_SERVICE_CONFIG_FILENAME}`)
|
|
25
|
+
.err()
|
|
26
|
+
.filePath(configPath)
|
|
27
|
+
.detail('Each service must have a fert.service.config.js file');
|
|
28
|
+
return resultsCollection.results;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
let rawConfig;
|
|
32
|
+
try {
|
|
33
|
+
rawConfig = await loadConfigFromFile({
|
|
34
|
+
dir: fertConfig.workingDir,
|
|
35
|
+
filename: FERT_SERVICE_CONFIG_FILENAME,
|
|
36
|
+
silent: true,
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
if (!rawConfig) {
|
|
40
|
+
resultsCollection
|
|
41
|
+
.addResult(`Failed to load service config file`)
|
|
42
|
+
.err()
|
|
43
|
+
.filePath(configPath)
|
|
44
|
+
.detail('The config file could not be imported. Check for syntax errors.');
|
|
45
|
+
return resultsCollection.results;
|
|
46
|
+
}
|
|
47
|
+
} catch (err) {
|
|
48
|
+
resultsCollection
|
|
49
|
+
.addResult(`Failed to parse service config: ${err.message}`)
|
|
50
|
+
.err()
|
|
51
|
+
.filePath(configPath)
|
|
52
|
+
.detail('Ensure the file exports a valid configuration object');
|
|
53
|
+
return resultsCollection.results;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Validate serviceName (required, ERROR)
|
|
57
|
+
if (!rawConfig.serviceName) {
|
|
58
|
+
resultsCollection
|
|
59
|
+
.addResult('Missing required field: serviceName')
|
|
60
|
+
.err()
|
|
61
|
+
.filePath(configPath)
|
|
62
|
+
.detail('serviceName must be specified as a string (e.g., "jobseekers-frontend")');
|
|
63
|
+
} else if (typeof rawConfig.serviceName !== 'string') {
|
|
64
|
+
resultsCollection
|
|
65
|
+
.addResult('Invalid serviceName type')
|
|
66
|
+
.err()
|
|
67
|
+
.filePath(configPath)
|
|
68
|
+
.detail(`serviceName must be a string, got ${typeof rawConfig.serviceName}`);
|
|
69
|
+
} else if (rawConfig.serviceName.trim() === '') {
|
|
70
|
+
resultsCollection
|
|
71
|
+
.addResult('serviceName cannot be empty')
|
|
72
|
+
.err()
|
|
73
|
+
.filePath(configPath)
|
|
74
|
+
.detail('serviceName must be a non-empty string (e.g., "jobseekers-frontend")');
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Validate entry (required, ERROR)
|
|
78
|
+
if (!rawConfig.entry) {
|
|
79
|
+
resultsCollection
|
|
80
|
+
.addResult('Missing required field: entry')
|
|
81
|
+
.err()
|
|
82
|
+
.filePath(configPath)
|
|
83
|
+
.detail('entry must be specified as a string path (e.g., "./src/index.js")');
|
|
84
|
+
} else if (typeof rawConfig.entry !== 'string') {
|
|
85
|
+
resultsCollection
|
|
86
|
+
.addResult('Invalid entry type')
|
|
87
|
+
.err()
|
|
88
|
+
.filePath(configPath)
|
|
89
|
+
.detail(`entry must be a string, got ${typeof rawConfig.entry}`);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Validate externalAssets.links (optional, WARNING)
|
|
93
|
+
if (rawConfig.externalAssets?.links !== undefined) {
|
|
94
|
+
const { links } = rawConfig.externalAssets;
|
|
95
|
+
const isValidType =
|
|
96
|
+
typeof links === 'string' || (Array.isArray(links) && links.every((link) => typeof link === 'string'));
|
|
97
|
+
|
|
98
|
+
if (!isValidType) {
|
|
99
|
+
resultsCollection
|
|
100
|
+
.addResult('Invalid externalAssets.links type')
|
|
101
|
+
.filePath(configPath)
|
|
102
|
+
.detail('externalAssets.links must be a string or an array of strings');
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Validate externalAssets.scripts (optional, WARNING)
|
|
107
|
+
if (rawConfig.externalAssets?.scripts !== undefined) {
|
|
108
|
+
const { scripts } = rawConfig.externalAssets;
|
|
109
|
+
const isValidType =
|
|
110
|
+
typeof scripts === 'string' || (Array.isArray(scripts) && scripts.every((script) => typeof script === 'string'));
|
|
111
|
+
|
|
112
|
+
if (!isValidType) {
|
|
113
|
+
resultsCollection
|
|
114
|
+
.addResult('Invalid externalAssets.scripts type')
|
|
115
|
+
.filePath(configPath)
|
|
116
|
+
.detail('externalAssets.scripts must be a string or an array of strings');
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return resultsCollection.results;
|
|
121
|
+
}
|
package/constants.js
CHANGED
|
@@ -47,8 +47,6 @@ export const ASSET_STORE_INVALIDATION_PATH = `/{fertConfig.client.rootClientProp
|
|
|
47
47
|
|
|
48
48
|
export const ASSET_STORE_USER_GUID = 'a386d4b6-f2df-4b80-ad1f-0349e23f530b';
|
|
49
49
|
|
|
50
|
-
export const CONFIG_API =
|
|
51
|
-
'https://configuration-api.job.madgexhosting.net/configs/override/{cpid}/production/{configGroup}/{config}';
|
|
52
50
|
export const CONFIG_DIR = 'config';
|
|
53
51
|
|
|
54
52
|
/** we assume the remove version of a service hosts an api translations endpoint */
|
package/docs/FAQ.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
-
|
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.4.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
|
-
] %}
|