Skip to content

Commit 3468b9d

Browse files
committed
feat(cards): add multi link support
1 parent 45acac7 commit 3468b9d

File tree

4 files changed

+56
-14
lines changed

4 files changed

+56
-14
lines changed

docs/tips-and-tricks.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ Here is a collection of neat tips and tricks that Homer users have come up with!
66

77
Great source to find service icons
88

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

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

public/assets/config-demo.yml.dist

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,17 @@ services:
6969
url: "https://github.com/bastienwirtz/homer/blob/main/docs/customservices.md"
7070
- name: "Dashboard icons"
7171
icon: "fa-solid fa-icons"
72-
subtitle: "Dashboard icons"
7372
tag: "setup"
74-
url: "https://github.com/walkxcode/dashboard-icons"
73+
url: ""
74+
quick:
75+
- name: "selfh.st"
76+
url: "https://selfh.st/icons/"
77+
icon: "fa-solid fa-arrow-up-right-from-square"
78+
target: "_blank"
79+
- name: "homarr-labs"
80+
url: "https://github.com/homarr-labs/dashboard-icons"
81+
icon: "fa-solid fa-arrow-up-right-from-square"
82+
target: "_blank"
7583
- name: "Buy me a coffee!"
7684
subtitle: "Sponsor this project"
7785
icon: "fa-solid fa-mug-hot"
@@ -116,18 +124,19 @@ services:
116124
icon: "fa-regular fa-bookmark"
117125
class: highlight-inverted
118126
items:
119-
- name: "r/selfhosted"
127+
- name: "Selfhosted community"
120128
icon: "fa-brands fa-reddit-alien"
121-
subtitle: "selfhosted community on Reddit"
122129
tag: "community"
123-
url: "https://www.reddit.com/r/selfhosted/"
124-
target: "_blank"
125-
- name: "c/selfhosted"
126-
logo: "https://icons.iconarchive.com/icons/simpleicons-team/simple/256/lemmy-icon.png"
127-
subtitle: "selfhosted community on Lemmy"
128-
tag: "community"
129-
url: "https://lemmy.world/c/selfhosted"
130-
target: "_blank"
130+
url: ""
131+
quick:
132+
- name: "r/selfhosted"
133+
url: "https://www.reddit.com/r/selfhosted/"
134+
icon: "fa-solid fa-arrow-up-right-from-square"
135+
target: "_blank"
136+
- name: "c/selfhosted"
137+
url: "https://lemmy.world/c/selfhosted"
138+
icon: "fa-solid fa-arrow-up-right-from-square"
139+
target: "_blank"
131140
- name: "Awesome selfhosted"
132141
icon: "fa-solid fa-star"
133142
subtitle: "Another application"

src/assets/themes/classic.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
--text: #eaeaea;
2727
--text-header: #ffffff;
2828
--text-title: #fafafa;
29-
--text-subtitle: #b6b6b6;
29+
--text-subtitle: #b6b6b6;
3030
--card-shadow: rgba(0, 0, 0, 0.4);
3131
--link: #3273dc;
3232
--link-hover: #144aa2;

src/components/services/Generic.vue

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@
1919
<div class="media-content">
2020
<slot name="content">
2121
<p class="title">{{ item.name }}</p>
22+
<p v-if="item.quick" class="quicklinks">
23+
<a
24+
v-for="(link, linkIndex) in item.quick"
25+
:key="linkIndex"
26+
:style="`background-color:${link.color};`"
27+
:href="link.url"
28+
:target="link.target"
29+
rel="noreferrer"
30+
>
31+
<span v-if="item.icon"><i style="font-size: 12px" :class="['fa-fw', link.icon]"></i></span>
32+
{{ link.name }}
33+
</a>
34+
</p>
2235
<p v-if="item.subtitle" class="subtitle">
2336
{{ item.subtitle }}
2437
</p>
@@ -61,4 +74,23 @@ export default {
6174
object-fit: contain;
6275
}
6376
}
77+
78+
a[href=""] {
79+
pointer-events: none;
80+
cursor: default;
81+
}
82+
83+
.quicklinks {
84+
float: right;
85+
a {
86+
font-size: 0.75rem;
87+
padding: 3px 6px;
88+
margin-left: 6px;
89+
border-radius: 100px;
90+
background-color: var(--background);
91+
z-index: 9999;
92+
pointer-events: all;
93+
}
94+
}
95+
6496
</style>

0 commit comments

Comments
 (0)