From 935ff8329113ec2afafdeb318f35a897ce8c1f97 Mon Sep 17 00:00:00 2001 From: Bob Vrijland Date: Fri, 11 Dec 2020 17:08:00 +0100 Subject: [PATCH] .. --- README.md | 1 + dist/AMPEr/css/AMPEr.css | 42 ++++++++++++++++++++++++++ dist/AMPEr/js/AMPEr.js | 3 +- dist/js/build/main.js | 1 + dist/js/main-concat.js | 1 + src/AMPEr/js/AMPEr.js | 3 +- src/AMPEr/scss/AMPEr.scss | 63 +++++++++++++++++++++++++++++++++++++++ src/js/main.js | 1 + 8 files changed, 113 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e507c6f..d724b75 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ You can use the following options. `cookieDays` default: 365 // Amount of days the cookie is saved before erased by the browser. `classPrefix` default: "AMPEr" // If you want to use you own styling. `debugMode` default: false // Change this to true if you want to open the modal every pageload. +`extraClass` default: "" // Put an extra class for styling on the modal `language` default: "en" // What language from the lexicon we want to use. `lexicon` // see below for more information. `analyticCallback` default: `function () { console.log("Consent for analytic cookies!");` // Triggers when it has consent for analytic cookies. diff --git a/dist/AMPEr/css/AMPEr.css b/dist/AMPEr/css/AMPEr.css index c5250c1..a6c1e19 100644 --- a/dist/AMPEr/css/AMPEr.css +++ b/dist/AMPEr/css/AMPEr.css @@ -17,6 +17,7 @@ * 4. Buttons and icon's * 5. Toggle switch component * 6. Transition + * 7. Extra styling options */ /* 2. Helpers ( Maybe this is already included, but heck .. )*/ .sr-only { @@ -205,3 +206,44 @@ html.using-mouse :focus + label span:last-child { display: none; } #AMPEr_modal_2.AMPEr--active { display: block; } + +/* 7. Extra styling options */ +.AMPEr_modal.AMPEr--bottom { + bottom: 0; + left: 0; + right: 0; + width: 100%; + border-radius: 0; } + .AMPEr_modal.AMPEr--bottom #AMPEr_modal_1 { + align-items: center; + justify-content: space-between; } + .AMPEr_modal.AMPEr--bottom #AMPEr_modal_1.AMPEr--active { + display: flex; } + .AMPEr_modal.AMPEr--bottom #AMPEr_modal_1 .AMPEr_modal_head { + display: none; } + .AMPEr_modal.AMPEr--bottom #AMPEr_modal_1 .AMPEr_description { + flex-grow: 1; } + .AMPEr_modal.AMPEr--bottom #AMPEr_modal_1 .AMPEr_modal_buttons { + margin-top: 0; + display: flex; + justify-content: flex-end; + min-width: 200px; } + .AMPEr_modal.AMPEr--bottom #AMPEr_modal_2 { + background-color: white; + padding: 1rem; + border-radius: 0.625rem; + max-width: 700px; + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); } + @media screen and (max-width: 768px) { + .AMPEr_modal.AMPEr--bottom #AMPEr_modal_1 { + flex-wrap: wrap; } + .AMPEr_modal.AMPEr--bottom #AMPEr_modal_1 .AMPEr_description { + flex-grow: 1; } + .AMPEr_modal.AMPEr--bottom #AMPEr_modal_1 .AMPEr_modal_buttons { + width: 100%; + margin-top: 0; + display: flex; + justify-content: flex-end; } } diff --git a/dist/AMPEr/js/AMPEr.js b/dist/AMPEr/js/AMPEr.js index 1e9ad90..3d87789 100644 --- a/dist/AMPEr/js/AMPEr.js +++ b/dist/AMPEr/js/AMPEr.js @@ -36,6 +36,7 @@ var AMPEr = function () { cookieName: "AMPEr", cookieDays: 365, classPrefix: "AMPEr", + extraClass: "", debugMode: false, language: "en", lexicon: { @@ -95,7 +96,7 @@ var AMPEr = function () { var showCookieWindow = function showCookieWindow() { var html; - html = '