Skip to content

Commit ffe9b14

Browse files
committed
move feedbucket button (#1030)
1 parent c9d9f1c commit ffe9b14

File tree

3 files changed

+51
-3
lines changed

3 files changed

+51
-3
lines changed

src/components/App.css

+30-3
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,8 @@ html[lang="bo"] .msg-popup .front p { font-size:18px;}
668668
#pop-login,
669669
#lang-login { cursor:pointer; }
670670

671+
#lang-login { display: flex; align-items: center;}
672+
671673
.over-nav + .nav .inner-nav > div { margin:0 25px; line-height:44px;height:44px; font-size:16px;}
672674

673675
.over-nav + .nav .inner-nav > div a { font-size:16px; color:black;}
@@ -1893,7 +1895,8 @@ footer #donate,
18931895
text-align:center; display:inline-block; margin-left:25px; }
18941896
.nav #donate img { vertical-align: middle; display: inline-block; margin-right:10px;}
18951897

1896-
.nav #lang { cursor:pointer; /*margin-top:7px;*/ margin-left:25px; display: inline-block;}
1898+
.nav #lang { cursor:pointer; /*margin-top:7px; margin-left:25px;*/ display: inline-block;}
1899+
.nav .lang-login > :first-child { margin-left:25px; }
18971900
#uiLangPopup #lang img,
18981901
.nav #lang img { display: inline-block; width:28px; }
18991902

@@ -4816,6 +4819,10 @@ div.mustLogin a:hover { border:none; text-decoration: underline;}
48164819
#feedback .tooltip a { cursor: pointer; }
48174820
#feedback .tooltip:not(.on) { display: none; }
48184821

4822+
#feedback.top .tooltip {
4823+
right:-4px;
4824+
top:100%;
4825+
}
48194826

48204827
.popHowTo.bg { z-index:1000; background-color:rgba(0,0,0,0.25)}
48214828

@@ -7103,16 +7110,36 @@ a.result .contenu ul > div:last-child h3[lang=bo] span { font-size:18px;}
71037110

71047111

71057112
/* feedbucket */
7113+
#feedback.top:not(.on,.off),
71067114
.nav + #feedback:not(.on,.off),
71077115
feedbucket-app:not(.on) { display:none !important; }
71087116

71097117
#root.recording ~ feedbucket-app { display:block !important; }
71107118

7119+
#feedback.top,
71117120
.nav + #feedback { position:fixed; color:#d73449; background:white; display: flex; border-radius: 20px 20px; width:40px; height: 40px; box-sizing: border-box;
7112-
box-shadow: 0 2px 4px rgba(187, 187, 187, 0.5); bottom:calc(50% - 20px); right:10px ; cursor: pointer; justify-content: center; align-items: center; z-index:1000000;
7121+
box-shadow: 0 2px 4px rgba(187, 187, 187, 0.5); bottom:calc(50% - 20px); right:10px ; cursor: pointer; justify-content: center; align-items: center; z-index:10000000;
71137122
}
7123+
7124+
#feedback.top {
7125+
position:relative;bottom:auto;right:auto;top:auto;left:auto;box-shadow: none; margin-right:4px;z-index:0;
7126+
}
7127+
7128+
7129+
#feedback.top svg {
7130+
color:#d73449;
7131+
}
7132+
7133+
#feedback:not(.top):not(.X) { visibility: hidden; }
7134+
7135+
#feedback.top svg,
71147136
.nav + #feedback svg { width:24px; height:24px; display:none; position: absolute;}
7137+
7138+
#feedback.top.X svg:first-of-type,
7139+
#feedback.top:not(.X) svg:first-of-type,
71157140
.nav + #feedback:not(.X) svg:first-of-type { display: block;}
7141+
7142+
/* #feedback.X.top svg:last-of-type, */
71167143
.nav + #feedback.X svg:last-of-type { display: block;}
71177144

71187145
.nav + #feedback.X { top:calc(50% + 117px); right:10px; bottom:auto; }
@@ -7444,7 +7471,7 @@ feedbucket-app:not(.on) { display:none !important; }
74447471
{
74457472

74467473
.nav { padding:0 calc((100% - 700px) / 2); }
7447-
.nav #lang { margin-left:20px; }
7474+
/* .nav #lang { margin-left:20px; } */
74487475
.nav #donate { width:40px; margin-left:15px; }
74497476

74507477
#res-header > div .widget-header {

src/components/App.js

+20
Original file line numberDiff line numberDiff line change
@@ -1193,6 +1193,25 @@ export function top_right_menu(that,etextTitle,backUrl,etextres,isMirador,locati
11931193
}}>{I18n.t("viewer.mustLoginFeedback")}</a>
11941194
</div></div>
11951195

1196+
let feedbucketTop = <div id="feedback" title={I18n.t("topbar.feedback")} className={"top "+ that.props.feedbucket + (that.props.keyword&&!that.props.IRI?" top":"")} onClick={(ev) => {
1197+
if(!document.querySelector('feedbucket-app')) {
1198+
$("#feedback .tooltip").toggleClass("on")
1199+
} else {
1200+
$("feedbucket-app").toggleClass("on")
1201+
that.props.onFeedbucketClick("on "+(that.props.feedbucket?.endsWith("X")?"":"X"))
1202+
}
1203+
}}><IconButton><Feedback /></IconButton>{/*<Close />*/}<div class="tooltip mustLogin">
1204+
<div class="bg" onClick={(e) => {
1205+
$("#feedback .tooltip").removeClass("on")
1206+
e.stopPropagation()
1207+
}}></div>
1208+
<a onClick={(e) => {
1209+
that.props.auth.login(location)
1210+
e.stopPropagation()
1211+
}}>{I18n.t("viewer.mustLoginFeedback")}</a>
1212+
</div></div>
1213+
1214+
11961215
let logo = [
11971216
<div id="logo">
11981217
<Link to="/?sortBy=firstScanSyncDate_desc&type%5B0%5D=Instance" {...(that?.props?.advancedSearch || that?.state?.filters) ? {onClick:(ev) => {
@@ -1556,6 +1575,7 @@ export function top_right_menu(that,etextTitle,backUrl,etextres,isMirador,locati
15561575
</div>
15571576

15581577
<div id="lang-login">
1578+
{ feedbucketTop }
15591579
{ lang_selec(that) }
15601580
{ that.props.auth && login }
15611581
<IconButton id="burger" onClick={() => that.setState({collapse:{...that.state.collapse,burgerOn:!that.state.collapse.burgerOn}})}>

src/lib/searchkit/App.css

+1
Original file line numberDiff line numberDiff line change
@@ -3120,6 +3120,7 @@ header[data-hits="0"] ~ .hits .pagination,
31203120
.nav #logo a:first-child span + .buda-small {
31213121
position: absolute;
31223122
bottom:10px;
3123+
z-index: 1;
31233124
}
31243125

31253126
.nav #logo {

0 commit comments

Comments
 (0)