@madgex/fert 1.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.
Files changed (120) hide show
  1. package/.eslintignore +8 -0
  2. package/.eslintrc.js +15 -0
  3. package/.github/workflows/commits.yml +14 -0
  4. package/.github/workflows/release.yml +29 -0
  5. package/.husky/commit-msg +4 -0
  6. package/.husky/pre-commit +4 -0
  7. package/.prettierignore +2 -0
  8. package/.prettierrc.js +8 -0
  9. package/README.md +232 -0
  10. package/bin/cli.js +68 -0
  11. package/bin/commands/build-tasks/build-external-assets.js +16 -0
  12. package/bin/commands/build-tasks/build-tokens.js +119 -0
  13. package/bin/commands/build-tasks/bundle-ds-css.js +74 -0
  14. package/bin/commands/build-tasks/bundle-entry.js +43 -0
  15. package/bin/commands/build.js +42 -0
  16. package/bin/commands/dev-server.js +50 -0
  17. package/bin/commands/init.js +207 -0
  18. package/bin/commands/publish-tasks/asset-store-uploader.js +94 -0
  19. package/bin/commands/publish-tasks/get-aws-parameter.js +41 -0
  20. package/bin/commands/publish.js +51 -0
  21. package/bin/utils/cpid-lookup.js +47 -0
  22. package/bin/utils/index.js +121 -0
  23. package/bin/utils/resolve-external-assets.js +77 -0
  24. package/commitlint.config.cjs +1 -0
  25. package/constants.js +36 -0
  26. package/delivery/git.cer +22 -0
  27. package/delivery/jenkinsfile +93 -0
  28. package/package.json +84 -0
  29. package/repo-templates/globals/fert.config.js +4 -0
  30. package/repo-templates/globals/jenkinsfile +4 -0
  31. package/repo-templates/template-basic/_gitignore +5 -0
  32. package/repo-templates/template-basic/brand.json +21 -0
  33. package/repo-templates/template-basic/package.json +13 -0
  34. package/repo-templates/template-basic/public/favicon.ico +0 -0
  35. package/repo-templates/template-basic/public/fonts/mdgx-icons.eot +0 -0
  36. package/repo-templates/template-basic/public/fonts/mdgx-icons.svg +71 -0
  37. package/repo-templates/template-basic/public/fonts/mdgx-icons.ttf +0 -0
  38. package/repo-templates/template-basic/public/fonts/mdgx-icons.woff +0 -0
  39. package/repo-templates/template-basic/public/fonts/my-font.woff +1 -0
  40. package/repo-templates/template-basic/public/images/logo.png +0 -0
  41. package/repo-templates/template-basic/src/css/styles.scss +12 -0
  42. package/repo-templates/template-basic/src/index.js +3 -0
  43. package/repo-templates/template-basic/templates/footer.njk +14 -0
  44. package/repo-templates/template-basic/templates/header.njk +14 -0
  45. package/repo-templates/template-bigworkbag/_gitignore +5 -0
  46. package/repo-templates/template-bigworkbag/brand.json +21 -0
  47. package/repo-templates/template-bigworkbag/package.json +13 -0
  48. package/repo-templates/template-bigworkbag/public/favicon.ico +0 -0
  49. package/repo-templates/template-bigworkbag/public/fonts/mdgx-icons.eot +0 -0
  50. package/repo-templates/template-bigworkbag/public/fonts/mdgx-icons.svg +71 -0
  51. package/repo-templates/template-bigworkbag/public/fonts/mdgx-icons.ttf +0 -0
  52. package/repo-templates/template-bigworkbag/public/fonts/mdgx-icons.woff +0 -0
  53. package/repo-templates/template-bigworkbag/public/fonts/my-font.woff +1 -0
  54. package/repo-templates/template-bigworkbag/public/images/logo.png +0 -0
  55. package/repo-templates/template-bigworkbag/public/images/user-menu-pointer.svg +4 -0
  56. package/repo-templates/template-bigworkbag/src/css/breakpoints.scss +17 -0
  57. package/repo-templates/template-bigworkbag/src/css/clicky-menu.scss +52 -0
  58. package/repo-templates/template-bigworkbag/src/css/desktop-main-nav.scss +25 -0
  59. package/repo-templates/template-bigworkbag/src/css/desktop-user-nav.scss +127 -0
  60. package/repo-templates/template-bigworkbag/src/css/footer.scss +77 -0
  61. package/repo-templates/template-bigworkbag/src/css/header-top.scss +29 -0
  62. package/repo-templates/template-bigworkbag/src/css/leaderboard-ad.scss +22 -0
  63. package/repo-templates/template-bigworkbag/src/css/mobile-main-nav.scss +68 -0
  64. package/repo-templates/template-bigworkbag/src/css/mobile-user-nav.scss +49 -0
  65. package/repo-templates/template-bigworkbag/src/css/reset.scss +91 -0
  66. package/repo-templates/template-bigworkbag/src/css/styles.scss +19 -0
  67. package/repo-templates/template-bigworkbag/src/css/top-bar.scss +13 -0
  68. package/repo-templates/template-bigworkbag/src/css/typography.scss +20 -0
  69. package/repo-templates/template-bigworkbag/src/css/util.scss +28 -0
  70. package/repo-templates/template-bigworkbag/src/css/variables.scss +9 -0
  71. package/repo-templates/template-bigworkbag/src/index.js +3 -0
  72. package/repo-templates/template-bigworkbag/src/js/clicky-menus.js +178 -0
  73. package/repo-templates/template-bigworkbag/src/js/no-js.js +10 -0
  74. package/repo-templates/template-bigworkbag/templates/context/footer-nav.njk +27 -0
  75. package/repo-templates/template-bigworkbag/templates/context/main-nav.njk +32 -0
  76. package/repo-templates/template-bigworkbag/templates/context/user-nav.njk +17 -0
  77. package/repo-templates/template-bigworkbag/templates/footer.njk +68 -0
  78. package/repo-templates/template-bigworkbag/templates/header.njk +54 -0
  79. package/repo-templates/template-bigworkbag/templates/includes/desktop-main-nav-items.njk +18 -0
  80. package/repo-templates/template-bigworkbag/templates/includes/desktop-user-nav/loggedin-items.njk +28 -0
  81. package/repo-templates/template-bigworkbag/templates/includes/desktop-user-nav/loggedout-items.njk +9 -0
  82. package/repo-templates/template-bigworkbag/templates/includes/desktop-user-nav/submenu-items.njk +18 -0
  83. package/repo-templates/template-bigworkbag/templates/includes/desktop-user-nav/user-nav.njk +24 -0
  84. package/repo-templates/template-bigworkbag/templates/includes/dev-console-context.njk +7 -0
  85. package/repo-templates/template-bigworkbag/templates/includes/mobile-main-nav-items.njk +25 -0
  86. package/repo-templates/template-bigworkbag/templates/includes/mobile-user-nav/loggedin-items.njk +33 -0
  87. package/repo-templates/template-bigworkbag/templates/includes/mobile-user-nav/loggedout-items.njk +16 -0
  88. package/repo-templates/template-bigworkbag/templates/includes/mobile-user-nav/user-nav.njk +24 -0
  89. package/repo-templates/template-bigworkbag/templates/svgs/arrow-down.svg +3 -0
  90. package/repo-templates/template-bigworkbag/templates/svgs/arrow-left.svg +3 -0
  91. package/repo-templates/template-bigworkbag/templates/svgs/arrow-right.svg +3 -0
  92. package/repo-templates/template-bigworkbag/templates/svgs/arrow-up.svg +3 -0
  93. package/repo-templates/template-bigworkbag/templates/svgs/cart.svg +3 -0
  94. package/repo-templates/template-bigworkbag/templates/svgs/facebook.svg +3 -0
  95. package/repo-templates/template-bigworkbag/templates/svgs/linkedin.svg +3 -0
  96. package/repo-templates/template-bigworkbag/templates/svgs/profile.svg +5 -0
  97. package/repo-templates/template-bigworkbag/templates/svgs/star-filled.svg +3 -0
  98. package/repo-templates/template-bigworkbag/templates/svgs/star-outline.svg +3 -0
  99. package/repo-templates/template-bigworkbag/templates/svgs/twitter.svg +3 -0
  100. package/repo-templates/template-bigworkbag/templates/svgs/youtube.svg +3 -0
  101. package/repo-templates/template-bigworkbag/templates/translations/da.njk +26 -0
  102. package/repo-templates/template-bigworkbag/templates/translations/de.njk +26 -0
  103. package/repo-templates/template-bigworkbag/templates/translations/en.njk +26 -0
  104. package/repo-templates/template-bigworkbag/templates/translations/es.njk +26 -0
  105. package/repo-templates/template-bigworkbag/templates/translations/fr.njk +26 -0
  106. package/repo-templates/template-bigworkbag/templates/translations/nb.njk +26 -0
  107. package/repo-templates/template-bigworkbag/templates/translations/nl.njk +26 -0
  108. package/repo-templates/template-bigworkbag/templates/translations/sv.njk +26 -0
  109. package/repo-templates/template-bigworkbag/templates/translations/zh-cn.njk +26 -0
  110. package/server/extensions/error-logging.js +25 -0
  111. package/server/index.js +98 -0
  112. package/server/plugins/hapi-vite.js +61 -0
  113. package/server/routes/public.js +29 -0
  114. package/server/routes/views.js +46 -0
  115. package/server/templates/furniture.njk +67 -0
  116. package/server/templates/page1.njk +37 -0
  117. package/server/view-manager.js +59 -0
  118. package/shared/Dockerfile.brandingRepoPublish +28 -0
  119. package/shared/README.md +4 -0
  120. package/vite.config.js +14 -0
