Obsidian Publish buttons?

Hello!

This is done by using Kepano’s Card List CSS.

Example

The source content looks like this in the note:

- [Dansk](https://publish.obsidian.md/help-da)
- [Español](https://publish.obsidian.md/help-es)
- [Italiano](https://publish.obsidian.md/help-it)
- [日本語](https://publish.obsidian.md/help-ja)
- [Português](https://publish.obsidian.md/help-pt-br)
- [Русский](https://publish.obsidian.md/help-ru)
- [Tiếng Việt](https://publish.obsidian.md/help-vi)
- [中文](https://publish.obsidian.md/help-zh)
- [Phéasa Khmêr](https://publish.obsidian.md/help-km)
- [العربية](https://publish.obsidian.md/help-ar)

Yaml

You would need to add this to your note you want to publish.

---
cssclasses:
  - list-cards
  - list-cards-mobile-full
---

CSS

And add this to your publish.css


.list-cards {
	--list-cards-template: repeat(2, minmax(0, 1fr));
}

.list-cards div > ul {
    --link-color: var(--text-normal);
    --link-unresolved-color: var(--text-muted);
    --link-decoration: none;
    --link-decoration-hover: none;
    --link-external-color: var(--text-normal);
    --link-external-decoration: none;
    --link-external-decoration-hover: none;
    display: grid;
    gap: 8px;
    grid-template-columns: var(--list-cards-template);
    padding: 0;
}

.list-cards div > ul > li {
    display: flex;
    border-radius: var(--radius-s);
    border: 1px solid var(--color-base-25);
    flex-wrap: wrap;
}

.list-cards div > ul > li a {
    flex-grow: 0;
}

.list-cards div > ul > li a:after {
    content: "";
    flex-basis: 100%;
    height: 0;
}

.list-cards div ul > li a {
    flex-grow: 1;
    padding: 16px;
    font-weight: var(--font-semibold);
    background: none;
}

.list-cards div ul > li:hover {
    border-color: var(--color-base-35);
}

.theme-dark .list-cards div ul > li {
    background-color: var(--background-secondary);
}

.list-cards div ul ul {
    display: block;
    width: 100%;
    color: var(--text-muted);
    font-size: var(--font-smaller);
    margin-top: -8px;
    padding: 0 16px 16px;
}

.list-cards div ul ul > li {
    display: block;
}

@media screen and (max-width: 750px) {
    .list-cards.list-cards-mobile-full {
		--list-cards-template: repeat(1, minmax(0, 1fr));
	}
}
2 Likes