Hi all,
I am tinkering with making a custom theme.
And I am currently a bit stuck on getting all pages to show nicely on their “list” pages.
For the main landing page, I am using _default/index.html for a nice look.
However, for other pages, I am unable to use it and am forced into _default/list.html
The issue is, that with _default/list.html it adds the boilerplate from _default/baseof.html.
Would it be possible to use the _default/index.html for all landing pages or use _default/list.html without the “baseof” boilerplate?
For clarification, I have the files:
_default/index.html
<head>
{{ partial "head.html" . }}
</head>
<body>
<header>
{{ partial "header.html" . }}
</header>
<div class="projects">
{{ $portfolio := site.GetPage "/portfolio/" }}
<ul class="project_banners">
{{ range $portfolio.Pages }}
{{ $banner := .Resources.Get "banner.png" }}
<li>
<a href="{{ .RelPermalink }}">
<img src="{{ $banner.Permalink }}">
</a>
</li>
{{ end }}
</ul>
</div>
</body>
_default/list.html
{{ define "main" }}
<div class="projects">
<ul class="project_banners">
{{ range .Pages }}
<li>
<a href="{{ .RelPermalink }}">
{{ with .Resources.GetMatch "banner.png" }}
<img src="{{ .Permalink }}">
{{ end }}
</a>
</li>
{{ end }}
</ul>
</div>
{{ end }}
_default/baseof.html
<!DOCTYPE html>
<html lang="{{ or site.Language.LanguageCode site.Language.Lang }}" dir="{{ or site.Language.LanguageDirection `ltr` }}">
<head>
{{ partial "head.html" . }}
</head>
<body>
<header>
{{ partial "header.html" . }}
</header>
<main class="main_body">
{{ block "main" . }}{{ end }}
</main>
<footer>
{{ partial "footer.html" . }}
</footer>
</body>
</html>
I want to prevent list and baseof being combined, since that means it does not occupy the full page.
If this is not possible, I could solve the issue with css and forcing the list to use the full viewport.
But I would like to avoid that since it would add a bunch of things to keep track of.