Skip to content

Commit 14a500d

Browse files
committed
Initial prototype check-in. Format not nailed down yet, missing features, and at least one bug, but demo works for the most part.
1 parent 7dd720c commit 14a500d

7 files changed

+450
-0
lines changed

dakt-edit.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.edit-mode.box[draggable] {
2+
user-select: none;
3+
cursor: move;
4+
}

dakt-local-sample.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE HTML>
2+
<head>
3+
<meta charset="utf-8">
4+
<link rel="stylesheet" type="text/css" href="dakt.css">
5+
<script src="dakt-menudata-sample.js"></script>
6+
</head>
7+
<body>
8+
<div id="notifications-overlay" class="overlay">
9+
<ul></ul><!-- if there are no notifications, this must be kept completely empty of whitespace for CSS :empty selector to kick in -->
10+
</div>
11+
<script src="dakt.js"></script>
12+
</body>

dakt-local.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE HTML>
2+
<head>
3+
<meta charset="utf-8">
4+
<link rel="stylesheet" type="text/css" href="dakt.css">
5+
<script src="dakt-menudata.js"></script>
6+
</head>
7+
<body>
8+
<div id="notifications-overlay" class="overlay">
9+
<ul></ul><!-- if there are no notifications, this must be kept completely empty of whitespace for CSS :empty selector to kick in -->
10+
</div>
11+
<script src="dakt.js"></script>
12+
</body>

dakt-menudata-sample.js

Lines changed: 30 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dakt-template.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE HTML>
2+
<head>
3+
<meta charset="utf-8">
4+
<link rel="stylesheet" type="text/css" href="dakt.css">
5+
<script type="text/javascript">
6+
// inject your menudata here
7+
</script>
8+
</head>
9+
<body>
10+
<div id="notifications-overlay" class="overlay">
11+
<ul></ul><!-- if there are no notifications, this must be kept completely empty of whitespace for CSS :empty selector to kick in -->
12+
</div>
13+
<script src="dakt.js"></script>
14+
</body>

dakt.css

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
body, html {
2+
padding: 0;
3+
margin: 0;
4+
height: 100%;
5+
}
6+
.box {
7+
box-sizing: border-box;
8+
float: left;
9+
border: 1px solid black;
10+
background-size: 3em;
11+
background-repeat: no-repeat;
12+
background-position: center 75%;
13+
}
14+
body {
15+
counter-reset: links notifications;
16+
font-family: Verdana;
17+
}
18+
a.box:before {
19+
display:block;
20+
line-height: 0.9em;
21+
position:absolute;
22+
opacity: 0.08;
23+
color: black;
24+
z-index: -1;
25+
}
26+
a.box {
27+
text-align: center;
28+
padding-top: 1em;
29+
z-index: -2;
30+
}
31+
a.box:before {
32+
content: counter(links);
33+
counter-increment: links;
34+
}
35+
a.box:before {
36+
font-weight: bold;
37+
}
38+
a.box.c2:before { /* these, to be offset from center a bit, depend on the font size, which depends on r... */
39+
margin-left: 15vw;
40+
}
41+
a.box.c3:before {
42+
margin-left: 9vw;
43+
}
44+
a.box.r2:before {
45+
margin-top: calc(100vh / 10);
46+
font-size: calc(100vh / 3);
47+
}
48+
a.box.r3:before {
49+
margin-top: calc(100vh / 25);
50+
font-size: 25vh;
51+
}
52+
.full {
53+
background-color: lightyellow;
54+
}
55+
.full:hover {
56+
background-color: white;
57+
}
58+
.empty {
59+
background-color: lightgrey;
60+
}
61+
.c2 {
62+
width: 50%;
63+
}
64+
.c3 {
65+
width: calc(100%/3);
66+
}
67+
.r2 {
68+
height: calc(50% - 15px);
69+
}
70+
.r3 {
71+
height: calc(100%/3 - 10px);
72+
}
73+
#footer {
74+
height: 30px;
75+
display: table;
76+
clear: left;
77+
}
78+
#footer div {
79+
display: table-cell;
80+
text-align: center;
81+
vertical-align: middle;
82+
white-space: nowrap;
83+
padding: 0px 5px;
84+
}
85+
#footer div:hover {
86+
background-color:lightgreen;
87+
}
88+
#notifications {
89+
width: 100%;
90+
}
91+
#notifications:after {
92+
content: '(' counter(notifications) ')';
93+
}
94+
#notifications.nonzero:after {
95+
background-color: yellow;
96+
}
97+
.overlay {
98+
position: absolute;
99+
top: 0px;
100+
left: 0px;
101+
background-color: white;
102+
width: 100%;
103+
height: calc(100% - 30px);
104+
z-index: -3;
105+
}
106+
#notifications-overlay > ul > li:before {
107+
counter-increment: notifications;
108+
content: counter(notifications, none);
109+
}
110+
#notifications-overlay > ul:empty:after {
111+
content: 'No notifications, currently.';
112+
}

0 commit comments

Comments
 (0)