Skip to content

Commit fb19ab6

Browse files
authored
Merge pull request #71 from xpquiz/develop
v1.5.0
2 parents f6b3ce8 + 2824d12 commit fb19ab6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1062
-165
lines changed

db.json

Lines changed: 147 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,106 @@
11
{
22
"theTriviaApi": [
33
{
4-
"category": "society_and_culture",
5-
"id": "622a1c367cc59eab6f950408",
6-
"correctAnswer": "Rosa Parks",
4+
"category": "sport_and_leisure",
5+
"id": "62417da50f96c4efe8d773db",
6+
"correctAnswer": "San Francisco 49ers",
77
"incorrectAnswers": [
8-
"Angela Davis",
9-
"Dorothy Cotton",
10-
"Fanny Lou Hamer"
8+
"San Francisco Jaguars",
9+
"San Francisco Pistons",
10+
"San Francisco Predators"
1111
],
1212
"question": {
13-
"text": "Which civil right activist is famous for refusing to give up her seat on a bus to make way for a white person?"
13+
"text": "Which of these is an American Football team based in San Francisco?"
1414
},
1515
"tags": [
16-
"general_knowledge",
17-
"people",
18-
"society_and_culture"
16+
"sport"
1917
],
2018
"type": "text_choice",
2119
"difficulty": "medium",
2220
"regions": [],
2321
"isNiche": false
22+
},
23+
{
24+
"category": "history",
25+
"id": "622a1c367cc59eab6f9503ac",
26+
"correctAnswer": "Germany",
27+
"incorrectAnswers": [
28+
"Switzerland",
29+
"Denmark",
30+
"France"
31+
],
32+
"question": {
33+
"text": "Which country was first to operate an old age pension scheme?"
34+
},
35+
"tags": [
36+
"history"
37+
],
38+
"type": "text_choice",
39+
"difficulty": "hard",
40+
"regions": [],
41+
"isNiche": false
42+
},
43+
{
44+
"category": "arts_and_literature",
45+
"id": "649b4f4f828109028d236251",
46+
"correctAnswer": "A Spider",
47+
"incorrectAnswers": [
48+
"A Pig",
49+
"A Sheep",
50+
"A Horse"
51+
],
52+
"question": {
53+
"text": "In E.B. White's classic children's book \"Charlotte's Web\", what kind of animal is Charlotte?"
54+
},
55+
"tags": [
56+
"animals",
57+
"childrens_literature",
58+
"arts_and_literature",
59+
"literature"
60+
],
61+
"type": "text_choice",
62+
"difficulty": "easy",
63+
"regions": [],
64+
"isNiche": false
2465
}
2566
],
2667
"openTriviaDb": {
2768
"response_code": 0,
2869
"results": [
2970
{
30-
"type": "Ym9vbGVhbg==",
71+
"type": "bXVsdGlwbGU=",
72+
"difficulty": "bWVkaXVt",
73+
"category": "SGlzdG9yeQ==",
74+
"question": "V2hlbiBkaWQgdGhlIENyaXNpcyBvZiB0aGUgVGhpcmQgQ2VudHVyeSBiZWdpbj8=",
75+
"correct_answer": "MjM1IEFE",
76+
"incorrect_answers": [
77+
"MjM1IEJD",
78+
"MjQyIEFE",
79+
"MjEwIEFE"
80+
]
81+
},
82+
{
83+
"type": "bXVsdGlwbGU=",
84+
"difficulty": "bWVkaXVt",
85+
"category": "RW50ZXJ0YWlubWVudDogVmlkZW8gR2FtZXM=",
86+
"question": "V2hpY2ggb2YgdGhlc2UgQ291bnRlci1TdHJpa2UgbWFwcyBpcyBhIGJvbWIgZGVmdXNlIHNjZW5hcmlvPw==",
87+
"correct_answer": "UHJvZGlneQ==",
88+
"incorrect_answers": [
89+
"NzQ3",
90+
"SGF2YW5h",
91+
"T2lscmln"
92+
]
93+
},
94+
{
95+
"type": "bXVsdGlwbGU=",
3196
"difficulty": "bWVkaXVt",
32-
"category": "RW50ZXJ0YWlubWVudDogSmFwYW5lc2UgQW5pbWUgJiBNYW5nYQ==",
33-
"question": "VGhlIGFuaW1hdGVkIGZpbG0gIlNwaXJpdGVkIEF3YXkiIHdvbiB0aGUgQWNhZGVteSBBd2FyZCBmb3IgQmVzdCBBbmltYXRlZCBGZWF0dXJlIGF0IHRoZSA3NXRoIEFjYWRlbXkgQXdhcmRzIGluIDIwMDMu",
34-
"correct_answer": "VHJ1ZQ==",
97+
"category": "RW50ZXJ0YWlubWVudDogVmlkZW8gR2FtZXM=",
98+
"question": "V2hhdCBpcyB0aGUgd29ybGQncyBmaXJzdCB2aWRlbyBnYW1lIGNvbnNvbGU/",
99+
"correct_answer": "TWFnbmF2b3ggT2R5c3NleQ==",
35100
"incorrect_answers": [
36-
"RmFsc2U="
101+
"Q29sZWNvIFRlbHN0YXI=",
102+
"TmludGVuZG8gQ29sb3IgVFYgR2FtZQ==",
103+
"QXRhcmkgMjYwMA=="
37104
]
38105
}
39106
]
@@ -70,6 +137,71 @@
70137
],
71138
"category": "Code",
72139
"difficulty": "Easy"
140+
},
141+
{
142+
"id": 1,
143+
"question": "How to delete a directory in Linux?",
144+
"description": "delete folder",
145+
"answers": {
146+
"answer_a": "ls",
147+
"answer_b": "delete",
148+
"answer_c": "remove",
149+
"answer_d": "rmdir",
150+
"answer_e": null,
151+
"answer_f": null
152+
},
153+
"multiple_correct_answers": "false",
154+
"correct_answers": {
155+
"answer_a_correct": "false",
156+
"answer_b_correct": "false",
157+
"answer_c_correct": "false",
158+
"answer_d_correct": "true",
159+
"answer_e_correct": "false",
160+
"answer_f_correct": "false"
161+
},
162+
"explanation": "rmdir deletes an empty directory",
163+
"tip": null,
164+
"tags": [],
165+
"category": "linux",
166+
"difficulty": "Easy"
167+
},
168+
{
169+
"id": 3,
170+
"question": "How to check the current disk usage on Linux?",
171+
"description": "check current disk usage",
172+
"answers": {
173+
"answer_a": "df",
174+
"answer_b": "usage",
175+
"answer_c": "uptime",
176+
"answer_d": "free",
177+
"answer_e": null,
178+
"answer_f": null
179+
},
180+
"multiple_correct_answers": "false",
181+
"correct_answers": {
182+
"answer_a_correct": "true",
183+
"answer_b_correct": "false",
184+
"answer_c_correct": "false",
185+
"answer_d_correct": "false",
186+
"answer_e_correct": "false",
187+
"answer_f_correct": "false"
188+
},
189+
"correct_answer": "answer_a",
190+
"explanation": "df shows you the current disk usage",
191+
"tip": "df",
192+
"tags": [
193+
{
194+
"name": "Linux"
195+
},
196+
{
197+
"name": "BASH"
198+
},
199+
{
200+
"name": "cmd"
201+
}
202+
],
203+
"category": "uncategorized",
204+
"difficulty": "easy"
73205
}
74206
]
75207
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "xpquiz.github.io",
3-
"version": "1.4.1",
3+
"version": "1.5.0",
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve",
Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,59 @@
11
<div class="window">
22
<app-window-title-bar iconPath="about.png" title="About XPQuiz"></app-window-title-bar>
33
<div class="window-body">
4-
<label><b>XPQuiz</b>&nbsp;- Version 1.4.2</label>
4+
<label><b>XPQuiz</b>&nbsp;- Version 1.5.0</label>
55
<label class="main">Created by&nbsp;<b><a href="https://isahann.github.io">Isahann Hanacleto</a></b></label>
66

