aboutsummaryrefslogtreecommitdiff
path: root/p/themes/Mapco
diff options
context:
space:
mode:
authorGravatar maTh <math-home@web.de> 2023-01-30 20:32:55 +0100
committerGravatar GitHub <noreply@github.com> 2023-01-30 20:32:55 +0100
commite53ba88bb96ba1343ffc771f6170baa4342b4e39 (patch)
tree6b7f2cec9fe51b788e186f102008ff4b2e86d1b2 /p/themes/Mapco
parent4ad66c24bfd96a5f5a71eec895e9d3085d67f4a0 (diff)
Search Improved: dropdown (#4994)
* first draft * fix * RTL CSS * add link to documentation * hide search button in desktop view * rename .no-desktop to .only-mobile * i18n * add ID * Theme: Swage * Theme Scewdriver * Theme Pafat * Theme flat * Theme: Adark * Theme: Dark * i18n: German * i18n en-us * fix i18n * Update app/i18n/fr/gen.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Update app/layout/nav_menu.phtml Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Update app/layout/nav_menu.phtml Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Update app/layout/nav_menu.phtml Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * wip * mapco theme * RTL for Ansum and Mapco * fix * fix --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'p/themes/Mapco')
-rw-r--r--p/themes/Mapco/_components.scss13
-rw-r--r--p/themes/Mapco/_layout.scss8
-rw-r--r--p/themes/Mapco/_mobile.scss27
-rw-r--r--p/themes/Mapco/_sidebar.scss2
-rw-r--r--p/themes/Mapco/mapco.css54
-rw-r--r--p/themes/Mapco/mapco.rtl.css52
6 files changed, 67 insertions, 89 deletions
diff --git a/p/themes/Mapco/_components.scss b/p/themes/Mapco/_components.scss
index 8b60dcf0f..5f7e04e56 100644
--- a/p/themes/Mapco/_components.scss
+++ b/p/themes/Mapco/_components.scss
@@ -22,6 +22,12 @@
}
/*=== Dropdown */
+.dropdown {
+ .dropdown-target:target + .btn {
+ background-color: variables.$grey-medium-light;
+ }
+}
+
.dropdown-menu {
margin: 9px 0 0 0;
padding: 0.5rem 0 1rem 0;
@@ -51,7 +57,9 @@
@include mixins.transition(all, 0.075s, ease-in-out);
- a, .as-link {
+ > a,
+ > span,
+ > .as-link {
padding: 0 2rem;
color: variables.$main-font-color;
font-size: inherit;
@@ -60,7 +68,10 @@
span.icon {
padding: 0 0.25rem !important;
}
+ }
+ > a,
+ > .as-link {
&:not(.addItem):hover {
background: variables.$main-first;
color: variables.$white;
diff --git a/p/themes/Mapco/_layout.scss b/p/themes/Mapco/_layout.scss
index 7be890369..b57a48fd0 100644
--- a/p/themes/Mapco/_layout.scss
+++ b/p/themes/Mapco/_layout.scss
@@ -226,7 +226,7 @@ main.prompt {
}
}
- .dropdown {
+ .dropdown:not(#dropdown-search-wrapper) {
a.dropdown-toggle {
border-left-width: 0;
background-image: url(icons/more.svg);
@@ -236,6 +236,12 @@ main.prompt {
}
}
}
+
+ #dropdown-search-wrapper.dropdown {
+ a.dropdown-toggle {
+ border-left-width: 0;
+ }
+ }
}
}
diff --git a/p/themes/Mapco/_mobile.scss b/p/themes/Mapco/_mobile.scss
index 6960873bf..3faea3d7e 100644
--- a/p/themes/Mapco/_mobile.scss
+++ b/p/themes/Mapco/_mobile.scss
@@ -35,30 +35,9 @@
}
.header {
- display: block;
- height: 8rem;
-
.item {
&.search {
- display: block;
-
- form {
- display: inherit;
- }
-
- .stick {
- display: flex;
- }
-
- input {
- width: 90%;
- height: 3.5rem;
-
- &:focus {
- width: 100%;
-
- }
- }
+ display: none;
}
&.configure {
@@ -105,11 +84,7 @@
}
.search {
- display: none;
- max-width: 97%;
-
.input {
-
max-width: 97%;
width: 90px;
diff --git a/p/themes/Mapco/_sidebar.scss b/p/themes/Mapco/_sidebar.scss
index a71960b1d..090a69580 100644
--- a/p/themes/Mapco/_sidebar.scss
+++ b/p/themes/Mapco/_sidebar.scss
@@ -93,7 +93,7 @@
border-radius: 5px 0 0 5px;
}
- .btn:last-child, input:last-child, .btn + .dropdown > .btn {
+ .btn:last-child, input:last-child, .dropdown:last-child > .btn {
border-radius: 0 5px 5px 0;
}
diff --git a/p/themes/Mapco/mapco.css b/p/themes/Mapco/mapco.css
index d2978c217..967accc00 100644
--- a/p/themes/Mapco/mapco.css
+++ b/p/themes/Mapco/mapco.css
@@ -220,6 +220,10 @@ form th {
}
/*=== Dropdown */
+.dropdown .dropdown-target:target + .btn {
+ background-color: #d5d8db;
+}
+
.dropdown-menu {
margin: 9px 0 0 0;
padding: 0.5rem 0 1rem 0;
@@ -246,20 +250,26 @@ form th {
.dropdown-menu .item {
transition: all 0.075s ease-in-out;
}
-.dropdown-menu .item a, .dropdown-menu .item .as-link {
+.dropdown-menu .item > a,
+.dropdown-menu .item > span,
+.dropdown-menu .item > .as-link {
padding: 0 2rem;
color: #303136;
font-size: inherit;
line-height: 2.5em;
}
-.dropdown-menu .item a span.icon, .dropdown-menu .item .as-link span.icon {
+.dropdown-menu .item > a span.icon,
+.dropdown-menu .item > span span.icon,
+.dropdown-menu .item > .as-link span.icon {
padding: 0 0.25rem !important;
}
-.dropdown-menu .item a:not(.addItem):hover, .dropdown-menu .item .as-link:not(.addItem):hover {
+.dropdown-menu .item > a:not(.addItem):hover,
+.dropdown-menu .item > .as-link:not(.addItem):hover {
background: #36c;
color: #fff;
}
-.dropdown-menu .item a:not(.addItem):hover .icon, .dropdown-menu .item .as-link:not(.addItem):hover .icon {
+.dropdown-menu .item > a:not(.addItem):hover .icon,
+.dropdown-menu .item > .as-link:not(.addItem):hover .icon {
filter: brightness(3);
}
.dropdown-menu .item.dropdown-section {
@@ -532,7 +542,7 @@ form th {
.stick .btn:first-child {
border-radius: 5px 0 0 5px;
}
-.stick .btn:last-child, .stick input:last-child, .stick .btn + .dropdown > .btn {
+.stick .btn:last-child, .stick input:last-child, .stick .dropdown:last-child > .btn {
border-radius: 0 5px 5px 0;
}
.stick .btn + .btn,
@@ -843,13 +853,16 @@ main.prompt {
.nav_menu .stick .btn.read_all:hover {
background-color: #d5d8db;
}
-.nav_menu .stick .dropdown a.dropdown-toggle {
+.nav_menu .stick .dropdown:not(#dropdown-search-wrapper) a.dropdown-toggle {
border-left-width: 0;
background-image: url(icons/more.svg);
}
-.nav_menu .stick .dropdown a.dropdown-toggle .icon {
+.nav_menu .stick .dropdown:not(#dropdown-search-wrapper) a.dropdown-toggle .icon {
display: none;
}
+.nav_menu .stick #dropdown-search-wrapper.dropdown a.dropdown-toggle {
+ border-left-width: 0;
+}
/*=== Content of feed articles */
.content, .content.thin {
@@ -1213,25 +1226,8 @@ main.prompt {
#slider .toggle_aside .icon {
filter: grayscale(100%) brightness(2.5);
}
- .header {
- display: block;
- height: 8rem;
- }
.header .item.search {
- display: block;
- }
- .header .item.search form {
- display: inherit;
- }
- .header .item.search .stick {
- display: flex;
- }
- .header .item.search input {
- width: 90%;
- height: 3.5rem;
- }
- .header .item.search input:focus {
- width: 100%;
+ display: none;
}
.header .item.configure {
position: absolute;
@@ -1264,10 +1260,6 @@ main.prompt {
.nav_menu .stick .btn.read_all {
padding: 0.85rem 1.25rem;
}
- .nav_menu .search {
- display: none;
- max-width: 97%;
- }
.nav_menu .search .input {
max-width: 97%;
width: 90px;
@@ -1338,4 +1330,6 @@ body.register {
a, button.as-link {
outline: none;
color: #36c;
-} \ No newline at end of file
+}
+
+/*# sourceMappingURL=mapco.css.map */
diff --git a/p/themes/Mapco/mapco.rtl.css b/p/themes/Mapco/mapco.rtl.css
index 7ed00631a..b962e5fe0 100644
--- a/p/themes/Mapco/mapco.rtl.css
+++ b/p/themes/Mapco/mapco.rtl.css
@@ -220,6 +220,10 @@ form th {
}
/*=== Dropdown */
+.dropdown .dropdown-target:target + .btn {
+ background-color: #d5d8db;
+}
+
.dropdown-menu {
margin: 9px 0 0 0;
padding: 0.5rem 0 1rem 0;
@@ -246,20 +250,26 @@ form th {
.dropdown-menu .item {
transition: all 0.075s ease-in-out;
}
-.dropdown-menu .item a, .dropdown-menu .item .as-link {
+.dropdown-menu .item > a,
+.dropdown-menu .item > span,
+.dropdown-menu .item > .as-link {
padding: 0 2rem;
color: #303136;
font-size: inherit;
line-height: 2.5em;
}
-.dropdown-menu .item a span.icon, .dropdown-menu .item .as-link span.icon {
+.dropdown-menu .item > a span.icon,
+.dropdown-menu .item > span span.icon,
+.dropdown-menu .item > .as-link span.icon {
padding: 0 0.25rem !important;
}
-.dropdown-menu .item a:not(.addItem):hover, .dropdown-menu .item .as-link:not(.addItem):hover {
+.dropdown-menu .item > a:not(.addItem):hover,
+.dropdown-menu .item > .as-link:not(.addItem):hover {
background: #36c;
color: #fff;
}
-.dropdown-menu .item a:not(.addItem):hover .icon, .dropdown-menu .item .as-link:not(.addItem):hover .icon {
+.dropdown-menu .item > a:not(.addItem):hover .icon,
+.dropdown-menu .item > .as-link:not(.addItem):hover .icon {
filter: brightness(3);
}
.dropdown-menu .item.dropdown-section {
@@ -532,7 +542,7 @@ form th {
.stick .btn:first-child {
border-radius: 0 5px 5px 0;
}
-.stick .btn:last-child, .stick input:last-child, .stick .btn + .dropdown > .btn {
+.stick .btn:last-child, .stick input:last-child, .stick .dropdown:last-child > .btn {
border-radius: 5px 0 0 5px;
}
.stick .btn + .btn,
@@ -843,13 +853,16 @@ main.prompt {
.nav_menu .stick .btn.read_all:hover {
background-color: #d5d8db;
}
-.nav_menu .stick .dropdown a.dropdown-toggle {
+.nav_menu .stick .dropdown:not(#dropdown-search-wrapper) a.dropdown-toggle {
border-right-width: 0;
background-image: url(icons/more.svg);
}
-.nav_menu .stick .dropdown a.dropdown-toggle .icon {
+.nav_menu .stick .dropdown:not(#dropdown-search-wrapper) a.dropdown-toggle .icon {
display: none;
}
+.nav_menu .stick #dropdown-search-wrapper.dropdown a.dropdown-toggle {
+ border-right-width: 0;
+}
/*=== Content of feed articles */
.content, .content.thin {
@@ -1213,25 +1226,8 @@ main.prompt {
#slider .toggle_aside .icon {
filter: grayscale(100%) brightness(2.5);
}
- .header {
- display: block;
- height: 8rem;
- }
.header .item.search {
- display: block;
- }
- .header .item.search form {
- display: inherit;
- }
- .header .item.search .stick {
- display: flex;
- }
- .header .item.search input {
- width: 90%;
- height: 3.5rem;
- }
- .header .item.search input:focus {
- width: 100%;
+ display: none;
}
.header .item.configure {
position: absolute;
@@ -1264,10 +1260,6 @@ main.prompt {
.nav_menu .stick .btn.read_all {
padding: 0.85rem 1.25rem;
}
- .nav_menu .search {
- display: none;
- max-width: 97%;
- }
.nav_menu .search .input {
max-width: 97%;
width: 90px;
@@ -1338,4 +1330,4 @@ body.register {
a, button.as-link {
outline: none;
color: #36c;
-} \ No newline at end of file
+}