@@ -0,0 +1,24 @@
1
+ {# Desktop user nav #}
2
+
3
+ {% if auth.isAuthenticated %}
4
+ {% set class="desktop-user-nav--loggedin"%}
5
+ {% set userNavItems = templatePath + "includes/desktop-user-nav/loggedin-items.njk" %}
6
+ {% else %}
7
+ {% set class="desktop-user-nav--loggedout"%}
8
+ {% set userNavItems = templatePath + "includes/desktop-user-nav/loggedout-items.njk" %}
9
+ {% endif %}
10
+
11
+ <nav
12
+ id="desktop-user-nav"
13
+ class="desktop-user-nav {{ class }}"
14
+ aria-label="{{ translations.header["user"] }}">
15
+ <a
16
+ href="https://bigworkbag-rs.madgexjb.com/"
17
+ class="recruiter-link">
18
+ {{ translations.header["recruiters"] }}
19
+ {% include templatePath + "svgs/arrow-right.svg" %}
20
+ </a>
21
+ <ul id="desktop-user-nav__items" class="desktop-user-nav__items">
22
+ {% include userNavItems %}
23
+ </ul>
24
+ </nav>
@@ -0,0 +1,7 @@
1
+ {# For debugging the nunjucks context in the development environment #}
2
+
3
+ {%- if not IS_PROD -%}
4
+ <script>
5
+ console.log('Nunjucks context (header-footer-podlet)', JSON.parse(JSON.stringify({{ getContext() | dump | safe }})))
6
+ </script>
7
+ {%- endif -%}
@@ -0,0 +1,25 @@
1
+ {# Mobile main nav items #}
2
+
3
+ {%- from templatePath + "context/main-nav.njk" import mainNavigation -%}
4
+
5
+ {% if mainNavigation.length %}
6
+ {% for item in mainNavigation %}
7
+ <li class="mobile-main-nav__item">
8
+ <a
9
+ class="mobile-main-nav__link"
10
+ href="{{ item.href }}"
11
+ {%- if item.openInNewWindow -%}target="_blank" rel="noopener"{% endif %}>
12
+ <span class="mobile-main-nav__label">{{- item.label | safe -}}</span>
13
+ {%- if item.openInNewWindow %}<span class="visually-hidden">{{ translations.header["link-new-window"] }}</span>{% endif %}
14
+ </a>
15
+ </li>
16
+ {% endfor %}
17
+ {% endif %}
18
+
19
+ <li class="mobile-main-nav__item">
20
+ <a
21
+ href="https://bigworkbag-rs.madgexjb.com/"
22
+ class="mobile-main-nav__link">
23
+ {{ translations.header["recruiters"] }}
24
+ </a>
25
+ </li>
@@ -0,0 +1,33 @@
1
+ {# Mobile user nav logged in items #}
2
+
3
+ <li class="mobile-user-nav__item">{{ auth.credentials.username | safe }}</li>
4
+
5
+ {%- from templatePath + "context/user-nav.njk" import userNavigation -%}
6
+ {% if userNavigation.length %}
7
+ {% for item in userNavigation %}
8
+ <li class="mobile-user-nav__item">
9
+ <a
10
+ class="mobile-user-nav__link"
11
+ href="{{ item.href }}"
12
+ {%- if item.openInNewWindow -%}target="_blank" rel="noopener"{% endif %}>
13
+ <span class="mobile-user-nav__label">{{- item.label | safe -}}</span>
14
+ {%- if item.openInNewWindow %}<span class="visually-hidden">{{ translations.header["link-new-window"] }}</span>{% endif %}
15
+ </a>
16
+ </li>
17
+ {% endfor %}
18
+ {% endif %}
19
+
20
+ <li class="mobile-user-nav__item">
21
+ <a
22
+ href="/your-jobs?ActiveSection=ShortList"
23
+ class="mobile-user-nav__link">
24
+ {{ translations.header["your-shortlist"] }}
25
+ </a>
26
+ </li>
27
+ <li class="mobile-user-nav__item">
28
+ <a
29
+ href="{{ getServiceRoute('jobseekersite', 'account.logoff') }}"
30
+ class="mobile-user-nav__link">
31
+ {{ translations.header["sign-out"] }}
32
+ </a>
33
+ </li>
@@ -0,0 +1,16 @@
1
+ {# Mobile user nav logged out items #}
2
+
3
+ <li class="mobile-user-nav__item">
4
+ <a
5
+ href="{{ getServiceRoute('jobseekersite', 'account.login') }}"
6
+ class="mobile-user-nav__link">
7
+ {{ translations.header["sign-in"] }}
8
+ </a>
9
+ </li>
10
+ <li class="mobile-user-nav__item">
11
+ <a
12
+ href="{{ getServiceRoute('jobseekersite', 'account.signup') }}"
13
+ class="mobile-user-nav__link">
14
+ {{ translations.header["create-account"] }}
15
+ </a>
16
+ </li>
@@ -0,0 +1,24 @@
1
+ {# Mobile user nav #}
2
+
3
+ {% if auth.isAuthenticated %}
4
+ {% set class = "mobile-user-nav--loggedin" %}
5
+ {% set userNavItemsPath = templatePath + "includes/mobile-user-nav/loggedin-items.njk" %}
6
+ {% else %}
7
+ {% set class = "mobile-user-nav--loggedout" %}
8
+ {% set userNavItemsPath = templatePath + "includes/mobile-user-nav/loggedout-items.njk" %}
9
+ {% endif %}
10
+
11
+
12
+ <nav id="mobile-user-nav" class="mobile-user-nav {{ class }}" aria-label="{{ translations.header["user"] }}">
13
+ <div class="clicky-menu js-clicky-menu">
14
+ <span
15
+ id="mobile-user-nav-clicky-menu-control"
16
+ class="clicky-menu-control js-clicky-menu-control">
17
+ {% include templatePath + "svgs/profile.svg" %}
18
+ </span>
19
+ <ul id="mobile-user-nav__items" class="mobile-user-nav__items">
20
+ {% include userNavItemsPath %}
21
+ </ul>
22
+ </div>
23
+ </nav>
24
+
@@ -0,0 +1,3 @@
1
+ <svg class="arrow-down" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
2
+ <path d="M28.055 5.573l-12.023 20.039-12.023-20.039h24.047z"></path>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg class="arrow-left" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
2
+ <path d="M24.047 27.616l-20.039-12.023 20.039-12.023v24.047z"></path>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg class="arrow-right" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
2
+ <path d="M8.016 27.616l20.039-12.023-20.039-12.023v24.047z"></path>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg class="arrow-up" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
2
+ <path d="M4.008 25.613l12.023-20.039 12.023 20.039h-24.047z"></path>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg class="cart" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
2
+ <path d="M31.841 28.882c0 1.515-1.228 2.742-2.742 2.742s-2.742-1.228-2.742-2.742c0-1.515 1.228-2.742 2.742-2.742s2.742 1.228 2.742 2.742zM15.1 28.856c0 1.515-1.228 2.742-2.742 2.742s-2.742-1.228-2.742-2.742c0-1.515 1.228-2.742 2.742-2.742s2.742 1.228 2.742 2.742zM29.057 17.713h-16.683l-1.722-12.313 18.405 3.673zM32.063 23.776h-24.856l-2.882-19.849-4.325-1.026v-3.34l7.031 1.981 2.795 19.228h22.236z"></path>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg class="facebook" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
2
+ <path d="M17.821 31.624v-14.626h4.91l0.735-5.7h-5.644v-3.639c0-1.65 0.458-2.774 2.825-2.774l3.018-0.001v-5.098c-0.522-0.069-2.314-0.224-4.399-0.224-4.351 0-7.33 2.656-7.33 7.534v4.203h-4.922v5.7h4.922v14.626h5.885z"></path>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg class="linkedin" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
2
+ <path d="M1.497 10.553h6.232v20.044h-6.232v-20.044zM4.613 0.589c1.992 0 3.61 1.618 3.61 3.611 0 1.995-1.618 3.613-3.61 3.613-1.997 0-3.611-1.618-3.611-3.613 0-1.992 1.614-3.611 3.611-3.611zM11.636 10.553h5.977v2.737h0.085c0.832-1.575 2.865-3.237 5.896-3.237 6.303 0 7.469 4.15 7.469 9.55v10.994h-6.222v-9.747c0-2.326-0.045-5.315-3.238-5.315-3.242 0-3.736 2.532-3.736 5.147v9.915h-6.228v-20.044z"></path>
3
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg class="profile" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewbox="0 0 32 32">
2
+ <path
3
+ d="M8.016 9.581c0 4.427 3.589 8.016 8.016 8.016s8.016-3.589 8.016-8.016-3.589-8.016-8.016-8.016-8.016 3.589-8.016 8.016zM24.047 19.601h-16.031c-4.427 0-8.016 3.589-8.016 8.016v2.004h32.063v-2.004c0-4.427-3.589-8.016-8.016-8.016z">
4
+ </path>
5
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg class="star-filled" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
2
+ <path d="M16.031 0.346l4.954 10.038 11.078 1.61-8.016 7.813 1.893 11.033-9.908-5.209-9.908 5.209 1.893-11.033-8.016-7.813 11.078-1.61z"></path>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg class="star-outline" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
2
+ <path d="M16.031 6.006l3.29 6.668 7.358 1.069-5.324 5.189 0.222 1.298 1.034 6.030-6.581-3.461-6.581 3.461 1.256-7.327-5.324-5.189 7.358-1.069 3.29-6.668M16.031 0.346l-4.954 10.038-11.078 1.609 8.016 7.813-1.893 11.033 9.908-5.209 9.908 5.209-1.893-11.033 8.016-7.813-11.078-1.609-4.954-10.038z"></path>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg class="twitter" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
2
+ <path d="M32.063 5.307c-1.176 0.524-2.446 0.88-3.775 1.036 1.36-0.814 2.398-2.101 2.893-3.643-1.271 0.756-2.681 1.304-4.176 1.601-1.204-1.276-2.91-2.079-4.8-2.079-3.631 0-6.582 2.947-6.582 6.58 0 0.512 0.060 1.015 0.168 1.497-5.465-0.273-10.312-2.892-13.555-6.874-0.565 0.974-0.889 2.104-0.889 3.309 0 2.283 1.156 4.296 2.928 5.475-1.083-0.036-2.099-0.333-2.985-0.819 0 0.028 0 0.056 0 0.083 0 3.183 2.268 5.84 5.278 6.448-0.556 0.147-1.131 0.228-1.733 0.228-0.426 0-0.835-0.039-1.235-0.118 0.833 2.614 3.267 4.516 6.141 4.569-2.247 1.765-5.087 2.814-8.172 2.814-0.526 0-1.053-0.029-1.567-0.089 2.911 1.865 6.368 2.955 10.087 2.955 12.101 0 18.712-10.026 18.712-18.717 0-0.287-0.004-0.57-0.020-0.85 1.285-0.927 2.405-2.088 3.284-3.406z"></path>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg class="youtube" xmlns="http://www.w3.org/2000/svg" width="28" height="32" viewBox="0 0 28 32">
2
+ <path d="M17.373 21.819v3.775q0 1.199-0.698 1.199-0.412 0-0.805-0.394v-5.386q0.394-0.394 0.805-0.394 0.698 0 0.698 1.199zM23.421 21.837v0.823h-1.61v-0.823q0-1.217 0.805-1.217t0.805 1.217zM6.137 17.937h1.914v-1.682h-5.582v1.682h1.879v10.181h1.789v-10.181zM11.29 28.117h1.592v-8.839h-1.592v6.763q-0.537 0.751-1.020 0.751-0.322 0-0.376-0.376-0.018-0.054-0.018-0.626v-6.513h-1.592v6.996q0 0.877 0.143 1.306 0.215 0.662 1.038 0.662 0.859 0 1.825-1.091v0.966zM18.966 25.469v-3.525q0-1.306-0.161-1.771-0.304-1.002-1.27-1.002-0.895 0-1.664 0.966v-3.883h-1.592v11.862h1.592v-0.859q0.805 0.984 1.664 0.984 0.966 0 1.27-0.984 0.161-0.483 0.161-1.789zM25.013 25.29v-0.233h-1.628q0 0.913-0.036 1.091-0.125 0.644-0.716 0.644-0.823 0-0.823-1.235v-1.557h3.203v-1.843q0-1.413-0.483-2.075-0.698-0.913-1.897-0.913-1.217 0-1.915 0.913-0.501 0.662-0.501 2.075v3.095q0 1.413 0.519 2.075 0.698 0.913 1.932 0.913 1.288 0 1.932-0.948 0.322-0.483 0.376-0.966 0.036-0.161 0.036-1.038zM14.135 8.955v-3.757q0-1.235-0.769-1.235t-0.769 1.235v3.757q0 1.252 0.769 1.252t0.769-1.252zM26.999 22.392q0 4.187-0.465 6.262-0.25 1.056-1.038 1.771t-1.825 0.823q-3.292 0.376-9.93 0.376t-9.93-0.376q-1.038-0.107-1.834-0.823t-1.029-1.771q-0.465-2.004-0.465-6.262 0-4.187 0.465-6.262 0.25-1.056 1.038-1.771t1.843-0.841q3.274-0.358 9.912-0.358t9.93 0.358q1.038 0.125 1.834 0.841t1.029 1.771q0.465 2.004 0.465 6.262zM9.143-0.438h1.825l-2.165 7.139v4.849h-1.789v-4.849q-0.25-1.324-1.091-3.793-0.662-1.843-1.163-3.346h1.897l1.27 4.706zM15.763 5.52v3.131q0 1.449-0.501 2.111-0.662 0.913-1.897 0.913-1.199 0-1.879-0.913-0.501-0.68-0.501-2.111v-3.131q0-1.431 0.501-2.093 0.68-0.912 1.879-0.912 1.235 0 1.897 0.912 0.501 0.662 0.501 2.093zM21.757 2.621v8.928h-1.628v-0.984q-0.948 1.109-1.843 1.109-0.823 0-1.056-0.662-0.143-0.429-0.143-1.342v-7.049h1.628v6.566q0 0.59 0.018 0.626 0.054 0.394 0.376 0.394 0.483 0 1.020-0.769v-6.817h1.628z"></path>
3
+ </svg>
@@ -0,0 +1,26 @@
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
+ } %}
@@ -0,0 +1,26 @@
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
+ } %}
@@ -0,0 +1,26 @@
1
+ {% set translations = {
2
+ header: {
3
+ "sign-in": "Sign in",
4
+ "sign-out": "Sign out",
5
+ "or": "or",
6
+ "create-account": "Create account",
7
+ "link-new-window": "(This link will open in a new window)",
8
+ "your-shortlist": "Your shortlist",
9
+ "user-menu": "User menu",
10
+
11
+ "skip-to-main-menu": "Skip to main menu",
12
+ "skip-to-user-menu": "Skip to user menu",
13
+
14
+ "recruiters": "Recruiters",
15
+ "jobseekers": "Jobseekers",
16
+
17
+ "user": "User",
18
+ "homepage": "Homepage",
19
+ "main": "Main menu"
20
+ },
21
+
22
+ footer: {
23
+ "back-to-top": "Back to top",
24
+ "footer": "Footer"
25
+ }
26
+ } %}
@@ -0,0 +1,26 @@
1
+ {% set translations = {
2
+ header: {
3
+ "sign-in": "Iniciar sesión",
4
+ "sign-out": "Cerrar sesión",
5
+ "or": "o",
6
+ "create-account": "Crear cuenta",
7
+ "link-new-window": "(Este enlace se abrirá en una nueva ventana.)",
8
+ "your-shortlist": "Su preselección",
9
+ "user-menu": "Menú de usuario",
10
+
11
+ "skip-to-main-menu": "Ir al menú principal",
12
+ "skip-to-user-menu": "Skip to user menu",
13
+
14
+ "recruiters": "Empresas",
15
+ "jobseekers": "Candidatos",
16
+
17
+ "user": "Usuario",
18
+ "homepage": "Página principal",
19
+ "main": "Menú principal"
20
+ },
21
+
22
+ footer: {
23
+ "back-to-top": "Volver arriba",
24
+ "footer": "Pie de página"
25
+ }
26
+ } %}
@@ -0,0 +1,26 @@
1
+ {% set translations = {
2
+ header: {
3
+ "sign-in": "Connexion",
4
+ "sign-out": "Déconnexion",
5
+ "or": "ou",
6
+ "create-account": "Créez un compte",
7
+ "link-new-window": "(Une nouvelle fenêtre s'ouvrira)",
8
+ "your-shortlist": "Favoris",
9
+ "user-menu": "Menu de l'utilisateur",
10
+
11
+ "skip-to-main-menu": "Passer au menu principal",
12
+ "skip-to-user-menu": "Skip to user menu",
13
+
14
+ "recruiters": "Recruteurs",
15
+ "jobseekers": "Chercheurs d'emploi",
16
+
17
+ "user": "Utilisateur",
18
+ "homepage": "Page d'accueil",
19
+ "main": "Menu principal"
20
+ },
21
+
22
+ footer: {
23
+ "back-to-top": "Haut de page",
24
+ "footer": "Bas de page"
25
+ }
26
+ } %}
@@ -0,0 +1,26 @@
1
+ {% set translations = {
2
+ header: {
3
+ "sign-in": "Logg inn",
4
+ "sign-out": "Logg ut",
5
+ "or": "eller",
6
+ "create-account": "Opprett konto",
7
+ "link-new-window": "(Dette åpnes i et nytt vindu)",
8
+ "your-shortlist": "Lagrede annonser",
9
+ "user-menu": "Brukermeny",
10
+
11
+ "skip-to-main-menu": "Hoppe til hovedmenyen",
12
+ "skip-to-user-menu": "Hopp til brukermeny",
13
+
14
+ "recruiters": "Rekrutterere",
15
+ "jobseekers": "Arbeidssøkere",
16
+
17
+ "user": "Bruker",
18
+ "homepage": "Forsiden",
19
+ "main": "Hovedmeny"
20
+ },
21
+
22
+ footer: {
23
+ "back-to-top": "Tilbake til toppen",
24
+ "footer": "Sidefot"
25
+ }
26
+ } %}
@@ -0,0 +1,26 @@
1
+ {% set translations = {
2
+ header: {
3
+ "sign-in": "Aanmelden",
4
+ "sign-out": "Afmelden",
5
+ "or": "of",
6
+ "create-account": "Account aanmaken",
7
+ "link-new-window": "(Dit opent in een nieuw venster)",
8
+ "your-shortlist": "Jouw selectie",
9
+ "user-menu": "Gebruikersmenu",
10
+
11
+ "skip-to-main-menu": "Verdergaan naar hoofdmenu",
12
+ "skip-to-user-menu": "Verdergaan naar gebruikersmenu",
13
+
14
+ "recruiters": "Wervers",
15
+ "jobseekers": "Werkzoekenden",
16
+
17
+ "user": "Gebruiker",
18
+ "homepage": "Startpagina",
19
+ "main": "Hoofdmenu"
20
+ },
21
+
22
+ footer: {
23
+ "back-to-top": "Terug naar boven",
24
+ "footer": "Voettekst"
25
+ }
26
+ } %}
@@ -0,0 +1,26 @@
1
+ {% set translations = {
2
+ header: {
3
+ "sign-in": "Logga in",
4
+ "sign-out": "Logga ut",
5
+ "or": "eller",
6
+ "create-account": "Skapa ett konto",
7
+ "link-new-window": "(Detta öppnas i ett nytt fönster)",
8
+ "your-shortlist": "Din jobblista",
9
+ "user-menu": "Användarmeny",
10
+
11
+ "skip-to-main-menu": "Hoppa till huvudmeny",
12
+ "skip-to-user-menu": "Gå till användarmeny",
13
+
14
+ "recruiters": "Rekryterare",
15
+ "jobseekers": "Jobbsökare",
16
+
17
+ "user": "Användare",
18
+ "homepage": "Hemsida",
19
+ "main": "Huvudmeny"
20
+ },
21
+
22
+ footer: {
23
+ "back-to-top": "Tillbaka till toppen av sidan",
24
+ "footer": "Sidfot"
25
+ }
26
+ } %}
@@ -0,0 +1,26 @@
1
+ {% set translations = {
2
+ header: {
3
+ "sign-in": "登录",
4
+ "sign-out": "注销",
5
+ "or": "或",
6
+ "create-account": "创建帐户",
7
+ "link-new-window": "(这会在新窗口中打开)",
8
+ "your-shortlist": "您的候选清单",
9
+ "user-menu": "用户菜单",
10
+
11
+ "skip-to-main-menu": "跳至主菜单",
12
+ "skip-to-user-menu": "跳至用户菜单",
13
+
14
+ "recruiters": "招聘企业",
15
+ "jobseekers": "求职者",
16
+
17
+ "user": "用户",
18
+ "homepage": "主页",
19
+ "main": "主菜单"
20
+ },
21
+
22
+ footer: {
23
+ "back-to-top": "返回顶部",
24
+ "footer": "页脚"
25
+ }
26
+ } %}
@@ -0,0 +1,25 @@
1
+ module.exports = [
2
+ {
3
+ type: 'onPreResponse',
4
+ method: async (request, h) => {
5
+ const { response, auth } = request;
6
+
7
+ if (!response.isBoom) {
8
+ return h.continue;
9
+ }
10
+
11
+ const { statusCode, error: errorTitle } = response.output.payload;
12
+ const errorMessage = response.toString();
13
+
14
+ return h
15
+ .response({
16
+ code: statusCode,
17
+ isAuthenticated: auth.isAuthenticated,
18
+ title: errorTitle || 'Unknown Error',
19
+ message: errorMessage || 'Sorry, an unknown problem has arisen.',
20
+ stack: response.stack || 'No stack available',
21
+ })
22
+ .code(response.output.statusCode);
23
+ },
24
+ },
25
+ ];
@@ -0,0 +1,98 @@
1
+ const Hapi = require('@hapi/hapi');
2
+ const Toys = require('@hapipal/toys');
3
+ const path = require('path');
4
+ const { log } = require('../bin/utils');
5
+ const podletServer = require('@private/header-footer-podlet-server');
6
+ const { VERSION, DEFAULT_DEV_PORT } = require('../constants');
7
+
8
+ exports.devServer = async ({ start, fertConfig = {} } = {}) => {
9
+ const server = Hapi.server({
10
+ port: fertConfig.cli.port ?? DEFAULT_DEV_PORT,
11
+ host: fertConfig.cli.host ?? 'localhost',
12
+ });
13
+
14
+ // "the path prefix used to locate static resources (files and view templates) when relative paths are used"
15
+ // https://hapi.dev/api/?v=21.3.2#-serverpathrelativeto
16
+ server.path(fertConfig.workingDir);
17
+
18
+ // make incoming fertConfig available server-wide
19
+ server.decorate('server', 'fertConfig', ({ update } = {}) => {
20
+ if (update) {
21
+ fertConfig = update;
22
+ }
23
+
24
+ return fertConfig;
25
+ });
26
+
27
+ // load in the podletServer to the dev servers app namespace
28
+ // server.app.podletServer = await podletServer({ start: false, fertConfig });
29
+ await server.register({
30
+ plugin: podletServer,
31
+ options: {
32
+ version: `${VERSION}-fert`,
33
+ isFert: true,
34
+ isProd: false,
35
+ templatePath: [path.resolve(fertConfig.workingDir, 'templates')],
36
+ },
37
+ routes: { prefix: '/_podlet' },
38
+ });
39
+
40
+ // add template support to hapi and setup the nunjucks engine
41
+ await server.register([
42
+ // require('blipp'),
43
+ require('@hapi/vision'),
44
+ require('@hapi/inert'),
45
+ {
46
+ plugin: require('./plugins/hapi-vite'),
47
+ options: {
48
+ watch: [path.join(fertConfig.workingDir, '/templates/**/*')],
49
+ entry: path.join(fertConfig.workingDir, fertConfig.entry),
50
+ log: log.debug,
51
+ },
52
+ },
53
+ ]);
54
+
55
+ server.views(require('./view-manager')(server));
56
+
57
+ // Mocked logged in
58
+ Toys.auth.strategy(server, 'mock-user', (request, h) => {
59
+ if (Object.prototype.hasOwnProperty.call(request.query, 'loggedin')) {
60
+ const user = {
61
+ email: 'email@madgex.com',
62
+ firstName: 'Samus',
63
+ lastName: 'Aran',
64
+ userId: 'b5699145-e867-4b47-8b18-f81247948dbb',
65
+ username: 'Samus Aran',
66
+ };
67
+
68
+ return h.authenticated({ credentials: user });
69
+ }
70
+
71
+ return h.continue;
72
+ });
73
+
74
+ // routes
75
+ server.route(require('./routes/public'));
76
+ server.route(require('./routes/views'));
77
+ server.ext(require('./extensions/error-logging'));
78
+
79
+ if (start) {
80
+ await server.start();
81
+
82
+ log.debug(`Hapi server started at ${server.info.uri}`);
83
+
84
+ return server;
85
+ }
86
+
87
+ await server.initialize();
88
+
89
+ return server;
90
+ };
91
+
92
+ if (require.main === module) {
93
+ exports.devServer({ start: true });
94
+
95
+ process.on('unhandledRejection', (err) => {
96
+ throw err;
97
+ });
98
+ }
@@ -0,0 +1,61 @@
1
+ const { createServer } = require('vite');
2
+ const chokidar = require('chokidar');
3
+ const Hoek = require('@hapi/hoek');
4
+
5
+ const internals = {};
6
+
7
+ internals.defaults = {
8
+ watch: ['/templates/**/*'],
9
+ entry: './src/index.js',
10
+ log: console.log,
11
+ };
12
+
13
+ module.exports = {
14
+ name: 'hapi-vite',
15
+ register: async (server, options = {}) => {
16
+ options = Hoek.applyToDefaults(internals.defaults, options);
17
+ const log = options.log;
18
+
19
+ // once hapi server is ready, start up the Vite server
20
+ server.ext({
21
+ type: 'onPostStart',
22
+ method: async (server) => {
23
+ server.app.viteServer = await createServer({
24
+ server: {
25
+ origin: server.info.uri,
26
+ watch: {
27
+ ignored: '*',
28
+ },
29
+ },
30
+ build: {
31
+ manifest: true,
32
+ rollupOptions: {
33
+ input: options.entry,
34
+ },
35
+ },
36
+ });
37
+
38
+ await server.app.viteServer.listen();
39
+
40
+ if (options.watch && options.watch.length) {
41
+ chokidar.watch(options.watch).on('all', (event, path) => {
42
+ log(event, path);
43
+ if (event === 'add' || event === 'change') {
44
+ server.app.viteServer.ws.send({
45
+ type: 'full-reload',
46
+ path: '*',
47
+ });
48
+ }
49
+ });
50
+ }
51
+ },
52
+ });
53
+
54
+ server.decorate('server', 'viteServer', () => server.app.viteServer);
55
+ server.decorate('server', 'viteServerOrigin', () => {
56
+ const { viteServer } = server.app;
57
+
58
+ return viteServer.resolvedUrls.local[0] || '';
59
+ });
60
+ },
61
+ };