mirror of
https://github.com/yv1ing/MollyBlog.git
synced 2025-09-16 14:53:45 +08:00
128 lines
4.5 KiB
HTML
128 lines
4.5 KiB
HTML
{{ define "index.html" }}
|
|
|
|
<html lang="{{ .site_info.language }}">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{{ .site_info.title }}</title>
|
|
<link rel="icon" type="image/x-icon" href="../assets/img/logo.png"/>
|
|
<link rel="stylesheet" href="../assets/css/lib/fontawesome.all.min.css">
|
|
<link rel="stylesheet" href="../assets/css/lib/bootstrap.min.css">
|
|
<link rel="stylesheet" href="../assets/css/global.css">
|
|
<link rel="stylesheet" href="../assets/css/index.css">
|
|
<script src="../assets/js/lib/typed.umd.js"></script>
|
|
<script src="../assets/js/lib/jquery.min.js"></script>
|
|
<script src="../assets/js/lib/bootstrap.min.js"></script>
|
|
<script src="../assets/js/lib/fontawesome.all.min.js"></script>
|
|
|
|
<!-- statistics script -->
|
|
{{ if .statistics.enable }}
|
|
{{ .statistics.script }}
|
|
{{ end }}
|
|
</head>
|
|
<body>
|
|
<div class="root-container">
|
|
<!-- header -->
|
|
<div class="container p-3">
|
|
<div class="row pt-3 pt-md-4 pt-lg-5">
|
|
<div class="col main-logo">
|
|
<div class="main-logo-img"></div>
|
|
<div class="main-logo-txt">
|
|
{{ .site_info.title }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- menu -->
|
|
<div class="container p-3">
|
|
<div class="row pt-lg-3">
|
|
<div class="col mx-auto">
|
|
{{ range $i, $v := .menu.Items }}
|
|
<span class="main-menu-item">
|
|
<i class="{{ $v.Icon }} m-icon"></i>
|
|
<a class="main-menu-link" href="{{ $v.Url }}"> {{ $v.Name }} </a>
|
|
</span>
|
|
{{ end }}
|
|
</div>
|
|
</div>
|
|
<div class="row pt-4">
|
|
<div class="search-wrap">
|
|
<input class="search-input" id="index-search-input" type="text">
|
|
|
|
<button class="search-button" onclick="search()">
|
|
<i class="fa-solid fa-magnifying-glass"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- body -->
|
|
<div class="container p-3">
|
|
<div class="row pt-lg-3">
|
|
<h4 class="recent-post-title"># {{ .recent_post.title }}</h4>
|
|
<div class="col-12 col-xl-9">
|
|
<div>
|
|
{{ range $i, $v := .recent_post.posts }}
|
|
<div class="row recent-post-item">
|
|
<div class="col recent-post-item-wrap">
|
|
<span class="d-none d-md-inline recent-post-item-date">{{ $v.Date }} | </span>
|
|
<span>
|
|
<a href="/post/{{ $v.HtmlHash }}">{{ $v.Title }}</a>
|
|
</span>
|
|
</div>
|
|
<div class="col d-none d-md-block recent-post-item-wrap">
|
|
<span style="color: var(--secondary-text-color)">
|
|
[
|
|
{{ range $i2, $v2 := $v.TagHashes }}
|
|
<a href="/tag/{{ $v2.Hash }}" style="color: var(--secondary-text-color)">{{ $v2.Name }}</a>
|
|
{{ if lt (add $i2 1) (len $v.TagHashes) }}
|
|
,
|
|
{{ end }}
|
|
{{ end }}
|
|
]
|
|
</span>
|
|
</div>
|
|
</div>
|
|
{{ end }}
|
|
</div>
|
|
</div>
|
|
|
|
<!-- special info -->
|
|
<!-- motto -->
|
|
<div class="col-xl-3 d-none d-xl-grid carousel slide special-info-area">
|
|
<span id="index-motto-container"></span>
|
|
</div>
|
|
{{ .site_info.motto_html }}
|
|
<script>
|
|
const options = {
|
|
strings: motto,
|
|
typeSpeed: 30,
|
|
startDelay: 100,
|
|
showCursor: false,
|
|
};
|
|
new Typed("#index-motto-container", options);
|
|
</script>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- footer -->
|
|
<div class="footer">
|
|
{{ .site_info.copyright }}
|
|
</div>
|
|
|
|
|
|
<!-- theme -->
|
|
<div class="theme-wrap" onclick="changeTheme()">
|
|
<i class="fa-solid fa-circle-half-stroke" style="width: 100%; height: 100%"></i>
|
|
</div>
|
|
|
|
<script src="../assets/js/global.js"></script>
|
|
<script src="../assets/js/index.js"></script>
|
|
</body>
|
|
</html>
|
|
|
|
{{ end }} |