mirror of
https://github.com/yv1ing/MollyBlog.git
synced 2025-09-16 14:53:45 +08:00
125 lines
7.1 KiB
HTML
125 lines
7.1 KiB
HTML
{{ define "search.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/search.css">
|
|
<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">
|
|
<div class="d-block d-md-none" style="height: 30px;"></div>
|
|
|
|
<!-- menu -->
|
|
<div class="container p-3">
|
|
<div class="row pt-lg-3">
|
|
<div class="col mx-auto post-menu">
|
|
{{ range $i, $v := .menu.Items }}
|
|
<i class="{{ $v.Icon }} m-icon"></i>
|
|
<a class="main-menu-link" href="{{ $v.Url }}"> {{ $v.Name }} </a>
|
|
{{ end }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- body -->
|
|
<div class="container p-3 body-container">
|
|
<div class="row pt-lg-3">
|
|
<h3 class="search-post-title"># {{ .search_post.title }}</h3>
|
|
<div class="row pt-4">
|
|
<div class="search-wrap">
|
|
<input class="search-input" id="search-search-input" type="text">
|
|
|
|
<button class="search-button" onclick="search()">
|
|
<i class="fa-solid fa-magnifying-glass"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div class="row pt-4">
|
|
<div class="col">
|
|
{{ range $i, $v := .search_post.posts }}
|
|
<div class="row search-post-item">
|
|
<div class="col search-post-item-wrap">
|
|
<span class="d-none d-md-inline search-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 search-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>
|
|
</div>
|
|
|
|
<div class="row pt-3 pt-lg-4">
|
|
<div class="col-12 col-md-8">
|
|
<div class="search-post-pagination">
|
|
<span class="search-post-pagination-item">
|
|
<a href="/search?keyword={{ .search_post.keyword }}&page={{ .page_info.pre_page }}">
|
|
<
|
|
</a>
|
|
</span>
|
|
<span class="search-post-pagination-item">
|
|
{{ .page_info.cur_page }} / {{ .page_info.all_page }}
|
|
</span>
|
|
<span class="search-post-pagination-item">
|
|
<a href="/search?keyword={{ .search_post.keyword }}&page={{ .page_info.nxt_page }}">
|
|
>
|
|
</a>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- footer -->
|
|
<div class="special-footer">
|
|
{{ .site_info.copyright }}
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- footer -->
|
|
<div class="footer">
|
|
{{ .site_info.copyright }}
|
|
</div>
|
|
|
|
<!-- theme -->
|
|
<div class="theme-wrap" onclick="changeTheme()">
|
|
<svg t="1735089313984" class="icon theme-btn" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6403" width="36" height="36">
|
|
<path d="M326.475761 829.999912l-36.600808 9.805927c-10.107989 2.709493-16.101899 13.097392-13.396433 23.201354 2.709493 10.107989 13.097392 16.101899 23.205381 13.395426l36.597787-9.80492c10.107989-2.709493 16.105926-13.097392 13.395426-23.205381C346.971649 833.288356 336.579722 827.290419 326.475761 829.999912L326.475761 829.999912zM371.675256 940.076204l-26.79186 26.795887c-7.402524 7.398496-7.402524 19.39437 0 26.787832 7.393462 7.402524 19.393363 7.402524 26.79186 0l26.79186-26.787832c7.398496-7.402524 7.398496-19.39437 0-26.795887C391.069627 932.681735 379.073752 932.681735 371.675256 940.076204L371.675256 940.076204zM734.141157 844.576399l-38.087958-9.83714c-10.512752-2.717548-21.325551 3.300527-24.144793 13.439729-2.816221 10.14323 3.425379 20.566369 13.942158 23.287945l38.08393 9.840161c10.517786 2.718555 21.329579-3.303547 24.149827-13.442749C750.900543 857.721114 744.657936 847.297974 734.141157 844.576399L734.141157 844.576399zM648.32142 945.201183c-7.701565-7.422661-20.184765-7.422661-27.882302 0-7.700558 7.425682-7.700558 19.460824 0 26.886506l27.882302 26.882478c7.69653 7.425682 20.180737 7.425682 27.881295 0 7.697537-7.425682 7.697537-19.456796 0-26.882478L648.32142 945.201183 648.32142 945.201183zM521.348807 948.22482c-10.461401 0-18.941278 8.479877-18.941278 18.942285l0 37.891618c0 10.461401 8.479877 18.941278 18.941278 18.941278 10.462408 0 18.946312-8.479877 18.946312-18.941278L540.29512 967.167104C540.29512 956.704696 531.811215 948.22482 521.348807 948.22482L521.348807 948.22482zM540.349491 492.068463c0.008055-0.200368 0.063433-0.380598 0.063433-0.581972L540.412924 33.50669c0-9.423316-8.479877-17.061448-18.942285-17.061448-10.461401 0-18.945305 7.638132-18.945305 17.061448l0 457.300163c-154.480359 5.447178-283.226073 143.101697-283.226073 305.561517l0 18.005894 151.931965 0c11.393765 64.408601 70.091387 113.669819 140.764747 113.669819 70.678394 0 129.379037-49.261217 140.773809-113.669819l151.930958 0 0-18.005894C804.70074 640.566995 686.30265 507.517909 540.349491 492.068463L540.349491 492.068463zM511.995973 892.037329c-50.606399 0-93.024913-33.238862-104.042108-77.663066l208.09227 0C605.029948 858.798467 562.611433 892.037329 511.995973 892.037329L511.995973 892.037329zM255.904095 778.366503c9.152467-138.251594 122.705489-251.815691 256.099932-251.815691 133.387395 0 246.93941 113.564097 256.091877 251.815691L255.904095 778.366503 255.904095 778.366503zM255.904095 778.366503" fill="#6d6faa" p-id="6404"></path>
|
|
</svg>
|
|
</div>
|
|
|
|
<script src="../assets/js/global.js"></script>
|
|
<script src="../assets/js/search.js"></script>
|
|
</body>
|
|
</html>
|
|
|
|
{{ end }} |