Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to Boostrap 4 #246

Open
wants to merge 4 commits into
base: master_v2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,8 @@ paginate = 10
# Enable or disable top bar with social icons
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ line 85 you should update the comment about the default theme color (now turquoise instead of light-blue)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

[params.topbar]
enable = true
text = """<p class="hidden-sm hidden-xs">Contact us on +420 777 555 333 or [email protected].</p>
<p class="hidden-md hidden-lg"><a href="#" data-animate-hover="pulse"><i class="fas fa-phone"></i></a>
<a href="#" data-animate-hover="pulse"><i class="fas fa-envelope"></i></a>
</p>
"""
text = """<p>Contact us on +420 777 555 333 or [email protected].</p>
"""

# Enable and disable widgets for the right sidebar
[params.widgets]
Expand Down Expand Up @@ -161,11 +158,11 @@ paginate = 10

[params.see_more]
enable = true
icon = "far fa-file-alt"
icon = "far fa-file-code"
title = "Do you want to see more?"
subtitle = "We have prepared for you more than 40 different HTML pages, including 5 variations of homepage."
link_url = "#"
link_text = "Check other homepages"
link_text = "See another homepage"

[params.clients]
enable = true
Expand Down
25 changes: 12 additions & 13 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<div id="content">
<div class="container">
<div class="row">
<div class="row bar">
<!-- *** LEFT COLUMN *** -->

<div class="col-md-9" id="blog-listing-medium">
Expand All @@ -30,23 +30,22 @@
<div class="image">
<a href="{{ .Permalink }}">
{{ if .Params.banner }}
<img src="{{ .Params.banner | relURL }}" class="img-responsive" alt="">
<img src="{{ .Params.banner | relURL }}" class="img-fluid" alt="">
{{ else }}
<img src="{{ "img/placeholder.png" | relURL }}" class="img-responsive" alt="">
{{ end }}
<img src="{{ "img/placeholder.png" | relURL }}" class="img-fluid" alt=""> {{ end }}
</a>
</div>
</div>
<div class="col-md-8">
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
<div class="clearfix">
<h2 class="h3 mt-0"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
<div class="d-flex flex-wrap justify-content-between text-xs">
<p class="author-category">
{{ if isset .Params "author" }}
{{ i18n "authorBy" }} <a href="#">{{ .Params.author }}</a>
{{ end }}
{{ if isset .Params "categories" }}
{{ if gt (len .Params.categories) 0 }}
in <a href="{{ "categories/" | relURL }}{{ index .Params.categories 0 | urlize | lower }}">{{ index .Params.categories 0 }}</a>
in <a href="{{ $.Site.BaseURL }}categories/{{ index .Params.categories 0 | urlize | lower }}">{{ index .Params.categories 0 }}</a>
{{ end }}
{{ end }}

Expand All @@ -56,24 +55,24 @@ <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
</p>
</div>
<p class="intro">{{ .Summary }}</p>
<p class="read-more"><a href="{{ .Permalink }}" class="btn btn-template-main">{{ i18n "continueReading" }}</a>
<p class="read-more text-right"><a href="{{ .Permalink }}" class="btn btn-template-outlined">{{ i18n "continueReading" }}</a>
</p>
</div>
</div>
</section>
{{ end }}

<ul class="pager">
<ul class="pager d-flex align-items-center justify-content-between list-unstyled">
{{ if .Paginator.HasPrev }}
<li class="previous"><a href="{{ .Paginator.Prev.URL | relURL }}">&larr; {{ i18n "newer" }}</a></li>
<li class="previous"><a class="btn btn-template-outlined" href="{{ .Paginator.Prev.URL | relURL }}">&larr; {{ i18n "newer" }}</a></li>
{{ else }}
<li class="previous disabled"><a href="#">&larr; {{ i18n "newer" }}</a></li>
<li class="previous disabled"><a class="btn btn-template-outlined" href="#">&larr; {{ i18n "newer" }}</a></li>
{{ end }}

