فهرست منبع

Hever: Fix alignfull first-element if homepage title is hidden

Thomas Guillot 6 سال پیش
والد
کامیت
c79bb5ed65
3فایلهای تغییر یافته به همراه47 افزوده شده و 10 حذف شده
  1. 23 6
      hever/sass/_extra-child-theme.scss
  2. 12 2
      hever/style-rtl.css
  3. 12 2
      hever/style.css

+ 23 - 6
hever/sass/_extra-child-theme.scss

@@ -270,13 +270,30 @@ article .entry-header .entry-title,
   }
 }
 
-.singular:not(.home.hide-homepage-title) .hentry .entry-content {
-	& > *:first-child {
-		&.alignfull {
-			margin-top: -#{0.666 * map-deep-get($config-global, "spacing", "vertical")};
+// Remove margin if alignfull is first element
+.singular {
+	.hentry .entry-content {
+		& > *:first-child {
+			&.alignfull {
+				margin-top: -#{0.666 * map-deep-get($config-global, "spacing", "vertical")};
+
+				@include media(mobile) {
+					margin-top: -#{2 * map-deep-get($config-global, "spacing", "vertical")};
+				}
+			}
+		}
+	}
+}
+
+.home.hide-homepage-title {
+	.hentry .entry-content {
+		& > *:first-child {
+			&.alignfull {
+				margin-top: 0;
 
-			@include media(mobile) {
-				margin-top: -#{2 * map-deep-get($config-global, "spacing", "vertical")};
+				@include media(mobile) {
+					margin-top: 0;
+				}
 			}
 		}
 	}

+ 12 - 2
hever/style-rtl.css

@@ -3450,16 +3450,26 @@ article .entry-header .entry-title a:active, article .entry-header .entry-title
 	color: #1279BE;
 }
 
-.singular:not(.home.hide-homepage-title) .hentry .entry-content > *:first-child.alignfull {
+.singular .hentry .entry-content > *:first-child.alignfull {
 	margin-top: -21.312px;
 }
 
 @media only screen and (min-width: 560px) {
-	.singular:not(.home.hide-homepage-title) .hentry .entry-content > *:first-child.alignfull {
+	.singular .hentry .entry-content > *:first-child.alignfull {
 		margin-top: -64px;
 	}
 }
 
+.home.hide-homepage-title .hentry .entry-content > *:first-child.alignfull {
+	margin-top: 0;
+}
+
+@media only screen and (min-width: 560px) {
+	.home.hide-homepage-title .hentry .entry-content > *:first-child.alignfull {
+		margin-top: 0;
+	}
+}
+
 /**
  * Comments
  */

+ 12 - 2
hever/style.css

@@ -3455,16 +3455,26 @@ article .entry-header .entry-title a:active, article .entry-header .entry-title
 	color: #1279BE;
 }
 
-.singular:not(.home.hide-homepage-title) .hentry .entry-content > *:first-child.alignfull {
+.singular .hentry .entry-content > *:first-child.alignfull {
 	margin-top: -21.312px;
 }
 
 @media only screen and (min-width: 560px) {
-	.singular:not(.home.hide-homepage-title) .hentry .entry-content > *:first-child.alignfull {
+	.singular .hentry .entry-content > *:first-child.alignfull {
 		margin-top: -64px;
 	}
 }
 
+.home.hide-homepage-title .hentry .entry-content > *:first-child.alignfull {
+	margin-top: 0;
+}
+
+@media only screen and (min-width: 560px) {
+	.home.hide-homepage-title .hentry .entry-content > *:first-child.alignfull {
+		margin-top: 0;
+	}
+}
+
 /**
  * Comments
  */