-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #130 from qld-gov-au/QOLOE-22-Footer
WIP: Footer - Sen's updates
- Loading branch information
Showing
12 changed files
with
1,055 additions
and
595 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
.qld-footer { | ||
// ------------------------------------------------------------------------------------------------------------------ | ||
// 1. Palette colours | ||
// ------------------------------------------------------------------------------------------------------------------ | ||
// Default palette | ||
--#{$prefix}footer-color-crest-fill: var(--#{$prefix}color-default-color-light-crest-fill); //#1d1d1d; | ||
--#{$prefix}footer-color-border: rgba(0, 0, 0, 0.2); // No token for this | ||
--#{$prefix}footer-color-title: var(--#{$prefix}color-default-color-light-site-title); //#022a50; | ||
--#{$prefix}footer-color-designAccent: var(--#{$prefix}color-default-color-light-accent-design-accent); //#6bbe27; | ||
--#{$prefix}footer-color-text: var(--#{$prefix}color-default-color-light-text-default); //#414141; | ||
--#{$prefix}footer-color-text__muted: var(--#{$prefix}color-default-color-light-text-lighter); //#636363; // not using | ||
--#{$prefix}footer-color-link: var(--#{$prefix}color-default-color-light-link-default); //#09549f; | ||
--#{$prefix}footer-color-focus: var(--#{$prefix}color-default-color-light-focus-default); //#0085b3; | ||
--#{$prefix}footer-color-background: var(--#{$prefix}color-default-color-light-background-default); //#fff; | ||
--#{$prefix}footer-color-alt-button: var(--#{$prefix}color-default-color-light-action-primary); //#008733; | ||
--#{$prefix}footer-color-alt-button__hover: var( | ||
--#{$prefix}color-default-color-light-action-primary-hover | ||
); //#00702b; | ||
|
||
// ------------------------------------------------------------------------------------------------------------------ | ||
// 2. Colours | ||
// ------------------------------------------------------------------------------------------------------------------ | ||
--qld-footer-column-border-color: var(--#{$prefix}footer-color-border); | ||
|
||
// ------------------------------------------------------------------------------------------------------------------ | ||
// 3. FORM IO | ||
// ------------------------------------------------------------------------------------------------------------------ | ||
--#{$prefix}formIO-bg-colour: var(--#{$prefix}core-default-color-neutral-white); //#fff; var(--#{$prefix}); // | ||
--#{$prefix}formIO-callout-bg-colour: var(--#{$prefix}core-default-color-neutral-lighter); //#f5f5f5; | ||
--#{$prefix}formIO-hr-colour: var(--#{$prefix}core-default-color-neutral-lighter); //#f5f5f5; | ||
--#{$prefix}formIO-formio-colour: var(--#{$prefix}core-default-color-neutral-black); //#1d1d1d; | ||
--#{$prefix}formIO-input-border: var(--#{$prefix}color-default-color-light-border-alt); //#7a7a7a; | ||
--#{$prefix}formIO-btn-disabled-colour: var(--#{$prefix}core-default-color-neutral-light); //#e8e8e8; | ||
--#{$prefix}formIO-btn-close-colour: var(--#{$prefix}color-default-color-light-action-secondary); //#008733; | ||
--#{$prefix}formIO-btn-close-colour__hover: var( | ||
--#{$prefix}color-default-color-light-action-secondary-hover | ||
); //#00702b; | ||
--#{$prefix}formIO-link-colour: var(--#{$prefix}color-default-color-light-link-default); //#09549f; | ||
--#{$prefix}formIO-link-colour-hover: var(--#{$prefix}color-default-color-light-focus-default); //#0085b3; | ||
--#{$prefix}formIO-submit-btn: var(--#{$prefix}color-default-color-light-action-primary); //#09549f; | ||
--#{$prefix}formIO-submit-btn-hover: var(--#{$prefix}color-default-color-light-action-primary-hover); | ||
--#{$prefix}formIO-submit-btn-text: var(--#{$prefix}color-default-color-light-link-on-action); //#fff; | ||
--#{$prefix}formIO-thankyou-page-title-colour: var(--#{$prefix}color-default-color-light-text-heading); | ||
--#{$prefix}formIO-border-notify-invalid: var(--#{$prefix}core-default-color-status-error-default); | ||
--#{$prefix}formIO-border-notify-success: var(--#{$prefix}core-default-color-status-success-default); | ||
--#{$prefix}formIO-callout-border-colour: var(--#{$prefix}core-default-color-brand-primary-light-green); | ||
@media (max-width: 991.98px) { | ||
--qld-footer-column-border-color: transparent; | ||
} | ||
|
||
// ------------------------------------------------------------------------------------------------------------------ | ||
// Dark palette & Forgov | ||
// ------------------------------------------------------------------------------------------------------------------ | ||
&.dark, | ||
&.dark-alt { | ||
--#{$prefix}footer-color-crest-fill: var(--#{$prefix}color-default-color-dark-crest-fill); //#fff; | ||
--#{$prefix}footer-color-text: var(--#{$prefix}color-default-color-dark-text-default); //#fff; | ||
--#{$prefix}footer-color-border: rgba(255, 255, 255, 0.2); // No token for this | ||
--#{$prefix}footer-color-title: var(--#{$prefix}color-default-color-dark-text-heading); //#fff; | ||
--#{$prefix}footer-color-designAccent: var(--#{$prefix}color-default-color-dark-accent-design-accent); | ||
--#{$prefix}footer-color-alt-button: var(--#{$prefix}color-default-color-dark-action-primary); //#efd700; | ||
--#{$prefix}footer-color-alt-button__hover: var( | ||
--#{$prefix}color-default-color-dark-action-primary-hover | ||
); //#add33f; | ||
--#{$prefix}footer-color-link: var(--#{$prefix}color-default-color-dark-link-default); //#fff; | ||
--#{$prefix}footer-color-focus: var(--#{$prefix}color-default-color-dark-focus-default); //#01b0e5; | ||
} | ||
&.dark-alt { | ||
--#{$prefix}footer-color-background: var(--#{$prefix}color-default-color-dark-background-alt); //#05325f; | ||
} | ||
&.dark { | ||
--#{$prefix}footer-color-background: var(--#{$prefix}color-default-color-dark-background-default); //#09549f; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.qld-footer { | ||
// ------------------------------------------------------------------------------------------------------------------ | ||
// Measurements | ||
// -text | ||
--#{$prefix}footer-font-size: 0.875rem; | ||
--#{$prefix}footer-text-underline-offset: 0.3em; | ||
--#{$prefix}footer-font-underline-boarder: 2px; | ||
|
||
// -spacing | ||
--#{$prefix}footer-gap: 12px; | ||
--#{$prefix}footer-column-spacing: 32px; | ||
--#{$prefix}footer-spacing: 1rem; | ||
--#{$prefix}footer-padding-y: 4rem; | ||
--#{$prefix}footer-bootstrap-default-padding: 15px; | ||
// -boarders | ||
--#{$prefix}footer-border-width: 1px; | ||
--#{$prefix}footer-special-border-width: 3px; | ||
--#{$prefix}footer-border-radius: 4px; | ||
|
||
// Icons and Crest | ||
--#{$prefix}footer-social-icon-size-width: 1.5rem; | ||
--#{$prefix}footer-social-icon-size-height: 20px; | ||
--#{$prefix}footer-crest-max-width: 252px; | ||
|
||
// Form IO | ||
--#{$prefix}formIO-feeback-font-weight: 700; | ||
--#{$prefix}formIO-border-outline-width: 2px; | ||
--#{$prefix}formIO-form-control-border-width: 2px; | ||
--#{$prefix}formIO-callout-heading-line-height: 24px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
* Init footer formio feedback form | ||
* | ||
* @memberof module:Footer | ||
* | ||
* @returns {void} | ||
*/ | ||
export function displayFeedbackForm() { | ||
if (typeof FormioScript === "object") { | ||
// eslint-disable-next-line no-undef | ||
FormioScript.init(); | ||
} else { | ||
let scriptEle = document.createElement("script"); | ||
scriptEle.setAttribute("src", "https://static.qgov.net.au/formio-qld/v2/v2.x.x-latest/formio-script.min.js"); | ||
scriptEle.setAttribute("type", "text/javascript"); | ||
scriptEle.setAttribute("async", true); | ||
|
||
document.body.appendChild(scriptEle); | ||
|
||
// Success event | ||
scriptEle.addEventListener("load", () => { | ||
document.getElementById("btn-footer-feedback").addEventListener("click", runDisplayFeedbackFormIO); | ||
}); | ||
// Error event | ||
if (location.hostname === "localhost" || location.hostname === "127.0.0.1") { | ||
scriptEle.addEventListener("error", (ev) => { | ||
console.log("Error on loading file", ev); | ||
}); | ||
} | ||
} | ||
} | ||
|
||
function runDisplayFeedbackFormIO() { | ||
// eslint-disable-next-line no-undef | ||
FormioScript.init(); | ||
} |
Oops, something went wrong.