@madgex/fert 5.0.3 → 5.0.5
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 +21 -12
- package/bin/cli.js +9 -27
- package/bin/commands/_service-command-bootstrap.js +12 -52
- package/bin/commands/build-tasks/build-tokens.js +8 -22
- package/bin/commands/build-tasks/bundle-entry.js +1 -4
- package/bin/commands/build.js +1 -0
- package/bin/commands/configs.js +17 -53
- package/bin/commands/dev-server.js +5 -14
- package/bin/commands/init.js +27 -117
- package/bin/commands/publish-tasks/asset-store-uploader.js +2 -5
- package/bin/commands/publish.js +10 -30
- package/bin/utils/configs.js +55 -95
- package/bin/utils/cpid-lookup.js +2 -2
- package/bin/utils/cpid-matches-git-remote.js +5 -10
- package/bin/utils/getSchemaMeta.js +1 -1
- package/bin/utils/index.js +14 -25
- package/bin/utils/lookup-cf-distribution-ids.js +2 -7
- package/bin/utils/resolve-external-assets.js +6 -15
- package/constants.js +3 -17
- package/package.json +17 -26
- package/repo-template/fert.config.js +3 -0
- package/repo-template/package.json +22 -0
- package/{repo-templates/template-basic → repo-template/services/jobseekers-frontend}/brand.json +6 -3
- package/repo-template/services/jobseekers-frontend/fert.service.config.js +7 -0
- package/repo-template/services/jobseekers-frontend/public/icons/user.svg +4 -0
- package/repo-template/services/jobseekers-frontend/public/images/favicon.ico +0 -0
- package/repo-template/services/jobseekers-frontend/public/images/fred.jpeg +0 -0
- package/repo-template/services/jobseekers-frontend/src/css/styles.scss +1152 -0
- package/repo-template/services/jobseekers-frontend/src/index.js +9 -0
- package/repo-template/services/jobseekers-frontend/src/js/recruiter-link.js +25 -0
- package/{repo-templates/template-bigworkbag → repo-template/services/jobseekers-frontend}/templates/context/footer-nav.njk +26 -26
- package/{repo-templates/template-bigworkbag → repo-template/services/jobseekers-frontend}/templates/context/main-nav.njk +40 -31
- package/{repo-templates/template-bigworkbag → repo-template/services/jobseekers-frontend}/templates/context/user-nav.njk +16 -16
- package/repo-template/services/jobseekers-frontend/templates/footer.njk +20 -0
- package/repo-template/services/jobseekers-frontend/templates/header.njk +74 -0
- package/repo-template/services/jobseekers-frontend/templates/includes/footer-nav.njk +15 -0
- package/repo-template/services/jobseekers-frontend/templates/includes/main-nav.njk +19 -0
- package/repo-template/services/jobseekers-frontend/templates/includes/user-nav/authenticated.njk +34 -0
- package/repo-template/services/jobseekers-frontend/templates/includes/user-nav/unauthenticated.njk +9 -0
- package/{repo-templates/template-bigworkbag → repo-template/services/jobseekers-frontend}/templates/translations/en.njk +1 -0
- package/server/index.js +2 -3
- package/server/plugins/hapi-vite.js +4 -2
- package/server/routes/views.js +1 -0
- package/server/view-manager.js +2 -5
- package/.prettierrc.js +0 -8
- package/bin/commands/configs.test.js +0 -182
- package/bin/utils/configs.test.js +0 -53
- package/bin/utils/persistent-cache-with-ttl.test.js +0 -42
- package/bin/utils/resolve-external-assets.test.js +0 -98
- package/delivery/jenkinsfile +0 -93
- package/eslint.config.mjs +0 -53
- package/repo-templates/globals/fert.config.js +0 -9
- package/repo-templates/template-basic/_gitignore +0 -6
- package/repo-templates/template-basic/package.json +0 -13
- package/repo-templates/template-basic/public/favicon.ico +0 -0
- package/repo-templates/template-basic/src/css/styles.scss +0 -11
- package/repo-templates/template-basic/src/index.js +0 -3
- package/repo-templates/template-basic/templates/footer.njk +0 -14
- package/repo-templates/template-basic/templates/header.njk +0 -14
- package/repo-templates/template-bigworkbag/_gitignore +0 -6
- package/repo-templates/template-bigworkbag/brand.json +0 -21
- package/repo-templates/template-bigworkbag/package.json +0 -13
- package/repo-templates/template-bigworkbag/public/favicon.ico +0 -0
- package/repo-templates/template-bigworkbag/public/fonts/mdgx-icons.eot +0 -0
- package/repo-templates/template-bigworkbag/public/fonts/mdgx-icons.svg +0 -71
- package/repo-templates/template-bigworkbag/public/fonts/mdgx-icons.ttf +0 -0
- package/repo-templates/template-bigworkbag/public/fonts/mdgx-icons.woff +0 -0
- package/repo-templates/template-bigworkbag/public/fonts/my-font.woff +0 -1
- package/repo-templates/template-bigworkbag/public/images/logo.png +0 -0
- package/repo-templates/template-bigworkbag/public/images/user-menu-pointer.svg +0 -4
- package/repo-templates/template-bigworkbag/src/css/breakpoints.scss +0 -17
- package/repo-templates/template-bigworkbag/src/css/clicky-menu.scss +0 -52
- package/repo-templates/template-bigworkbag/src/css/desktop-main-nav.scss +0 -25
- package/repo-templates/template-bigworkbag/src/css/desktop-user-nav.scss +0 -127
- package/repo-templates/template-bigworkbag/src/css/footer.scss +0 -77
- package/repo-templates/template-bigworkbag/src/css/header-top.scss +0 -29
- package/repo-templates/template-bigworkbag/src/css/leaderboard-ad.scss +0 -22
- package/repo-templates/template-bigworkbag/src/css/mobile-main-nav.scss +0 -68
- package/repo-templates/template-bigworkbag/src/css/mobile-user-nav.scss +0 -49
- package/repo-templates/template-bigworkbag/src/css/reset.scss +0 -91
- package/repo-templates/template-bigworkbag/src/css/styles.scss +0 -18
- package/repo-templates/template-bigworkbag/src/css/top-bar.scss +0 -13
- package/repo-templates/template-bigworkbag/src/css/typography.scss +0 -20
- package/repo-templates/template-bigworkbag/src/css/util.scss +0 -28
- package/repo-templates/template-bigworkbag/src/css/variables.scss +0 -9
- package/repo-templates/template-bigworkbag/src/index.js +0 -3
- package/repo-templates/template-bigworkbag/src/js/clicky-menus.js +0 -178
- package/repo-templates/template-bigworkbag/src/js/no-js.js +0 -10
- package/repo-templates/template-bigworkbag/templates/footer.njk +0 -68
- package/repo-templates/template-bigworkbag/templates/header.njk +0 -54
- package/repo-templates/template-bigworkbag/templates/includes/desktop-main-nav-items.njk +0 -18
- package/repo-templates/template-bigworkbag/templates/includes/desktop-user-nav/loggedin-items.njk +0 -28
- package/repo-templates/template-bigworkbag/templates/includes/desktop-user-nav/loggedout-items.njk +0 -9
- package/repo-templates/template-bigworkbag/templates/includes/desktop-user-nav/submenu-items.njk +0 -18
- package/repo-templates/template-bigworkbag/templates/includes/desktop-user-nav/user-nav.njk +0 -24
- package/repo-templates/template-bigworkbag/templates/includes/dev-console-context.njk +0 -7
- package/repo-templates/template-bigworkbag/templates/includes/mobile-main-nav-items.njk +0 -25
- package/repo-templates/template-bigworkbag/templates/includes/mobile-user-nav/loggedin-items.njk +0 -33
- package/repo-templates/template-bigworkbag/templates/includes/mobile-user-nav/loggedout-items.njk +0 -16
- package/repo-templates/template-bigworkbag/templates/includes/mobile-user-nav/user-nav.njk +0 -24
- package/repo-templates/template-bigworkbag/templates/svgs/arrow-down.svg +0 -3
- package/repo-templates/template-bigworkbag/templates/svgs/arrow-left.svg +0 -3
- package/repo-templates/template-bigworkbag/templates/svgs/arrow-right.svg +0 -3
- package/repo-templates/template-bigworkbag/templates/svgs/arrow-up.svg +0 -3
- package/repo-templates/template-bigworkbag/templates/svgs/cart.svg +0 -3
- package/repo-templates/template-bigworkbag/templates/svgs/facebook.svg +0 -3
- package/repo-templates/template-bigworkbag/templates/svgs/linkedin.svg +0 -3
- package/repo-templates/template-bigworkbag/templates/svgs/profile.svg +0 -5
- package/repo-templates/template-bigworkbag/templates/svgs/star-filled.svg +0 -3
- package/repo-templates/template-bigworkbag/templates/svgs/star-outline.svg +0 -3
- package/repo-templates/template-bigworkbag/templates/svgs/twitter.svg +0 -3
- package/repo-templates/template-bigworkbag/templates/svgs/youtube.svg +0 -3
- /package/{repo-templates/globals → repo-template}/jenkinsfile +0 -0
- /package/{repo-templates/template-basic → repo-template/services/jobseekers-frontend}/public/fonts/mdgx-icons.eot +0 -0
- /package/{repo-templates/template-basic → repo-template/services/jobseekers-frontend}/public/fonts/mdgx-icons.svg +0 -0
- /package/{repo-templates/template-basic → repo-template/services/jobseekers-frontend}/public/fonts/mdgx-icons.ttf +0 -0
- /package/{repo-templates/template-basic → repo-template/services/jobseekers-frontend}/public/fonts/mdgx-icons.woff +0 -0
- /package/{repo-templates/template-basic → repo-template/services/jobseekers-frontend}/public/fonts/my-font.woff +0 -0
- /package/{repo-templates/template-basic → repo-template/services/jobseekers-frontend}/public/images/logo.png +0 -0
- /package/{repo-templates/template-bigworkbag → repo-template/services/jobseekers-frontend}/templates/translations/da.njk +0 -0
- /package/{repo-templates/template-bigworkbag → repo-template/services/jobseekers-frontend}/templates/translations/de.njk +0 -0
- /package/{repo-templates/template-bigworkbag → repo-template/services/jobseekers-frontend}/templates/translations/es.njk +0 -0
- /package/{repo-templates/template-bigworkbag → repo-template/services/jobseekers-frontend}/templates/translations/fr.njk +0 -0
- /package/{repo-templates/template-bigworkbag → repo-template/services/jobseekers-frontend}/templates/translations/nb.njk +0 -0
- /package/{repo-templates/template-bigworkbag → repo-template/services/jobseekers-frontend}/templates/translations/nl.njk +0 -0
- /package/{repo-templates/template-bigworkbag → repo-template/services/jobseekers-frontend}/templates/translations/sv.njk +0 -0
- /package/{repo-templates/template-bigworkbag → repo-template/services/jobseekers-frontend}/templates/translations/zh-cn.njk +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import '@madgex/branding-shared/components/autoregister.js';
|
|
2
|
+
import recruiterLink from './js/recruiter-link';
|
|
3
|
+
import './css/styles.scss';
|
|
4
|
+
|
|
5
|
+
if (document.readyState === 'loading') {
|
|
6
|
+
document.addEventListener('DOMContentLoaded', recruiterLink.init);
|
|
7
|
+
} else {
|
|
8
|
+
recruiterLink.init();
|
|
9
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// this functionality only applies to JBE
|
|
2
|
+
// breakpoint was hardcoded to 750 in the original function
|
|
3
|
+
const recruiterLink = {
|
|
4
|
+
init: () => {
|
|
5
|
+
const breakpoint = 750;
|
|
6
|
+
const link = document.querySelector('.js-recruiter-link');
|
|
7
|
+
const primaryNav = document.querySelector('.primary-nav');
|
|
8
|
+
|
|
9
|
+
// checking that the elements are there before performing the expensive document.body.clientWidth
|
|
10
|
+
if (link && primaryNav) {
|
|
11
|
+
const screenWidth = document.body.clientWidth;
|
|
12
|
+
|
|
13
|
+
if (screenWidth <= breakpoint) {
|
|
14
|
+
recruiterLink.moveLink(link, primaryNav);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
moveLink: (item, destination) => {
|
|
19
|
+
const itemClone = item.cloneNode(true);
|
|
20
|
+
|
|
21
|
+
destination.append(itemClone);
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default recruiterLink;
|
|
@@ -1,27 +1,27 @@
|
|
|
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
|
-
}
|
|
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
27
|
] %}
|
|
@@ -1,32 +1,41 @@
|
|
|
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
|
-
}
|
|
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
|
+
}
|
|
32
41
|
] %}
|
|
@@ -1,17 +1,17 @@
|
|
|
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
|
-
}
|
|
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
17
|
] %}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{%- from templatePath + 'translations/en.njk' import translations -%}
|
|
2
|
+
|
|
3
|
+
<div data-block="footer-main" class="position-static" scoped-v6="">
|
|
4
|
+
<footer role="contentinfo" class="contentinfo">
|
|
5
|
+
<div class="back-to-top">
|
|
6
|
+
<div class="wrapper cf">
|
|
7
|
+
<p class="right-text no-margin">
|
|
8
|
+
<a href="#top-bar" class="js-smooth-scrollto block-level">{{ translations.footer["back-to-top"] }}</a>
|
|
9
|
+
</p>
|
|
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 - 2021 bigworkbag.com, all rights reserved. Powered by Madgex Job Board Software
|
|
17
|
+
</p>
|
|
18
|
+
</div>
|
|
19
|
+
</footer>
|
|
20
|
+
</div>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<!-- HEADER-FOOTER-PODLET VERSION: {{ version }} -->
|
|
2
|
+
|
|
3
|
+
{%- from templatePath + './translations/en.njk' import translations -%}
|
|
4
|
+
|
|
5
|
+
<div data-block="header-main" class="position-static" scoped-v6="">
|
|
6
|
+
|
|
7
|
+
<div id="ad-leaderboard" class="ad ad--leaderboard ad--leaderboard--empty"></div>
|
|
8
|
+
|
|
9
|
+
<header role="banner" class="banner">
|
|
10
|
+
<div id="top-bar" class="top-bar">
|
|
11
|
+
<div class="wrapper cf">
|
|
12
|
+
|
|
13
|
+
<ul class="nav-toggles cf js-togglable-nav-triggers">
|
|
14
|
+
<li class="nav-toggles__item nav-toggles__item--primary">
|
|
15
|
+
<mdgx-togglable-nav aria-controls="primary-nav">
|
|
16
|
+
<a href="#primary-nav" title="Main menu" class="js-togglable-nav-trigger">
|
|
17
|
+
<i class="burger" aria-hidden="true"></i>
|
|
18
|
+
<span class="hidden">{{ translations.header["skip-to-main-menu"] }}</span>
|
|
19
|
+
</a>
|
|
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="/" aria-label="{{ translations.header["homepage"] }}">
|
|
64
|
+
<img src="/_/jobseekers-frontend/assets/images/logo.png" title="bigworkbag.com" alt="bigworkbag.com logo"/>
|
|
65
|
+
</a>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
{% include templatePath + './includes/main-nav.njk' %}
|
|
70
|
+
|
|
71
|
+
</header>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<!-- END HEADER FRAGMENT -->
|
|
@@ -0,0 +1,15 @@
|
|
|
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 -%}
|
|
@@ -0,0 +1,19 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
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>
|
package/server/index.js
CHANGED
|
@@ -18,6 +18,7 @@ exports.devServer = async ({ start, fertConfig = {} } = {}) => {
|
|
|
18
18
|
// make incoming fertConfig available server-wide
|
|
19
19
|
server.decorate('server', 'fertConfig', ({ update } = {}) => {
|
|
20
20
|
if (update) {
|
|
21
|
+
// eslint-disable-next-line no-param-reassign
|
|
21
22
|
fertConfig = update;
|
|
22
23
|
}
|
|
23
24
|
|
|
@@ -48,9 +49,7 @@ exports.devServer = async ({ start, fertConfig = {} } = {}) => {
|
|
|
48
49
|
{
|
|
49
50
|
plugin: require('./plugins/hapi-vite'),
|
|
50
51
|
options: {
|
|
51
|
-
watch: ['/templates/**/*', '/public/tokens/**/*'].map((p) =>
|
|
52
|
-
path.join(fertConfig.workingDir, p)
|
|
53
|
-
),
|
|
52
|
+
watch: ['/templates/**/*', '/public/tokens/**/*'].map((p) => path.join(fertConfig.workingDir, p)),
|
|
54
53
|
root: path.resolve(fertConfig.workingDir),
|
|
55
54
|
entry: path.join(fertConfig.workingDir, fertConfig.entry),
|
|
56
55
|
log: log.debug,
|
|
@@ -13,14 +13,16 @@ internals.defaults = {
|
|
|
13
13
|
module.exports = {
|
|
14
14
|
name: 'hapi-vite',
|
|
15
15
|
register: async (server, options = {}) => {
|
|
16
|
+
// eslint-disable-next-line no-param-reassign
|
|
16
17
|
options = Hoek.applyToDefaults(internals.defaults, options);
|
|
17
18
|
const log = options.log;
|
|
18
19
|
|
|
19
20
|
// once hapi server is ready, start up the Vite server
|
|
20
21
|
server.ext({
|
|
21
22
|
type: 'onPostStart',
|
|
22
|
-
method: async (
|
|
23
|
-
|
|
23
|
+
method: async (_server) => {
|
|
24
|
+
// eslint-disable-next-line no-param-reassign
|
|
25
|
+
_server.app.viteServer = await createServer({
|
|
24
26
|
root: options.root,
|
|
25
27
|
server: {
|
|
26
28
|
origin: server.info.uri,
|
package/server/routes/views.js
CHANGED
package/server/view-manager.js
CHANGED
|
@@ -8,11 +8,7 @@ module.exports = (server) => {
|
|
|
8
8
|
engines: {
|
|
9
9
|
njk: {
|
|
10
10
|
compile: (src, options) => {
|
|
11
|
-
const template = Nunjucks.compile(
|
|
12
|
-
src,
|
|
13
|
-
options.environment,
|
|
14
|
-
options.filename
|
|
15
|
-
);
|
|
11
|
+
const template = Nunjucks.compile(src, options.environment, options.filename);
|
|
16
12
|
|
|
17
13
|
return (context) => {
|
|
18
14
|
return template.render(context);
|
|
@@ -25,6 +21,7 @@ module.exports = (server) => {
|
|
|
25
21
|
});
|
|
26
22
|
|
|
27
23
|
// pass nunjucks env for use in Vision
|
|
24
|
+
// eslint-disable-next-line no-param-reassign
|
|
28
25
|
options.compileOptions.environment = env;
|
|
29
26
|
|
|
30
27
|
return next();
|
package/.prettierrc.js
DELETED
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
const assert = require('node:assert');
|
|
2
|
-
const { describe, it, beforeEach } = require('node:test');
|
|
3
|
-
const fs = require('node:fs/promises');
|
|
4
|
-
const Path = require('node:path');
|
|
5
|
-
const Joi = require('joi');
|
|
6
|
-
|
|
7
|
-
describe('configs', () => {
|
|
8
|
-
let fertConfig;
|
|
9
|
-
let api;
|
|
10
|
-
let mkdirMock;
|
|
11
|
-
let writeFileMock;
|
|
12
|
-
let handleDownload;
|
|
13
|
-
let handleQuery;
|
|
14
|
-
let collateConfigs;
|
|
15
|
-
|
|
16
|
-
beforeEach(async (t) => {
|
|
17
|
-
fertConfig = {
|
|
18
|
-
workingDir: 'working-dir',
|
|
19
|
-
clientPropertyId: 'ff6102ff-0f4b-43d1-a2c7-83b835b8dee5',
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const { ConfigAPI } = await import('@madgex/config-api-sdk');
|
|
23
|
-
|
|
24
|
-
api = new ConfigAPI({
|
|
25
|
-
clientPropertyId: fertConfig.clientPropertyId,
|
|
26
|
-
environment: 'dev',
|
|
27
|
-
schemas: {
|
|
28
|
-
'jsfe-config': Joi.object({
|
|
29
|
-
StrConfig: Joi.string().default('My new JSFE config'),
|
|
30
|
-
NumConfig: Joi.number().default(0),
|
|
31
|
-
StrConfigReadOnly: Joi.string()
|
|
32
|
-
.default('I am read-only')
|
|
33
|
-
.meta({ readOnly: true }),
|
|
34
|
-
}),
|
|
35
|
-
},
|
|
36
|
-
fetch: async () => ({
|
|
37
|
-
ok: true,
|
|
38
|
-
json: async () => ({
|
|
39
|
-
status: 'success',
|
|
40
|
-
data: [
|
|
41
|
-
{
|
|
42
|
-
configName: 'jsfe-config',
|
|
43
|
-
key: 'StrConfig',
|
|
44
|
-
value: '"hello"',
|
|
45
|
-
},
|
|
46
|
-
],
|
|
47
|
-
}),
|
|
48
|
-
}),
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
// Set up mocks before requiring the module that uses them
|
|
52
|
-
mkdirMock = t.mock.method(fs, 'mkdir', async () => {});
|
|
53
|
-
writeFileMock = t.mock.method(fs, 'writeFile', async () => {});
|
|
54
|
-
|
|
55
|
-
// Clear require cache to ensure we get a fresh copy with our mocks
|
|
56
|
-
delete require.cache[require.resolve('./configs')];
|
|
57
|
-
({ handleDownload, handleQuery } = require('./configs'));
|
|
58
|
-
|
|
59
|
-
delete require.cache[require.resolve('../utils/configs')];
|
|
60
|
-
({ collateConfigs } = require('../utils/configs'));
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
describe('handleDownload', () => {
|
|
64
|
-
let options;
|
|
65
|
-
|
|
66
|
-
beforeEach(async () => {
|
|
67
|
-
options = { download: 'dev' };
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
it('iterates over known schemas', async () => {
|
|
71
|
-
await handleDownload(fertConfig, api, options);
|
|
72
|
-
|
|
73
|
-
assert.strictEqual(Object.keys(api.schemas).length, 1);
|
|
74
|
-
assert.strictEqual(mkdirMock.mock.calls.length, 1);
|
|
75
|
-
assert.strictEqual(mkdirMock.mock.calls[0].arguments[0], 'config');
|
|
76
|
-
assert.strictEqual(writeFileMock.mock.calls.length, 1); // Only one schema
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
it('saves to the expected place', async () => {
|
|
80
|
-
await handleDownload(fertConfig, api, options);
|
|
81
|
-
|
|
82
|
-
assert.strictEqual(writeFileMock.mock.calls.length, 1);
|
|
83
|
-
|
|
84
|
-
assert.strictEqual(
|
|
85
|
-
writeFileMock.mock.calls[0].arguments[0],
|
|
86
|
-
Path.join('working-dir', 'config', 'jsfe-config.json')
|
|
87
|
-
);
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
it('writes the expected data', async () => {
|
|
91
|
-
await handleDownload(fertConfig, api, options);
|
|
92
|
-
|
|
93
|
-
assert.strictEqual(writeFileMock.mock.calls.length, 1);
|
|
94
|
-
|
|
95
|
-
const jsfeConfig = JSON.parse(writeFileMock.mock.calls[0].arguments[1]);
|
|
96
|
-
assert.strictEqual(Object.keys(jsfeConfig).length, 1);
|
|
97
|
-
assert.strictEqual(jsfeConfig.StrConfig, 'hello');
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
it('skips read-only keys', async () => {
|
|
101
|
-
// clone api object including prototype
|
|
102
|
-
const tweakedApi = Object.assign(
|
|
103
|
-
Object.create(Object.getPrototypeOf(api)),
|
|
104
|
-
api
|
|
105
|
-
);
|
|
106
|
-
|
|
107
|
-
tweakedApi.schemas = {
|
|
108
|
-
'jsfe-config': Joi.object({
|
|
109
|
-
StrConfig: Joi.string().default('My new JSFE config'),
|
|
110
|
-
ReadOnlyConfig: Joi.string()
|
|
111
|
-
.default('I am read-only')
|
|
112
|
-
.meta({ readOnly: true }),
|
|
113
|
-
}),
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
await handleDownload(fertConfig, tweakedApi, options);
|
|
117
|
-
|
|
118
|
-
assert.strictEqual(writeFileMock.mock.calls.length, 1);
|
|
119
|
-
|
|
120
|
-
const jsfeConfig = JSON.parse(writeFileMock.mock.calls[0].arguments[1]);
|
|
121
|
-
assert.strictEqual(Object.keys(jsfeConfig).length, 1);
|
|
122
|
-
assert.strictEqual(jsfeConfig.ReadOnlyConfig, undefined);
|
|
123
|
-
});
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
describe('handlePublish', () => {
|
|
127
|
-
it('sets and deletes correct configs', async () => {
|
|
128
|
-
const localConfigs = {
|
|
129
|
-
'jsfe-config': {
|
|
130
|
-
path: '',
|
|
131
|
-
data: {
|
|
132
|
-
StrConfig: 'default value',
|
|
133
|
-
// NumConfig is purposefully omitted & should be deleted from the api
|
|
134
|
-
},
|
|
135
|
-
},
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
const { toSet, toRemove } = await collateConfigs(api, localConfigs);
|
|
139
|
-
|
|
140
|
-
assert.deepStrictEqual(toSet, {
|
|
141
|
-
'jsfe-config': {
|
|
142
|
-
StrConfig: 'default value',
|
|
143
|
-
},
|
|
144
|
-
});
|
|
145
|
-
|
|
146
|
-
assert.deepStrictEqual(toRemove, { 'jsfe-config': ['NumConfig'] });
|
|
147
|
-
});
|
|
148
|
-
});
|
|
149
|
-
describe('handleQuery', () => {
|
|
150
|
-
let options;
|
|
151
|
-
|
|
152
|
-
beforeEach(async () => {
|
|
153
|
-
options = { query: true };
|
|
154
|
-
});
|
|
155
|
-
|
|
156
|
-
it('logs available schemas if query option is true', async () => {
|
|
157
|
-
await handleQuery(fertConfig, api, options);
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
it.skip('logs schema description if query option is valid', async (t) => {
|
|
161
|
-
const api = {
|
|
162
|
-
schemas: {
|
|
163
|
-
testSchema: {
|
|
164
|
-
describe: () => ({ keys: {} }),
|
|
165
|
-
validate: () => ({}),
|
|
166
|
-
},
|
|
167
|
-
},
|
|
168
|
-
};
|
|
169
|
-
const options = { query: 'testSchema' };
|
|
170
|
-
let logMessage = '';
|
|
171
|
-
|
|
172
|
-
t.mock.method(console, 'log', (message) => {
|
|
173
|
-
logMessage += message;
|
|
174
|
-
});
|
|
175
|
-
|
|
176
|
-
await handleQuery(api, options);
|
|
177
|
-
|
|
178
|
-
assert(logMessage.includes('Getting testSchema schema description...'));
|
|
179
|
-
assert(logMessage.includes('Defaults'));
|
|
180
|
-
});
|
|
181
|
-
});
|
|
182
|
-
});
|