{{ if .Paginator.HasNext }}
<li class="next"><a href="{{ .Paginator.Next.URL | relURL }}">{{ i18n "older" }} &rarr;</a></li>
<li class="next"><a class="btn btn-template-outlined" href="{{ .Paginator.Next.URL | relURL }}">{{ i18n "older" }} &rarr;</a></li>
{{ else }}
<li class="next disabled"><a href="#">{{ i18n "older" }} &rarr;</a></li>
<li class="next disabled"><a class="btn btn-template-outlined" href="#">{{ i18n "older" }} &rarr;</a></li>
{{ end }}
</ul>
</div>
Expand Down
36 changes: 20 additions & 16 deletions layouts/partials/carousel.html
Original file line number Diff line number Diff line change
@@ -1,29 +1,33 @@
{{ if isset .Site.Params "carousel" }}
{{ if .Site.Params.carousel.enable }}
{{ if gt (len .Site.Data.carousel) 0 }}
<section>
<div class="home-carousel">
<div class="dark-mask"></div>
<div class="container">
<div class="homepage owl-carousel">
{{ range sort .Site.Data.carousel "weight" }}
<div class="item">
<div class="row">
<div class="col-sm-5 right">
<h1>{{ .title }}</h1>
{{ .description | safeHTML }}
</div>
<div class="col-sm-7">
<img class="img-responsive" src="{{ .image }}" alt="">
<!-- carousel start -->
<section style="background: url('../img/photogrid.jpg') center center repeat; background-size: cover;" class="bar background-white relative-positioned">
<div class="container">
<div class="home-carousel">
<div class="dark-mask mask-primary"></div>
<div class="container">
<div class="homepage owl-carousel owl-loaded owl-drag">
{{ range sort .Site.Data.carousel "weight" }}
<div class="item">
<div class="row">
<div class="col-sm-5 right">
<h1>{{ .title }}</h1>
{{ .description | safeHTML }}
</div>
<div class="col-sm-7">
<img class="img-responsive" src="{{ .image }}" alt="">
</div>
</div>
</div>
{{ end }}
</div>
{{ end }}
<!-- /.project owl-slider -->
</div>
<!-- /.project owl-slider -->
</div>
</div>
</section>
<!-- carousel start -->
{{ end }}
{{ end }}
{{ end }}
46 changes: 21 additions & 25 deletions layouts/partials/clients.html
Original file line number Diff line number Diff line change
@@ -1,34 +1,30 @@
{{ if isset .Site.Params "clients" }}
{{ if .Site.Params.clients.enable }}
{{ if gt (len .Site.Data.clients) 0 }}
<section class="bar background-gray no-mb">
<section class="bar bg-gray">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="heading text-center">
<h2>{{ .Site.Params.clients.title | markdownify }}</h2>
</div>
<div class="heading text-center">
<h2>{{ .Site.Params.clients.title | markdownify }}</h2>
</div>

<p class="lead">
{{ .Site.Params.clients.subtitle | markdownify }}
</p>
<p class="lead">
{{ .Site.Params.clients.subtitle | markdownify }}
</p>

<ul class="owl-carousel customers">
{{ range .Site.Data.clients }}
<li class="item" title="{{ .name }}">
{{ if .url }}
<a href="{{ .url }}" target="_blank">
<img src="{{ .image }}" alt="{{ .name }}" class="img-responsive" />
</a>
{{ else }}
<img src="{{ .image }}" alt="{{ .name }}" class="img-responsive" />
{{ end }}
</li>
{{ end }}
</ul>
<!-- /.owl-carousel -->
</div>
</div>
<ul class="list-unstyled owl-carousel customers no-mb">
{{ range .Site.Data.clients }}
<li class="item" title="{{ .name }}">
{{ if .url }}
<a href="{{ .url }}" target="_blank">
<img src="{{ .image }}" alt="{{ .name }}" class="img-responsive" />
</a>
{{ else }}
<img src="{{ .image }}" alt="{{ .name }}" class="img-responsive" />
{{ end }}
</li>
{{ end }}
</ul>
<!-- /.owl-carousel -->
</div>
</section>
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/contact.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="row">
<div class="col-md-8">

<section>
<section class="bar">

{{ .Content }}

Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/features.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
{{ with $element.url }}
<a href="{{ $element.url }}">
{{ end }}
<div class="icon">
<div class="icon-outlined">
<i class="{{ .icon }}"></i>
</div>
{{ with $element.url }}
</a>
{{ end }}
<h3>{{ $element.name | markdownify }}</h3>
<h3 class="h4">{{ $element.name | markdownify }}</h3>
Copy link
Contributor

@ryanfox1985 ryanfox1985 Dec 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it sounds weird h3 and class h4.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. I just ripped this off from the Boostrapious live demo/raw distro. We download the raw distro from them and pay for a non-attribution license.

Copy link
Contributor

@ryanfox1985 ryanfox1985 Dec 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I leave the comment opened to remember this on the final check

<p>{{ $element.description | markdownify }}</p>
</div>
</div>
Expand Down
131 changes: 53 additions & 78 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,89 +1,64 @@
<footer id="footer">
<footer class="main-footer">
<div class="container">
<div class="row">
{{ if isset .Site.Params "about_us" }}
<div class="col-lg-3">
<h4 class="h6">{{ i18n "aboutUs" }}</h4>
{{ .Site.Params.about_us | safeHTML }}
<hr class="d-block d-lg-none">
</div>
{{ end }}

{{ if isset .Site.Params "about_us" }}
<div class="col-md-4 col-sm-6">
<h4>{{ i18n "aboutUs" }}</h4>

{{ .Site.Params.about_us | safeHTML }}

