1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 15:15:56 +00:00

floatingTitle-related fixes

This commit is contained in:
Andrew Dolgov
2018-12-05 16:26:53 +03:00
parent fa639df588
commit 2dac797704
7 changed files with 79 additions and 30 deletions

View File

@@ -216,18 +216,36 @@ div#floatingTitle {
border-bottom-width: 1px; border-bottom-width: 1px;
background : white; background : white;
color : @default-text; color : @default-text;
display : flex;
flex-direction : row;
flex-wrap : nowrap;
box-shadow : 0px 1px 1px -1px rgba(0,0,0,0.1); box-shadow : 0px 1px 1px -1px rgba(0,0,0,0.1);
> * { > * {
display : table-cell; align-self: center;
white-space : nowrap; white-space : nowrap;
vertical-align : middle; padding : 4px;
padding : 9px 5px;
} }
img { .left, .right {
margin-right : 4px; display : flex;
margin-left : 4px;
> * {
align-self : center;
}
i.material-icons {
margin-left : 2px;
font-size : 20px;
padding : 2px;
user-select: none;
}
i.anchor {
margin-left : 0px;
padding : 0px;
color : #ccc;
}
} }
span.author { span.author {
@@ -284,7 +302,6 @@ div#floatingTitle {
white-space : normal; white-space : normal;
} }
.dijit,
img.score-pic { img.score-pic {
display : none; display : none;
} }

View File

@@ -1175,17 +1175,36 @@ div#floatingTitle {
border-bottom-width: 1px; border-bottom-width: 1px;
background: white; background: white;
color: #555555; color: #555555;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
box-shadow: 0px 1px 1px -1px rgba(0, 0, 0, 0.1); box-shadow: 0px 1px 1px -1px rgba(0, 0, 0, 0.1);
} }
div#floatingTitle > * { div#floatingTitle > * {
display: table-cell; align-self: center;
white-space: nowrap; white-space: nowrap;
vertical-align: middle; padding: 4px;
padding: 9px 5px;
} }
div#floatingTitle img { div#floatingTitle .left,
margin-right: 4px; div#floatingTitle .right {
margin-left: 4px; display: flex;
}
div#floatingTitle .left > *,
div#floatingTitle .right > * {
align-self: center;
}
div#floatingTitle .left i.material-icons,
div#floatingTitle .right i.material-icons {
margin-left: 2px;
font-size: 20px;
padding: 2px;
user-select: none;
}
div#floatingTitle .left i.anchor,
div#floatingTitle .right i.anchor {
margin-left: 0px;
padding: 0px;
color: #ccc;
} }
div#floatingTitle span.author { div#floatingTitle span.author {
color: #555555; color: #555555;
@@ -1233,7 +1252,6 @@ div#floatingTitle span.titleWrap {
width: 100%; width: 100%;
white-space: normal; white-space: normal;
} }
div#floatingTitle .dijit,
div#floatingTitle img.score-pic { div#floatingTitle img.score-pic {
display: none; display: none;
} }

File diff suppressed because one or more lines are too long

View File

@@ -233,7 +233,6 @@ define(["dojo/_base/declare"], function (declare) {
if (force || e.offsetTop + e.offsetHeight > (ctr.scrollTop + ctr.offsetHeight) || if (force || e.offsetTop + e.offsetHeight > (ctr.scrollTop + ctr.offsetHeight) ||
e.offsetTop < ctr.scrollTop) { e.offsetTop < ctr.scrollTop) {
// expanded cdm has a 4px margin now
ctr.scrollTop = e.offsetTop; ctr.scrollTop = e.offsetTop;
Element.hide("floatingTitle"); Element.hide("floatingTitle");

View File

@@ -173,15 +173,11 @@ define(["dojo/_base/declare"], function (declare) {
ft.setAttribute("data-article-id", id); ft.setAttribute("data-article-id", id);
ft.innerHTML = header.innerHTML; ft.innerHTML = header.innerHTML;
ft.firstChild.innerHTML = "<img class='anchor marked-pic' src='images/page_white_go.png' " +
"onclick=\"Article.cdmScrollToId(" + id + ", true)\">" + ft.firstChild.innerHTML; ft.select(".dijitCheckBox")[0].outerHTML = "<i class=\"material-icons anchor\" onclick=\"Article.cdmScrollToId(" + id + ", true)\">expand_more</i>";
this.initFloatingMenu(); this.initFloatingMenu();
const cb = ft.select(".rchk")[0];
if (cb)
cb.parentNode.removeChild(cb);
} }
if (row.hasClassName("Unread")) if (row.hasClassName("Unread"))
@@ -1005,6 +1001,7 @@ define(["dojo/_base/declare"], function (declare) {
const menu = new dijit.Menu({ const menu = new dijit.Menu({
id: "floatingMenu", id: "floatingMenu",
selector: ".hlMenuAttach",
targetNodeIds: ["floatingTitle"] targetNodeIds: ["floatingTitle"]
}); });

View File

@@ -1175,17 +1175,36 @@ div#floatingTitle {
border-bottom-width: 1px; border-bottom-width: 1px;
background: white; background: white;
color: #555555; color: #555555;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
box-shadow: 0px 1px 1px -1px rgba(0, 0, 0, 0.1); box-shadow: 0px 1px 1px -1px rgba(0, 0, 0, 0.1);
} }
div#floatingTitle > * { div#floatingTitle > * {
display: table-cell; align-self: center;
white-space: nowrap; white-space: nowrap;
vertical-align: middle; padding: 4px;
padding: 9px 5px;
} }
div#floatingTitle img { div#floatingTitle .left,
margin-right: 4px; div#floatingTitle .right {
margin-left: 4px; display: flex;
}
div#floatingTitle .left > *,
div#floatingTitle .right > * {
align-self: center;
}
div#floatingTitle .left i.material-icons,
div#floatingTitle .right i.material-icons {
margin-left: 2px;
font-size: 20px;
padding: 2px;
user-select: none;
}
div#floatingTitle .left i.anchor,
div#floatingTitle .right i.anchor {
margin-left: 0px;
padding: 0px;
color: #ccc;
} }
div#floatingTitle span.author { div#floatingTitle span.author {
color: #555555; color: #555555;
@@ -1233,7 +1252,6 @@ div#floatingTitle span.titleWrap {
width: 100%; width: 100%;
white-space: normal; white-space: normal;
} }
div#floatingTitle .dijit,
div#floatingTitle img.score-pic { div#floatingTitle img.score-pic {
display: none; display: none;
} }

File diff suppressed because one or more lines are too long