diff options
author | Evan <58769763+developer-evan@users.noreply.github.com> | 2020-11-04 05:54:44 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-04 05:54:44 +0300 |
commit | c2e473f5a697f9b0bc210c530c1dfe96416587f9 (patch) | |
tree | e056a51625fdf7194edb6db7b09f2848f3e53ec1 | |
parent | df24e83ce3d2ac97f64500bb77538447815d9cc7 (diff) | |
parent | 5e5e7181c381f2afa8c0a685ec838ec136551126 (diff) |
Merge pull request #34 from roscooking/master
Hide the labels Address, Tel and Email if they are not defined in the config file
-rw-r--r-- | layouts/partials/footer.html | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 9ffbbe9..0ce23a7 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -6,17 +6,25 @@ <a href="{{site.BaseURL}}"><img src="{{site.Params.logo | absURL }}" alt="{{site.Title}}" class="img-fluid"></a> </div> <div class="col-md-3 col-sm-6 mb-4 mb-md-0"> + {{ if .Site.Params.address }} <h6>Address</h6> <ul class="list-unstyled"> <li class="font-secondary text-dark">{{site.Params.address | markdownify }}</li> </ul> + {{ end }} </div> <div class="col-md-3 col-sm-6 mb-4 mb-md-0"> + {{ if or .Site.Params.mobile .Site.Params.email }} <h6>Contact Info</h6> <ul class="list-unstyled"> - <li class="font-secondary text-dark">Tel : {{ site.Params.mobile | markdownify }}</li> - <li class="font-secondary text-dark">Email : {{ site.Params.email | markdownify }}</li> + {{ if .Site.Params.mobile }} + <li class="font-secondary text-dark">Tel : {{ .site.Params.mobile | markdownify }}</li> + {{ end }} + {{ if .Site.Params.email }} + <li class="font-secondary text-dark">Email : {{ .site.Params.email | markdownify }}</li> + {{ end }} </ul> + {{ end }} </div> <div class="col-md-3 col-sm-6 mb-4 mb-md-0"> <h6>Follow</h6> |