-
-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: enable posts to be starred (#223)
* feat(starr-posts): add check if post got starred If isStarred: true in a posts front matter, the star SVG will be rendered for this post in the list of posts. * feat(starr-posts): add CSS to display a star icon for a starred post in the list of posts * feat(starr-posts): add optional front matter config isStarred to default archetypes If isStarred is not specified or set to false in a posts front matter, no star icon will appear. * feat(starr-posts): add new optional isStarred config to en-us Markdown Syntax Guide example site To demo the new optional feature, the config isStarred was added to an example post which will be rendered as soon as someone uses the theme for the first time (because en-us is the default language).
- Loading branch information
Showing
4 changed files
with
20 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,6 @@ title: | |
date: {{ .Date }} | ||
draft: true | ||
description: | ||
isStarred: false | ||
--- | ||
|
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,3 +1,16 @@ | ||
.list-page .post-year { | ||
padding-bottom: .5rem; | ||
} | ||
|
||
.icon-star { | ||
color: orange; | ||
height: 16px; | ||
margin-right: 1rem; | ||
width: 16px; | ||
display: block; | ||
} | ||
|
||
.post-item-right { | ||
margin-left: auto; | ||
margin-right: 0; | ||
} |
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