This repository has been archived by the owner on Oct 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
213 lines (181 loc) · 7.67 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<title>Home Informations</title>
<style>
div.main {
width: 50%;
margin: auto;
display: block;
padding: 5px;
text-align: center;
font-family: "monospace";
}
table {
border: 1px solid black;
width: 100%;
color: blue;
cursor: pointer;
font-size: 10px;
}
div.info_text_box{
text-align: left;
font-size: 13px;
}
h2 {
font-family:"monospace"
font-size: 18px;
}
h2:hover {
color: #dd0612;
}
a {
color: black;
text-decoration: none;
}
a:hover{
text-decoration: none;
color: #951522;
}
.close-design {
color: #aaaaaa;
float: right;
font-size: 28px;
font-weight: bold;
}
.close:hover,
.close:focus {
color: #000;
text-decoration: none;
cursor: pointer;
}
.logo-file{
position:absolute;
margin-top:-1px;
margin-left:3px;
}
</style>
<script type="text/javascript" src="config.json"></script>
</head>
<body>
<script>
var left_icon = '<img src="http://pixsector.com/cache/81183b13/avcc910c4ee5888b858fe.png" height="20px" alt="Word Logo" class="">';
var word_icon = '<img src="https://upload.wikimedia.org/wikipedia/commons/4/48/Microsoft_Word_logo.png" height="20px" alt="Word Logo" class="">';
var excel_icon = '<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/72/Microsoft_Excel_Logo.svg/2000px-Microsoft_Excel_Logo.svg.png" height="20px" alt="Excel Logo" class="">';
var powerpoint_icon = '<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b0/Microsoft_PowerPoint_2013_logo.svg/2000px-Microsoft_PowerPoint_2013_logo.svg.png" height="20px" alt="PowerPoint Logo" class="">';
var pdf_icon = '<img src="https://cdn0.iconfinder.com/data/icons/flat-file-format/100/pdf-512.png" height="20px" alt="PDF Logo" class="pdf file icon">';
</script>
<div class="main">
<div class="selection_box">
<table>
<tr>
<td><a href="https://chaepy.net" target="_blank">Chaepy</a></td>
<td><a></a></td>
<td><a href="#exampleModal" data-toggle="modal" data-target="#exampleModal">Settings</a></td>
<td><a href="" target="_blank"></a><td>
</tr>
</table>
</div><br><br>
<h2>Home</h2>
<div class="info_text_box">
<script language="javascript" type="text/javascript">
//Write Headings
if(!data){
var data = {"Ampferl":{"Homepage":"https://ampferl.com/","About":"https://jonas.ampferl.com/","Chaepy SSO":"https://chaepy.net"},"Links":{"Github":"https://github.com/Ampferl","Twitter":"https://twitter.com/ChaepyDev"}};
}
for(obj of Object.keys(data)){
document.write("<h4>"+obj+"</h4>");
for(obj2 of Object.keys(data[obj])){
// Find Files
if(data[obj][obj2].includes(".pdf")){
var icon = pdf_icon + " ";
}else if(data[obj][obj2].includes(".pptx") || data[obj][obj2].includes(".ppt")){
var icon = powerpoint_icon + " ";
}else if(data[obj][obj2].includes(".docx") || data[obj][obj2].includes(".doc")){
var icon = word_icon + " ";
}else if(data[obj][obj2].includes(".xlsx") || data[obj][obj2].includes(".xls")){
var icon = excel_icon + " ";
}else{
var icon = "";
}
// ENd Find Files
document.write("<a href='" + data[obj][obj2] + "' class='show-cat'>" + left_icon + " " + icon + obj2 + "</a><br>");
}
}
</script>
</div>
</div>
<div class="footer" align="center">
© <span id="year">2018 - 2019</span> Ampferl
</div>
<div id="settings">
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="settings">Einstellungen</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="form-group">
<label for="createcat"></label>
<input type="text" class="form-control" id="createcat" placeholder="Kategorie Namen">
</div>
<button onclick="addcat()" class="btn btn-primary" style="background-color:#951522; border-color: white;">Hinzufügen</button>
<div id="categories">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Schließen</button>
<button onclick="downloadjson()" class="btn btn-primary" style="background-color:#951522; border-color: white;">Änderungen Herunterladen</button>
</div>
</div>
</div>
</div>
<br>
<a id="downloadAnchorElem" style="display:none;">Download</a><br><center>
<script language="javascript" type="text/javascript">
var json_obj = [];
var item = {};
function addcat() {
var cat = document.getElementById("createcat").value;
var cat2 = '"'+cat+'"';
var htmlcatcode = '<hr><div class="cat-' + cat + '"><h4>' + cat + '</h4><div class="container"><div class="row"><input type="text" class="form-control col-4" id="createsubcatname-'+cat+'" placeholder="Name"><input type="text" class="form-control col-8" id="createsubcatlink-'+cat+'" placeholder="Link" value="http://"></div></div><br><button onclick="addsubcat(\''+cat+'\')" class="btn btn-primary" style="background-color:#951522; border-color: white;">Hinzufügen</button><br><hr><div id="subcats-' + cat + '"></div></div><br>';
document.getElementById("categories").innerHTML += htmlcatcode;
item[cat] = {};
}
function addsubcat(catname){
var subcatname = document.getElementById("createsubcatname-"+catname).value;
var subcatlink = document.getElementById("createsubcatlink-"+catname).value;
var htmlcat2code = "<a href='"+subcatlink+"'>"+subcatname+"</a><br>";
document.getElementById("subcats-"+catname).innerHTML += htmlcat2code;
item[catname][subcatname] = subcatlink;
}
</script></center>
<script>
function downloadjson() {
json_obj.push(item);
console.log(json_obj);
var data1 = "data = ";
var data2 = ";";
var result = JSON.stringify(json_obj);
result = result.replace("[", "");
result = result.replace("]", "");
var dataStr = "data:text/json;charset=utf-8," + encodeURIComponent(data1 + result + data2);
var dlAnchorElem = document.getElementById('downloadAnchorElem');
dlAnchorElem.setAttribute("href", dataStr );
dlAnchorElem.setAttribute("download", "config.json");
dlAnchorElem.click();
}
</script>
</div>
<script>document.getElementById("year").innerHTML = new Date().getFullYear();</script>
</body>
</html>