File tree Expand file tree Collapse file tree 4 files changed +12
-0
lines changed
Expand file tree Collapse file tree 4 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,7 @@ struct FrontMatterAssetExtra {
127127 image : Option < String > ,
128128 licenses : Option < Vec < String > > ,
129129 bevy_versions : Option < Vec < String > > ,
130+ nsfw : Option < bool > ,
130131}
131132
132133impl From < & Asset > for FrontMatterAsset {
@@ -140,6 +141,7 @@ impl From<&Asset> for FrontMatterAsset {
140141 image : asset. image . clone ( ) ,
141142 licenses : asset. licenses . clone ( ) ,
142143 bevy_versions : asset. bevy_versions . clone ( ) ,
144+ nsfw : asset. nsfw ,
143145 } ,
144146 }
145147 }
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ pub struct Asset {
2828 pub crate_name : Option < String > ,
2929 pub licenses : Option < Vec < String > > ,
3030 pub bevy_versions : Option < Vec < String > > ,
31+ pub nsfw : Option < bool > ,
3132
3233 // this field is not read from the toml file
3334 #[ serde( skip) ]
Original file line number Diff line number Diff line change @@ -34,6 +34,14 @@ $asset-card-padding: 0.4rem;
3434 }
3535 }
3636
37+ & __blur-overlay {
38+ backdrop-filter : blur (16px );
39+ width : 100% ;
40+ height : 100% ;
41+ position : absolute ;
42+ top : 0 ;
43+ }
44+
3745 & __title {
3846 position : absolute ;
3947 width : 100% ;
Original file line number Diff line number Diff line change 1414 < div id ="{{ post.title | slugify }} ">
1515 < a class ="asset-card " href ="{{ post.extra.link }} ">
1616 < div class ="asset-card__banner ">
17+ {% if post.extra.nsfw %}< div class ="asset-card__blur-overlay "> </ div > {% endif %}
1718 < div class ="asset-card__title "> {{ post.title }}</ div >
1819 {% if post.extra.image %}
1920 < img src ="{{ image_macros::resize_image(path=post.extra.image, width=370, height=370) }} "
You can’t perform that action at this time.
0 commit comments