Lade till stöd för stilmall

This commit is contained in:
crille committed 2026-04-07 09:51:43 +02:00
1 parent a5d749ca23
commit 57bea77872
2 files changed
+5 -1

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
.sro-block img {
width: 300px;
}
+2 -1
View File
@@ -26,6 +26,7 @@ function sro_register_block() {
'editor_script' => 'sro-block-js', 'editor_script' => 'sro-block-js',
'render_callback' => 'sro_render_block' 'render_callback' => 'sro_render_block'
)); ));
wp_register_style('sro-style',plugins_url('css/style.css',__FILE__));
} }
add_action('init', 'sro_register_block'); add_action('init', 'sro_register_block');
@@ -97,7 +98,7 @@ function sro_render_block() {
return " return "
<div class='sro-block'> <div class='sro-block'>
<img src='$img' width='300'> <img src='$img' />
<div><strong>$artist – $track</strong></div> <div><strong>$artist – $track</strong></div>
<div>Spelades för $mins minuter sedan</div> <div>Spelades för $mins minuter sedan</div>
</div> </div>