Skip to content

Commit

Permalink
Added crawler layer, Fixed image hover bug
Browse files Browse the repository at this point in the history
  • Loading branch information
HelloWorld017 committed Feb 15, 2017
1 parent e705185 commit 1e4fa15
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 6 deletions.
4 changes: 3 additions & 1 deletion author.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class="main-header author-head"
style="background-image: url({{#if cover}}{{cover}}{{else}}http://localhost:2368/ghost/img/user-cover.png{{/if}})">
</header>

<section class="author-profile">
{{#if image}}
<figure class="author-image">
Expand All @@ -33,3 +33,5 @@
<div id="origami-posts">
</div>
</main>

{{> "loop"}}
2 changes: 2 additions & 0 deletions index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@
<div id="origami-posts">
</div>
</main>

{{> "loop"}}
7 changes: 7 additions & 0 deletions partials/loop.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div class="crawler-links-layer">
{{#foreach posts}}
<a href="{{url}}">{{title}}</a>
{{/foreach}}

{{pagination}}
</div>
20 changes: 19 additions & 1 deletion src/components/Post.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</header>
<hr class="post-divider">
<template v-if="image">
<div class="post-image">
<div :class="imageClass" @mouseover="mouseover" @mouseout="mouseout">
<div class="post-image-filter" :style="imageStyle"></div>
<div class="post-image-indicator">
<div class="post-image-indicator-shape"></div>
Expand Down Expand Up @@ -116,6 +116,10 @@
imageStyle(){
return `background-image: url("${this.image}")`;
},
imageClass(){
return `post-image${this.hover ? ' hover' : ''}`;
}
},
mounted() {
Expand All @@ -126,6 +130,20 @@
this.$el.style.animationName = "flip";
this.$el.style.webkitAnimationName = "flip";
},
methods: {
mouseover(){
this.hover = true;
},
mouseout(){
this.hover = false;
}
},
data(){
return {
hover: false
};
},
components: {
Author,
Tag
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ new Clipboard('[data-origami-link]', {

return resolveUrl(trigger.getAttribute('data-origami-link'));
}
})
});
12 changes: 9 additions & 3 deletions src/less/origami.less
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,10 @@
//margin-right: 6px;
}

.crawler-links-layer {
display: none;
}

/* Appears in the top left corner of your home page */
.blog-logo {
display: block;
Expand Down Expand Up @@ -526,10 +530,12 @@
-webkit-transition: -webkit-filter .5s;

will-change: filter;
}

&:hover {
.blur(3px);
}
&:hover .post-image-filter,
.post-image-filter:hover,
.post-image.hover .post-image-filter {
.blur(3px);
}

.mobile-image-tools {
Expand Down
2 changes: 2 additions & 0 deletions tag.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@
<div id="origami-posts">
</div>
</main>

{{> "loop"}}

0 comments on commit 1e4fa15

Please sign in to comment.