more style

This commit is contained in:
Tobias Merkle 2024-05-30 17:03:24 -04:00
parent eee375d794
commit f9e8d0ce9c
2 changed files with 3 additions and 2 deletions

View File

@ -157,10 +157,11 @@ fn get_widget() -> String {
a.href = `/main:app_store:sys/app-details/${app.package}:${app.publisher}`
a.target = '_blank';
a.rel = 'noopener noreferrer';
const iconLetter = app.metadata_hash.replace('0x', '')[0].toUpperCase();
a.innerHTML = `<div
class="app-image rounded mr-2 grow"
style="
background-image: url('${app.metadata.image || `/icons/${Math.floor(Math.random() * 10)}`}');
background-image: url('${app.metadata.image || `/icons/${iconLetter}`}');
height: 92px;
width: 92px;
max-width: 33%;

View File

@ -124,7 +124,7 @@ fn trim_content(content: &str) -> String {
fn post_to_html_string(post: KinodeBlogPost) -> String {
format!(
r#"<a
class="post p-2 grow self-stretch flex items-stretch rounded-lg shadow bg-white/10 font-sans w-full"
class="post p-2 grow self-stretch flex items-stretch rounded-lg shadow bg-white/10 hover:bg-white/20 font-sans w-full"
href="https://kinode.org/blog/post/{}"
target="_blank"
rel="noopener noreferrer"