Skip to content

Commit 53400be

Browse files
committed
contact logic to credits
1 parent 34f02b7 commit 53400be

File tree

2 files changed

+17
-23
lines changed

2 files changed

+17
-23
lines changed

scripts/Contact.js

-23
This file was deleted.

scripts/Credits.js

+17
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ class Credits {
66

77
this.close_button = this.contianer.querySelector(".close")
88
this.close_button.addEventListener("click", this.hide.bind(this))
9+
10+
// contact
11+
this.contact_container = document.querySelector(".contact-container")
12+
13+
this.contact_open_button = document.querySelector(".contact-open")
14+
this.contact_open_button.addEventListener("click", this.showContactForm.bind(this))
15+
16+
this.contact_close_button = this.container.querySelector(".contact-close")
17+
this.contact_close_button.addEventListener("click", this.hideContactForm.bind(this))
918
}
1019

1120
show() {
@@ -15,4 +24,12 @@ class Credits {
1524
hide() {
1625
this.contianer.style.top = null
1726
}
27+
28+
showContactForm() {
29+
this.contact_container.style.display = null
30+
}
31+
32+
hideContactForm() {
33+
this.contact_container.style.display = "none"
34+
}
1835
}

0 commit comments

Comments
 (0)