Commit 5c0d4cde authored by Luc Didry's avatar Luc Didry
Browse files

Make anchors show the section

parent a11c294e
......@@ -308,7 +308,7 @@
<section id="cd-timeline">
<section id="resume">
<div class="cd-timeline-block">
<div class="cd-timeline-img cd-work">
......@@ -407,13 +407,25 @@
$(document).ready(function() {
$('#work').hide();
$('#skills').hide();
$('#cd-timeline').hide();
$('#resume').hide();
var hash = window.location.hash.substring(1);
switch (hash) {
case 'work':
toggleWork();
break;
case 'skills':
toggleSkills();
break;
case 'resume':
toggleResume();
break;
}
});
function toggleWork() {
if($('#work:hidden').length !== 0) {
$('#work').fadeIn();
$('#skills').hide();
$('#cd-timeline').hide();
$('#resume').hide();
} else {
$('#work').fadeOut();
}
......@@ -424,14 +436,14 @@
$('#skills').fadeIn();
$('#skills ul li').addClass('transform');
$('#work').hide();
$('#cd-timeline').hide();
$('#resume').hide();
} else {
$('#skills').fadeOut();
}
}
function toggleResume() {
if($('#cd-timeline:hidden').length !== 0) {
$('#cd-timeline').fadeIn();
if($('#resume:hidden').length !== 0) {
$('#resume').fadeIn();
$('#work').hide();
$('#skills').hide();
var timelineBlocks = $('.cd-timeline-block'),
......@@ -459,7 +471,7 @@
});
}
} else {
$('#cd-timeline').fadeOut();
$('#resume').fadeOut();
}
}
</script>
......
......@@ -99,13 +99,25 @@
$(document).ready(function() {
$('#work').hide();
$('#skills').hide();
$('#cd-timeline').hide();
$('#resume').hide();
var hash = window.location.hash.substring(1);
switch (hash) {
case 'work':
toggleWork();
break;
case 'skills':
toggleSkills();
break;
case 'resume':
toggleResume();
break;
}
});
function toggleWork() {
if($('#work:hidden').length !== 0) {
$('#work').fadeIn();
$('#skills').hide();
$('#cd-timeline').hide();
$('#resume').hide();
} else {
$('#work').fadeOut();
}
......@@ -116,14 +128,14 @@
$('#skills').fadeIn();
$('#skills ul li').addClass('transform');
$('#work').hide();
$('#cd-timeline').hide();
$('#resume').hide();
} else {
$('#skills').fadeOut();
}
}
function toggleResume() {
if($('#cd-timeline:hidden').length !== 0) {
$('#cd-timeline').fadeIn();
if($('#resume:hidden').length !== 0) {
$('#resume').fadeIn();
$('#work').hide();
$('#skills').hide();
var timelineBlocks = $('.cd-timeline-block'),
......@@ -151,7 +163,7 @@
});
}
} else {
$('#cd-timeline').fadeOut();
$('#resume').fadeOut();
}
}
</script>
......
<section id="cd-timeline">
<section id="resume">
{{ range .Site.Params.resume }}
<div class="cd-timeline-block">
<div class="cd-timeline-img cd-{{ .icon }}">
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment