aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar maTh <1645099+math-GH@users.noreply.github.com> 2024-11-01 16:32:04 +0100
committerGravatar GitHub <noreply@github.com> 2024-11-01 16:32:04 +0100
commit0735c9f70ca118a599fdd203bb9f135158a67395 (patch)
treea527c547244cd35986471cd158b0f1cf9fe0c3b1
parentdf86cbb361e480dbe50b1dc52025c880f170f6b2 (diff)
Fixed: article footer dropdowns (my labels, article tags, sharing) (#6959)
* fix dropdown triangle in mobile view * Nord theme * mobile view: width improved. Each theme can decide about border-radius * Ansum/Mapco theme * fix pink dark theme: label icon in pink now too * my labels: line breaks improved * article tags: headline added
-rw-r--r--app/views/helpers/index/normal/entry_bottom.phtml1
-rw-r--r--p/scripts/main.js2
-rw-r--r--p/themes/Ansum/_components.scss2
-rw-r--r--p/themes/Ansum/_mobile.scss4
-rw-r--r--p/themes/Ansum/ansum.css5
-rw-r--r--p/themes/Ansum/ansum.rtl.css5
-rw-r--r--p/themes/Dark-pink/pinkdark.css1
-rw-r--r--p/themes/Dark-pink/pinkdark.rtl.css1
-rw-r--r--p/themes/Mapco/_components.scss2
-rw-r--r--p/themes/Mapco/_mobile.scss4
-rw-r--r--p/themes/Mapco/mapco.css5
-rw-r--r--p/themes/Mapco/mapco.rtl.css5
-rw-r--r--p/themes/Nord/nord.css6
-rw-r--r--p/themes/Nord/nord.rtl.css6
-rw-r--r--p/themes/base-theme/frss.css29
-rw-r--r--p/themes/base-theme/frss.rtl.css29
16 files changed, 60 insertions, 47 deletions
diff --git a/app/views/helpers/index/normal/entry_bottom.phtml b/app/views/helpers/index/normal/entry_bottom.phtml
index 6ebd17949..3d405a5d8 100644
--- a/app/views/helpers/index/normal/entry_bottom.phtml
+++ b/app/views/helpers/index/normal/entry_bottom.phtml
@@ -53,6 +53,7 @@
<?= _i('tag') ?><?= _t('index.tag.related') ?>
</a>
<ul class="dropdown-menu">
+ <li class="dropdown-header"><?= _t('index.tag.related') ?></li>
<?php
foreach ($tags as $tag) {
?><li class="item"><a href="<?= _url('index', 'index', 'search', '#' . str_replace(' ', '+', htmlspecialchars_decode($tag, ENT_QUOTES))) ?>"><?= $tag ?></a></li><?php
diff --git a/p/scripts/main.js b/p/scripts/main.js
index 9e243a519..f35fa35df 100644
--- a/p/scripts/main.js
+++ b/p/scripts/main.js
@@ -1455,7 +1455,7 @@ function loadDynamicTags(div) {
(context.anonymous ? '' : 'class="checkboxTag" ') +
'name="t_' + tag.id + '"type="checkbox" ' +
(context.anonymous ? 'disabled="disabled" ' : '') +
- (tag.checked ? 'checked="checked" ' : '') + '/> ' + tag.name + '</label></li>';
+ (tag.checked ? 'checked="checked" ' : '') + '/>' + tag.name + '</label></li>';
datalist += '<option value="' + tag.name + '"></option>';
}
if (context.anonymous && nbLabelsChecked === 0) {
diff --git a/p/themes/Ansum/_components.scss b/p/themes/Ansum/_components.scss
index 44834b2c5..fa9f34c44 100644
--- a/p/themes/Ansum/_components.scss
+++ b/p/themes/Ansum/_components.scss
@@ -13,7 +13,7 @@
.horizontal-list {
padding: 0.1rem 0;
- .item {
+ & > .item {
&:first-child {
padding-left: 0.5rem;
}
diff --git a/p/themes/Ansum/_mobile.scss b/p/themes/Ansum/_mobile.scss
index 21eb43c52..90c744566 100644
--- a/p/themes/Ansum/_mobile.scss
+++ b/p/themes/Ansum/_mobile.scss
@@ -115,10 +115,6 @@
~ a.dropdown-toggle {
&:not(.btn) {
- ~ .dropdown-menu {
- margin-top: 0;
- }
-
&::after {
bottom: -17px;
}
diff --git a/p/themes/Ansum/ansum.css b/p/themes/Ansum/ansum.css
index 9bb6ce263..6961abe0b 100644
--- a/p/themes/Ansum/ansum.css
+++ b/p/themes/Ansum/ansum.css
@@ -208,7 +208,7 @@ th {
.horizontal-list {
padding: 0.1rem 0;
}
-.horizontal-list .item:first-child {
+.horizontal-list > .item:first-child {
padding-left: 0.5rem;
}
@@ -1282,9 +1282,6 @@ main.prompt {
right: 21px;
bottom: -14px;
}
- .dropdown-target:target ~ a.dropdown-toggle:not(.btn) ~ .dropdown-menu {
- margin-top: 0;
- }
.dropdown-target:target ~ a.dropdown-toggle:not(.btn)::after {
bottom: -17px;
}
diff --git a/p/themes/Ansum/ansum.rtl.css b/p/themes/Ansum/ansum.rtl.css
index 927b67db8..846072ed8 100644
--- a/p/themes/Ansum/ansum.rtl.css
+++ b/p/themes/Ansum/ansum.rtl.css
@@ -208,7 +208,7 @@ th {
.horizontal-list {
padding: 0.1rem 0;
}
-.horizontal-list .item:first-child {
+.horizontal-list > .item:first-child {
padding-right: 0.5rem;
}
@@ -1282,9 +1282,6 @@ main.prompt {
left: 21px;
bottom: -14px;
}
- .dropdown-target:target ~ a.dropdown-toggle:not(.btn) ~ .dropdown-menu {
- margin-top: 0;
- }
.dropdown-target:target ~ a.dropdown-toggle:not(.btn)::after {
bottom: -17px;
}
diff --git a/p/themes/Dark-pink/pinkdark.css b/p/themes/Dark-pink/pinkdark.css
index e73bbebac..a4cecf9e5 100644
--- a/p/themes/Dark-pink/pinkdark.css
+++ b/p/themes/Dark-pink/pinkdark.css
@@ -106,6 +106,7 @@ input:focus {
.icon[src*="/all"],
.icon[src*="/down"],
.icon[src*="/help"],
+.icon[src*="/label"],
.icon[src*="/link"],
.icon[src*="/login"],
.icon[src*="/logout"],
diff --git a/p/themes/Dark-pink/pinkdark.rtl.css b/p/themes/Dark-pink/pinkdark.rtl.css
index 43e1ee485..c692f60da 100644
--- a/p/themes/Dark-pink/pinkdark.rtl.css
+++ b/p/themes/Dark-pink/pinkdark.rtl.css
@@ -106,6 +106,7 @@ input:focus {
.icon[src*="/all"],
.icon[src*="/down"],
.icon[src*="/help"],
+.icon[src*="/label"],
.icon[src*="/link"],
.icon[src*="/login"],
.icon[src*="/logout"],
diff --git a/p/themes/Mapco/_components.scss b/p/themes/Mapco/_components.scss
index 7b2526428..a0fdf1b94 100644
--- a/p/themes/Mapco/_components.scss
+++ b/p/themes/Mapco/_components.scss
@@ -13,7 +13,7 @@
.horizontal-list {
padding: 0.1rem 0;
- .item {
+ & > .item {
&:first-child {
padding-left: 0.5rem;
}
diff --git a/p/themes/Mapco/_mobile.scss b/p/themes/Mapco/_mobile.scss
index 974c5cf65..8e47832a2 100644
--- a/p/themes/Mapco/_mobile.scss
+++ b/p/themes/Mapco/_mobile.scss
@@ -122,10 +122,6 @@
~ a.dropdown-toggle {
&:not(.btn) {
- ~ .dropdown-menu {
- margin-top: 0;
- }
-
&::after {
bottom: -17px;
}
diff --git a/p/themes/Mapco/mapco.css b/p/themes/Mapco/mapco.css
index a1821bd01..4c8509923 100644
--- a/p/themes/Mapco/mapco.css
+++ b/p/themes/Mapco/mapco.css
@@ -207,7 +207,7 @@ th {
.horizontal-list {
padding: 0.1rem 0;
}
-.horizontal-list .item:first-child {
+.horizontal-list > .item:first-child {
padding-left: 0.5rem;
}
@@ -1302,9 +1302,6 @@ main.prompt {
right: 21px;
bottom: -14px;
}
- .dropdown-target:target ~ a.dropdown-toggle:not(.btn) ~ .dropdown-menu {
- margin-top: 0;
- }
.dropdown-target:target ~ a.dropdown-toggle:not(.btn)::after {
bottom: -17px;
}
diff --git a/p/themes/Mapco/mapco.rtl.css b/p/themes/Mapco/mapco.rtl.css
index 2880bde0c..511d2fdf0 100644
--- a/p/themes/Mapco/mapco.rtl.css
+++ b/p/themes/Mapco/mapco.rtl.css
@@ -207,7 +207,7 @@ th {
.horizontal-list {
padding: 0.1rem 0;
}
-.horizontal-list .item:first-child {
+.horizontal-list > .item:first-child {
padding-right: 0.5rem;
}
@@ -1302,9 +1302,6 @@ main.prompt {
left: 21px;
bottom: -14px;
}
- .dropdown-target:target ~ a.dropdown-toggle:not(.btn) ~ .dropdown-menu {
- margin-top: 0;
- }
.dropdown-target:target ~ a.dropdown-toggle:not(.btn)::after {
bottom: -17px;
}
diff --git a/p/themes/Nord/nord.css b/p/themes/Nord/nord.css
index 575ad2b70..d327e4d83 100644
--- a/p/themes/Nord/nord.css
+++ b/p/themes/Nord/nord.css
@@ -799,7 +799,7 @@ li.item.active {
padding: 0.25rem;
}
-.flux .tags .icon {
+.flux .content .tags .icon {
padding: 0.25rem;
}
@@ -1333,10 +1333,6 @@ optgroup::before {
margin: 0;
}
- .dropdown-target:target ~ .dropdown-toggle:not(.btn) ~ .dropdown-menu {
- margin-top: 7px;
- }
-
.dropdown .dropdown-menu {
border-radius: 6px;
}
diff --git a/p/themes/Nord/nord.rtl.css b/p/themes/Nord/nord.rtl.css
index 99f73a0c4..eb61ed04f 100644
--- a/p/themes/Nord/nord.rtl.css
+++ b/p/themes/Nord/nord.rtl.css
@@ -799,7 +799,7 @@ li.item.active {
padding: 0.25rem;
}
-.flux .tags .icon {
+.flux .content .tags .icon {
padding: 0.25rem;
}
@@ -1333,10 +1333,6 @@ optgroup::before {
margin: 0;
}
- .dropdown-target:target ~ .dropdown-toggle:not(.btn) ~ .dropdown-menu {
- margin-top: 7px;
- }
-
.dropdown .dropdown-menu {
border-radius: 6px;
}
diff --git a/p/themes/base-theme/frss.css b/p/themes/base-theme/frss.css
index 8faab70cc..2dfbc2a04 100644
--- a/p/themes/base-theme/frss.css
+++ b/p/themes/base-theme/frss.css
@@ -355,13 +355,19 @@ input[type="checkbox"] {
.dropdown-menu input[type="checkbox"] {
margin-left: 1em;
- margin-right: .5em;
+ margin-right: 0.5rem;
+ width: 1rem;
}
.dropdown-menu .item .checkboxNewTag {
display: none;
}
+.dropdown-menu .item label:not(.noHover):has(input[type="checkbox"]) {
+ padding-left: 2.5rem;
+ text-indent: -2.5rem;
+}
+
.dropdown-menu .item.addItem {
padding: 0 0.5em;
}
@@ -728,6 +734,11 @@ input[type="checkbox"]:focus-visible {
scroll-margin-bottom: 2rem;
}
+.horizontal-list.bottom .dropdown-menu {
+ left: 0.5rem;
+ right: auto;
+}
+
.dropdown-menu::after {
background-color: inherit;
width: 10px;
@@ -743,6 +754,11 @@ input[type="checkbox"]:focus-visible {
transform: rotate(45deg);
}
+.horizontal-list.bottom .dropdown-menu::after {
+ left: 0.5rem;
+ right: auto;
+}
+
.dropdown-menu-scrollable {
max-height: min(75vh, 50em);
overflow-x: hidden;
@@ -2421,10 +2437,8 @@ html.slider-active {
}
.dropdown .dropdown-menu {
- width: 94%;
- border-radius: 0;
- left: 3%;
- right: 3%;
+ left: 0.5rem !important;
+ right: 0.5rem !important;
position: absolute;
}
@@ -2472,6 +2486,11 @@ html.slider-active {
cursor: default;
}
+ .horizontal-list.bottom .dropdown-target:target ~ .dropdown-toggle::after {
+ top: 31px;
+ left: 10px;
+ }
+
.dropdown-target:target ~ .dropdown-toggle:not(.btn) ~ .dropdown-menu {
margin-top: 10px;
}
diff --git a/p/themes/base-theme/frss.rtl.css b/p/themes/base-theme/frss.rtl.css
index ef77fb180..45906f9c3 100644
--- a/p/themes/base-theme/frss.rtl.css
+++ b/p/themes/base-theme/frss.rtl.css
@@ -355,13 +355,19 @@ input[type="checkbox"] {
.dropdown-menu input[type="checkbox"] {
margin-right: 1em;
- margin-left: .5em;
+ margin-left: 0.5rem;
+ width: 1rem;
}
.dropdown-menu .item .checkboxNewTag {
display: none;
}
+.dropdown-menu .item label:not(.noHover):has(input[type="checkbox"]) {
+ padding-right: 2.5rem;
+ text-indent: -2.5rem;
+}
+
.dropdown-menu .item.addItem {
padding: 0 0.5em;
}
@@ -728,6 +734,11 @@ input[type="checkbox"]:focus-visible {
scroll-margin-bottom: 2rem;
}
+.horizontal-list.bottom .dropdown-menu {
+ right: 0.5rem;
+ left: auto;
+}
+
.dropdown-menu::after {
background-color: inherit;
width: 10px;
@@ -743,6 +754,11 @@ input[type="checkbox"]:focus-visible {
transform: rotate(-45deg);
}
+.horizontal-list.bottom .dropdown-menu::after {
+ right: 0.5rem;
+ left: auto;
+}
+
.dropdown-menu-scrollable {
max-height: min(75vh, 50em);
overflow-x: hidden;
@@ -2421,10 +2437,8 @@ html.slider-active {
}
.dropdown .dropdown-menu {
- width: 94%;
- border-radius: 0;
- right: 3%;
- left: 3%;
+ right: 0.5rem !important;
+ left: 0.5rem !important;
position: absolute;
}
@@ -2472,6 +2486,11 @@ html.slider-active {
cursor: default;
}
+ .horizontal-list.bottom .dropdown-target:target ~ .dropdown-toggle::after {
+ top: 31px;
+ right: 10px;
+ }
+
.dropdown-target:target ~ .dropdown-toggle:not(.btn) ~ .dropdown-menu {
margin-top: 10px;
}