@@ -28,7 +28,42 @@ <h1 style="font-family: 'Fira Code', monospace; cursor: pointer;" onclick="scrol
28
28
< i data-feather ="download " class ="icon "> </ i > Install
29
29
</ button >
30
30
</ div >
31
+
32
+ < button onclick ="openorclose(); " class =" filled-btn " id ="menu-button " style ="display: none ">
33
+ < i data-feather ="more-vertical " class ="icon "> </ i >
34
+ </ button >
35
+
36
+ < div class ="menu " style ="display: none " id ="menu ">
37
+ < button onclick ="openwin('https://github.com/TimMcCool/scratchattach/wiki/Documentation', '_blank'); " class ="">
38
+ </ i > Documentation
39
+ </ button >
40
+ < button onclick ="openwin('https://github.com/TimMcCool/scratchattach/', '_blank'); " class ="">
41
+ < i data-feather ="github " class ="icon "> </ i > Source
42
+ </ button >
43
+ < button onclick ="scrollToSection('installation'); " class ="filled-btn ">
44
+ < i data-feather ="download " class ="icon "> </ i > Install
45
+ </ button >
46
+ </ div >
31
47
</ header >
48
+
49
+ < script >
50
+ let open = 0 ;
51
+ function openorclose ( ) {
52
+ if ( open === 0 ) {
53
+ document . getElementById ( 'menu' ) . style = "display: flex;" ;
54
+ open = 1 ;
55
+ } else {
56
+ document . getElementById ( 'menu' ) . style = "display: none;" ;
57
+ open = 0 ;
58
+ }
59
+ }
60
+
61
+ function openwin ( win , target ) {
62
+ window . open ( win , target ) ;
63
+ }
64
+ </ script >
65
+
66
+
32
67
< div class ="background-container ">
33
68
< div class ="background-image "> </ div > <!-- New div for the background image -->
34
69
< section class ="section-1 " id ="intro ">
@@ -171,19 +206,19 @@ <h3>... and more!</h3>
171
206
< div class ="content ">
172
207
< h2 style ="padding-top:20px "> Getting started</ h2 >
173
208
< p style ="margin-bottom:20px "> Log in with your Scratch account:</ p >
174
- < div class ="expand-box " data-width ="700px " id ="logInCmd ">
209
+ < div class ="expand-box " data-width ="90% " id ="logInCmd ">
175
210
< p id ="expandText0 " data-text ="import scratchattach as sa " margin ="0 "> </ p >
176
211
< p id ="expandText1 " data-text ="session = sa.login('username', 'password') " margin ="0 "> </ p >
177
212
</ div >
178
213
< p style ="margin-bottom:20px "> Set and get cloud variables anytime:</ p >
179
- < div class ="expand-box " data-width ="700px " id ="cloudCmd ">
214
+ < div class ="expand-box " data-width ="90% " id ="cloudCmd ">
180
215
< p id ="expandText0 " data-text ="cloud = session.connect_cloud('project_id') "> </ p >
181
216
< p id ="expandText1 " data-text =" "> </ p >
182
217
< p id ="expandText2 " data-text ="cloud.set_var('variable', 'value') "> </ p >
183
218
< p id ="expandText3 " data-text ="cloud.get_var('variable') "> </ p >
184
219
</ div >
185
220
< p style ="margin-bottom:20px "> Follow users, love their projects and comment:</ p >
186
- < div class ="expand-box " data-width ="700px " id ="siteCmd ">
221
+ < div class ="expand-box " data-width ="90% " id ="siteCmd ">
187
222
< p id ="expandText0 " data-text ="user = session.connect_user('username') "> </ p >
188
223
< p id ="expandText1 " data-text ="user.follow() "> </ p >
189
224
< p id ="expandText2 " data-text =" "> </ p >
@@ -242,6 +277,8 @@ <h2 style="padding-top:20px">Community Projects</h2>
242
277
const section = document . getElementById ( sectionId ) ;
243
278
const elementPosition = section . getBoundingClientRect ( ) . top + window . scrollY ; // Add current scroll position
244
279
window . scrollTo ( { behavior : 'smooth' , top : elementPosition - 75 } ) ;
280
+ document . getElementById ( 'menu' ) . style = "display: none;" ;
281
+ open = 0 ;
245
282
}
246
283
247
284
</ script >
0 commit comments