Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Dominik Nguyen
My Coding Projects
Commits
fcda5d36
Commit
fcda5d36
authored
Nov 29, 2021
by
BooDonky
Browse files
new html file created
parent
770f7b11
Changes
5
Hide whitespace changes
Inline
Side-by-side
Python Projects/Hostien Buyer/main.kv
View file @
fcda5d36
...
...
@@ -38,12 +38,4 @@
text: "Abbrechen"
Button:
text: "OK"
\ No newline at end of file
text: "OK"
\ No newline at end of file
Web Projects/Quiz/index.html
View file @
fcda5d36
<!DOCTYPE html>
<html>
<head>
<
script
src=
"script.js"
></script
>
<
style
src=
"style.css"
></style
>
<
title>
Question for Right Password
</title
>
<
title>
Quiz App
</title
>
<
meta
name=
"viewport"
content=
"width=Ddevice-width, initial-scale=1"
>
<
link
rel=
"stylesheet"
href=
"style.css"
>
</head>
<body>
<div
class=
"home-box"
>
<h3>
SICHERHEITSCHECK
</h3>
<p>
Hi, es werden jetzt einige Sicherheitsfragen abgefragt
<span
class=
"total-question"
></span></p>
<button
type=
"button"
class=
"btn"
>
Starten mit dem Sicherheitscheck
</buttor>
</div>
</body>
</html>
\ No newline at end of file
Web Projects/Quiz/script.js
View file @
fcda5d36
const
startButton
=
document
.
getElementById
(
'
start-btn
'
)
const
nextButton
=
document
.
getElementById
(
'
next-btn
'
)
const
questionContainerElement
=
document
.
getElementById
(
'
question-container
'
)
const
questionElement
=
document
.
getElementById
(
'
question
'
)
const
answerButtonsElement
=
document
.
getElementById
(
'
answer-buttons
'
)
let
currentQuestionIndex
startButton
.
addEventListener
(
'
click
'
,
startGame
)
nextButton
.
addEventListener
(
'
click
'
,
()
=>
{
currentQuestionIndex
++
setNextQuestion
()
})
function
startGame
()
{
startButton
.
classList
.
add
(
'
hide
'
)
currentQuestionIndex
=
0
questionContainerElement
.
classList
.
remove
(
'
hide
'
)
setNextQuestion
()
}
function
setNextQuestion
()
{
resetState
()
showQuestion
(
currentQuestionIndex
)
}
function
showQuestion
(
question
)
{
questionElement
.
innerText
=
question
.
question
question
.
answers
.
forEach
(
answer
=>
{
const
button
=
document
.
createElement
(
'
button
'
)
button
.
innerText
=
answer
.
text
button
.
classList
.
add
(
'
btn
'
)
if
(
answer
.
correct
)
{
button
.
dataset
.
correct
=
answer
.
correct
}
button
.
addEventListener
(
'
click
'
,
selectAnswer
)
answerButtonsElement
.
appendChild
(
button
)
})
}
function
resetState
()
{
clearStatusClass
(
document
.
body
)
nextButton
.
classList
.
add
(
'
hide
'
)
while
(
answerButtonsElement
.
firstChild
)
{
answerButtonsElement
.
removeChild
(
answerButtonsElement
.
firstChild
)
}
}
function
selectAnswer
(
e
)
{
const
selectedButton
=
e
.
target
const
correct
=
selectedButton
.
dataset
.
correct
setStatusClass
(
document
.
body
,
correct
)
Array
.
from
(
answerButtonsElement
.
children
).
forEach
(
button
=>
{
setStatusClass
(
button
,
button
.
dataset
.
correct
)
})
if
(
questions
.
length
>
currentQuestionIndex
+
1
)
{
nextButton
.
classList
.
remove
(
'
hide
'
)
}
else
{
startButton
.
innerText
=
'
Restart
'
startButton
.
classList
.
remove
(
'
hide
'
)
}
}
function
setStatusClass
(
element
,
correct
)
{
clearStatusClass
(
element
)
if
(
correct
)
{
element
.
classList
.
add
(
'
correct
'
)
}
else
{
element
.
classList
.
add
(
'
wrong
'
)
}
}
function
clearStatusClass
(
element
)
{
element
.
classList
.
remove
(
'
correct
'
)
element
.
classList
.
remove
(
'
wrong
'
)
}
const
questions
=
[
{
question
:
'
What is 2 + 2?
'
,
answers
:
[
{
text
:
'
4
'
,
correct
:
true
},
{
text
:
'
22
'
,
correct
:
false
}
]
},
{
question
:
'
Who is the best YouTuber?
'
,
answers
:
[
{
text
:
'
Web Dev Simplified
'
,
correct
:
true
},
{
text
:
'
Traversy Media
'
,
correct
:
true
},
{
text
:
'
Dev Ed
'
,
correct
:
true
},
{
text
:
'
Fun Fun Function
'
,
correct
:
true
}
]
},
{
question
:
'
Is web development fun?
'
,
answers
:
[
{
text
:
'
Kinda
'
,
correct
:
false
},
{
text
:
'
YES!!!
'
,
correct
:
true
},
{
text
:
'
Um no
'
,
correct
:
false
},
{
text
:
'
IDK
'
,
correct
:
false
}
]
},
{
question
:
'
What is 4 * 2?
'
,
answers
:
[
{
text
:
'
6
'
,
correct
:
false
},
{
text
:
'
8
'
,
correct
:
true
}
]
}
]
\ No newline at end of file
Web Projects/Quiz/style.css
View file @
fcda5d36
@import
url('https://fonts.googleapis.com/css2?family=Open+Sans:ital@1&display=swap')
;
body
{
margin
:
0
;
font-size
:
16px
;
background-color
:
#FFB6C1
;
font-family
:
'Open Sans'
,
sans-serif
;
font-weight
:
400
;
}
*
{
box-sizing
:
border-box
;
margin
:
0
;
padding
:
0
;
outline
:
none
;
}
.home-box
{
max-width
:
70%
;
background-color
:
#ffffff
;
margin
:
40px
auto
;
padding
:
30px
;
border-radius
:
10px
;
}
.home-box
h3
{
font-size
:
18px
;
color
:
#000000
;
margin-bottom
:
15px
;
Line-height
:
25px
;
}
.home-box
p
{
font-size
:
16px
;
margin-bottom
:
10px
;
Line-height
:
22px
;
color
:
#000000
;
font-weight
:
400
;
}
.home-box
p
span
{
font-weight
:
500
;
}
\ No newline at end of file
Web Projects/Quiz/webscript.py
deleted
100644 → 0
View file @
770f7b11
from
selenium
import
webdriver
driver
=
webdriver
.
Chrome
()
driver
.
get
(
""
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment