Skip to content

Commit

Permalink
Update layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
tong committed Nov 29, 2020
1 parent 26698f9 commit 0e4fc9a
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 36 deletions.
35 changes: 10 additions & 25 deletions layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,42 +1,27 @@
{{ define "header" }}
<a href="project" style="-webkit-user-drag:none;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);min-height:10vh;max-height:80vh;min-height:10vh;">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="100%" width="100%">
{{ define "main" }}
<a href="project" style="max-height:50vh;cursor:vertical-text">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<style>
path {
stroke: var(--f_high);
stroke-width: 2;
fill: var(--f_med);
}
</style>
<path d="M 12,22 V 12"/>
<path d="M 4,12 H 20"/>
<path d="M 2.5,5 12,11"/>
<path d="M 21.5,5 12,11"/>
<path d="M 11,12 h2 V22 h-2 z"/>
<path d="M 6,11.5 h12 v2 h-12 z"/>
<path d="M 3.5,4.5 h12 v2 h-12 z" transform="rotate(36,3.5,5.5)"/>
<path d="M 8.5,4.5 h12 v2 h-12 z" transform="rotate(-36,20.5,5.5)"/>
</svg>
</a>
{{ end }}

{{ define "nav" }}
<!-- -->
{{/* */}}
{{ end }}

{{ define "main" }}
<!-- -->
{{/* */}}
{{ end }}

{{ define "footer" }}
<!-- -->
{{ end }}

{{ define "scripts" }}
<script>
window.addEventListener('load', e => {
setTimeout(() => { window.location = '{{ .Site.BaseURL }}/project'; }, 300000 );
setTimeout(() => { window.location = '{{ .Site.BaseURL }}/project'; }, 1000 );
});
</script>
{{ end }}

{{ define "preload" }}
<link rel="prerender" href="https://disktree.net/ii/project">
<link rel="prerender" href="https://disktree.net/ii/project/">
{{ end }}
5 changes: 3 additions & 2 deletions layouts/partials/links.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
{{ $url := urls.Parse $urlstr }}

{{ if eq $url.Host "github.com" }}{{ $type = "github" }}
{{ else if eq $url.Host "disktree.net" }}{{ $type = "diamond" }}
{{ else if eq $url.Host "disktree.net" }}{{ $type = "circle" }}
{{ else if eq $url.Host "disktree.bandcamp.com" }}{{ $type = "circle" }}
{{ else if eq $url.Host "disktree.itch.io" }}{{ $type = "circle" }}
{{ else if eq $url.Host "gist.github.com" }}{{ $type = "github" }}
{{ else if eq $url.Host "gitlab.com" }}{{ $type = "gitlab" }}
{{ else if eq $url.Host "bandcamp.com" }}{{ $type = "bandcamp" }}
{{ else if eq $url.Host "disktree.bandcamp.com" }}{{ $type = "bandcamp" }}
{{ else if eq $url.Host "twitter.com" }}{{ $type = "twitter" }}
{{ else if eq $url.Host "vimeo.com" }}{{ $type = "vimeo" }}
{{ else if eq $url.Host "youtube.com" }}{{ $type = "youtube" }}
Expand Down
5 changes: 3 additions & 2 deletions layouts/partials/site/aside.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
<li title="{{ .GitInfo.AuthorEmail }}">{{ .GitInfo.AuthorName }}</li>
{{ end }}
</ul>
<ul class="social" style="display:none">
{{/*
<ul class="social">
<li><a href="https://vimeo.com/" class="ic-vimeo" title="vimeo/disktree"></a></li>
<li><a href="https://twitter.com/disktree" class="ic-twitter" title="twitter/disktree"></a></li>
<li><a href="https://gitlab.com/disktree" class="ic-gitlab" title="gitlab/disktree"></a></li>
<li><a href="https://github.com/tong" class="ic-github-alt" title="github/tong"></a></li>
</ul>

*/}}
11 changes: 6 additions & 5 deletions layouts/partials/site/footer.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@

<a href="{{ .Site.BaseURL }}/theme" class="ic-diamond" title="Select Theme"></a>
{{/*
<a href="#header" class="ic-arrow-up"></a>
<div style="width: 100%; height:2.4rem; background:white;"></div>
<a href="{{.Site.BaseURL}}/index.xml" class="ic-feed" title="index.xml"></a>
<code style="white-space: normal;">{{ .GitInfo }}</code>
<a href="https://vimeo.com/" class="ic-vimeo" title="vimeo/disktree"></a>
<a href="https://twitter.com/disktree" class="ic-twitter" title="twitter/disktree"></a>
<a href="https://gitlab.com/disktree" class="ic-gitlab" title="gitlab/disktree"></a>
<a href="https://github.com/tong" class="ic-github-alt" title="github/tong"></a>
*/}}
<a href="{{ .Site.BaseURL }}/theme" class="ic-cross" title="Select Theme"></a>

4 changes: 2 additions & 2 deletions layouts/theme/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<h1><a href="{{ .Site.BaseURL }}/project">{{- .Title -}}</a></h1>
<a href="#" onclick="javascript:_selectDefaultTheme()">[DEFAULT]</a>
<a href="https://github.com/hundredrabbits/Themes/tree/master/themes">[MORE]</a>
{{ if .Content }}<article>{{- .Content -}}</article>{{ end }}
<a href="#" onclick="javascript:Theme.clearLocal()">[CLEAR]</a>
{{ if .Content }}<article class="content">{{- .Content -}}</article>{{ end }}
<style>
ul.themes {
margin: 1rem auto;
Expand All @@ -26,7 +27,6 @@ <h1><a href="{{ .Site.BaseURL }}/project">{{- .Title -}}</a></h1>

<script>
let _handleThemeSelect = svg => {
//Theme.apply( Theme.parseSVG( svg ), true );
Theme.applySVG( svg );
}
let _selectDefaultTheme = e => {
Expand Down

0 comments on commit 0e4fc9a

Please sign in to comment.