In Index template removed one tab level to save horizontal space.
This commit is contained in:
parent
c63d59f0a4
commit
2c8a9e3e61
164
web/index.templ
164
web/index.templ
@ -8,92 +8,92 @@ import "strconv"
|
|||||||
|
|
||||||
|
|
||||||
templ Index(currentPath, progVer string, stat *files.DirStat, entries *[]files.DirEntry, r *http.Request) {
|
templ Index(currentPath, progVer string, stat *files.DirStat, entries *[]files.DirEntry, r *http.Request) {
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang={ i18n.GetLocale(ctx).Code().String() }>
|
<html lang={ i18n.GetLocale(ctx).Code().String() }>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<meta name="theme-color" content="#cd2682" />
|
<meta name="theme-color" content="#cd2682" />
|
||||||
<meta name="color-scheme" content="light dark" />
|
<meta name="color-scheme" content="light dark" />
|
||||||
|
|
||||||
<title>Arav's dwelling / { i18n.T(ctx, "title") }</title>
|
<title>Arav's dwelling / { i18n.T(ctx, "title") }</title>
|
||||||
|
|
||||||
<meta name="description" content={ i18n.T(ctx, "description") } />
|
<meta name="description" content={ i18n.T(ctx, "description") } />
|
||||||
<meta name="keywords" content={ i18n.T(ctx, "keywords") } />
|
<meta name="keywords" content={ i18n.T(ctx, "keywords") } />
|
||||||
|
|
||||||
<link rel="icon" href="/assets/img/favicon.svg" sizes="any" type="image/svg+xml"/>
|
<link rel="icon" href="/assets/img/favicon.svg" sizes="any" type="image/svg+xml"/>
|
||||||
<link rel="stylesheet" href="/assets/css/main.css" />
|
<link rel="stylesheet" href="/assets/css/main.css" />
|
||||||
<script src="/assets/js/main.js" defer></script>
|
<script src="/assets/js/main.js" defer></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<svg width="360" viewBox="0 -36 360 66">
|
<svg width="360" viewBox="0 -36 360 66">
|
||||||
<text y="7" textLength="360" lengthAdjust="spacingAndGlyphs">Arav's dwelling</text>
|
<text y="7" textLength="360" lengthAdjust="spacingAndGlyphs">Arav's dwelling</text>
|
||||||
<text y="25" textLength="360" lengthAdjust="spacingAndGlyphs">Welcome to my sacred place, wanderer</text>
|
<text y="25" textLength="360" lengthAdjust="spacingAndGlyphs">Welcome to my sacred place, wanderer</text>
|
||||||
</svg>
|
</svg>
|
||||||
<nav>
|
<nav>
|
||||||
<a href={ templ.SafeURL(utils.MainSite(r.Host)) }>{ i18n.T(ctx, "back-home") }</a>
|
<a href={ templ.SafeURL(utils.MainSite(r.Host)) }>{ i18n.T(ctx, "back-home") }</a>
|
||||||
<h1>{ i18n.T(ctx, "title") }</h1>
|
<h1>{ i18n.T(ctx, "title") }</h1>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<section>
|
<section>
|
||||||
<span><a href="/">{ i18n.T(ctx, "curpath-root") }</a>@templ.Raw(currentPath)</span>
|
<span><a href="/">{ i18n.T(ctx, "curpath-root") }</a>@templ.Raw(currentPath)</span>
|
||||||
<p>{ i18n.T(ctx, "stats.files") }: { strconv.FormatInt(stat.Files, 10) } ({ stat.FilesSize }); { i18n.T(ctx, "stats.directories") }: { strconv.FormatInt(stat.Directories, 10) }.</p>
|
<p>{ i18n.T(ctx, "stats.files") }: { strconv.FormatInt(stat.Files, 10) } ({ stat.FilesSize }); { i18n.T(ctx, "stats.directories") }: { strconv.FormatInt(stat.Directories, 10) }.</p>
|
||||||
<input type="text" name="filter" placeholder={ i18n.T(ctx, "stats.filter") } class="hidden">
|
<input type="text" name="filter" placeholder={ i18n.T(ctx, "stats.filter") } class="hidden">
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{ i18n.T(ctx, "table.name") }</th>
|
<th>{ i18n.T(ctx, "table.name") }</th>
|
||||||
<th>{ i18n.T(ctx, "table.date") }</th>
|
<th>{ i18n.T(ctx, "table.date") }</th>
|
||||||
<th>{ i18n.T(ctx, "table.size") }</th>
|
<th>{ i18n.T(ctx, "table.size") }</th>
|
||||||
|
</tr>
|
||||||
|
<tr tabindex="0">
|
||||||
|
<td><a href="../">../</a></td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
for i, entry := range *entries {
|
||||||
|
<tr tabindex={ strconv.FormatInt(int64(i)+1, 10) }>
|
||||||
|
<td><a href={ templ.SafeURL(entry.Link) }>{ entry.Name }</a></td>
|
||||||
|
<td>{ utils.ToClientTimezone(entry.Datetime, r).Format(files.FileDateFormat) }</td>
|
||||||
|
<td>{ entry.Size }</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr tabindex="0">
|
}
|
||||||
<td><a href="../">../</a></td>
|
</tbody>
|
||||||
</tr>
|
</table>
|
||||||
</thead>
|
</section>
|
||||||
<tbody>
|
<section>
|
||||||
for i, entry := range *entries {
|
<span>@templ.Raw(currentPath)</span>
|
||||||
<tr tabindex={ strconv.FormatInt(int64(i)+1, 10) }>
|
</section>
|
||||||
<td><a href={ templ.SafeURL(entry.Link) }>{ entry.Name }</a></td>
|
<noscript>
|
||||||
<td>{ utils.ToClientTimezone(entry.Datetime, r).Format(files.FileDateFormat) }</td>
|
|
||||||
<td>{ entry.Size }</td>
|
|
||||||
</tr>
|
|
||||||
}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
<section>
|
<section>
|
||||||
<span>@templ.Raw(currentPath)</span>
|
<p>{ i18n.T(ctx, "no-script-explain") }</p>
|
||||||
</section>
|
</section>
|
||||||
<noscript>
|
</noscript>
|
||||||
<section>
|
<section id="instruction" class="hidden">
|
||||||
<p>{ i18n.T(ctx, "no-script-explain") }</p>
|
<p>{ i18n.T(ctx, "instruction") }</p>
|
||||||
</section>
|
</section>
|
||||||
</noscript>
|
</main>
|
||||||
<section id="instruction" class="hidden">
|
<footer>
|
||||||
<p>{ i18n.T(ctx, "instruction") }</p>
|
<a href="?lang=ru">рус</a>
|
||||||
</section>
|
<a href="?lang=en">eng</a>
|
||||||
</main>
|
<br/>
|
||||||
<footer>
|
v{ progVer } 2017—2024 { i18n.T(ctx, "footer.author") } <<a href="mailto:me@arav.su">me@arav.su</a>> <a href={ templ.SafeURL(utils.MainSite(r.Host) + "/privacy") }>{ i18n.T(ctx, "footer.privacy") }</a>
|
||||||
<a href="?lang=ru">рус</a>
|
</footer>
|
||||||
<a href="?lang=en">eng</a>
|
<div id="overlay">
|
||||||
<br/>
|
<button name="prev">❰</button>
|
||||||
v{ progVer } 2017—2024 { i18n.T(ctx, "footer.author") } <<a href="mailto:me@arav.su">me@arav.su</a>> <a href={ templ.SafeURL(utils.MainSite(r.Host) + "/privacy") }>{ i18n.T(ctx, "footer.privacy") }</a>
|
<div></div>
|
||||||
</footer>
|
<span></span>
|
||||||
<div id="overlay">
|
<span class="c-autoplay">
|
||||||
<button name="prev">❰</button>
|
<input id="c-autoplay" type="checkbox" name="autoplay">
|
||||||
<div></div>
|
<label for="c-autoplay">{ i18n.T(ctx, "autoplay") }</label>
|
||||||
<span></span>
|
</span>
|
||||||
<span class="c-autoplay">
|
<button name="next">❱</button>
|
||||||
<input id="c-autoplay" type="checkbox" name="autoplay">
|
</div>
|
||||||
<label for="c-autoplay">{ i18n.T(ctx, "autoplay") }</label>
|
</body>
|
||||||
</span>
|
</html>
|
||||||
<button name="next">❱</button>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user