This repository has been archived by the owner on May 12, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added context function and glitch effect
- Loading branch information
Showing
12 changed files
with
99 additions
and
96 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Large diffs are not rendered by default.
Oops, something went wrong.
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,59 @@ | ||
/* | ||
(TEXT) PARAMS | ||
================= | ||
1. Namespace | ||
2. Intensity | ||
3. Text color | ||
4. Background color (flat) | ||
5. Highlight #1 color | ||
6. Highlight #2 color | ||
7. Width (px) | ||
8. Height (px) | ||
*/ | ||
|
||
@mixin textGlitch($name, $intensity, $textColor, $background, $highlightColor1, $highlightColor2, $width, $height) { | ||
|
||
color: $textColor; | ||
position: relative; | ||
$steps: $intensity; | ||
|
||
// Ensure the @keyframes are generated at the root level | ||
@at-root { | ||
// We need two different ones | ||
@for $i from 1 through 2 { | ||
@keyframes #{$name}-anim-#{$i} { | ||
@for $i from 0 through $steps { | ||
#{percentage($i*(1/$steps))} { | ||
clip: rect( | ||
random($height)+px, | ||
$width+px, | ||
random($height)+px, | ||
0 | ||
); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
&:before, | ||
&:after { | ||
content: attr(data-text); | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
background: $background; | ||
clip: rect(0, 0, 0, 0); | ||
} | ||
&:after { | ||
left: 2px; | ||
text-shadow: -1px 0 $highlightColor1; | ||
animation: #{$name}-anim-1 2s infinite linear alternate-reverse; | ||
} | ||
&:before { | ||
left: -2px; | ||
text-shadow: 2px 0 $highlightColor2; | ||
animation: #{$name}-anim-2 3s infinite linear alternate-reverse; | ||
} | ||
|
||
} |
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,13 +1,12 @@ | ||
{{#if next}} | ||
<hr class="post-list__divider " /> | ||
|
||
<nav class="pagination" role="navigation"> | ||
{{#if prev}} | ||
<a class="newer-posts pagination__newer btn btn-small" href="{{page_url prev}}#open">← Newer Posts</a> | ||
{{/if}} | ||
<span class="pagination__page-number">Page {{page}} of {{pages}}</span> | ||
{{#if next}} | ||
<a class="older-posts pagination__older btn btn-small" href="{{page_url next}}#open">Older Posts →</a> | ||
{{/if}} | ||
{{#if prev}} | ||
<a class="newer-posts pagination__newer btn btn-small" href="{{page_url prev}}#open">← Newer Posts</a> | ||
{{/if}} | ||
<span class="pagination__page-number">Page {{page}} of {{pages}}</span> | ||
{{#if next}} | ||
<a class="older-posts pagination__older btn btn-small" href="{{page_url next}}#open">Older Posts →</a> | ||
{{/if}} | ||
</nav> | ||
{{/if}} |
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