Added optional target attributes to handlbars template an apps/links collection

This commit is contained in:
Marcus Kimpenhaus 2021-07-12 08:59:43 +02:00
parent 244840732b
commit c53f3adff5
3 changed files with 15 additions and 12 deletions

View file

@ -1,6 +1,6 @@
{
"apps" : [
{"name":"Bazarr","url":"subs.example.com","icon":"message-video"},
{"name":"Bazarr","url":"subs.example.com","icon":"message-video", "target": "_blank"},
{"name":"CloudCMD","url":"files.example.com","icon":"folder-multiple-outline"},
{"name":"Cockpit","url":"cp.example.com","icon":"airplane"},
{"name":"Feedbin","url":"rss.example.com","icon":"rss"},

View file

@ -85,7 +85,7 @@
<span class="iconify icon" data-icon="mdi-{{icon}}"></span>
</div>
<div class="apps_text">
<a href="https://{{url}}">{{name}}</a>
<a href="https://{{url}}" {{#if target}}target="{{target}}"{{/if}} >{{name}}</a>
<span id="app-address">{{url}}</span>
</div>
</div>
@ -102,7 +102,7 @@
<div id="links_item">
<h4>{{category}}</h4>
{{#links}}
<a href="{{url}}" class="theme_color-border theme_text-select">{{name}}</a>
<a href="{{url}}" target="{{target}}" class="theme_color-border theme_text-select">{{name}}</a>
{{/links}}
</div>
{{/bookmarks}}

View file

@ -13,7 +13,8 @@
},
{
"name": "Slack",
"url": "https://slack.com/signin"
"url": "https://slack.com/signin",
"target": "_blank"
}
]
},
@ -22,11 +23,13 @@
"links": [
{
"name": "Box",
"url": "https://box.com"
"url": "https://box.com",
"target": "sui"
},
{
"name": "Dropbox",
"url": "https://dropbox.com"
"url": "https://dropbox.com",
"target": "sui"
},
{
"name": "Drive",