diff --git a/docs/configuration.md b/docs/configuration.md index 1c5a19f..0022c82 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -491,7 +491,6 @@ Placeholders: `{POST-ID}` - the ID of the post - ### Reddit Display a list of posts from a specific subreddit. @@ -682,11 +681,12 @@ You can hover over the "ERROR" text to view more information. Properties for each site: -| Name | Type | Required | -| ---- | ---- | -------- | -| title | string | yes | -| url | string | yes | -| icon | string | no | +| Name | Type | Required | Default | +| ---- | ---- | -------- | ------- | +| title | string | yes | | +| url | string | yes | | +| icon | string | no | | +| same-tab | boolean | no | false | `title` @@ -700,6 +700,10 @@ The URL which will be requested and its response will determine the status of th Optional URL to an image which will be used as the icon for the site. Can be an external URL or internal via [server configured assets](#assets-path). +`same-tab` + +Whether to open the link in the same or a new tab. + ### Releases Display a list of releases for specific repositories on Github. Draft releases and prereleases will not be shown. @@ -816,14 +820,39 @@ An array of groups which can optionally have a title and a custom color. | Name | Type | Required | Default | | ---- | ---- | -------- | ------- | | title | string | no | | -| color | HSL | no | the primary theme color | +| color | HSL | no | the primary color of the theme | | links | array | yes | | ###### Properties for each link -| Name | Type | Required | -| ---- | ---- | -------- | -| title | string | yes | -| url | string | yes | +| Name | Type | Required | Default | +| ---- | ---- | -------- | ------- | +| title | string | yes | | +| url | string | yes | | +| icon | string | no | | +| same-tab | boolean | no | false | +| hide-arrow | boolean | no | false | + +`icon` + +URL pointing to an image. You can also directly use [Simple Icons](https://simpleicons.org/) via a `si:` prefix: + +```yaml +icon: si:gmail +icon: si:youtube +icon: si:reddit +``` + +> [!WARNING] +> +> Simple Icons are loaded externally and are hosted on `cdnjs.cloudflare.com`, if you do not wish to depend on a 3rd party you are free to download the icons individually and host them locally. + +`same-tab` + +Whether to open the link in the same tab or a new one. + +`hide-arrow` + +Whether to hide the colored arrow on each link. ### Calendar Display a calendar. diff --git a/internal/assets/static/main.css b/internal/assets/static/main.css index 920e2a8..3008ee4 100644 --- a/internal/assets/static/main.css +++ b/internal/assets/static/main.css @@ -33,6 +33,7 @@ --color-widget-background: hsl(var(--color-widget-background-hsl-values)); --color-separator: hsl(var(--bghs), calc(var(--scheme) ((var(--scheme) var(--bgl)) + 4% * var(--cm)))); --color-widget-content-border: hsl(var(--bghs), calc(var(--scheme) (var(--scheme) var(--bgl) + 4%))); + --color-widget-background-highlight: hsl(var(--bghs), calc(var(--scheme) (var(--scheme) var(--bgl) + 4%))); --ths: var(--bgh), calc(var(--bgs) * var(--tsm)); --color-text-base: hsl(var(--ths), calc(var(--scheme) var(--cm) * 58%)); @@ -80,7 +81,7 @@ .visited-indicator:not(.text-truncate)::after, .visited-indicator.text-truncate::before, -.bookmarks-link::after { +.bookmarks-link:not(.bookmarks-link-no-arrow)::after { content: '↗'; margin-left: 0.5em; display: inline-block; @@ -590,10 +591,31 @@ body { color: var(--bookmarks-group-color); } -.bookmarks-link::after { +.bookmarks-group .bookmarks-link::after { color: var(--bookmarks-group-color); } +.bookmarks-icon-container { + margin-block: 0.1rem; + background-color: var(--color-widget-background-highlight); + border-radius: var(--border-radius); + padding: 0.5rem; +} + +.bookmarks-icon { + width: 20px; + height: 20px; + opacity: 0.8; +} + +.simple-icon { + opacity: 0.7; +} + +:root:not(.light-scheme) .simple-icon { + filter: invert(1); +} + .calendar-day { width: calc(100% / 7); text-align: center; diff --git a/internal/assets/templates/bookmarks.html b/internal/assets/templates/bookmarks.html index 92421e1..068ab4d 100644 --- a/internal/assets/templates/bookmarks.html +++ b/internal/assets/templates/bookmarks.html @@ -7,7 +7,14 @@ {{ if ne .Title "" }}
{{ .Title }}
{{ end }} diff --git a/internal/assets/templates/monitor.html b/internal/assets/templates/monitor.html index 602c334..fa97302 100644 --- a/internal/assets/templates/monitor.html +++ b/internal/assets/templates/monitor.html @@ -8,7 +8,7 @@ {{ end }}
- {{ .Title }} + {{ .Title }}