-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
241 lines (224 loc) · 6.22 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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
<!DOCTYPE html>
<html>
<head>
<title>TutCode - Learn and code on one page</title>
<meta charset="UTF-8" />
<link rel="stylesheet" href="src/css/styles.css" />
<script
src="https://kit.fontawesome.com/c8e4d183c2.js"
crossorigin="anonymous"
></script>
</head>
<body>
<script>
function openTab(e, tabName) {
let event = e;
// Declare all variables
var tabcontent, tablinks;
// Get all elements with class="tabcontent" and hide them
tabcontent = document.getElementsByClassName("tabcontent");
for (let i = 0; i < tabcontent.length - 1; i++) {
tabcontent[i].style.display = "none";
}
// Get all elements with class="tablinks" and remove the class "active"
tablinks = document.getElementsByClassName("tablinks");
for (let i = 0; i < tablinks.length; i++) {
tablinks[i].className = "tablinks";
}
// Show the current tab, and add a "tab-active" class to the button that opened the tab
document.getElementById(tabName).style.display = "block";
document.getElementById(tabName).className = "tabcontent tab-active";
event.target.className += " tablink-active";
}
document.getElementById("defaultTab").click();
</script>
<div id="top-menu">
<div id="logo">TUTCODE</div>
<div>
<button type="button" id="new-project" class="menu-btn">
<i class="fa fa-plus"></i>
New
</button>
<button type="button" id="download-project" class="menu-btn">
<i class="fa fa-download"></i>
Download
</button>
</div>
<div>
<a href="" class="github-link"><i class="fab fa-github"></i></a>
</div>
</div>
<div id="main">
<div id="left">
<div id="lesson">
<div class="collapsible">
<button
type="button"
id="collapsible"
class="bar-btn collapsible-text"
>
<i class="fa fa-caret-down"></i> Tutorial
</button>
<button type="button" id="add-link" class="bar-btn add-link">
<i class="fa fa-link"></i>
</button>
</div>
<!-- Section to website or youtube video link-->
<div id="enter-link">
<h4>Tutorial Setting</h4>
<div>
<p>Enter a link to a youtube video or tutorial article</p>
<textarea id="link-box">
https://www.youtube.com/watch?v=cwC1qdPWBKo</textarea
>
<button id="link-done">Done</button>
</div>
</div>
<div id="embed">
<div id="embed-prompt" class="embed-option embed-active">
Enter a video or tutorial article url
</div>
<iframe id="embed-content" class="embed-option" src="about:blank">
</iframe>
</div>
</div>
<!-- Code editors -->
<div id="code-tabs">
<div class="tab" id="tabs">
<button
class="tablinks tab-active"
onclick="e(event, 'html')"
id="defaultTab"
>
HTML
</button>
<button class="tablinks" onclick="e(event, 'css')">
CSS
</button>
<button class="tablinks" onclick="e(event, 'javascript')">
JavaScript
</button>
<button class="tablinks" id="run">
<i class="fa fa-play"></i>
</button>
</div>
<!-- Code area -->
<div id="html" class="tabcontent" style="display: block">
<textarea class="language-html editor" id="html-editor">
<!--HTML seed code -->
<div class="card">
<div class="card-image"></div>
<div class="card-text">
<span class="date">4 days ago</span>
<h2>Post One</h2>
<p>Lorem ipsum dolor sit amet consectetur, Ducimus, repudiandae temporibus omnis illum maxime quod deserunt eligendi dolor</p>
</div>
<div class="card-stats">
<div class="stat">
<div class="value">4<sup>m</sup></div>
<div class="type">read</div>
</div>
<div class="stat border">
<div class="value">5123</div>
<div class="type">views</div>
</div>
<div class="stat">
<div class="value">32</div>
<div class="type">comments</div>
</div>
</div>
</div>
</textarea
>
</div>
<div id="css" class="tabcontent">
<textarea class="language-css editor" id="css-editor">
/* CSS seed code */
.card {
display: grid;
width: 300px;
grid-template-rows: 210px 210px 80px;
grid-template-areas: "image" "text" "stats";
border-radius: 18px;
background: white;
box-shadow: 5px 5px 15px rgba(0,0,0,0.9);
font-family: roboto;
text-align: center;
margin: auto;
margin-top: 20%;
}
.card-image {
grid-area: image;
}
.card-text {
grid-area: text;
}
.card-stats {
grid-area: stats;
}
.card-image {
grid-area: image;
background: url("https://i.stack.imgur.com/y9DpT.jpg");
border-top-left-radius: 15px;
border-top-right-radius: 15px;
background-size: cover;
}
.card-text {
grid-area: text;
margin: 25px;
}
.card-text .date {
color: rgb(255, 7, 110);
font-size:13px;
}
.card-text p {
color: grey;
font-size:15px;
font-weight: 300;
}
.card-text h2 {
margin-top:0px;
font-size:28px;
}
.card-stats {
grid-area: stats;
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: 1fr;
border-bottom-left-radius: 15px;
border-bottom-right-radius: 15px;
background: rgb(255, 7, 110);
}
.card-stats .stat {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
color: white;
padding:10px;
}
</textarea
>
</div>
<div id="javascript" class="tabcontent">
<textarea id="js-editor" class="editor language-js">
// JavaScript code here
</textarea
>
</div>
</div>
</div>
<div id="right">
<!-- Rendered code is shown here -->
<div id="renderer">
<div id="render-content">
<iframe id="iframe"></iframe>
</div>
</div>
</div>
</div>
<!--Using JQuery-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js"></script>
<script src="src/js/index.js"></script>
</body>
</html>