77
<label>Source code at&nbsp;<b><a href="https://github.com/xpquiz/xpquiz.github.io">GitHub</a></b></label>
88
<label>Questions provided by&nbsp;<b><a href="https://the-trivia-api.com/">The Trivia API</a></b>,&nbsp;<b><a
9-
href="https://opentdb.com/">Open Trivia Database</a></b>&nbsp;and&nbsp;<b><a href="https://quizapi.io/">QuizAPI</a></b></label>
9+
href="https://opentdb.com/">Open Trivia Database</a></b>&nbsp;and&nbsp;<b><a
10+
href="https://quizapi.io/">QuizAPI</a></b></label>
1011
<label>Windows XP theming provided by&nbsp;<b><a href="https://botoxparty.github.io/XP.css/">XP.css</a></b></label>
1112
<label>Windows XP sounds provided by&nbsp;<b><a href="https://archive.org/details/windowsxpstartup_201910/">The
1213
Internet Archive</a></b></label>
1314
<label>Windows XP icons provided by&nbsp;<b><a
1415
href="https://www.deviantart.com/marchmountain/art/Windows-XP-High-Resolution-Icon-Pack-916042853">marchmountain
1516
at DeviantArt</a></b></label>
1617

17-
<app-icon-button iconPath="home.png" title="Return to home"
18-
(onButtonClick)="this.returnHome()"></app-icon-button>
18+
<div class="window-body_buttons">
19+
<app-icon-button iconPath="home.png" title="Return home"
20+
(onButtonClick)="this.router.navigateByUrl(PathsEnum.HOME)"></app-icon-button>
21+
<app-icon-button iconPath="contact.png" title="Contact us!" [disabled]="this.showFeedbackWindow"
22+
(onButtonClick)="this.toggleFeedbackWindow()"></app-icon-button>
23+
</div>
1924
</div>
2025
</div>
26+
27+
<div class="window" *ngIf="this.showFeedbackWindow">
28+
<app-window-title-bar iconPath="about.png" title="Contact"></app-window-title-bar>
29+
<div class="window-body">
30+
<form [formGroup]="this.feedbackForm" (ngSubmit)="this.onSubmit()">
31+
<label class="window-body_feedback-title">✍️ Feel free to message us about suggestions, feedbacks or compliments!
32+
🤔</label>
33+
34+
<div class="window-body_feedback-inputs">
35+
<div class="field-row">
36+
<label for="name">Name (*):</label>
37+
<input id="name" type="text" formControlName="name" placeholder="Type in your name..."/>
38+
</div>
39+
<div class="field-row">
40+
<label for="message">Message (*):</label>
41+
<textarea id="message" rows="8" formControlName="message" placeholder="Write your message..."></textarea>
42+
</div>
43+
</div>
44+
45+
<div class="window-body_feedback-inputs-error">
46+
<label *ngIf="this.shouldShowErrorMessage('name')">Please type in your name.</label>
47+
<label *ngIf="this.shouldShowErrorMessage('message')">Please type your message.</label>
48+
</div>
49+
50+
<div class="window-body_feedback-buttons">
51+
<app-icon-button iconPath="no.png" title="Close"
52+
(onButtonClick)="this.toggleFeedbackWindow()"></app-icon-button>
53+
<app-icon-button [disabled]="this.shouldDisableSendButton()" iconPath="send.png" title="Send"
54+
type="submit"></app-icon-button>
55+
</div>
56+
</form>
57+
</div>
58+
</div>
59+
Lines changed: 65 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,69 @@
1-
.window-body
2-
display: flex
3-
flex-direction: column
4-
align-items: center
5-
justify-content: center
1+
.window
2+
margin: 10px
63

7-
label
8-
margin: 3px
4+
&-body
5+
display: flex
6+
flex-direction: column
7+
align-items: center
8+
justify-content: center
99

10-
&.main
11-
margin-bottom: 10px
10+
label
11+
margin: 3px
12+
13+
&.main
14+
margin-bottom: 10px
15+
font-style: italic
16+
17+
&_buttons
18+
display: flex
19+
flex-direction: row
20+
align-items: center
21+
justify-content: center
22+
margin: 5px
23+
24+
app-icon-button
25+
margin: 5px
26+
27+
label.window-body_feedback-title
1228
font-style: italic
29+
margin-bottom: 10px
30+
31+
&_feedback-inputs
32+
display: flex
33+
flex-direction: column
34+
align-items: center
35+
justify-content: center
36+
margin: 10px
37+
width: 300px
38+
39+
.field-row
40+
width: 100%
41+
42+
textarea
43+
border: 1px solid #7f9db9
44+
45+
label
46+
width: 25%
47+
display: block
48+
text-align: end
49+
align-self: flex-start
50+
51+
input, textarea
52+
width: 75%
53+
54+
&_feedback-inputs-error
55+
color: red
56+
display: flex
57+
flex-direction: column
58+
align-items: center
59+
justify-content: center
60+
61+
&_feedback-buttons
62+
display: flex
63+
flex-direction: row
64+
align-items: center
65+
justify-content: center
66+
margin: 5px
1367

14-
app-icon-button
15-
margin-top: 15px
68+
app-icon-button
69+
margin: 5px

0 commit comments

Comments
 (0)