mirror of
https://github.com/daledavies/jump.git
synced 2026-07-06 01:48:49 +02:00
Issue #38: Add optional description to sites
This commit is contained in:
@@ -37,6 +37,7 @@ class Site {
|
||||
$this->newtab = isset($sitearray['newtab']) ? $sitearray['newtab'] : (isset($this->defaults['newtab']) ? $this->defaults['newtab'] : false);
|
||||
$this->iconname = $sitearray['icon'] ?? null;
|
||||
$this->tags = $sitearray['tags'] ?? $this->tags;
|
||||
$this->description = isset($sitearray['description']) ? $sitearray['description'] : $sitearray['name'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
{
|
||||
"name": "Github",
|
||||
"url" : "https://github.com/daledavies/jump",
|
||||
"description": "This is a test",
|
||||
"nofollow": false,
|
||||
"newtab": true
|
||||
},
|
||||
@@ -18,6 +19,7 @@
|
||||
{
|
||||
"name": "Bitwarden",
|
||||
"url" : "https://bitwarden.example.com",
|
||||
"description": "This is another test",
|
||||
"icon": "bitwarden.png",
|
||||
"tags": ["stuff"]
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{{# hassites}}
|
||||
<ul class="sites {{# altlayout}}alternate{{/ altlayout}}">
|
||||
{{# sites}}<li><a {{# newtab}}target="_blank"{{/ newtab}} rel="{{# nofollow}}nofollow {{/ nofollow}}{{# newtab}}noopener{{/ newtab}}" title="{{name}}" href="{{url}}">
|
||||
{{# sites}}<li><a {{# newtab}}target="_blank"{{/ newtab}} rel="{{# nofollow}}nofollow {{/ nofollow}}{{# newtab}}noopener{{/ newtab}}" title="{{description}}" href="{{url}}">
|
||||
<span class="icon">
|
||||
<img src="/api/icon.php?siteurl={{#urlencode}}{{url}}{{/urlencode}}">
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user