Gjorde en minimal version

This commit is contained in:
2026-04-03 13:07:09 +02:00
parent 4762de4c32
commit 09e078878d
4 changed files with 20 additions and 120 deletions

View File

@@ -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);

View File

@@ -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"
}

View File

@@ -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;
}