Browse Source

floatingTitle: show collapse button if in expandable mode

Andrew Dolgov 1 month ago
parent
commit
848bb6579c
8 changed files with 58 additions and 19 deletions
  1. 15 4
      css/cdm.less
  2. 10 4
      css/default.css
  3. 1 1
      css/default.css.map
  4. 10 0
      js/Headlines.js
  5. 10 4
      themes/night.css
  6. 1 1
      themes/night.css.map
  7. 10 4
      themes/night_blue.css
  8. 1 1
      themes/night_blue.css.map

+ 15 - 4
css/cdm.less

@@ -212,6 +212,12 @@ div.cdm.vgrlf .feed {
 	}
 }
 
+#main:not(.expandable) div#floatingTitle {
+	.collapse {
+		display : none;
+	}
+}
+
 div#floatingTitle {
 	position : absolute;
 	z-index : 5;
@@ -256,6 +262,15 @@ div#floatingTitle {
 		}
 	}
 
+	.excerpt {
+		display : none;
+	}
+
+	.collapse i {
+		color : @color-accent;
+		cursor : pointer;
+	}
+
 	span.author {
 		color : @default-text;
 		font-size : 11px;
@@ -297,10 +312,6 @@ div#floatingTitle {
 		color : @default-text;
 	}
 
-	.collapse, .excerpt {
-		display : none;
-	}
-
 	span.titleWrap {
 		width : 100%;
 		white-space : normal;

+ 10 - 4
css/default.css

@@ -1239,6 +1239,9 @@ div.cdm.vgrlf .feed {
   display: inline-block;
   padding: 1px 4px 1px 4px;
 }
+#main:not(.expandable) div#floatingTitle .collapse {
+  display: none;
+}
 div#floatingTitle {
   position: absolute;
   z-index: 5;
@@ -1282,6 +1285,13 @@ div#floatingTitle .right i.icon-anchor {
   color: #ccc;
   cursor: pointer;
 }
+div#floatingTitle .excerpt {
+  display: none;
+}
+div#floatingTitle .collapse i {
+  color: #257aa7;
+  cursor: pointer;
+}
 div#floatingTitle span.author {
   color: #555;
   font-size: 11px;
@@ -1317,10 +1327,6 @@ div#floatingTitle span.updated {
 div#floatingTitle div.feed a {
   color: #555;
 }
-div#floatingTitle .collapse,
-div#floatingTitle .excerpt {
-  display: none;
-}
 div#floatingTitle span.titleWrap {
   width: 100%;
   white-space: normal;

File diff suppressed because it is too large
+ 1 - 1
css/default.css.map


+ 10 - 0
js/Headlines.js

@@ -556,6 +556,9 @@ define(["dojo/_base/declare"], function (declare) {
 
 				if (!append) {
 
+					// TODO: the below needs to be applied again when switching expanded/expandable on the fly
+					// via hotkeys, not just on feed load
+
 					$("headlines-frame").removeClassName("cdm");
 					$("headlines-frame").removeClassName("normal");
 
@@ -564,6 +567,13 @@ define(["dojo/_base/declare"], function (declare) {
 					$("headlines-frame").setAttribute("is-vfeed",
 						reply['headlines']['is_vfeed'] ? 1 : 0);
 
+					// for floating title because it's placed outside of headlines-frame
+					$("main").removeClassName("expandable");
+					$("main").removeClassName("expanded");
+
+					if (App.isCombinedMode())
+						$("main").addClassName(App.getInitParam("cdm_expanded") ? " expanded" : " expandable");
+
 					Article.setActive(0);
 
 					try {

+ 10 - 4
themes/night.css

@@ -1240,6 +1240,9 @@ div.cdm.vgrlf .feed {
   display: inline-block;
   padding: 1px 4px 1px 4px;
 }
+#main:not(.expandable) div#floatingTitle .collapse {
+  display: none;
+}
 div#floatingTitle {
   position: absolute;
   z-index: 5;
@@ -1283,6 +1286,13 @@ div#floatingTitle .right i.icon-anchor {
   color: #ccc;
   cursor: pointer;
 }
+div#floatingTitle .excerpt {
+  display: none;
+}
+div#floatingTitle .collapse i {
+  color: #b87d2c;
+  cursor: pointer;
+}
 div#floatingTitle span.author {
   color: #ccc;
   font-size: 11px;
@@ -1318,10 +1328,6 @@ div#floatingTitle span.updated {
 div#floatingTitle div.feed a {
   color: #ccc;
 }
-div#floatingTitle .collapse,
-div#floatingTitle .excerpt {
-  display: none;
-}
 div#floatingTitle span.titleWrap {
   width: 100%;
   white-space: normal;

File diff suppressed because it is too large
+ 1 - 1
themes/night.css.map


+ 10 - 4
themes/night_blue.css

@@ -1240,6 +1240,9 @@ div.cdm.vgrlf .feed {
   display: inline-block;
   padding: 1px 4px 1px 4px;
 }
+#main:not(.expandable) div#floatingTitle .collapse {
+  display: none;
+}
 div#floatingTitle {
   position: absolute;
   z-index: 5;
@@ -1283,6 +1286,13 @@ div#floatingTitle .right i.icon-anchor {
   color: #ccc;
   cursor: pointer;
 }
+div#floatingTitle .excerpt {
+  display: none;
+}
+div#floatingTitle .collapse i {
+  color: #257aa7;
+  cursor: pointer;
+}
 div#floatingTitle span.author {
   color: #ccc;
   font-size: 11px;
@@ -1318,10 +1328,6 @@ div#floatingTitle span.updated {
 div#floatingTitle div.feed a {
   color: #ccc;
 }
-div#floatingTitle .collapse,
-div#floatingTitle .excerpt {
-  display: none;
-}
 div#floatingTitle span.titleWrap {
   width: 100%;
   white-space: normal;

File diff suppressed because it is too large
+ 1 - 1
themes/night_blue.css.map