diff options
author | mcrwfrd <mcrwfrd@gmail.com> | 2019-07-13 00:25:34 +0300 |
---|---|---|
committer | mcrwfrd <mcrwfrd@gmail.com> | 2019-07-13 00:25:34 +0300 |
commit | edc62de6245e534a2a87dc88cdb7374973cf8c6d (patch) | |
tree | d701fc120e544c958465e4b917df2164f211e374 | |
parent | 82db0539321d1fe8749c06fc1e8183eec9398855 (diff) |
Add carousel to bio page
-rw-r--r-- | content/posts/test-post.md | 3 | ||||
-rw-r--r-- | data/bioPhotos.toml | 2 | ||||
-rw-r--r-- | layouts/_default/list.html | 4 | ||||
-rw-r--r-- | layouts/_default/single.html | 6 | ||||
-rw-r--r-- | layouts/about/list.html | 46 | ||||
-rw-r--r-- | layouts/contact/list.html | 8 |
6 files changed, 54 insertions, 15 deletions
diff --git a/content/posts/test-post.md b/content/posts/test-post.md index a20e843..8681c40 100644 --- a/content/posts/test-post.md +++ b/content/posts/test-post.md @@ -2,8 +2,7 @@ title: "The Day I Met Emily Carr" date: 2019-05-12T12:14:34+06:00 image: "images/blog/post-5.jpg" -description: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore -et dolore magna aliqua." +summary: "sup" type: "post" --- diff --git a/data/bioPhotos.toml b/data/bioPhotos.toml new file mode 100644 index 0000000..7feca9b --- /dev/null +++ b/data/bioPhotos.toml @@ -0,0 +1,2 @@ +[[bioPhotos]] +photo = "../images/bio1.jpg"
\ No newline at end of file diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 5463ea6..6ec411d 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -19,9 +19,9 @@ <div class="col-md-8"> {{ range .Data.Pages }} <section class="section pt-1"> - <h4 class=""><a class="text-dark" href="{{.Permalink}}">{{.Title }}</a> + <h4 class=""><a class="text-dark" href="{{.Permalink}}">{{ .Title }}</a> </h4> - <p class="cars-text">{{.Summary}}</p> + <p class="cars-text">{{ .Summary }}</p> </section> {{ end }} </div> diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 861ad01..b01faff 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -5,10 +5,10 @@ <div class="container"> <div class="row"> <div class="col-md-8"> - <h3 class="font-tertiary mt-4 mb-2">{{.Title}}</h3> - <p class="font-secondary">by <span class="text-primary">{{$.Site.Params.Author}}</span></p> + <h3 class="font-tertiary mt-4 mb-2">{{ .Title }}</h3> + <p class="font-secondary">by <span class="text-primary">{{ $.Site.Params.Author }}</span></p> <div class="content"> - {{.Content }} + {{ .Content }} </div> </div> </div> diff --git a/layouts/about/list.html b/layouts/about/list.html index b3d39e2..c103721 100644 --- a/layouts/about/list.html +++ b/layouts/about/list.html @@ -19,13 +19,55 @@ <div class="col-md-8"> {{ .Content }} </div> - <div class="col-md-4 text-center drag-lg-top"> - <div class="shadow-down mb-4"> + </div> + </div> + </section> + <!-- /about --> + + <!-- about --> + <section class="section pt-5 pb-5"> + <div class="container"> + <div class="row"> + + <div class="col-md-3"> + </div> + + <div class="col-md-6"> + + <div id="myCarousel" class="carousel slide" data-ride="carousel"> + + <div class="carousel-inner"> + {{ range $.Site.Data.bioPhotos.bioPhotos }} + <div class="carousel-item" data-interval="10000"> + <img src="{{ .photo }}" class="d-block w-100" alt="..."> + </div> + {{ end }} + </div> + + <a class="carousel-control-prev" href="#myCarousel" role="button" data-slide="prev"> + <span class="carousel-control-prev-icon" aria-hidden="true"></span> + <span class="sr-only">Previous</span> + </a> + + <a class="carousel-control-next" href="#myCarousel" role="button" data-slide="next"> + <span class="carousel-control-next-icon" aria-hidden="true"></span> + <span class="sr-only">Next</span> + </a> + </div> </div> + + <div class="col-md-3"> + </div> + </div> </div> </section> <!-- /about --> + <script> + $(document).ready(function () { + $('#myCarousel').find('.carousel-item').first().addClass('active'); + }); + </script> {{ end }}
\ No newline at end of file diff --git a/layouts/contact/list.html b/layouts/contact/list.html index b3d39e2..02c96a2 100644 --- a/layouts/contact/list.html +++ b/layouts/contact/list.html @@ -12,20 +12,16 @@ </section> <!-- /page title --> - <!-- about --> + <!-- contact --> <section class="section pt-5"> <div class="container"> <div class="row"> <div class="col-md-8"> {{ .Content }} </div> - <div class="col-md-4 text-center drag-lg-top"> - <div class="shadow-down mb-4"> - </div> - </div> </div> </div> </section> - <!-- /about --> + <!-- /contact --> {{ end }}
\ No newline at end of file |