Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
7 changes: 7 additions & 0 deletions Javascript/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

import './module-b'
import './module-a'


import '../assets/main.scss'

18 changes: 18 additions & 0 deletions Javascript/module-a.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
class Button{
constructor (name){
this.name = name
}
}
const button1 = new Button(".png small")
const button2 = new Button(".png large")
const button3 = new Button(".jpg")

document.addEventListener("DOMContentLoaded", ()=>{
document.getElementById("btn-container").innerHTML+=`<button class="btn" id="btn1">${button1.name}</button>`
document.getElementById("btn-container").innerHTML+=`<button class="btn" id="btn2">${button2.name}</button>`
document.getElementById("btn-container").innerHTML+=`<button class="btn" id="btn3">${button3.name}</button>`
})




10 changes: 10 additions & 0 deletions Javascript/module-b.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
$(document).on("click",function(e){
if(e.target.id === "btn1"){
$("#img1").toggleClass("is__hidden");
}
else if(e.target.id === "btn2"){
$("#img2").toggleClass("is__hidden");
}

})

Binary file added assets/Images/942057.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
152 changes: 152 additions & 0 deletions assets/Images/Pokeball.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/Images/angry_pikachu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/Images/pikachu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/_colors.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.btn{
background-color: rgba(0, 0, 0, 0.459);
color: whitesmoke;
}
24 changes: 24 additions & 0 deletions assets/_spacing.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.btn{
margin: 4rem;
width: 5rem;
height: 3rem;
cursor: pointer;
}

body{
background-image: url("./Images/942057.png");
background-repeat: no-repeat;
background-size: contain;
background-position: center;
}

.img__container{
display: flex;
flex-direction: row;
height: 30rem;
}

.is__hidden{
display: none;
}

10 changes: 10 additions & 0 deletions assets/_text.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
body{
color: white;
background-color: yellowgreen;
margin: auto;
width: 50rem;
}

div{
margin-top: 5rem;
}
3 changes: 3 additions & 0 deletions assets/main.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@forward 'colors';
@forward 'text';
@forward 'spacing';
152 changes: 152 additions & 0 deletions dist/Pokeball.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/cb7b963520a584e0561e.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/f39735072036b440139e.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/fbd0e9b255747af7f891.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading