Temporarily remove the recursive nav from the Classic theme

- The recursive call within Handlebars was causing huge memory spikes
- It seems it deep cloned (?) the entire Album objects at every recursive call
- This itself could bloat to several hundred megs of RAM for very large galleries

Replacing it with a simple breadcrumbs navigation for now.
exif-summary
Romain 7 years ago
parent 24b2f9bd7c
commit 9a2da3e5ea

@ -1,10 +0,0 @@
{{#compare id '==' @root.album.id}}
<li class="active">
{{else}}
<li>
{{/compare}}
<!-- This album -->
<a href="{{relative url}}">{{title}}</a>
<!-- And nested album -->
</li>
{{#each albums}}{{> nav}}{{/each}}

@ -5,11 +5,15 @@
</a>
</header>
<!--
Breadcrumbs of parent albums
-->
{{#compare album.depth '!=' 0}}
<nav>
{{#each gallery.home.albums}}
{{> nav}}
{{/each}}
<nav class="breadcrumbs">
{{#each breadcrumbs~}}
<a class="breadcrumb-item" href="{{relative url}}">{{title}}</a>&nbsp;&nbsp;/&nbsp;&nbsp;
{{~/each~}}
<a class="breadcrumb-item" href="{{relative album.url}}">{{album.title}}</a>
</nav>
{{/compare}}

@ -59,9 +59,11 @@ nav li {
nav a {
color: #666;
display: inline-block;
min-width: 7em;
padding: 0.4em 1em;
text-decoration: none;
background-color: #33609c;
color: #fff;
font-weight: bold;
}
nav li.active {

Loading…
Cancel
Save