File tree Expand file tree Collapse file tree 7 files changed +71
-88
lines changed Expand file tree Collapse file tree 7 files changed +71
-88
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 3
3
< head >
4
4
< meta charset ="utf-8 ">
5
5
< meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6
- < title > selgnairt</ title >
7
- < style > body {padding : 0 ; margin : 0 ;} </ style >
8
- < script src ="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.3/p5.min.js "> </ script >
9
- < script src ="selgnairt.js "> </ script >
6
+ < title id ="title "> :: sqdorte ::</ title >
7
+ < link id ="style " rel ="stylesheet " type ="text/css " href ="style.css ">
8
+ < script id ="script " src ="menu.js "> </ script >
10
9
</ head >
11
10
< body >
11
+ < ul id ="ul ">
12
+ </ ul >
12
13
</ body >
13
14
</ html >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ window . onload = function ( ) {
2
+
3
+ arts = [ 'artegenerativafoda' , 'generartistic' , 'selgnairt' ] ;
4
+ ul = document . getElementById ( 'ul' ) ;
5
+
6
+ arts . forEach ( art => {
7
+ a = document . createElement ( 'A' ) ;
8
+ a . setAttribute ( 'onclick' , `loadArt('${ art } ')` )
9
+ a . innerHTML = art
10
+
11
+ li = document . createElement ( 'LI' ) ;
12
+ li . appendChild ( a ) ;
13
+
14
+ ul . appendChild ( li ) ;
15
+ } )
16
+ }
17
+
18
+ function injectScript ( src ) {
19
+ script = document . createElement ( 'script' ) ;
20
+ script . type = 'text/javascript' ;
21
+ script . async = true ;
22
+ script . src = src ;
23
+ document . head . appendChild ( script ) ;
24
+ }
25
+
26
+ function loadArt ( name ) {
27
+ document . title = name ;
28
+ document . body . removeChild ( document . getElementById ( 'ul' ) ) ;
29
+
30
+ document . getElementById ( 'style' ) . setAttribute ( 'href' , 'p5.css' ) ;
31
+
32
+ injectScript ( `${ name } .js` ) ;
33
+ injectScript ( 'https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.3/p5.min.js' ) ;
34
+
35
+ document . head . removeChild ( document . getElementById ( 'script' ) ) ;
36
+ }
Original file line number Diff line number Diff line change
1
+ html , body {
2
+ height : 100% ;
3
+ }
4
+
5
+ body {
6
+ padding : 0 ;
7
+ margin : 0 ;
8
+ display : flex;
9
+ justify-content : center;
10
+ align-items : center;
11
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ ul {
2
+ list-style : none;
3
+ text-align : center;
4
+ }
5
+
6
+ li {
7
+ padding-top : 30px ;
8
+ }
9
+
10
+ a {
11
+ outline : none;
12
+ color : # 4c4d4f ;
13
+ text-decoration : none;
14
+ }
15
+
16
+ a : hover {
17
+ font-weight : bold;
18
+ color : # 8fefb2 ;
19
+ }
You can’t perform that action at this time.
0 commit comments