Skip to content
Merged
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
30 changes: 25 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import './sass/main.scss'
import '@fortawesome/fontawesome-free/css/all.css'

// slick-carousel configuration
import $ from 'jquery'
import 'slick-carousel'


// Hiring message
const hiringMessage = `Hey, you.
You’re finally awake.
You were trying to see the code, right?
Expand All @@ -14,11 +11,32 @@ If you’d like to work on this website and other cool projects with hackathons,

console.log(hiringMessage);

// comment generated via js instead of directly in HTML so the hiring message text is only in one place
// Comment generated via js instead of directly in HTML so the hiring message text is only in one place
const comment = document.createComment("\n"+hiringMessage.toString()+"\n");
document.insertBefore(comment, document.firstChild);


// Random hero SVG on each page load
import desk1 from './assets/desk1.svg'
import desk2 from './assets/desk2.svg'
import desk3 from './assets/desk3.svg'

$(document).ready(function() {
var deskIndex = parseInt(localStorage.getItem('deskIndex'));
if (!deskIndex) {
deskIndex = 0;
localStorage.setItem('deskIndex', 0);
}
var desks = [desk1, desk2, desk3]
$('#desk').css('background-image', 'url(' + desks[deskIndex % desks.length] + ')');
localStorage.setItem('deskIndex', deskIndex + 1);
});


// Slick-carousel
import $ from 'jquery'
import 'slick-carousel'

$(document).ready(function() {
$('.carousel').slick({
infinite: true,
Expand Down Expand Up @@ -67,6 +85,7 @@ $(document).on('keydown', function(event) {
});


// FAQ Cards hide/show
let card = document.getElementsByClassName("card");
for (let i = 0; i < card.length; i++) {
let accordion = card[i].getElementsByClassName("accordion-header")[0];
Expand All @@ -90,6 +109,7 @@ for (let i = 0; i < card.length; i++) {
});
}


// Schedule toggle code
$('.day-second-events').hide();
$('.day-first').click(function() {
Expand Down
2 changes: 1 addition & 1 deletion sass/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ $event-count: 6;
// Transition all elements on the screen
// (except FAQ panel, which already has a transition,
// and the section days, which need no transition.)
&:not(.panel):not(#days):not(.number) {
&:not(.panel):not(#days):not(.number):not(#desk) {
transition: all 1s ease;
}

Expand Down