diff --git a/pagex_commons b/pagex_commons index 29d5efe..0187746 160000 --- a/pagex_commons +++ b/pagex_commons @@ -1 +1 @@ -Subproject commit 29d5efe4da47d273bba32822c96073d6ee6cd390 +Subproject commit 018774636bc62228563bb9956a81ff4112867615 diff --git a/src/content/articles/playground-partial/playground-partial.pagex.js b/src/content/articles/playground-full/playground-full.pagex.js similarity index 78% rename from src/content/articles/playground-partial/playground-partial.pagex.js rename to src/content/articles/playground-full/playground-full.pagex.js index 15f44a9..644b9e7 100644 --- a/src/content/articles/playground-partial/playground-partial.pagex.js +++ b/src/content/articles/playground-full/playground-full.pagex.js @@ -18,42 +18,45 @@ export default { _transform: PagexResourceTransformer.MARKDOWN, path: "../playground/content.md" }, - id: "playground-partial", - title: "Playground Test Article (partial)", + id: "playground-full", + title: "Playground Test Article (full theme)", created_at: 0, theme: { emoji_style: VoidcannonEmojiStyle.FLUENT_FLAT, - partial: true, + partial: false, colors: { - light: "#c7f718", + light: "#D02843", dark: "#c7f718", } }, header: { type: VoidcannonHeaderType.IMMERSIVE, - layout: VoidcannonHeaderLayoutType.TEXT, - label: "Article Title :catsmile:", + layout: VoidcannonHeaderLayoutType.LOGO_LEFT, base: { _transform: PagexResourceTransformer.MEDIA, path: "../playground/assets/header/background.png" }, + logo: { + _transform: PagexResourceTransformer.MEDIA, + path: "../playground/assets/header/logo.png" + }, immersive_content: { - left: { + right: { base: { _transform: PagexResourceTransformer.MEDIA, - path: "../playground/assets/header/immersive_left/full.png" + path: "../playground/assets/header/immersive_right/full.png" }, outer: { _transform: PagexResourceTransformer.MEDIA, - path: "../playground/assets/header/immersive_left/outer_v2.png" + path: "../playground/assets/header/immersive_right/outer.png" }, inner: { _transform: PagexResourceTransformer.MEDIA, - path: "../playground/assets/header/immersive_left/base_v2.png" + path: "../playground/assets/header/immersive_right/inner.png" } } }, - color: "#c7f718" + color: "#D02843" }, authors: [bignutty], collections: [ diff --git a/src/content/articles/playground-p3/content.md b/src/content/articles/playground-p3/content.md index 0165783..9bbe976 100644 --- a/src/content/articles/playground-p3/content.md +++ b/src/content/articles/playground-p3/content.md @@ -4,7 +4,7 @@ this is sample text (p3) ## Test Articles - [playground](./[playground]) -- - [playground (partially themed)](./[playground-partial]) +- - [playground (full theme)](./[playground-full]) - - [playground (no theme)](./[playground-gm3]) - [p3](./[playground-p3]) - [totk](./[playground-totk]) diff --git a/src/content/articles/playground-totk/content.md b/src/content/articles/playground-totk/content.md index 5621848..425564a 100644 --- a/src/content/articles/playground-totk/content.md +++ b/src/content/articles/playground-totk/content.md @@ -4,7 +4,7 @@ this is sample text (totk) ## Test Articles - [playground](./[playground]) -- - [playground (partially themed)](./[playground-partial]) +- - [playground (full theme)](./[playground-full]) - - [playground (no theme)](./[playground-gm3]) - [p3](./[playground-p3]) - [totk](./[playground-totk]) diff --git a/src/content/articles/playground/assets/header/background.png b/src/content/articles/playground/assets/header/background.png index 9ad392a..a49346e 100644 Binary files a/src/content/articles/playground/assets/header/background.png and b/src/content/articles/playground/assets/header/background.png differ diff --git a/src/content/articles/playground/assets/header/immersive_right/full.png b/src/content/articles/playground/assets/header/immersive_right/full.png new file mode 100644 index 0000000..f9e76cf Binary files /dev/null and b/src/content/articles/playground/assets/header/immersive_right/full.png differ diff --git a/src/content/articles/playground/assets/header/immersive_right/inner.png b/src/content/articles/playground/assets/header/immersive_right/inner.png new file mode 100644 index 0000000..98863bf Binary files /dev/null and b/src/content/articles/playground/assets/header/immersive_right/inner.png differ diff --git a/src/content/articles/playground/assets/header/immersive_right/outer.png b/src/content/articles/playground/assets/header/immersive_right/outer.png new file mode 100644 index 0000000..cdb69c0 Binary files /dev/null and b/src/content/articles/playground/assets/header/immersive_right/outer.png differ diff --git a/src/content/articles/playground/assets/header/logo.png b/src/content/articles/playground/assets/header/logo.png new file mode 100644 index 0000000..1884005 Binary files /dev/null and b/src/content/articles/playground/assets/header/logo.png differ diff --git a/src/content/articles/playground/content.md b/src/content/articles/playground/content.md index 52460aa..493afb0 100644 --- a/src/content/articles/playground/content.md +++ b/src/content/articles/playground/content.md @@ -4,7 +4,7 @@ this is sample text (playground) ## Test Articles - [playground](./[playground]) -- - [playground (partially themed)](./[playground-partial]) +- - [playground (full theme)](./[playground-full]) - - [playground (no theme)](./[playground-gm3]) - [p3](./[playground-p3]) - [totk](./[playground-totk]) @@ -454,8 +454,6 @@ syntax = "proto3"; package bignutty.pagex; - 🍋‍🟩 - // Represents preprocessed metadata for pagex media items. message PagexProcessedMedia { // The version of this metadata payload. @@ -475,6 +473,116 @@ message PagexMediaAttribution { } ``` +```protobuf +syntax = 'proto3'; + +package fm.last.api; + +import "bignutty/api/JsField.proto"; + +import "fm/last/api/common.proto"; + +// Last.fm `track` service. +service TrackService { + // track.getInfo + // Returns information about a track. + rpc getInfo(TrackInfoRequest) returns (TrackInfoResponse); +} + +// Query parameters for a track.getInfo request. +message TrackInfoRequest { + // Track name (required, unless mbid is provided). + optional string track = 1; + // Artist name (required, unless mbid is provided). + optional string artist = 2; + // MusicBrainz Recording ID. + optional string mbid = 3; + + // User to retrieve stats for + optional string username = 4; + + // Autocorrect tracks via corrections. + optional bool autocorrect = 5; +} + +// A track as returned by the track.getInfo method. +message TrackInfoResponse { + // An artist fragment in track.getInfo responses. + message PartialArtist { + // Canonical name of the artist. + string name = 1; + // Last.fm URL for the artist. + string url = 2; + // MusicBrainz ID for the artist. + optional string mbid = 3; + } + + // An album fragment in track.getInfo responses. + message PartialAlbum { + // Canonical title of the album. + string title = 1; + // Canonical name of the album artist. + string artist = 2; + // Last.fm URL for the album. + string url = 3; + // Cover artwork for the album. + repeated fm.last.api.Image image = 4; + } + + // Metadata about Last.fm site streaming. + message StreamingMetadata { + // Whether the track can be streamed. + bool streamable = 1 [(bignutty.api.js_field) = "#text"]; + // Whether the full track is available for streaming. + bool fulltrack = 2; + } + + // Top Tags fragment in track.getInfo responses. + message TopTags { + // Tag fragment. + message PartialTag { + // Tag Name + string name = 1; + // Last.fm URL for the tag. + string url = 2; + } + + // List of top tags. (max. 5) + repeated PartialTag tag = 1; + } + + // Canonical name of the track. + string name = 1; + // Last.fm URL. + string url = 2; + // Duration of the track. + // Will be "0" when the duration is unknown. + int32 duration = 3; + + // Global listener count. + int32 listeners = 4; + // Global scrobble count. + int32 playcount = 5; + + // Amount of scrobbles the user has for this track. + optional int32 userplaycount = 6 [(fm.last.api.requires_user)=true]; + // Whether the user has loved the track. + optional bool userloved = 7 [(fm.last.api.requires_user)=true]; + + // Artist associated with the track. + PartialArtist artist = 10; + // Canonical album this track is featured on. + optional PartialAlbum album = 11; + + // If the track can be streamed on last.fm. + StreamingMetadata streamable = 20 [deprecated=true]; + // Top tags added by users. + TopTags toptags = 21; + // Wiki entry written by users. + optional fm.last.api.Wiki wiki = 22; +} +``` + ## Horizontal Rule --- diff --git a/src/content/articles/playground/playground.pagex.js b/src/content/articles/playground/playground.pagex.js index 09e7306..3895a90 100644 --- a/src/content/articles/playground/playground.pagex.js +++ b/src/content/articles/playground/playground.pagex.js @@ -25,36 +25,40 @@ export default { cta: "View Test Article!", theme: { emoji_style: VoidcannonEmojiStyle.FLUENT_FLAT, + partial: true, colors: { light: "#D02843", - dark: "#c7f718", + dark: "#D02843", } }, header: { type: VoidcannonHeaderType.IMMERSIVE, - layout: VoidcannonHeaderLayoutType.TEXT, - label: "Article Title :catsmile:", + layout: VoidcannonHeaderLayoutType.LOGO_LEFT, base: { _transform: PagexResourceTransformer.MEDIA, path: "./assets/header/background.png" }, + logo: { + _transform: PagexResourceTransformer.MEDIA, + path: "./assets/header/logo.png" + }, immersive_content: { - left: { + right: { base: { _transform: PagexResourceTransformer.MEDIA, - path: "./assets/header/immersive_left/full.png" + path: "./assets/header/immersive_right/full.png" }, outer: { _transform: PagexResourceTransformer.MEDIA, - path: "./assets/header/immersive_left/outer_v2.png" + path: "./assets/header/immersive_right/outer.png" }, inner: { _transform: PagexResourceTransformer.MEDIA, - path: "./assets/header/immersive_left/base_v2.png" + path: "./assets/header/immersive_right/inner.png" } } }, - color: "#c7f718" + color: "#D02843" }, authors: [bignutty], collections: [ diff --git a/voidcannon b/voidcannon index c5c9659..8d797d7 160000 --- a/voidcannon +++ b/voidcannon @@ -1 +1 @@ -Subproject commit c5c96596f609d121a5abb61633c38a85f3d8c135 +Subproject commit 8d797d7ed4b94c7ed079a1ea6396d6aa85d568c6