Merge pull request #18 from kimpenhaus/feature/optional-link-target

optional link target attribute
This commit is contained in:
Jeroen 2021-08-04 02:13:46 +02:00 committed by GitHub
commit c93d1e1621
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 30 additions and 26 deletions

View file

@ -33,7 +33,7 @@ Add your apps by editing apps.json:
{ {
"apps" : [ "apps" : [
{"name":"Name of app 1","url":"sub1.example.com","icon":"icon-name"}, {"name":"Name of app 1","url":"sub1.example.com","icon":"icon-name"},
{"name":"Name of app 2","url":"sub2.example.com","icon":"icon-name"} {"name":"Name of app 2","url":"sub2.example.com","icon":"icon-name","target":"optionals"}
] ]
} }
@ -58,7 +58,8 @@ Add your bookmarks by editing links.json:
}, },
{ {
"name":"Link2", "name":"Link2",
"url":"http://example.com" "url":"http://example.com",
"target":"optionals"
} }
] ]
}, },

View file

@ -1,6 +1,6 @@
{ {
"apps" : [ "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":"CloudCMD","url":"files.example.com","icon":"folder-multiple-outline"},
{"name":"Cockpit","url":"cp.example.com","icon":"airplane"}, {"name":"Cockpit","url":"cp.example.com","icon":"airplane"},
{"name":"Feedbin","url":"rss.example.com","icon":"rss"}, {"name":"Feedbin","url":"rss.example.com","icon":"rss"},

View file

@ -85,7 +85,7 @@
<span class="iconify icon" data-icon="mdi-{{icon}}"></span> <span class="iconify icon" data-icon="mdi-{{icon}}"></span>
</div> </div>
<div class="apps_text"> <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> <span id="app-address">{{url}}</span>
</div> </div>
</div> </div>
@ -102,7 +102,7 @@
<div id="links_item"> <div id="links_item">
<h4>{{category}}</h4> <h4>{{category}}</h4>
{{#links}} {{#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}} {{/links}}
</div> </div>
{{/bookmarks}} {{/bookmarks}}

View file

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