瀏覽代碼

Elegant Business: Add style for posts list block

Takashi Irie 6 年之前
父節點
當前提交
7a69c00411
共有 3 個文件被更改,包括 1321 次插入647 次删除
  1. 145 1
      elegant-business/sass/blocks/_blocks.scss
  2. 1032 646
      elegant-business/style-rtl.css
  3. 144 0
      elegant-business/style.css

+ 145 - 1
elegant-business/sass/blocks/_blocks.scss

@@ -821,7 +821,7 @@
 				margin-right: #{0.5 * $size__spacing-unit};
 				margin-right: #{0.5 * $size__spacing-unit};
       }
       }
     }
     }
-    
+
     @include media(tabletalt) {
     @include media(tabletalt) {
 			.wp-block-column > * {
 			.wp-block-column > * {
 
 
@@ -996,4 +996,148 @@
 	.wp-block-pullquote.is-style-solid-color blockquote.has-white-color {
 	.wp-block-pullquote.is-style-solid-color blockquote.has-white-color {
 		color: #FFF;
 		color: #FFF;
 	}
 	}
+
+	//! Posts List
+	.a8c-posts-list-item__title a,
+	.a8c-posts-list-item__meta a {
+		text-decoration: none;
+	}
+
+	.a8c-posts-list__view-all {
+		text-decoration: none;
+	}
+
+	.a8c-posts-list-item__title {
+		a {
+			color: inherit;
+
+			&:hover,
+			&:focus {
+				color: $color__text-hover;
+			}
+		}
+	}
+
+	.a8c-posts-list-item__meta {
+		a {
+			color: $color__text-light;
+
+			&:hover,
+			&:focus {
+				color: $color__link;
+			}
+		}
+
+		.a8c-posts-list-item__edit-link {
+			a {
+				color: $color__background-body;
+			}
+		}
+	}
+
+	.a8c-posts-list {
+		text-align: center;
+	}
+
+	.a8c-posts-list__item:not(:first-child) {
+		margin-top: calc(6 * #{$size__spacing-unit});
+	}
+
+	.a8c-posts-list-item__featured {
+
+		span {
+			background: $color__background-button;
+			color: #fff;
+			display: inline-block;
+			font-size: $font__size-xxs;
+			font-weight: bold;
+			line-height: 1;
+			padding: .25rem;
+			text-transform: uppercase;
+			z-index: 1;
+		}
+	}
+
+	.a8c-posts-list-item__post-thumbnail {
+		margin-bottom: $size__vertical-spacing-unit;
+
+		img {
+			display: block;
+		}
+	}
+
+	.a8c-posts-list-item__title {
+		font-size: $font__size-md;
+		margin: 0;
+
+		@include media(tablet) {
+			font-size: $font__size-lg;
+		}
+	}
+
+	.a8c-posts-list-item__meta {
+		color: $color__text-light;
+		font-size: $font__size-xxs;
+		font-weight: 500;
+	}
+
+	.a8c-posts-list-item__edit-link {
+		@include button-transition;
+		background: $color__background-button;
+		border-radius: 3px;
+		font-family: $font__ui;
+		font-weight: 700;
+		margin-left: calc(.5 * #{$size__spacing-unit});
+		padding: .1rem .4rem;
+
+		&:hover,
+		&:focus {
+			background: $color__background-button-hover;
+			cursor: pointer;
+		}
+	}
+
+	.a8c-posts-list-item__excerpt {
+		@include postContentMaxWidth();
+		margin: 0 auto;
+		text-align: left;
+
+		p {
+			margin: $size__vertical-spacing-unit 0;
+		}
+	}
+
+	.a8c-posts-list__view-all {
+		@include button-transition;
+		background: $color__background-button;
+		border: none;
+		border-radius: 5px;
+		box-sizing: border-box;
+		color: $color__background-body;
+		display: inline-block;
+		font-family: $font__ui;
+		font-size: $font__size-sm;
+		font-weight: 700;
+		line-height: $font__line-height-heading;
+		margin-top: calc(6 * #{$size__spacing-unit} - #{$size__vertical-spacing-unit});
+		outline: none;
+		padding: ( $size__spacing-unit * .76 ) $size__spacing-unit;
+		vertical-align: bottom;
+
+		&:hover {
+			background: $color__background-button-hover;
+			cursor: pointer;
+		}
+
+		&:visited {
+			color: $color__background-body;
+			text-decoration: none;
+		}
+
+		&:focus {
+			background: $color__background-button-hover;
+			outline: thin dotted;
+			outline-offset: -4px;
+		}
+	}
 }
 }

文件差異過大導致無法顯示
+ 1032 - 646
elegant-business/style-rtl.css


+ 144 - 0
elegant-business/style.css

@@ -4398,6 +4398,150 @@ body.page .main-navigation {
   color: #FFF;
   color: #FFF;
 }
 }
 
 
+.entry .entry-content .a8c-posts-list-item__title a,
+.entry .entry-content .a8c-posts-list-item__meta a {
+  text-decoration: none;
+}
+
+.entry .entry-content .a8c-posts-list__view-all {
+  text-decoration: none;
+}
+
+.entry .entry-content .a8c-posts-list-item__title a {
+  color: inherit;
+}
+
+.entry .entry-content .a8c-posts-list-item__title a:hover, .entry .entry-content .a8c-posts-list-item__title a:focus {
+  color: #4a4a4a;
+}
+
+.entry .entry-content .a8c-posts-list-item__meta a {
+  color: #767676;
+}
+
+.entry .entry-content .a8c-posts-list-item__meta a:hover, .entry .entry-content .a8c-posts-list-item__meta a:focus {
+  color: #c43d80;
+}
+
+.entry .entry-content .a8c-posts-list-item__meta .a8c-posts-list-item__edit-link a {
+  color: #fff;
+}
+
+.entry .entry-content .a8c-posts-list {
+  text-align: center;
+}
+
+.entry .entry-content .a8c-posts-list__item:not(:first-child) {
+  margin-top: calc(6 * 1rem);
+}
+
+.entry .entry-content .a8c-posts-list-item__featured span {
+  background: #c43d80;
+  color: #fff;
+  display: inline-block;
+  font-size: 0.59259em;
+  font-weight: bold;
+  line-height: 1;
+  padding: .25rem;
+  text-transform: uppercase;
+  z-index: 1;
+}
+
+.entry .entry-content .a8c-posts-list-item__post-thumbnail {
+  margin-bottom: 32px;
+}
+
+.entry .entry-content .a8c-posts-list-item__post-thumbnail img {
+  display: block;
+}
+
+.entry .entry-content .a8c-posts-list-item__title {
+  font-size: 1.125em;
+  margin: 0;
+}
+
+@media only screen and (min-width: 768px) {
+  .entry .entry-content .a8c-posts-list-item__title {
+    font-size: 1.6875em;
+  }
+}
+
+.entry .entry-content .a8c-posts-list-item__meta {
+  color: #767676;
+  font-size: 0.59259em;
+  font-weight: 500;
+}
+
+.entry .entry-content .a8c-posts-list-item__edit-link {
+  transition: background 150ms ease-in-out;
+  background: #c43d80;
+  border-radius: 3px;
+  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
+  font-weight: 700;
+  margin-left: calc(.5 * 1rem);
+  padding: .1rem .4rem;
+}
+
+.entry .entry-content .a8c-posts-list-item__edit-link:hover, .entry .entry-content .a8c-posts-list-item__edit-link:focus {
+  background: #111;
+  cursor: pointer;
+}
+
+.entry .entry-content .a8c-posts-list-item__excerpt {
+  margin: 0 auto;
+  text-align: left;
+}
+
+@media only screen and (min-width: 768px) {
+  .entry .entry-content .a8c-posts-list-item__excerpt {
+    max-width: calc(8 * (100vw / 12) - 28px);
+  }
+}
+
+@media only screen and (min-width: 1168px) {
+  .entry .entry-content .a8c-posts-list-item__excerpt {
+    max-width: calc(6 * (100vw / 12) - 28px);
+  }
+}
+
+.entry .entry-content .a8c-posts-list-item__excerpt p {
+  margin: 32px 0;
+}
+
+.entry .entry-content .a8c-posts-list__view-all {
+  transition: background 150ms ease-in-out;
+  background: #c43d80;
+  border: none;
+  border-radius: 5px;
+  box-sizing: border-box;
+  color: #fff;
+  display: inline-block;
+  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
+  font-size: 0.88889em;
+  font-weight: 700;
+  line-height: 1.2;
+  margin-top: calc(6 * 1rem - 32px);
+  outline: none;
+  padding: 0.76rem 1rem;
+  vertical-align: bottom;
+}
+
+.entry .entry-content .a8c-posts-list__view-all:hover {
+  background: #111;
+  cursor: pointer;
+}
+
+.entry .entry-content .a8c-posts-list__view-all:visited {
+  color: #fff;
+  text-decoration: none;
+}
+
+.entry .entry-content .a8c-posts-list__view-all:focus {
+  background: #111;
+  outline: thin dotted;
+  outline-offset: -4px;
+}
+
 /* Site Builder */
 /* Site Builder */
 /* !Site Builder styles */
 /* !Site Builder styles */
 .entry .entry-content .site-builder__header {
 .entry .entry-content .site-builder__header {

部分文件因文件數量過多而無法顯示