<hr class="hidden-md hidden-lg hidden-sm">
<div class="col-lg-3">
{{ if isset .Site.Params "recent_posts" }} {{ if .Site.Params.recent_posts.enable }}
<h4 class="h6">{{ i18n "recentPosts" }}</h4>
<ul class="list-unstyled footer-blog-list"></ul>
{{ range first 3 (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}
<li class="d-flex align-items-center">
<div class="image">
{{ if isset .Params "banner" }}
<img src="{{ .Site.BaseURL}}{{ .Params.banner }}" class="img-fluid" alt="{{ .Title }}">
{{ else }}
<img src="{{ .Site.BaseURL}}img/placeholder.png" class="img-fluid" alt="{{ .Title }}">
{{ end }}
</div>
<div class="text">
<h5 class="mb-0"><a href="{{ .Permalink }}">{{ .Title }}</a></h5>
</div>
</li>
{{ end }}
</ul>
<hr class="d-block d-lg-none">
{{ end }} {{ end }}
</div>
<!-- /.col-lg-3 -->

{{ if isset .Site.Params "address" }}
<div class="col-lg-3">
<h4 class="h6">{{ i18n "contactTitle" }}</h4>
{{ .Site.Params.address | safeHTML }}
<a href="/contact" class="btn btn-small btn-template-main">{{ i18n "contactGoTo" }}</a>
</div>
<!-- /.col-lg-3 -->
{{ end }}
</div>
<!-- /.col-md-4 -->
{{ end }}

<div class="col-md-4 col-sm-6">

{{ if isset .Site.Params "recent_posts" }} {{ if .Site.Params.recent_posts.enable }}
<h4>{{ i18n "recentPosts" }}</h4>
</div>
<!-- /.container -->

<div class="blog-entries">
{{ range first 3 (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}
<div class="item same-height-row clearfix">
<div class="image same-height-always">
<a href="{{ .Permalink }}">
{{ if isset .Params "banner" }}
<img src="{{ .Params.banner | relURL }}" class="img-responsive" alt="{{ .Title }}">
{{ else }}
<img src="{{ "img/placeholder.png" | relURL }}" class="img-responsive" alt="{{ .Title }}">
{{ end }}
</a>
</div>
<div class="name same-height-always">
<h5><a href="{{ .Permalink }}">{{ .Title }}</a></h5>
</div>
<div class="copyrights">
<div class="container">
<div class="row">
<div class="col-lg-4 text-center-md">
{{ if isset .Site.Params "copyright" }}
<p>{{ .Site.Params.copyright | safeHTML }}</p>
{{ end }}
</div>
{{ end }}
<div class="col-lg-8 text-right text-center-md">
<p>{{ i18n "templateBy" | markdownify }} <a href="https://bootstrapious.com/p/big-bootstrap-tutorial">Bootstrapious </a> & <a href="https://fity.cz/ostrava">Fity</a></p>
<!-- Please do not remove the backlink to us unless you purchase the Attribution-free License at https://bootstrapious.com/donate. Thank you. -->
<p>{{ i18n "portedBy" | markdownify }} <a href="https://github.com/devcows/hugo-universal-theme">DevCows</a>.</p>
</div>

<hr class="hidden-md hidden-lg">
{{ end }} {{ end }}

</div>
<!-- /.col-md-4 -->

{{ if isset .Site.Params "address" }}
<div class="col-md-4 col-sm-6">

<h4>{{ i18n "contactTitle" }}</h4>

{{ .Site.Params.address | safeHTML }}

<a href="/contact" class="btn btn-small btn-template-main">{{ i18n "contactGoTo" }}</a>

<hr class="hidden-md hidden-lg hidden-sm">

</div>
<!-- /.col-md-4 -->
{{ end }}

</div>
<!-- /.container -->
</footer>

<!-- /#footer -->

<!-- *** FOOTER END *** -->

<!-- *** COPYRIGHT ***
_________________________________________________________ -->

<div id="copyright">
<div class="container">
<div class="col-md-12">
{{ if isset .Site.Params "copyright" }}
<p class="pull-left">{{ .Site.Params.copyright | safeHTML }}</p>
{{ end }}
<p class="pull-right">
{{ i18n "templateBy" | markdownify }} <a href="https://bootstrapious.com/p/universal-business-e-commerce-template">Bootstrapious</a>.
<!-- Not removing this link is part of the licence conditions of the template. Thanks for understanding :) -->

{{ i18n "portedBy" | markdownify }} <a href="https://github.com/devcows/hugo-universal-theme">DevCows</a>.
</p>
</div>
</div>
</div>
<!-- /#copyright -->

<!-- *** COPYRIGHT END *** -->
9 changes: 4 additions & 5 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@

<!-- Bootstrap and Font Awesome CSS -->
<link rel="stylesheet" href="//use.fontawesome.com/releases/v5.11.2/css/all.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="//stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.11/css/bootstrap-select.min.css">

<!-- CSS animations -->
<link href="{{ "css/animate.css" | relURL}}" rel="stylesheet">

<!-- Theme stylesheet, if possible do not edit this stylesheet -->
{{ with .Site.Params.style }}
Expand All @@ -50,8 +49,8 @@
<link rel="apple-touch-icon" href="{{ "img/apple-touch-icon.png" | relURL }}" />

<!-- owl carousel CSS -->
<link href="{{ "css/owl.carousel.css" | relURL}}" rel="stylesheet">
<link href="{{ "css/owl.theme.css" | relURL}}" rel="stylesheet">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.theme.default.min.css">

<!-- RSS feed -->
<link rel="alternate" href="{{ "/index.xml" | absURL }}" type="application/rss+xml" title="{{ .Site.Title }}">
Expand Down
Loading