Website Summary Files Commits Branches @commit @diff @stats
path: root / wp-content / themes / carmag / assets / src
diff options
context:
space:
mode:
Commitfb093e569036dcb0200afabdb29c83bc2db783d2 (patch)
Author
 metodiew <stanko@metodiew.com>
2020-07-15 10:10:01 +0300
Committer
 metodiew <stanko@metodiew.com>
2020-07-15 10:10:01 +0300
Files71ee31bf39565ea6cff7b88b312bf430cf66248b /wp-content/themes/carmag/assets/src
tues-interns-2020-feature/registration.tar
tues-interns-2020-feature/registration.tar.gz
tues-interns-2020-feature/registration.zip
Parentc09cfaaff21afdf1fa43aa81327611d3f848e7eb (diff)
Parent860e362739eee6867b6617320ec9eae81865140a (diff)
Sync feature/registration with the latest master feature/registration
diff --git a/wp-content/themes/carmag/assets/src/sass/components/_cookie-notice.scss b/wp-content/themes/carmag/assets/src/sass/components/_cookie-notice.scss
new file mode 100644
index 0000000..4df650e
--- /dev/null
+++ b/wp-content/themes/carmag/assets/src/sass/components/_cookie-notice.scss
@@ -0,0 +1,42 @@
+.cookie-banner {
+ background-color: $color-primary-dark;
+}
+
+.cookie-content {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 24px 0;
+ width: 100%;
+ font-weight: bold;
+ color: white;
+
+ .cookie-text {
+ font-size: 20px;
+
+ a {
+ text-decoration: none;
+ color: $color-secondary;
+ }
+ }
+
+ .cookie-button {
+ button {
+ border: none;
+ color: white;
+ align-items: center;
+ padding: 12px 56px;
+ background: $color-primary;
+ }
+ }
+}
+
+@media only screen and (max-width: $breakpoint-medium) {
+ .cookie-content {
+ flex-direction: column;
+ }
+
+ .cookie-text {
+ text-align: center;
+ }
+} \ No newline at end of file
diff --git a/wp-content/themes/carmag/assets/src/sass/layout/_header.scss b/wp-content/themes/carmag/assets/src/sass/layout/_header.scss
index 3f814ae..3802c2f 100644
--- a/wp-content/themes/carmag/assets/src/sass/layout/_header.scss
+++ b/wp-content/themes/carmag/assets/src/sass/layout/_header.scss
@@ -78,7 +78,7 @@
}
}
- .menu-primary-container {
+ .menu-container {
transition: 0.2s;
&.opened {
@@ -88,7 +88,7 @@
pointer-events: auto;
}
- .menu-primary-menu-container {
+ div[class$="-menu-container"] {
.menu {
display: flex;
flex-direction: row;
@@ -104,6 +104,7 @@
.menu-item {
margin: 0 10px;
+ position: relative;
&.register {
padding: 0;
@@ -117,6 +118,89 @@
}
}
+ &.profile {
+ min-width: max-content;
+ user-select: none;
+ cursor: pointer;
+ }
+
+ .sub-menu {
+ display: flex;
+ flex-direction: column;
+ position: absolute;
+ background-color: $color-white;
+ right: 0;
+ visibility: hidden;
+ opacity: 0;
+ transition: 0.2s;
+
+ li {
+ margin: 0;
+ border-top: 0.5px solid
+ rgba(0, 0, 0, 0.5);
+ border-bottom: 0.5px solid
+ rgba(0, 0, 0, 0.5);
+
+ &:first-child {
+ border-top: none;
+ }
+
+ &:last-child {
+ border-bottom: none;
+ }
+
+ a {
+ color: black;
+ font-weight: normal;
+ text-shadow: 0 0 0.5px black;
+ transition: 0.2s;
+
+ &:hover {
+ text-shadow: 0 0 1px black,
+ 0 0 1px black; //bolder
+ }
+
+ &:before {
+ font-family: "Font Awesome 5 Pro";
+ font-size: 25px;
+ margin: 0 10px 0 0;
+ vertical-align: sub;
+ }
+ }
+
+ &.profile-edit {
+ a:before {
+ content: "\f4ff";
+ }
+ }
+
+ &.profile-publish {
+ a:before {
+ content: "\f055";
+ }
+ }
+
+ &.profile-logout {
+ a:before {
+ content: "\f2f5";
+ }
+ }
+ }
+ }
+
+ &.is-extended {
+ .sub-menu {
+ visibility: visible;
+ opacity: 1;
+ }
+
+ .dropdown-arrow {
+ i {
+ transform: rotate(-90deg);
+ }
+ }
+ }
+
a {
display: inline-block;
transition: 0.2s;
@@ -130,6 +214,16 @@
border-bottom: 1px solid white;
}
}
+
+ .dropdown-arrow {
+ color: white;
+ display: inline-block;
+
+ i {
+ transition: 0.2s;
+ transform: rotate(90deg);
+ }
+ }
}
}
}
@@ -156,7 +250,7 @@
display: flex;
}
- .menu-primary-container {
+ .menu-container {
position: absolute;
z-index: 1;
visibility: hidden;
@@ -167,7 +261,7 @@
left: 0;
right: 0;
- .menu-primary-menu-container {
+ div[class$="-menu-container"] {
.menu {
flex-direction: column;
padding: 0 20px;
@@ -194,6 +288,31 @@
width: 100%;
border: 0;
}
+
+ &.profile {
+ & > a {
+ &:hover {
+ border-bottom: 1px solid
+ transparent;
+ }
+
+ &:after {
+ font-family: "Font Awesome 5 Pro";
+ content: "\f078";
+ margin-left: 20px;
+ vertical-align: text-top;
+ }
+ }
+ }
+
+ .sub-menu {
+ left: 0;
+ right: 0;
+ }
+
+ .dropdown-arrow {
+ display: none;
+ }
}
}
}
diff --git a/wp-content/themes/carmag/assets/src/sass/master.scss b/wp-content/themes/carmag/assets/src/sass/master.scss
index 3725c52..2c68409 100644
--- a/wp-content/themes/carmag/assets/src/sass/master.scss
+++ b/wp-content/themes/carmag/assets/src/sass/master.scss
@@ -44,6 +44,7 @@
@import "components/forms";
@import "components/carousel";
@import "components/seller-card";
+@import "components/cookie-notice";
// If there is anything specific for a page it should be in this folder
@import "pages/404";
diff --git a/wp-content/themes/carmag/assets/src/scripts/scripts.js b/wp-content/themes/carmag/assets/src/scripts/scripts.js
index 04e7d0d..1e5febd 100644
--- a/wp-content/themes/carmag/assets/src/scripts/scripts.js
+++ b/wp-content/themes/carmag/assets/src/scripts/scripts.js
@@ -22,7 +22,7 @@ jQuery(document).ready(function ($) {
const toggleDrawer = () => {
const drawerClassList = event.target.classList;
- const navClassList = document.querySelectorAll(".menu-primary-container")[0]
+ const navClassList = document.querySelectorAll(".menu-container")[0]
.classList;
drawerClassList.toggle("opened");
navClassList.toggle("opened");
@@ -31,9 +31,13 @@ const toggleDrawer = () => {
const separator = document.createElement("span");
separator.className = "separator";
const loginLink = document.querySelectorAll(".login")[0];
+const profileDropdown = document.querySelectorAll(".profile")[0];
if (loginLink) {
loginLink.before(separator);
}
+if (profileDropdown) {
+ profileDropdown.before(separator);
+}
const faqFields = document.querySelectorAll(".faq-field");
faqFields.forEach((field) => {