-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: display attributes for listings in editor and front-end
Moves shared styles to a `shared` SCSS folder and implements helpers to output the same class names in editor + front-end based on curated list block attributes.
- Loading branch information
Showing
11 changed files
with
178 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 2 additions & 0 deletions
2
src/listing-styles/listings/listing.scss → src/listing-styles/front-end/listing.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/** | ||
* Custom styles for listings pages. | ||
*/ | ||
import './listings/view.scss'; | ||
import './front-end/view.scss'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
.newspack-listings { | ||
&__listing-post { | ||
.media-position-left &, | ||
.media-position-right & { | ||
display: flex; | ||
} | ||
} | ||
|
||
&__listing-featured-media { | ||
flex-basis: 100%; | ||
margin: 1rem 0; | ||
max-width: 100%; | ||
padding: 0; | ||
|
||
.media-position-right & { | ||
order: 2; | ||
} | ||
|
||
.media-size-1 & { | ||
flex-basis: 25%; | ||
} | ||
|
||
.media-size-2 & { | ||
flex-basis: 50%; | ||
} | ||
|
||
.media-size-3 & { | ||
flex-basis: 75%; | ||
} | ||
} | ||
|
||
&__listing-meta { | ||
flex-basis: 100%; | ||
|
||
.media-position-left & { | ||
margin-left: 1rem; | ||
} | ||
|
||
.media-position-right & { | ||
margin-right: 1rem; | ||
} | ||
} | ||
} |