-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
150 lines (134 loc) · 3.46 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
<html>
<head>
<script>
function showChallenge(target, path) {
// Not bothering to support IE11 etc.
document
.querySelectorAll('.challenge-selector')
.forEach(e => e.classList.remove('active'));
target.classList.add('active');
document.querySelector('iframe').setAttribute('src', path);
}
</script>
<style>
body {
height: 100%;
width: 100%;
font-family: Impact, Charcoal, sans-serif;
margin: 0;
display: flex;
align-items: center;
flex-flow: column;
background: #e4e4e0;
color: white;
}
.header {
min-height: 82px;
max-height: 82px;
background: #212120;
width: 100%;
display: flex;
justify-content: center;
z-index: 10;
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.32);
}
.challenge-container {
flex: 1 1 auto;
width: 100%;
display: flex;
flex-direction: row;
overflow: hidden;
}
.challenge-list {
display: flex;
flex-direction: column;
width: 100%;
box-sizing: border-box;
height: 100%;
width: 300px;
direction: rtl;
margin-right: -24px;
}
.challenge-list-content {
padding-right: 24px;
background: linear-gradient(45deg, #242424, #464646);
display: flex;
flex-direction: column;
height: 100%;
overflow-y: auto;
background-clip: content-box;
}
.challenge-selector {
font-size: 1.5em;
font-family: Impact, Charcoal, sans-serif;
color: #e4e4e0;
background: none;
border: none;
cursor: pointer;
margin: 16px;
display: flex;
position: relative;
overflow-x: visible;
flex-direction: row-reverse;
}
.challenge-selector:focus {
outline: none;
}
.challenge-selector>* {
z-index: 1;
color: white;
transition: color 0.3s ease-in-out;
}
.challenge-selector:before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 2px;
height: 100%;
transition: width 0.3s ease-in-out, opacity 0.3s ease-in-out;
background: #dcedc8;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
opacity: 0;
}
.challenge-selector:hover:before,
.challenge-selector:focus:before {
opacity: 1;
transition: width 0.0s ease-in-out;
}
.challenge-selector.active>* {
color: #212120;
}
.challenge-selector.active:before {
transition: width 0.3s ease-in-out, opacity 0.3s ease-in-out;
width: 110%;
opacity: 1;
}
.challenge {
flex: 1 1 auto;
border: none;
}
</style>
</head>
<body>
<div class="header">
<h1>Dribbble Challenges</h1>
</div>
<div class="challenge-container">
<div class="challenge-list">
<div class="challenge-list-content">
<button class="challenge-selector" onclick="showChallenge(this, './cycle-bar/index.html')">
<span>Cycle Bar</span>
</button>
<button class="challenge-selector" onclick="showChallenge(this, './personal-finance-app/index.html')">
<span>Personal Finance App</span>
</button>
<button class="challenge-selector" onclick="showChallenge(this, './hello-dribbble/index.html')">
<span>Hello Dribbble</span>
</button>
</div>
</div>
<iframe class="challenge" src=""></iframe>
</div>
</body>
</html>