Gjorde en minimal version
This commit is contained in:
@@ -1,17 +1,6 @@
|
||||
(function (blocks, element) {
|
||||
var el = element.createElement;
|
||||
|
||||
blocks.registerBlockType("spotify-recent-oauth/recent-track", {
|
||||
title: "Spotify Recent Track",
|
||||
icon: "format-audio",
|
||||
category: "widgets",
|
||||
|
||||
edit: function () {
|
||||
return el("p", {}, "Spotify Recent Track – visas i frontend.");
|
||||
},
|
||||
|
||||
save: function () {
|
||||
return null; // Server-side render
|
||||
},
|
||||
edit: () => element.createElement("p", {}, "Spotify Recent Track – visas bara i frontend"),
|
||||
save: () => null,
|
||||
});
|
||||
})(window.wp.blocks, window.wp.element);
|
||||
|
||||
@@ -3,13 +3,7 @@
|
||||
"name": "spotify-recent-oauth/recent-track",
|
||||
"title": "Spotify Recent Track",
|
||||
"category": "widgets",
|
||||
"icon": "format-audio",
|
||||
"description": "Visar din senast spelade låt från Spotify.",
|
||||
"supports": {
|
||||
"html": false
|
||||
},
|
||||
"editorScript": "sro-block-js",
|
||||
"style": "sro-style",
|
||||
"editorStyle": "sro-editor-style",
|
||||
"render": "sro_render_block"
|
||||
}
|
||||
|
||||
@@ -1,23 +1,4 @@
|
||||
.sro-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 10px;
|
||||
background: #111;
|
||||
color: #fff;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.sro-album img {
|
||||
width: 300px;
|
||||
height: 300px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.sro-info {
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.sro-track {
|
||||
font-weight: bold;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user