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 = '