189 lines
5.0 KiB
Go
189 lines
5.0 KiB
Go
package main
|
|
|
|
import "sort"
|
|
|
|
var (
|
|
Bookmarks = []Bookmark{
|
|
{
|
|
Title: "DuckDuckGo",
|
|
Image: "https://duckduckgo.com/assets/logo_homepage.alt.v108.svg",
|
|
Link: "https://duckduckgo.com/",
|
|
Color: "#e37151",
|
|
},
|
|
{
|
|
Title: "Cloud",
|
|
Image: "https://cloud.tordarus.net/svg/core/logo/logo?color=ffffff&v=1",
|
|
Link: "https://cloud.tordarus.net/",
|
|
Color: "#007ec2",
|
|
},
|
|
{
|
|
Title: "Torrents",
|
|
Image: "/transmission.png",
|
|
Link: "https://torrents.tordarus.net/",
|
|
Color: "#e7402c",
|
|
},
|
|
{
|
|
Title: "Adblock",
|
|
Image: "/pihole.svg",
|
|
Link: "https://adblock.tordarus.net/",
|
|
Color: "#272c30",
|
|
},
|
|
{
|
|
Title: "Postbank",
|
|
Image: "https://wintouch.de/wp-content/uploads/2014/06/Postbank-Icon.png",
|
|
Link: "https://meine.postbank.de/#/login",
|
|
Color: "#ffcc00",
|
|
},
|
|
{
|
|
Title: "DKB",
|
|
Image: "https://vdiv-sa.de/wp-content/uploads/2016/08/DKB_AG_web_RGB.jpg",
|
|
Link: "https://www.dkb.de/",
|
|
Color: "#ffffff",
|
|
},
|
|
{
|
|
Title: "Finanzen",
|
|
Image: "https://docs.firefly-iii.org/img/logo.png",
|
|
Link: "https://finance.tordarus.net",
|
|
Color: "#ffffff",
|
|
ImageSize: "cover",
|
|
IconPadding: "0em",
|
|
},
|
|
{
|
|
Title: "YouTube",
|
|
Image: "https://upload.wikimedia.org/wikipedia/commons/thumb/4/42/YouTube_light_icon_%282017%29.svg/1280px-YouTube_light_icon_%282017%29.svg.png",
|
|
Color: "#ff0000",
|
|
Link: "https://www.youtube.com/",
|
|
IconPadding: "1.5em",
|
|
},
|
|
{
|
|
Title: "Netflix",
|
|
Image: "https://1000logos.net/wp-content/uploads/2017/05/emblem-Netflix.jpg",
|
|
Color: "#000000",
|
|
Link: "https://www.netflix.com/",
|
|
},
|
|
{
|
|
Title: "Jisho",
|
|
Image: "https://assets.jisho.org/assets/jisho-logo-v4@2x-7330091c079b9dd59601401b052b52e103978221c8fb6f5e22406d871fcc746a.png",
|
|
Link: "https://jisho.org/",
|
|
Color: "#ffffff",
|
|
},
|
|
{
|
|
Title: "Wadoku",
|
|
Image: "https://www.wadoku.de/img/wadoku_logo.svg",
|
|
Link: "https://www.wadoku.de/",
|
|
Color: "#ffffff",
|
|
},
|
|
{
|
|
Title: "Übersetzer",
|
|
Image: "https://tools.avans.nl/tools/image/wZkdyaMblN.jpg",
|
|
Link: "https://www.deepl.com/translator",
|
|
Color: "#042b48",
|
|
ImageSize: "cover",
|
|
IconPadding: "0em",
|
|
},
|
|
{
|
|
Title: "WaniKani",
|
|
Image: "https://assets.wanikani.com/assets/logo--retro-colors-b79775af8773b5a416e4ec3fae02e62d391b7e88e57f9fe0c2e4997a3383b002.png",
|
|
Link: "https://www.wanikani.com/",
|
|
Color: "#ffffff",
|
|
},
|
|
{
|
|
Title: "Passwörter",
|
|
Image: "https://raw.githubusercontent.com/dani-garcia/vaultwarden/main/resources/vaultwarden-logo-white.svg",
|
|
Link: "https://pw.tordarus.net",
|
|
Color: "#175ddc",
|
|
},
|
|
{
|
|
Title: "Projekte",
|
|
Image: "https://cdn.icon-icons.com/icons2/2407/PNG/512/gitea_icon_146173.png", //"https://git.tordarus.net/assets/img/logo.svg",
|
|
Link: "https://git.tordarus.net",
|
|
Color: "#609926",
|
|
ImageSize: "cover",
|
|
IconPadding: "0em",
|
|
},
|
|
{
|
|
Title: "Regexr",
|
|
Image: "https://raw.githubusercontent.com/gskinner/regexr/master/dev/icons/RegExr.svg",
|
|
Link: "https://regex.tordarus.net",
|
|
Color: "#101112",
|
|
ImageSize: "contain",
|
|
IconPadding: "0em",
|
|
},
|
|
{
|
|
Title: "Wikipedia",
|
|
Image: "https://upload.wikimedia.org/wikipedia/commons/8/80/Wikipedia-logo-v2.svg",
|
|
Link: "https://www.wikipedia.org/",
|
|
Color: "#ffffff",
|
|
},
|
|
{
|
|
Title: "Reddit",
|
|
Image: "https://www.redditinc.com/assets/images/site/reddit-logo.png",
|
|
Link: "https://www.reddit.com/",
|
|
Color: "#ff4300",
|
|
ImageSize: "cover",
|
|
IconPadding: "0em",
|
|
},
|
|
{
|
|
Title: "Tagesschau",
|
|
Image: "https://m47ch.com/wp-content/uploads/2010/12/Tagesschau.png",
|
|
Link: "https://www.tagesschau.de/",
|
|
Color: "#003f8c",
|
|
},
|
|
{
|
|
Title: "Golem",
|
|
Image: "https://www.golem.de/staticrl/images/golem-logo-opt2.svg",
|
|
Link: "https://www.golem.de/",
|
|
Color: "#000000",
|
|
},
|
|
{
|
|
Title: "Comico",
|
|
Image: "https://play-lh.googleusercontent.com/xZ5bfg-XfyEmM1641bXduE27w44OmyWeVspg626wRYF0ejAgZAvsRKP4sECblfmnpg=w512",
|
|
Link: "https://comico.jp/",
|
|
Color: "#f40000",
|
|
ImageSize: "cover",
|
|
IconPadding: "0em",
|
|
},
|
|
{
|
|
Title: "Manganelo",
|
|
Image: "https://manganato.com/themes/hm/images/logo.png",
|
|
Link: "https://manganato.com/",
|
|
Color: "#ffffff",
|
|
ImageSize: "contain",
|
|
IconPadding: "0em",
|
|
},
|
|
{
|
|
Title: "Manga List",
|
|
Image: "https://www.firstcomicsnews.com/wp-content/uploads/2020/09/manga-logo.png",
|
|
Link: "https://manga.tordarus.net/",
|
|
Color: "#be151b",
|
|
},
|
|
}
|
|
)
|
|
|
|
type Bookmark struct {
|
|
Title string
|
|
Image string
|
|
ImageSize string
|
|
IconPadding string
|
|
Color string
|
|
Link string
|
|
HideBorder bool
|
|
Order int
|
|
}
|
|
|
|
func ParseBookmarks() {
|
|
// set default values
|
|
for i := range Bookmarks {
|
|
if Bookmarks[i].Color == "" {
|
|
Bookmarks[i].Color = DefaultSettings.Background
|
|
}
|
|
if Bookmarks[i].ImageSize == "" {
|
|
Bookmarks[i].ImageSize = "contain"
|
|
}
|
|
}
|
|
|
|
sort.SliceStable(Bookmarks, func(i, j int) bool {
|
|
return Bookmarks[i].Order < Bookmarks[j].Order
|
|
})
|
|
}
|