Remove sidebar until we have a good design

Current sidebar doesn't handle nested albums very well, and navigation is still awkward.
For example should it save its open/closed state when browsing?
pull/51/head
Romain 8 years ago
parent bd7119c25b
commit ff7b720f49

@ -1,17 +0,0 @@
<li>
<!-- This album -->
<a href="{{filename}}.html">
{{#if albums.length}}
<i class="fa fa-folder-o"></i>
{{else}}
<i class="fa fa-photo"></i>
{{/if}}
{{title}}<span class="count">{{stats.total}}</span>
</a>
<!-- And nested album -->
<ul>
{{#each albums}}
{{> sidebar-album}}
{{/each}}
</ul>
</li>

@ -14,16 +14,6 @@
<div id="container"> <div id="container">
<!--
Sidebar with album hierarchy
-->
<!-- <input id="hamburger" class="hamburger-checkbox" type="checkbox" />
<nav id="sidebar">
<ul>
{{> sidebar-album gallery.home }}
</ul>
</nav> -->
<!-- <!--
Main gallery panel Main gallery panel
--> -->

@ -15,7 +15,7 @@
@mobile-trigger: 900px; @mobile-trigger: 900px;
// ----------------------------------- // -----------------------------------
// Page structure // Generic styles
// ----------------------------------- // -----------------------------------
* { * {
@ -32,78 +32,6 @@ html, body {
margin: 0; margin: 0;
} }
#wrapper {
display: flex;
min-height: 100vh;
flex-direction: column;
}
#container {
display: flex;
flex: 1;
}
#sidebar {
overflow: hidden;
order: -1;
}
#content {
flex: 1;
}
// -----------------------------------
// Slide-out navigation
// -----------------------------------
.hamburger-checkbox {
position: absolute;
opacity: 0;
}
.hamburger-label {
display: none;
}
#sidebar {
flex: 0 0 15em;
}
@media only screen and (max-width: @mobile-trigger) {
.hamburger-label {
display: inline-block;
}
#sidebar {
flex: 0 0 0;
transition: all .2s;
white-space: nowrap;
}
#sidebar .count {
opacity: 0;
}
.hamburger-checkbox:checked ~ #sidebar {
flex: 0 0 100%;
font-size: 1.1em;
}
.hamburger-checkbox:checked ~ #content {
flex: 0 0 0;
}
.hamburger-checkbox:checked ~ #sidebar .count {
opacity: 100;
}
}
// -----------------------------------
// Generic styles
// -----------------------------------
body { body {
background: @body-background; background: @body-background;
color: @text-color; color: @text-color;
@ -155,43 +83,6 @@ h1 {
font-weight: bold; font-weight: bold;
} }
// -----------------------------------
// Sidebar navigation
// -----------------------------------
#sidebar {
background: @nav-background;
border-right: 1px solid @borders;
}
#sidebar ul:not(:first-child) {
margin-left: 1.5em;
}
#sidebar i.fa {
margin-right: 0.3em;
}
#sidebar a {
border-bottom: 1px solid @borders;
color: @text-color;
display: block;
padding: 0.8em 1em;
position: relative;
}
#sidebar .count {
background-color: #fcfcfc;
border: 1px solid @borders;
border-radius: 0.4em;
color: @text-light;
font-size: 0.7em;
padding: 0.4em 0.6em 0.3em 0.5em;
position: absolute;
right: 1em;
margin-top: -2px;
}
// ----------------------------------- // -----------------------------------
// Breadcrumbs navigation // Breadcrumbs navigation
// ----------------------------------- // -----------------------------------
@ -265,14 +156,6 @@ nav.breadcrumbs a {
width: 100%; width: 100%;
} }
// -----------------------------------
// Navigation hovers
// -----------------------------------
#sidebar a:hover {
background-color: @nav-highlight;
}
// ----------------------------------- // -----------------------------------
// Photo and video thumbnails // Photo and video thumbnails
// ----------------------------------- // -----------------------------------

