-
Notifications
You must be signed in to change notification settings - Fork 0
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 #6 from dlesaca/project-tiles
Project tiles
- Loading branch information
Showing
13 changed files
with
195 additions
and
32 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Select all links with hashes | ||
$('a[href*="#"]') | ||
// Remove links that don't actually link to anything | ||
.not('[href="#"]') | ||
.not('[href="#0"]') | ||
.click(function(event) { | ||
// On-page links | ||
if ( | ||
location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') | ||
&& | ||
location.hostname == this.hostname | ||
) { | ||
// Figure out element to scroll to | ||
var target = $(this.hash); | ||
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); | ||
// Does a scroll target exist? | ||
if (target.length) { | ||
// Only prevent default if animation is actually gonna happen | ||
event.preventDefault(); | ||
$('html, body').animate({ | ||
scrollTop: target.offset().top | ||
}, 300, function() { | ||
// Callback after animation | ||
// Must change focus! | ||
var $target = $(target); | ||
$target.focus(); | ||
if ($target.is(":focus")) { // Checking if the target was focused | ||
return false; | ||
} else { | ||
$target.attr('tabindex','-1'); // Adding tabindex for elements not focusable | ||
$target.focus(); // Set focus again | ||
}; | ||
}); | ||
} | ||
} | ||
}); |
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,19 +1,8 @@ | ||
{{#foreach posts}} | ||
<article class="{{post_class}} site-tile"> | ||
<header class="post-header"> | ||
<article class="{{post_class}} post-tile" style="background-image: url({{image}}); background-repeat: no-repeat"> | ||
<header class="overlay"> | ||
<h2 class="post-title"><a href="{{url}}">{{title}}</a></h2> | ||
<p class="tags">{{tags}}</p> | ||
</header> | ||
<section class="post-excerpt"> | ||
{{#if image}} | ||
<img src="{{image}}" alt="post image"/> | ||
{{/if}} | ||
<p>{{excerpt words="26"}} <a class="read-more" href="{{url}}">»</a></p> | ||
</section> | ||
<footer class="post-meta"> | ||
{{#if author.image}}<img class="author-thumb" src="{{author.image}}" alt="{{author.name}}" nopin="nopin" />{{/if}} | ||
{{author}} | ||
{{tags prefix=" on "}} | ||
<time class="post-date" datetime="{{date format="YYYY-MM-DD"}}">{{date format="DD MMMM YYYY"}}</time> | ||
</footer> | ||
</article> | ||
{{/foreach}} |
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,18 @@ | ||
{{!< default}} | ||
|
||
{{#post}} | ||
<article class="{{post_class}} post"> | ||
|
||
<header class="post-header"> | ||
<h1 class="post-title">{{title}}</h1> | ||
<section class="post-meta post-tags"> | ||
{{tags}} | ||
</section> | ||
</header> | ||
|
||
<section class="post-content"> | ||
{{content}} | ||
</section> | ||
|
||
</article> | ||
{{/post}} |
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,20 +1,99 @@ | ||
.site-block { | ||
@extend %grid-960; | ||
// grid-template-rows: 10em 10em 10em; | ||
grid-template-rows: repeat(6, 5.7em); | ||
&--blog { | ||
@extend %grid-gallery; | ||
grid-template-rows: repeat(2, 875px); | ||
background-color: $color-site-black; | ||
} | ||
&--project-banner { | ||
height: 500px; | ||
background-position: center; | ||
background-repeat: no-repeat; | ||
background-size: contain; | ||
} | ||
&--showcase { | ||
margin: 6em 0; | ||
} | ||
} | ||
|
||
.selected-projects { | ||
font-family: 'Fira Sans'; | ||
font-weight: 300; | ||
@include font-size('21'); | ||
text-transform: uppercase; | ||
text-align: center; | ||
margin: 1.5em 0; | ||
position: relative; | ||
&:after { | ||
content: '↓'; | ||
position: absolute; | ||
top: 25px; | ||
left: 0; | ||
right: 0; | ||
color: $color-site-pink-base; | ||
} | ||
} | ||
|
||
.site-block__child { | ||
&--intro { | ||
grid-column: 5 / span 7; | ||
grid-column: 3 / span 8; | ||
grid-row-start: 2; | ||
} | ||
} | ||
|
||
.intro-text { | ||
text-align: center; | ||
@include butler; | ||
@include font-size('51'); | ||
} | ||
|
||
.post-content { | ||
p { | ||
@include font-size('21'); | ||
margin: 1em auto; | ||
width: 40em; | ||
letter-spacing: .02em; | ||
line-height: 1.75em; | ||
font-weight: 200; | ||
} | ||
} | ||
|
||
.post-tags { | ||
a { | ||
color: $link-01; | ||
} | ||
} | ||
|
||
.showcase { | ||
// background-color: gray; | ||
// padding: 0 2em; | ||
img { | ||
border: 1px solid rgba(0,0,0,0.09); | ||
box-shadow: 0px 2px 2px 0px rgba(0,0,0,0.1); | ||
width: 100%; | ||
} | ||
&--layout-col1 { | ||
margin: 0 auto; | ||
max-width: 80em; | ||
} | ||
&--layout-col2 { | ||
@include grid(2, 1fr, 2em); | ||
} | ||
&--layout-col3 { | ||
@include grid(3, 1fr, 2em); | ||
} | ||
&--layout-col4 { | ||
@include grid(4, 1fr, 2em); | ||
} | ||
&--layout-col5 { | ||
@include grid(5, 1fr, 2em); | ||
} | ||
&--layout-col6 { | ||
@include grid(6, 1fr, 2em); | ||
} | ||
&__heading { | ||
margin: .6em 0; | ||
text-align: center; | ||
} | ||
} |
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,8 +1,13 @@ | ||
.site-header { | ||
@extend %grid-960; | ||
grid-template-areas: ". . . . . . . . . . nav nav"; | ||
grid-template-areas: ". . . . . . . . . nav nav nav"; | ||
padding: 3em; | ||
&__logo { | ||
width: 12em; | ||
width: 20em; | ||
} | ||
} | ||
|
||
.post-header { | ||
margin: 3em auto; | ||
width: 53em; | ||
} |
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 |
---|---|---|
|
@@ -3,6 +3,6 @@ | |
margin-top: 1em; | ||
&__list__item { | ||
display: inline; | ||
margin-right: 1em; | ||
margin-right: 2em; | ||
} | ||
} |
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,26 @@ | ||
.post-tile { | ||
background-size: cover; | ||
.overlay { | ||
a { | ||
color: $color-site-white; | ||
} | ||
font-weight: 300; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
text-align: center; | ||
background:rgba(0,0,0,.90); | ||
opacity: 0; | ||
height: 100%; | ||
transition: $transition--base; | ||
&:hover { | ||
opacity: 1; | ||
} | ||
} | ||
.tags { | ||
color: $color-site-white; | ||
width: 50%; | ||
font-weight: 200; | ||
} | ||
} |