Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
chip-ahoyto
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
João Magalhães
chip-ahoyto
Commits
a384f590
Verified
Commit
a384f590
authored
2 years ago
by
João Magalhães
Browse files
Options
Downloads
Patches
Plain Diff
feat: toggle narrative section
parent
8db0c668
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#734
passed
2 years ago
Stage: build
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/web/index.html
+10
-8
10 additions, 8 deletions
examples/web/index.html
examples/web/index.ts
+8
-0
8 additions, 0 deletions
examples/web/index.ts
with
18 additions
and
8 deletions
examples/web/index.html
+
10
−
8
View file @
a384f590
...
...
@@ -25,14 +25,16 @@
<h1>
CHIP-Ahoyto
<span
id=
"version"
></span>
<img
class=
"logo-image"
src=
"res/thunder.png"
alt=
"thunder"
/>
</h1>
<div
class=
"separator"
></div>
<p>
This is a
<a
href=
"https://en.wikipedia.org/wiki/CHIP-8"
target=
"_blank"
>
CHIP-8
</a>
emulator built using
the
<a
href=
"https://www.rust-lang.org"
target=
"_blank"
>
Rust Programming Language
</a>
and is running
inside this browser with the help of
<a
href=
"https://webassembly.org/"
target=
"_blank"
>
WebAssembly
</a>
.
</p>
<p>
You can check the source code of it at
<a
href=
"https://gitlab.stage.hive.pt/joamag/chip-ahoyto"
target=
"_blank"
>
GitLab
</a>
.
</p>
<p>
TIP: Drag and Drop ROM files to the Browser to load the ROM.
</p>
<div
class=
"separator"
></div>
<div
id=
"section-narrative"
class=
"section"
>
<p>
This is a
<a
href=
"https://en.wikipedia.org/wiki/CHIP-8"
target=
"_blank"
>
CHIP-8
</a>
emulator built using
the
<a
href=
"https://www.rust-lang.org"
target=
"_blank"
>
Rust Programming Language
</a>
and is running
inside this browser with the help of
<a
href=
"https://webassembly.org/"
target=
"_blank"
>
WebAssembly
</a>
.
</p>
<p>
You can check the source code of it at
<a
href=
"https://gitlab.stage.hive.pt/joamag/chip-ahoyto"
target=
"_blank"
>
GitLab
</a>
.
</p>
<p>
TIP: Drag and Drop ROM files to the Browser to load the ROM.
</p>
</div>
<div
id=
"separator-narrative"
class=
"separator"
></div>
<div
id=
"section-keyboard"
class=
"section"
style=
"display: none;"
>
<div
id=
"keyboard"
class=
"keyboard"
>
<div
class=
"keyboard-line"
>
...
...
This diff is collapsed.
Click to expand it.
examples/web/index.ts
+
8
−
0
View file @
a384f590
...
...
@@ -436,13 +436,21 @@ const registerButtons = () => {
buttonKeyboard
.
addEventListener
(
"
click
"
,
()
=>
{
const
sectionKeyboard
=
document
.
getElementById
(
"
section-keyboard
"
);
const
separatorKeyboard
=
document
.
getElementById
(
"
separator-keyboard
"
);
const
sectionNarrative
=
document
.
getElementById
(
"
section-narrative
"
);
const
separatorNarrative
=
document
.
getElementById
(
"
separator-narrative
"
);
if
(
buttonKeyboard
.
classList
.
contains
(
"
enabled
"
))
{
sectionKeyboard
.
style
.
display
=
"
none
"
;
separatorKeyboard
.
style
.
display
=
"
none
"
;
sectionNarrative
.
style
.
display
=
"
block
"
;
separatorNarrative
.
style
.
display
=
"
block
"
;
buttonKeyboard
.
classList
.
remove
(
"
enabled
"
);
}
else
{
sectionKeyboard
.
style
.
display
=
"
block
"
;
separatorKeyboard
.
style
.
display
=
"
block
"
;
sectionNarrative
.
style
.
display
=
"
none
"
;
separatorNarrative
.
style
.
display
=
"
none
"
;
buttonKeyboard
.
classList
.
add
(
"
enabled
"
);
}
});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment