-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from bangkokrb/release/0.3.1
Release - 0.3.1
- Loading branch information
Showing
9 changed files
with
92 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
import './initializers/'; | ||
import './screens/'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
const SELECTOR = { | ||
appHeaderEvent: '.app-header__event' | ||
}; | ||
|
||
class HomeScreen { | ||
/** | ||
* Initializer | ||
* | ||
* @param {Element} elementRef - HTML node to mount the component. | ||
* */ | ||
constructor() { | ||
this.appHeaderEvent = document.querySelector(SELECTOR.appHeaderEvent); | ||
|
||
this._bind(); | ||
this._addEventListener(); | ||
} | ||
|
||
// Event listeners | ||
|
||
/** | ||
* Scroll handler of links in the app header. | ||
* | ||
* @param {Event} event - click event on header links | ||
* */ | ||
onClickAppHeaderLink(event) { | ||
let closestLink = event.target.closest('a'); | ||
let targetHref = closestLink.hash; | ||
|
||
event.preventDefault(); | ||
|
||
let scrollToEl = document.querySelector(targetHref); | ||
let verticalScroll = scrollToEl.getBoundingClientRect().y; | ||
|
||
// Scroll to the selected section | ||
window.scrollBy({ | ||
top: verticalScroll, | ||
left: 0, | ||
behavior: 'smooth' | ||
}); | ||
} | ||
|
||
// Private | ||
|
||
/** | ||
* Bind all functions to the local instance scope. | ||
* */ | ||
_bind() { | ||
this.onClickAppHeaderLink = this.onClickAppHeaderLink.bind(this); | ||
} | ||
|
||
/** | ||
* Adds all the required event listeners. | ||
* */ | ||
_addEventListener() { | ||
this.appHeaderEvent.querySelectorAll('a').forEach(appHeaderLink => appHeaderLink.addEventListener('click', this.onClickAppHeaderLink)); | ||
} | ||
} | ||
|
||
if (document.body.classList.contains('home')) { | ||
new HomeScreen(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import './Home/'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,30 +5,30 @@ permalink: / | |
--- | ||
|
||
<section id="about" class="home-hero"> | ||
<div class="home-hero__brand"> | ||
{% include icon.svg icon="icon-logo" class="home-hero__logo" %} | ||
</div> | ||
<div class="home-hero__text"> | ||
<h1 class="home-hero__heading display-heading">Join us for the <strong>first</strong> Ruby Conference in Bangkok</h1> | ||
</div> | ||
<div class="home-hero__brand"> | ||
{% include icon.svg icon="icon-logo" class="home-hero__logo" %} | ||
</div> | ||
<div class="home-hero__text"> | ||
<h1 class="home-hero__heading display-heading">Join us for the <strong>first</strong> Ruby Conference in Bangkok</h1> | ||
</div> | ||
</section> | ||
|
||
<section id="speakers" class="home-speaker"> | ||
<h2>Speakers</h2> | ||
{% include list-keynote-speaker.html %} | ||
<div class="call-to-action"> | ||
<a href="https://www.papercall.io/rubyconfth" target="_blank" class="call-to-action__btn btn btn--primary btn--lg">Submit your talk</a> | ||
</div> | ||
<h2>Speakers</h2> | ||
{% include list-keynote-speaker.html %} | ||
<div class="call-to-action"> | ||
<a href="https://www.papercall.io/rubyconfth" target="_blank" class="call-to-action__btn btn btn--primary btn--lg">Submit your talk</a> | ||
</div> | ||
</section> | ||
|
||
<section id="venue" class="home-venue"> | ||
<h2>Venue</h2> | ||
{% include map-venue.html %} | ||
<h2>Venue</h2> | ||
{% include map-venue.html %} | ||
</section> | ||
|
||
<section id="sponsors" class="home-sponsor"> | ||
<h2>Sponsors</h2> | ||
<p>Our event is supported by amazing sponsors and partners.</p> | ||
{% include list-sponsor.html %} | ||
<p>If you are interested in supporting our event, reach out to our team: <a href="mailto:[email protected]">[email protected]</a>. <br />Our sponsors deck will be published soon.</p> | ||
<h2>Sponsors</h2> | ||
<p>Our event is supported by amazing sponsors and partners.</p> | ||
{% include list-sponsor.html %} | ||
<p>If you are interested in supporting our event, reach out to our team: <a href="mailto:[email protected]">[email protected]</a>. <br />Our sponsors deck will be published soon.</p> | ||
</section> |