-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
78 lines (68 loc) · 1.42 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
<html>
<head>
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/app.js" type="text/javascript"></script>
<title>Category trees</title>
<style>
.cat-link {
color: blue;
cursor: hand;
}
.cat-link:hover {
text-decoration: underline;
}
/*
Tree structure using CSS:
http://stackoverflow.com/questions/14922247/how-to-get-a-tree-in-html-using-pure-css
*/
.tree, .tree ul{
font: normal normal 14px/20px Helvetica, Arial, sans-serif;
list-style-type: none;
margin-left: 0 0 0 10px;
padding: 0;
position: relative;
overflow:hidden;
}
.tree li{
margin: 0;
padding: 0 12px;
position: relative;
}
.tree li::before, .tree li::after{
content: '';
position: absolute;
left: 0;
}
/* horizontal line on inner list items */
.tree li::before{
border-top: 1px solid #999;
top: 10px;
width: 10px;
height: 0;
}
/* vertical line on list items */
.tree li:after{
border-left: 1px solid #999;
height: 100%;
width: 0px;
top: -10px;
}
/* lower line on list items from the first level because they don't have parents */
.tree > li::after{
top: 10px;
}
/* hide line from the last of the first level list items */
.tree > li:last-child::after{
display: none;
}
.tree ul:last-child li:last-child:after{
height:20px;
}
</style>
</head>
<body>
<h1>Categories</h1>
<h2 class="cat-link loaded" id="top">Category:Contents</h2>
<span id="cats"></span>
</body>
</html>