-
Notifications
You must be signed in to change notification settings - Fork 2
/
tutorial.html
210 lines (135 loc) · 7.39 KB
/
tutorial.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>EE250</title>
<link href="https://unpkg.com/bonsai.css@latest/dist/bonsai.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://unpkg.com/balloon-css/balloon.min.css">
<link href='assets/fontawesome-free-5.15.1-web/css/all.min.css' rel='stylesheet'>
<link rel="stylesheet" type="text/css" href="assets/asciinema-player.css" />
<link href='assets/ee250/mddoc.css' rel='stylesheet'>
<link href='assets/ee250/common.css' rel='stylesheet'>
<script>
</script>
</head>
<body>
<div class='container' style='--d:grid; --gtr: 2em 1fr 2em; --h:100vh; --w:vw; --jc:center; --ofy:visible' >
<div class='header' style='--ff:monospace; --bg:inherit; --ta:center; --c:powderblue; --tt: uppercase; --weight:bold; --bb: dotted gray 1px;'>
USC EE250
</div>
<div style='--d:grid; --gtc: repeat(2,1fr); --gar:1fr; --bb:dotted seagreen 1px; max-height:inherit; --ofy:auto'>
<!--MAX-CONTENT vs MIN-CONTENT -> https://stackoverflow.com/questions/51285308/how-do-min-content-and-max-content-work -->
<div style='--bg:inherit; --d:grid; --gtr: max-content 3em 3em; --ofy:auto'>
<!--LEFT COLUMN TOP ROW-->
<asciinema-player preload speed='1' theme='solarized-dark' font-size='small' src='' style='--mt:0.5em; --ofx:auto'></asciinema-player>
<!--LEFT COLUMN MIDDLE ROW-->
<div id='termcontrolbutton' style='--ta:center;--d:grid; --gtc: 20% 20% 20% 20%; --gg:1em; --jc:center; --c:lightseagreen;'>
<div data-balloon-pos='up' aria-label='play/pause' title='play/pause' v-on:click='toggle'>
<i :class="{fa:true, 'fa-pause':playing, 'fa-play':!playing}"></i>
</div>
<div data-balloon-pos='up' aria-label='current playback position' title='current playback position'>{{Number.parseFloat(playbackposition).toFixed(1)}}s</div>
<div>
<a data-balloon-pos='up' aria-label='player control keybindings' title='player control keybindings' target='blank' href='https://github.com/asciinema/asciinema-player#keyboard-shortcuts' style='--c:lightseagreen'>
<i class="fas fa-keyboard"></i>
</a>
</div>
<div id='asciinemacomment' data-clipboard-text='[email protected]: Hello World' data-balloon-length="medium" aria-label='Copy the tag and paste on the gist to add your comment' data-balloon-pos='up'><i class='fa fa-copy'></i></div>
</div>
<!--LEFT COLUMN BOTTOM ROW-->
<div id='asciinemasearch' style='--d:grid; --gtr: auto auto;'>
<div style='--d:flex'>
<input type='text' v-model='searchterm' v-on:keyup.enter='search' style='--pl:0.5em' placeholder="Search Playback [Enter]"/>
</div>
<div style='--ml:1em; --d:flex; flex-flow: row wrap; --jc:center; --ac:center; grid-auto-flow: column; --gac:auto; color:fuchsia; --h:100%; --va:baseline'>
<div v-for='s in results' v-on:click='seek' class='hoverpointer' style='display:flex;align-items:center; --ml:0.2em; --mr:0.2em; --h:auto; --va:middle; --ac:center; --jc:center; --td:underline'> {{s}}</div>
</div>
</div>
</div>
<!--RIGHT COLUMN-->
<!--overflow auto is same as scroll but auto only puts the scroll bar when necessary, scroll puts it always | already set for .mddoc in mddoc.css-->
<div class='mddoc' style='--bl:dotted seagreen 1px; --c:lightseagreen; --maxh:inherit;'></div>
</div>
<!--<div style='--d:grid; --gtc: 1fr 1fr'>
<div style=''>
</div>
<div style=''>
</div>
</div>-->
<div class='footer' id='ACKS' style=" --c: gray; --weight: bold; --ff:monospace; --bt:dotted seagreen 1px" >
<a style='--td:none' target='blank' href='https://usc.edu'> University of Southern California </a>
|
<a style='--td:none' href='https://viterbischool.usc.edu/' target='blank'> USC Viterbi </a>
|
<a style='--td:none' href='https://bytes.usc.edu/ee250/' target='blank'> EE250 </a>
<!-- | ACKS:
<a style='--td:none' v-for='(val,idx) in acks' :href='val' target='blank'>
{{idx}}
</a>-->
</div>
</div>
</body>
<script src="assets/asciinema-player.js"></script>
<script src='https://cdn.jsdelivr.net/npm/[email protected]/umbrella.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/marked/1.2.7/marked.min.js'></script>
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-yaml/4.0.0/js-yaml.min.js"></script>
<link rel="stylesheet"
href="//unpkg.com/@highlightjs/[email protected]/styles/night-owl.min.css">
<script src="//unpkg.com/@highlightjs/[email protected]/highlight.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script src="https://unpkg.com/clipboard@2/dist/clipboard.min.js"></script>
<script src='assets/ee250/common.js'></script>
<script src='assets/ee250/terminalplayer.js'></script>
<script src='assets/ee250/mddoc.js'></script>
<script>
window.DOCFOLDER = get_params().folder
//console.log(window.DOCFOLDER)
terminalplayer_set_source(`${DOCFOLDER}/demo.cast`)
console.log(window.DOCFOLDER)
</script>
<script>
mddoc_fill(`${DOCFOLDER}/doc.md`,'.mddoc').then((fmmd)=>{
fm=fmmd[0];
//fill title header
if(typeof(fm)=='object')
{
u('.header').html(fm.title)
}
//init highlightjs
hljs.initHighlighting();
window.MDDOC_FM = fm;
});
var termsearch_typed = new Typed('#asciinemasearch input',{
startDelay: 2000,
strings:['search the terminal', 'type your search word', 'and hit enter',''],
typeSpeed: 20,
backSpeed: 10,
backDelay: 1000,
smartBackspace: true,
})
</script>
<script>
configure_site();
//replace/update the site header and title by folder instead of from the site config.yml
u('.header').html(DOCFOLDER.toUpperCase())
u('title').html(`EE250 - ${DOCFOLDER.toUpperCase()}`);
</script>
<script>
var clipboard = new ClipboardJS('#asciinemacomment');
clipboard.on('success', function(e) {
console.info('Action:', e.action);
console.info('Text:', e.text);
console.info('Trigger:', e.trigger);
btn = u('#asciinemacomment')
arialabel = btn.attr('aria-label'); //save
btn.attr('aria-label','Copied');
setTimeout(()=>btn.attr('aria-label',arialabel),1000);
window.open(window.SITECONFIG.gists.lab_comments)
e.clearSelection();
});
clipboard.on('error', function(e) {
console.error('Action:', e.action);
console.error('Trigger:', e.trigger);
})
</script>