Browse Source

various layout fixes related to inline player causing unnecessary left padding if shorten_expanded is enabled

Andrew Dolgov 1 year ago
parent
commit
33240b7fd9
7 changed files with 39 additions and 2 deletions
  1. 1 0
      css/cdm.less
  2. 10 0
      css/default.css
  3. 0 0
      css/default.css.map
  4. 12 0
      css/tt-rss.less
  5. 6 2
      include/controls.php
  6. 10 0
      themes/night.css
  7. 0 0
      themes/night.css.map

+ 1 - 0
css/cdm.less

@@ -68,6 +68,7 @@
 
 	.intermediate {
 		margin-top : 10px;
+		margin-left : 10px;
 	}
 
 	.content-inner {

+ 10 - 0
css/default.css

@@ -80,6 +80,15 @@ body.ttrss_main div.post div.content iframe {
   min-width: 50%;
   max-width: 98%;
 }
+body.ttrss_main .inline-player {
+  display: flex;
+}
+body.ttrss_main .inline-player > * {
+  align-self: center;
+}
+body.ttrss_main .inline-player audio {
+  margin-right: 8px;
+}
 body.ttrss_main .article-note {
   background-color: #fff7d5;
   margin: 5px;
@@ -1095,6 +1104,7 @@ video::-webkit-media-controls-overlay-play-button {
 }
 .cdm .intermediate {
   margin-top: 10px;
+  margin-left: 10px;
 }
 .cdm .content-inner {
   margin: 10px;

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


+ 12 - 0
css/tt-rss.less

@@ -81,6 +81,18 @@ body.ttrss_main {
 		}
 	}
 
+	.inline-player {
+		display : flex;
+
+		> * {
+			align-self : center;
+		}
+
+		audio {
+			margin-right : 8px;
+		}
+	}
+
 	.article-note {
 		background-color : #fff7d5;
 		margin : 5px;

+ 6 - 2
include/controls.php

@@ -286,18 +286,22 @@ function format_inline_player($url, $ctype) {
 
 	if (strpos($ctype, "audio/") === 0) {
 
+		$entry .= "<div class='inline-player'>";
+
 		if ($_SESSION["hasAudio"] && (strpos($ctype, "ogg") !== false ||
 				$_SESSION["hasMp3"])) {
 
 			$entry .= "<audio preload=\"none\" controls>
 					<source type=\"$ctype\" src=\"$url\"/>
-					</audio>";
+					</audio> ";
 
 		}
 
-		if ($entry) $entry .= "&nbsp; <a target=\"_blank\" rel=\"noopener noreferrer\"
+		if ($entry) $entry .= "<a target=\"_blank\" rel=\"noopener noreferrer\"
 				href=\"$url\">" . basename($url) . "</a>";
 
+		$entry .= "</div>";
+
 		return $entry;
 
 	}

+ 10 - 0
themes/night.css

@@ -80,6 +80,15 @@ body.ttrss_main div.post div.content iframe {
   min-width: 50%;
   max-width: 98%;
 }
+body.ttrss_main .inline-player {
+  display: flex;
+}
+body.ttrss_main .inline-player > * {
+  align-self: center;
+}
+body.ttrss_main .inline-player audio {
+  margin-right: 8px;
+}
 body.ttrss_main .article-note {
   background-color: #fff7d5;
   margin: 5px;
@@ -1095,6 +1104,7 @@ video::-webkit-media-controls-overlay-play-button {
 }
 .cdm .intermediate {
   margin-top: 10px;
+  margin-left: 10px;
 }
 .cdm .content-inner {
   margin: 10px;

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


Some files were not shown because too many files changed in this diff