summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen <jeroenpardon@users.noreply.github.com>2021-08-04 02:13:46 +0200
committerGitHub <noreply@github.com>2021-08-04 02:13:46 +0200
commitc93d1e1621a5479f77a571ed5564af10aa85b9bc (patch)
tree4f069c5b5fc8b58d0bb41b37ceb4bbdd15433e9d
parent65e44f029a5ba51320662cd8295b3565ce250ba0 (diff)
parent93b20aa5df56bcb6d983d3880bf6f4601a54bb7b (diff)
Merge pull request #18 from kimpenhaus/feature/optional-link-target
optional link target attribute
-rwxr-xr-xREADME.md29
-rwxr-xr-xapps.json2
-rwxr-xr-xindex.html16
-rwxr-xr-xlinks.json9
4 files changed, 30 insertions, 26 deletions
diff --git a/README.md b/README.md
index e4a918e..5ba434e 100755
--- a/README.md
+++ b/README.md
@@ -9,13 +9,13 @@
#### Prerequisites:
- Docker: [Linux](https://docs.docker.com/install/linux/docker-ce/debian/), [Mac](https://hub.docker.com/editions/community/docker-ce-desktop-mac), [Windows](https://hub.docker.com/editions/community/docker-ce-desktop-windows)
- - [Docker-compose](https://docs.docker.com/compose/install/)
+ - [Docker-compose](https://docs.docker.com/compose/install/)
#### Install:
- `git clone` this repository
- Build and bring up with `docker-compose up -d`
- - The page should be available at `http://localhost:4000`
+ - The page should be available at `http://localhost:4000`
To run at a different port open edit docker-compose.yml:
@@ -33,7 +33,7 @@ Add your apps by editing apps.json:
{
"apps" : [
{"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"}
]
}
@@ -47,29 +47,30 @@ Please note:
Add your bookmarks by editing links.json:
```
-{
- "bookmarks":[
- {
+{
+ "bookmarks":[
+ {
"category":"Category1",
- "links":[
- {
+ "links":[
+ {
"name":"Link1",
"url":"http://example.com"
},
- {
+ {
"name":"Link2",
- "url":"http://example.com"
+ "url":"http://example.com",
+ "target":"optionals"
}
]
},
- {
+ {
"category":"Category2",
- "links":[
- {
+ "links":[
+ {
"name":"Link1",
"url":"http://example.com"
},
- {
+ {
"name":"Link2",
"url":"http://example.com"
}
diff --git a/apps.json b/apps.json
index 9186d2d..8958e0e 100755
--- a/apps.json
+++ b/apps.json
@@ -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"},
diff --git a/index.html b/index.html
index 8e5a748..67d11ef 100755
--- a/index.html
+++ b/index.html
@@ -12,7 +12,7 @@
</head>
<body onload="loadFunctions()">
-
+
<section id="modal">
<div>
<header id="modal-header">
@@ -62,14 +62,14 @@
<a href="https://materialdesignicons.com/"><span class="iconify" data-icon="mdi-material-design"></a></span>
</header>
</div>
- </section>
+ </section>
<main id="container" class="fade">
<section id="search">
<input name="keywords" type="text" id="keywords" size="50" spellcheck="false" autofocus="true" onkeydown="handleKeyPress(event)">
</section>
-
+
<section id="header">
<h2 id="header_date"></h2>
<h1 id="header_greet"></h1>
@@ -85,11 +85,11 @@
<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>
- {{/apps}}
+ {{/apps}}
</div>
</script>
</section>
@@ -102,11 +102,11 @@
<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}}
- </div>
+ </div>
</script>
</section>
</main>
@@ -121,6 +121,6 @@
<script src="./assets/js/script.js" type="text/javascript"></script>
<script src="./assets/js/themer.js" type="text/javascript"></script>
<script src="./assets/js/search.js" type="text/javascript"></script>
-
+
</body>
</html>
diff --git a/links.json b/links.json
index 9c29431..f4b1272 100755
--- a/links.json
+++ b/links.json
@@ -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",