add form styles

This commit is contained in:
panr 2022-06-16 09:16:23 +02:00
parent e0213b0d4e
commit ce78519623
7 changed files with 55 additions and 15 deletions

View File

@ -15,12 +15,19 @@ a.button {
margin-bottom: 5px;
text-decoration: none;
text-align: center;
border-radius: 8px;
border: 1px solid transparent;
border-radius: 0;
border: 1px solid var(--accent);
background: var(--accent);
font: inherit;
font-weight: bold;
appearance: none;
cursor: pointer;
outline: none;
&:hover {
background: color-mod(var(--accent) a(90%));
}
/* variants */
&.outline {
@ -34,20 +41,11 @@ a.button {
}
}
&.primary {
box-shadow: 0 4px 6px rgba(50, 50, 93, .11), 0 1px 3px rgba(0, 0, 0, .08);
&:hover {
box-shadow: 0 2px 6px rgba(50, 50, 93, .21), 0 1px 3px rgba(0, 0, 0, .08);
}
}
&.link {
background: none;
font-size: 1rem;
}
/* sizes */
&.small {
@ -64,6 +62,8 @@ a.read-more,
a.read-more:hover,
a.read-more:active {
display: inline-flex;
border: none;
color: var(--accent);
background: none;
box-shadow: none;
padding: 0;

30
assets/css/form.css Normal file
View File

@ -0,0 +1,30 @@
input, textarea, select {
background: transparent;
color: var(--accent);
border: 1px solid var(--accent);
border-radius: 0;
padding: 10px;
font: inherit;
appearance: none;
&:focus, :active {
border-color: var(--color);
outline: 1px solid var(--color);
}
&:active {
box-shadow: none;
}
}
select {
background: var(--background);
option {
background: var(--background);
}
}
::placeholder {
color: color-mod(var(--accent) a(50%));
}

View File

@ -2,6 +2,7 @@
@import 'font.css';
@import 'buttons.css';
@import 'form.css';
@import 'header.css';
@import 'logo.css';

View File

@ -1 +1,4 @@
!function(){var e=getComputedStyle(document.body).getPropertyValue("--phoneWidth"),t=function(){return window.matchMedia(e).matches},n=document.querySelector(".language-selector-current"),o=document.querySelector(".language-selector__more");document.body.addEventListener("click",(function(){t()||!o||o.classList.contains("hidden")||o.classList.add("hidden")})),n&&n.addEventListener("click",(function(e){t()||(e.stopPropagation(),o.classList.toggle("hidden"))}))}();
(function(){var __webpack_modules__={"./assets/js/languageSelector.js":
/*!***************************************!*\
!*** ./assets/js/languageSelector.js ***!
\***************************************/function(){eval('var mobileQuery = getComputedStyle(document.body).getPropertyValue("--phoneWidth");\n\nvar isMobile = function isMobile() {\n return window.matchMedia(mobileQuery).matches;\n};\n\nvar languageSelector = document.querySelector(".language-selector-current");\nvar moreLanguagesContainer = document.querySelector(".language-selector__more");\ndocument.body.addEventListener("click", function () {\n if (!isMobile() && moreLanguagesContainer && !moreLanguagesContainer.classList.contains("hidden")) {\n moreLanguagesContainer.classList.add("hidden");\n }\n});\nlanguageSelector && languageSelector.addEventListener("click", function (e) {\n if (!isMobile()) {\n e.stopPropagation();\n moreLanguagesContainer.classList.toggle("hidden");\n }\n});\n\n//# sourceURL=webpack://terminal/./assets/js/languageSelector.js?')}},__webpack_exports__={};__webpack_modules__["./assets/js/languageSelector.js"]()})();

View File

@ -1 +1,4 @@
!function(){var e=document.querySelector(".container"),t=document.querySelector(".menu"),n=document.querySelector(".menu-trigger"),i=(document.querySelector(".menu__inner--desktop"),document.querySelector(".menu__sub-inner-more-trigger")),o=document.querySelector(".menu__sub-inner-more"),d=getComputedStyle(document.body).getPropertyValue("--phoneWidth"),c=function(){return window.matchMedia(d).matches},s=function(){n&&n.classList.toggle("hidden",!c()),t&&t.classList.toggle("hidden",c()),o&&o.classList.toggle("hidden",!c())};t&&t.addEventListener("click",(function(e){return e.stopPropagation()})),o&&o.addEventListener("click",(function(e){return e.stopPropagation()})),s(),document.body.addEventListener("click",(function(){c()||!o||o.classList.contains("hidden")?c()&&!t.classList.contains("hidden")&&t.classList.add("hidden"):o.classList.add("hidden")})),window.addEventListener("resize",s),n&&n.addEventListener("click",(function(e){e.stopPropagation(),t&&t.classList.toggle("hidden")})),i&&i.addEventListener("click",(function(t){t.stopPropagation(),o&&o.classList.toggle("hidden"),o.getBoundingClientRect().right>e.getBoundingClientRect().right&&(o.style.left="auto",o.style.right=0)}))}();
(function(){var __webpack_modules__={"./assets/js/menu.js":
/*!***************************!*\
!*** ./assets/js/menu.js ***!
\***************************/function(){eval('var container = document.querySelector(".container");\nvar menu = document.querySelector(".menu");\nvar mobileMenuTrigger = document.querySelector(".menu-trigger");\nvar desktopMenu = document.querySelector(".menu__inner--desktop");\nvar desktopMenuTrigger = document.querySelector(".menu__sub-inner-more-trigger");\nvar menuMore = document.querySelector(".menu__sub-inner-more");\nvar mobileQuery = getComputedStyle(document.body).getPropertyValue("--phoneWidth");\n\nvar isMobile = function isMobile() {\n return window.matchMedia(mobileQuery).matches;\n};\n\nvar handleMenuClasses = function handleMenuClasses() {\n mobileMenuTrigger && mobileMenuTrigger.classList.toggle("hidden", !isMobile());\n menu && menu.classList.toggle("hidden", isMobile());\n menuMore && menuMore.classList.toggle("hidden", !isMobile());\n}; // Common\n\n\nmenu && menu.addEventListener("click", function (e) {\n return e.stopPropagation();\n});\nmenuMore && menuMore.addEventListener("click", function (e) {\n return e.stopPropagation();\n});\nhandleMenuClasses();\ndocument.body.addEventListener("click", function () {\n if (!isMobile() && menuMore && !menuMore.classList.contains("hidden")) {\n menuMore.classList.add("hidden");\n } else if (isMobile() && !menu.classList.contains("hidden")) {\n menu.classList.add("hidden");\n }\n});\nwindow.addEventListener("resize", handleMenuClasses); // Mobile menu\n\nmobileMenuTrigger && mobileMenuTrigger.addEventListener("click", function (e) {\n e.stopPropagation();\n menu && menu.classList.toggle("hidden");\n}); // Desktop menu\n\ndesktopMenuTrigger && desktopMenuTrigger.addEventListener("click", function (e) {\n e.stopPropagation();\n menuMore && menuMore.classList.toggle("hidden");\n\n if (menuMore.getBoundingClientRect().right > container.getBoundingClientRect().right) {\n menuMore.style.left = "auto";\n menuMore.style.right = 0;\n }\n});\n\n//# sourceURL=webpack://terminal/./assets/js/menu.js?')}},__webpack_exports__={};__webpack_modules__["./assets/js/menu.js"]()})();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long