|
@ -1,65 +1,81 @@ |
|
|
<app> |
|
|
<app> |
|
|
<div class="show-md show-sm show-xs navigate-small dropdown dropdown-right"> |
|
|
<div class="container"> |
|
|
<button onclick={this.menuOn} class="mobile-navigate btn btn-link navigate-item dropdown-toggle" tabindex="0"> |
|
|
<div class="columns"> |
|
|
<i class="bar-menu fa fa-bars" aria-hidden="true"></i> |
|
|
|
|
|
</button> |
|
|
<div class="column hide-xs hide-sm hide-md col-1 col-xl-1 col-lg-2"> |
|
|
<!-- menu component --> |
|
|
<div |
|
|
<ul |
|
|
data-is="menu" |
|
|
if={this.menuActive} |
|
|
name="Category" |
|
|
class="mobile-menu tab tab-block menu"> |
|
|
items={["Programming", "Books", "Philosophy"]}> |
|
|
<li |
|
|
</div> |
|
|
each="{page in ['posts', 'projects', 'links', 'about']}" |
|
|
</div> |
|
|
class={"navigate-tab tab-item animated fadeIn " + (this.parent.active.get(page) ? "active" : "")} |
|
|
<div class="column col-xl-11 col-lg-10 col-md-12 col-sm-12 col-xs-12"> |
|
|
data-is="navtab" |
|
|
<div class="show-md show-sm show-xs navigate-small dropdown dropdown-right"> |
|
|
active={this.parent.active.get(page)} |
|
|
<button onclick={this.menuOn} class="mobile-navigate btn btn-link navigate-item dropdown-toggle" tabindex="0"> |
|
|
to={this.parent.to(page)} |
|
|
<i class="bar-menu fa fa-bars" aria-hidden="true"></i> |
|
|
title={page} |
|
|
</button> |
|
|
onclick={this.menuOff} |
|
|
<!-- menu component --> |
|
|
> |
|
|
<ul |
|
|
</li> |
|
|
if={this.menuActive} |
|
|
</ul> |
|
|
class="mobile-menu tab tab-block menu"> |
|
|
</div> |
|
|
<li |
|
|
<ul class="hide-md hide-sm hide-xs navigate tab tab-block"> |
|
|
each="{page in ['posts', 'projects', 'links', 'about']}" |
|
|
<li |
|
|
class={"navigate-tab tab-item animated fadeIn " + (this.parent.active.get(page) ? "active" : "")} |
|
|
each="{page in ['posts', 'projects', 'links', 'about']}" |
|
|
data-is="navtab" |
|
|
class={"navigate-tab tab-item animated fadeIn " + (this.parent.active.get(page) ? "active" : "")} |
|
|
active={this.parent.active.get(page)} |
|
|
data-is="navtab" |
|
|
to={this.parent.to(page)} |
|
|
active={this.parent.active.get(page)} |
|
|
title={page} |
|
|
to={this.parent.to(page)} |
|
|
onclick={this.menuOff} |
|
|
title={page} |
|
|
> |
|
|
> |
|
|
</li> |
|
|
</li> |
|
|
</ul> |
|
|
</ul> |
|
|
</div> |
|
|
<div class="projects-content"> |
|
|
<ul class="hide-md hide-sm hide-xs navigate tab tab-block"> |
|
|
<loading if={!this.state.loaded}></loading> |
|
|
<li |
|
|
<projectsview |
|
|
each="{page in ['posts', 'projects', 'links', 'about']}" |
|
|
class="animated fadeInDown" |
|
|
class={"navigate-tab tab-item animated fadeIn " + (this.parent.active.get(page) ? "active" : "")} |
|
|
if={this.active.get("projects") && this.state.loaded} |
|
|
data-is="navtab" |
|
|
state={this.state} |
|
|
active={this.parent.active.get(page)} |
|
|
ref="projectsview" |
|
|
to={this.parent.to(page)} |
|
|
> |
|
|
title={page} |
|
|
</projectsview> |
|
|
> |
|
|
</div> |
|
|
</li> |
|
|
<div class="content"> |
|
|
</ul> |
|
|
<postsview |
|
|
<div class="projects-content"> |
|
|
cached={this.cached} |
|
|
<loading if={!this.state.loaded}></loading> |
|
|
state={this.state} |
|
|
<projectsview |
|
|
if={this.active.get("posts")} |
|
|
class="animated fadeInDown" |
|
|
ref="postsview" |
|
|
if={this.active.get("projects") && this.state.loaded} |
|
|
> |
|
|
state={this.state} |
|
|
</postsview> |
|
|
ref="projectsview" |
|
|
<about |
|
|
> |
|
|
if={this.active.get("about")} |
|
|
</projectsview> |
|
|
> |
|
|
</div> |
|
|
</about> |
|
|
|
|
|
<links |
|
|
<div class="content"> |
|
|
cached={this.cached} |
|
|
<postsview |
|
|
state={this.state} |
|
|
cached={this.cached} |
|
|
if={this.active.get("links")} |
|
|
state={this.state} |
|
|
> |
|
|
if={this.active.get("posts")} |
|
|
</links> |
|
|
ref="postsview" |
|
|
|
|
|
> |
|
|
|
|
|
</postsview> |
|
|
|
|
|
<about |
|
|
|
|
|
if={this.active.get("about")} |
|
|
|
|
|
> |
|
|
|
|
|
</about> |
|
|
|
|
|
<links |
|
|
|
|
|
cached={this.cached} |
|
|
|
|
|
state={this.state} |
|
|
|
|
|
if={this.active.get("links")} |
|
|
|
|
|
> |
|
|
|
|
|
</links> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<script> |
|
|
<script> |
|
|
|
|
|
import './menu.tag'; |
|
|
import './navtab.tag'; |
|
|
import './navtab.tag'; |
|
|
import './projectsview.tag'; |
|
|
import './projectsview.tag'; |
|
|
import './postsview.tag'; |
|
|
import './postsview.tag'; |
|
@ -82,11 +98,7 @@ self.cached = fetchCached({ |
|
|
cache: { |
|
|
cache: { |
|
|
get: ((k) => { |
|
|
get: ((k) => { |
|
|
return new Promise((resolve, reject) => { |
|
|
return new Promise((resolve, reject) => { |
|
|
var result = self.cache[k]; |
|
|
resolve(self.cache[k]); |
|
|
if (result == undefined) { |
|
|
|
|
|
resolve(undefined); |
|
|
|
|
|
} |
|
|
|
|
|
resolve(result); |
|
|
|
|
|
}); |
|
|
}); |
|
|
}), |
|
|
}), |
|
|
set: (k, v) => { self.cache[k] = v; } |
|
|
set: (k, v) => { self.cache[k] = v; } |
|
|