diff --git a/public/themes/jellybeans.css b/public/themes/jellybeans.css
index 7c8f98fc..d6e74d07 100644
--- a/public/themes/jellybeans.css
+++ b/public/themes/jellybeans.css
@@ -216,6 +216,7 @@ r4-track-create {
min-height: 3em;
}
}
+
/* Cards */
r4-channel-card {
background: var(--c-bg2);
@@ -223,18 +224,28 @@ r4-channel-card {
[color-scheme='dark'] r4-channel-card {
--c-border: rgb(50, 51, 70);
}
+r4-channel-card r4-button-play {
+ margin-top: var(--s);
+ margin-left: var(--s);
+}
+r4-channel-card-body {
+ padding: var(--s);
+}
r4-channel-card r4-channel-slug {
display: none;
}
-r4-channel-card r4-channel-description {
- margin-left: 0.5em;
-}
/* Track lists */
r4-list-item r4-track {
border-bottom: 1px solid var(--c-border);
padding: calc(var(--s) / 2) 0;
}
+r4-list-item r4-track:hover {
+ background-color: color-mix(in oklch, var(--c-bg) 100%, black 2%);
+}
+[color-scheme="dark"] r4-list-item r4-track:hover {
+ background-color: color-mix(in oklch, var(--c-bg) 100%, white 8%);
+}
r4-track-title,
r4-track-description {
font-size: 14px;
diff --git a/src/components/r4-channel-card.js b/src/components/r4-channel-card.js
index 04140dbb..7b72485d 100644
--- a/src/components/r4-channel-card.js
+++ b/src/components/r4-channel-card.js
@@ -39,13 +39,19 @@ export default class R4ChannelCard extends LitElement {
return html`Loading...`
}
return html`
-
+
${this.renderAvatar()}
- ${this.channel.name}
- @${this.channel.slug}
- ${this.renderDescription()} ${this.renderUrl()}
+
+
+
+ ${this.channel.name}
+ @${this.channel.slug}
+
+ ${this.renderDescription()}
+ ${this.renderUrl()}
+
+
`
}
renderDescription() {
@@ -62,7 +69,7 @@ export default class R4ChannelCard extends LitElement {
}
renderAvatar() {
if (this.channel.image) {
- return html``
+ return html``
}
}
renderUrl() {
diff --git a/src/index.css b/src/index.css
index d80bf010..d7e5e981 100644
--- a/src/index.css
+++ b/src/index.css
@@ -401,27 +401,21 @@ r4-supabase-modifiers form {
display: flex;
flex-wrap: wrap;
}
-r4-channel-card,
-r4-channel-card a,
r4-track {
display: flex;
align-items: center;
flex-wrap: wrap;
}
-r4-channel-card {
- flex: 1;
- background-color: var(--c-bg);
- border: 1px solid var(--c-border);
- border-radius: var(--s-radius);
- padding: var(--s);
+
+r4-avatar {
+ display: inline-flex;
}
-r4-channel-card r4-avatar,
-r4-channel-card r4-button-play {
- padding: calc(var(--s) / 2);
+r4-avatar picture,
+r4-avatar img {
+ width: 100%;
}
-r4-avatar,
-r4-avatar picture {
- display: inline-flex;
+r4-avatar img {
+ vertical-align: bottom;
}
r4-list {
@@ -444,6 +438,43 @@ r4-avatar-upload form {
align-items: center;
}
+/* Default, portrait card layout */
+r4-channel-card {
+ display: block;
+ flex: 1;
+ background-color: var(--c-bg);
+ border: 1px solid var(--c-border);
+ border-radius: var(--s-radius);
+ container: card / inline-size;
+}
+r4-channel-card-inner {
+ display: flex;
+ flex-flow: column nowrap;
+}
+r4-channel-card r4-avatar {
+ width: 100%;
+}
+r4-channel-card-body {
+ flex: 1;
+ display: block;
+}
+
+/* Horizontal card layout */
+@container card (min-width: 500px) {
+ r4-channel-card-inner {
+ flex-direction: row;
+ align-items: center;
+ gap: var(--s);
+ }
+ r4-channel-card a:has(r4-avatar) {
+ width: 13rem;
+ }
+}
+
+r4-channel-description {
+ display: block;
+}
+
r4-supabase-modifiers form {
display: flex;
flex-wrap: wrap;