|
@ -27,12 +27,12 @@ |
|
|
class="mobile-menu tab tab-block menu"> |
|
|
class="mobile-menu tab tab-block menu"> |
|
|
<li |
|
|
<li |
|
|
each="{page in ['posts', 'projects', 'links', 'about']}" |
|
|
each="{page in ['posts', 'projects', 'links', 'about']}" |
|
|
class={"navigate-tab tab-item animated fadeIn " + (this.parent.active.get(page) ? "active" : "")} |
|
|
class={"navigate-tab tab-item animated fadeIn " + (parent.active.get(page) ? "active" : "")} |
|
|
data-is="navtab" |
|
|
data-is="navtab" |
|
|
active={this.parent.active.get(page)} |
|
|
active={parent.active.get(page)} |
|
|
to={this.parent.to(page)} |
|
|
to={parent.to(page)} |
|
|
title={page} |
|
|
title={page} |
|
|
onclick={this.parent.menuOff} |
|
|
onclick={parent.menuOff} |
|
|
> |
|
|
> |
|
|
</li> |
|
|
</li> |
|
|
</ul> |
|
|
</ul> |
|
@ -41,20 +41,20 @@ |
|
|
<ul class="hide-md hide-sm hide-xs navigate tab tab-block"> |
|
|
<ul class="hide-md hide-sm hide-xs navigate tab tab-block"> |
|
|
<li |
|
|
<li |
|
|
each="{page in ['posts', 'projects', 'links', 'about']}" |
|
|
each="{page in ['posts', 'projects', 'links', 'about']}" |
|
|
class={"navigate-tab tab-item animated fadeIn " + (this.parent.active.get(page) ? "active" : "")} |
|
|
class={"navigate-tab tab-item animated fadeIn " + (parent.active.get(page) ? "active" : "")} |
|
|
data-is="navtab" |
|
|
data-is="navtab" |
|
|
active={this.parent.active.get(page)} |
|
|
active={parent.active.get(page)} |
|
|
to={this.parent.to(page)} |
|
|
to={parent.to(page)} |
|
|
title={page} |
|
|
title={page} |
|
|
> |
|
|
> |
|
|
</li> |
|
|
</li> |
|
|
</ul> |
|
|
</ul> |
|
|
<div class="projects-content"> |
|
|
<div class="projects-content"> |
|
|
<loading if={!this.state.loaded}></loading> |
|
|
<loading if={!state.loaded}></loading> |
|
|
<projectsview |
|
|
<projectsview |
|
|
class="animated fadeInDown" |
|
|
class="animated fadeInDown" |
|
|
if={this.active.get("projects") && this.state.loaded} |
|
|
if={active.get("projects") && state.loaded} |
|
|
state={this.state} |
|
|
state={state} |
|
|
ref="projectsview" |
|
|
ref="projectsview" |
|
|
> |
|
|
> |
|
|
</projectsview> |
|
|
</projectsview> |
|
@ -62,20 +62,20 @@ |
|
|
|
|
|
|
|
|
<div class="content"> |
|
|
<div class="content"> |
|
|
<postsview |
|
|
<postsview |
|
|
cached={this.cached} |
|
|
cached={cached} |
|
|
state={this.state} |
|
|
state={state} |
|
|
if={this.active.get("posts")} |
|
|
if={active.get("posts")} |
|
|
ref="postsview" |
|
|
ref="postsview" |
|
|
> |
|
|
> |
|
|
</postsview> |
|
|
</postsview> |
|
|
<about |
|
|
<about |
|
|
if={this.active.get("about")} |
|
|
if={active.get("about")} |
|
|
> |
|
|
> |
|
|
</about> |
|
|
</about> |
|
|
<links |
|
|
<links |
|
|
cached={this.cached} |
|
|
cached={cached} |
|
|
state={this.state} |
|
|
state={state} |
|
|
if={this.active.get("links")} |
|
|
if={active.get("links")} |
|
|
> |
|
|
> |
|
|
</links> |
|
|
</links> |
|
|
</div> |
|
|
</div> |
|
@ -90,6 +90,7 @@ import './links.tag'; |
|
|
import './loading.tag'; |
|
|
import './loading.tag'; |
|
|
|
|
|
|
|
|
import fetchCached from 'fetch-cached'; |
|
|
import fetchCached from 'fetch-cached'; |
|
|
|
|
|
import 'whatwg-fetch'; |
|
|
import Z from './zipper.js'; |
|
|
import Z from './zipper.js'; |
|
|
import pathEq from 'ramda/src/pathEq'; |
|
|
import pathEq from 'ramda/src/pathEq'; |
|
|
import route from 'riot-route'; |
|
|
import route from 'riot-route'; |
|
@ -189,7 +190,6 @@ var about = activate("about"); |
|
|
var links = activate("links"); |
|
|
var links = activate("links"); |
|
|
|
|
|
|
|
|
function posts(_id) { |
|
|
function posts(_id) { |
|
|
console.log(self.state); |
|
|
|
|
|
if (self.state._id != _id) { |
|
|
if (self.state._id != _id) { |
|
|
self.state._id = _id; |
|
|
self.state._id = _id; |
|
|
} |
|
|
} |
|
@ -216,7 +216,7 @@ self.route("projects", projects); |
|
|
self.route("about", about); |
|
|
self.route("about", about); |
|
|
self.route("links", links); |
|
|
self.route("links", links); |
|
|
|
|
|
|
|
|
self.on("mount", () => { |
|
|
self.one("updated", () => { |
|
|
route.start(true); |
|
|
route.start(true); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|