@ -1,17 +0,0 @@
<li>
<!-- This album -->
<a href="{{filename}}.html">
{{#if albums.length}}
<i class="fa fa-folder-o"></i>
{{else}}
<i class="fa fa-photo"></i>
{{/if}}
{{title}}<span class="count">{{stats.total}}</span>
</a>
<!-- And nested album -->
<ul>
{{#each albums}}
{{> sidebar-album}}
{{/each}}
</ul>
</li>

@ -1,106 +1,84 @@
<div id="wrapper"> <div id="content">
<!-- <!--
Sidebar with album hierarchy Gallery title
--> -->
<!-- <input id="hamburger" class="hamburger-checkbox" type="checkbox" /> <header style="color: #17baef;">
<nav id="sidebar"> <h1>{{gallery.title}}</h1>
<ul> </header>
{{> sidebar-album gallery.home }}
</ul>
</nav> -->
<div id="container"> <!--
Breadcrumbs of parent albums
-->
<!-- <nav class="breadcrumbs">
Gallery title <div class="mask"></div>
--> {{#each breadcrumbs~}}
<header style="color: #17baef;"> <a class="breadcrumb-item" href="{{filename}}.html">{{title}}</a>
<h1> <span class="separator">&gt;</span>
<label for="hamburger" class="hamburger-label noselect" role="button"> {{~/each~}}
<i class="fa fa-navicon"></i> <a class="breadcrumb-item" href="{{album.filename}}.html">{{album.title}}</a>
</label> </nav>
{{gallery.title}}
</h1> <!--
</header> Main gallery panel
-->
<section id="content">
<!-- <!--
Breadcrumbs of parent albums Nested albums, if any
--> -->
<ul id="albums">
<nav class="breadcrumbs"> {{#each album.albums~}}
<div class="mask"></div> <li>
{{#each breadcrumbs~}} <a href="{{filename}}.html">
<a class="breadcrumb-item" href="{{filename}}.html">{{title}}</a> <h3>{{title}}</h3>
<span class="separator">&gt;</span> <div class="meta">
{{~/each~}} <time>{{{date stats.fromDate}}} - {{{date stats.toDate}}}</time><span class="separator">,</span>
<a class="breadcrumb-item" href="{{album.filename}}.html">{{album.title}}</a> <span class="summary">{{summary}}</span>
</nav> </div>
<ul class="grid clearfix">
{{~#slice previews count=8~}}
<li><img src="{{this.urls.thumb}}" /></li>
{{~/slice}}
</ul>
</a>
</li>
{{~/each}}
</ul>
<!-- <!--
Main gallery panel All photos and videos
--> -->
<section id="content"> <ul id="media">
{{#each album.files}}
<!-- {{#if isVideo~}}
Nested albums, if any <li data-html="#media{{id}}"
--> data-poster="{{urls.poster}}"
<ul id="albums"> data-download-url="{{{download this}}}">
{{#each album.albums~}} <a href="{{{download this}}}">
<li> <img src="{{urls.thumb}}"
<a href="{{filename}}.html"> width="{{../gallery.thumbsSize}}"
<h3>{{title}}</h3> height="{{../gallery.thumbSize}}"
<div class="meta"> alt="{{filename}}" />
<time>{{{date stats.fromDate}}} - {{{date stats.toDate}}}</time><span class="separator">,</span> </a>
<span class="summary">{{summary}}</span> <img class="video-overlay" src="public/play.png" />
</div> </li>
<!-- <div class="mosaic" style="opacity: 0.8"> {{else}}
<img src="{{filename}}.png" /> <li data-src="{{urls.large}}"
</div> --> data-sub-html="{{caption}}"
<ul class="grid clearfix"> data-download-url="{{{download this}}}">
{{~#slice previews count=8~}} <a href="{{{download this}}}">
<li><img src="{{this.urls.thumb}}" /></li> <img src="{{urls.thumb}}"
{{~/slice}} width="{{../gallery.thumbSize}}"
</ul> height="{{../gallery.thumbSize}}"
</a> alt="{{filename}}" />
</li> </a>
{{~/each}} </li>
</ul> {{~/if}}
{{/each}}
<!-- </ul>
All photos and videos
-->
<ul id="media">
{{#each album.files}}
{{#if isVideo}}
<li data-html="#media{{id}}"
data-poster="{{urls.poster}}"
data-download-url="{{{download this}}}">
<a href="{{{download this}}}">
<img src="{{urls.thumb}}"
width="{{../gallery.thumbsSize}}"
height="{{../gallery.thumbSize}}"
alt="{{filename}}" />
</a>
<img class="video-overlay" src="public/play.png" />
</li>
{{else}}
<li data-src="{{urls.large}}"
data-sub-html="{{caption}}"
data-download-url="{{{download this}}}">
<a href="{{{download this}}}">
<img src="{{urls.thumb}}"
width="{{../gallery.thumbSize}}"
height="{{../gallery.thumbSize}}"
alt="{{filename}}" />
</a>
</li>
{{/if}}
{{/each}}
</ul>
</section>
</div> </section>
</div> </div>

@ -3,9 +3,9 @@
// Variables for user customisation // Variables for user customisation
// ----------------------------------- // -----------------------------------
@body-background: #f6f6f6; @body-background: #fff;
@header-background: #444; @header-background: #fff;
@header-foreground: #fff; @header-foreground: #17baef;
@nav-background: #fafafa; @nav-background: #fafafa;
@nav-highlight: #fff; @nav-highlight: #fff;
@album-background: #fafafa; @album-background: #fafafa;
@ -15,7 +15,7 @@
@mobile-trigger: 450px; @mobile-trigger: 450px;
// ----------------------------------- // -----------------------------------
// Page structure // Generic styles
// ----------------------------------- // -----------------------------------
* { * {
@ -32,80 +32,8 @@ html, body {
margin: 0; margin: 0;
} }
#wrapper {
display: flex;
min-height: 100vh;
flex-direction: column;
}
#container {
// display: flex;
// flex: 1;
}
#sidebar {
overflow: hidden;
order: -1;
}
#content {
flex: 1;
}
// -----------------------------------
// Slide-out navigation
// -----------------------------------
.hamburger-checkbox {
position: absolute;
opacity: 0;
}
.hamburger-label {
display: none;
}
#sidebar {
flex: 0 0 15em;
}
@media only screen and (max-width: @mobile-trigger) {
.hamburger-label {
display: inline-block;
}
#sidebar {
flex: 0 0 0;
transition: all .2s;
white-space: nowrap;
}
#sidebar .count {
opacity: 0;
}
.hamburger-checkbox:checked ~ #sidebar {
flex: 0 0 100%;
font-size: 1.1em;
}
.hamburger-checkbox:checked ~ #content {
flex: 0 0 0;
}
.hamburger-checkbox:checked ~ #sidebar .count {
opacity: 100;
}
}
// -----------------------------------
// Generic styles
// -----------------------------------
body { body {
background: #fff; background: @body-background;
color: #444; color: #444;
font-family: 'Open Sans', sans-serif; font-family: 'Open Sans', sans-serif;
font-size: 16px; font-size: 16px;
@ -138,61 +66,18 @@ a {
// ----------------------------------- // -----------------------------------
header { header {
background: #fff; background: @header-background;
font-size: 1.4em; font-size: 1.4em;
font-family: 'Montserrat', sans-serif; font-family: 'Montserrat', sans-serif;
padding: 0; padding: 0;
color: #17baef; color: @header-foreground;
}
header .hamburger-label {
// color: #fff;
margin-right: 0.4em;
} }
h1 { h1 {
margin: 1em; margin: 1em;
color: #17baef;
display: inline-block; display: inline-block;
} }
// -----------------------------------
// Sidebar navigation
// -----------------------------------
#sidebar {
background: @nav-background;
border-right: 1px solid @borders;
}
#sidebar ul:not(:first-child) {
margin-left: 1.5em;
}
#sidebar i.fa {
margin-right: 0.3em;
}
#sidebar a {
border-bottom: 1px solid @borders;
color: @text-color;
display: block;
padding: 0.8em 1em;
position: relative;
}
#sidebar .count {
background-color: #fcfcfc;
border: 1px solid @borders;
border-radius: 0.4em;
color: @text-light;
font-size: 0.7em;
padding: 0.4em 0.6em 0.3em 0.5em;
position: absolute;
right: 1em;
margin-top: -2px;
}
// ----------------------------------- // -----------------------------------
// Breadcrumbs navigation // Breadcrumbs navigation
// ----------------------------------- // -----------------------------------
@ -272,12 +157,18 @@ nav.breadcrumbs .separator {
} }
#albums .grid { #albums .grid {
opacity: 0.8; opacity: 0.9;
width: 400px; width: 400px;
height: 50px; height: 50px;
overflow: hidden; overflow: hidden;
} }
#albums .mosaic {
width: 400px;
opacity: 0.9;
overflow: hidden;
}
#albums .grid li { #albums .grid li {
float: left; float: left;
padding: 0; padding: 0;

Loading…
Cancel
Save