Skip to content

Commit

Permalink
topページにCarouselを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
xsuz committed Oct 18, 2023
1 parent 0abc23e commit 06c3981
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 11 deletions.
8 changes: 1 addition & 7 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,7 @@ <h3>{{ .Title }}</h3>

{{else if eq .Title (.Date.Format "2006-01") }}
<h3>{{ .Date.Format "2006年01月"}}</h3>
<ul class="list-group">
{{- range (.Paginate $pages).Pages }}
<li class="list-group-item">
{{ partial "excerpt.html" . }}
</li>
{{- end }}
</ul>
{{ partial "pagination.html" . }}
{{ else if eq (lower .Title) "tags" }}
<!--Tags-->
<h3><div class="bi bi-tags">Tags</div></h3>
Expand Down
30 changes: 28 additions & 2 deletions layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
{{- define "main" -}}

<img src="{{.Site.BaseURL}}/img/top.jpg" class="img-fluid" alt="Responsive image">
<!-- 1920x1080の画像を用いること -->
<div id="top" class="carousel slide" data-bs-ride="carousel" data-bs-interval="3000">
<div class="carousel-inner">
<div class="carousel-item active">
<img src="{{.Site.BaseURL}}/img/top/top.jpg" class="img-fluid" alt="Responsive image">
</div>
<div class="carousel-item">
<img src="{{.Site.BaseURL}}/img/top/about.jpg" class="img-fluid" alt="Responsive image">
</div>
<div class="carousel-item">
<img src="{{.Site.BaseURL}}/img/top/teams.jpg" class="img-fluid" alt="Responsive image">
</div>
<div class="carousel-item">
<img src="{{.Site.BaseURL}}/img/top/access.jpg" class="img-fluid" alt="Responsive image">
</div>
<div class="carousel-item">
<img src="{{.Site.BaseURL}}/img/top/sponsor.png" class="img-fluid" alt="Responsive image">
</div>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#top" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#top" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>

<h1>最新情報</h1>

Expand Down
4 changes: 2 additions & 2 deletions layouts/shortcodes/imgs.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="carousel slide" data-bs-ride="carousel">
<div class="carousel slide" data-bs-ride="carousel" data-bs-interval="3000">
{{ $isFirst := true }}
<div class="carousel-inner">
{{ range .Params }}
Expand All @@ -7,7 +7,7 @@
width: auto;
height: 200px;
display: block;
background-size: cover;" alt="..." data-bs-interval="1000">
background-size: cover;" alt="...">
</div>
{{ $isFirst = false }}
{{ end }}
Expand Down
Binary file added static/img/top/about.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/top/access.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/top/sponsor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/top/teams.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes

0 comments on commit 06c3981

Please sign in to comment.