Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cards): add multi link support #865

Merged
merged 1 commit into from
Feb 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/tips-and-tricks.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Here is a collection of neat tips and tricks that Homer users have come up with!

Great source to find service icons

- <https://github.com/walkxcode/dashboard-icons>
- <https://selfh.st/icons/>
- <https://github.com/homarr-labs/dashboard-icons>

## Use Homer as a custom "new tab" page

Expand Down
33 changes: 21 additions & 12 deletions public/assets/config-demo.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,17 @@ services:
url: "https://github.com/bastienwirtz/homer/blob/main/docs/customservices.md"
- name: "Dashboard icons"
icon: "fa-solid fa-icons"
subtitle: "Dashboard icons"
tag: "setup"
url: "https://github.com/walkxcode/dashboard-icons"
url: ""
quick:
- name: "selfh.st"
url: "https://selfh.st/icons/"
icon: "fa-solid fa-arrow-up-right-from-square"
target: "_blank"
- name: "homarr-labs"
url: "https://github.com/homarr-labs/dashboard-icons"
icon: "fa-solid fa-arrow-up-right-from-square"
target: "_blank"
- name: "Buy me a coffee!"
subtitle: "Sponsor this project"
icon: "fa-solid fa-mug-hot"
Expand Down Expand Up @@ -116,18 +124,19 @@ services:
icon: "fa-regular fa-bookmark"
class: highlight-inverted
items:
- name: "r/selfhosted"
- name: "Selfhosted community"
icon: "fa-brands fa-reddit-alien"
subtitle: "selfhosted community on Reddit"
tag: "community"
url: "https://www.reddit.com/r/selfhosted/"
target: "_blank"
- name: "c/selfhosted"
logo: "https://icons.iconarchive.com/icons/simpleicons-team/simple/256/lemmy-icon.png"
subtitle: "selfhosted community on Lemmy"
tag: "community"
url: "https://lemmy.world/c/selfhosted"
target: "_blank"
url: ""
quick:
- name: "r/selfhosted"
url: "https://www.reddit.com/r/selfhosted/"
icon: "fa-solid fa-arrow-up-right-from-square"
target: "_blank"
- name: "c/selfhosted"
url: "https://lemmy.world/c/selfhosted"
icon: "fa-solid fa-arrow-up-right-from-square"
target: "_blank"
- name: "Awesome selfhosted"
icon: "fa-solid fa-star"
subtitle: "Another application"
Expand Down
2 changes: 1 addition & 1 deletion src/assets/themes/classic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
--text: #eaeaea;
--text-header: #ffffff;
--text-title: #fafafa;
--text-subtitle: #b6b6b6;
--text-subtitle: #b6b6b6;
--card-shadow: rgba(0, 0, 0, 0.4);
--link: #3273dc;
--link-hover: #144aa2;
Expand Down
32 changes: 32 additions & 0 deletions src/components/services/Generic.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@
<div class="media-content">
<slot name="content">
<p class="title">{{ item.name }}</p>
<p v-if="item.quick" class="quicklinks">
<a
v-for="(link, linkIndex) in item.quick"
:key="linkIndex"
:style="`background-color:${link.color};`"
:href="link.url"
:target="link.target"
rel="noreferrer"
>
<span v-if="item.icon"><i style="font-size: 12px" :class="['fa-fw', link.icon]"></i></span>
{{ link.name }}
</a>
</p>
<p v-if="item.subtitle" class="subtitle">
{{ item.subtitle }}
</p>
Expand Down Expand Up @@ -61,4 +74,23 @@ export default {
object-fit: contain;
}
}

a[href=""] {
pointer-events: none;
cursor: default;
}

.quicklinks {
float: right;
a {
font-size: 0.75rem;
padding: 3px 6px;
margin-left: 6px;
border-radius: 100px;
background-color: var(--background);
z-index: 9999;
pointer-events: all;
}
}

</style>