Skip to content

Commit

Permalink
Merge pull request StaticMania#16 from GirlyPoison/master
Browse files Browse the repository at this point in the history
More messages and logos configurable; custom stylesheets.
  • Loading branch information
Md-Saad authored Sep 12, 2023
2 parents efe406a + 53bb9cc commit eac3f49
Show file tree
Hide file tree
Showing 8 changed files with 680 additions and 23 deletions.
614 changes: 614 additions & 0 deletions assets/js/qrcode.js

Large diffs are not rendered by default.

15 changes: 14 additions & 1 deletion exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ summarylength = 25
# Site Params
[params]
logo = "images/logo.png"
logo_footer = "images/logo-footer.png"
favicon_icon = "images/favicon.ico"
favicon_shortcut_icon = "images/favicon.png"
custom_stylesheets = [] # [ "scss/my_1.scss", "scss/my_2.scss" ]
dateFormat = "26 FEB 1994"
# Meta data
description = "Roxo Hugo themes | Design Agency Template by StaticMania"
Expand Down Expand Up @@ -74,10 +78,16 @@ summarylength = 25
secondary_button = "Connect with Us"
secondary_button_url = "contact"

[params.blog]
read_more = "read more"

[params.portfolio]
enable = true
title = "OUR RECENT WORKS"
subtitle = "Crafting experiences and seeking to make the complex clear & beautiful."
view_project = "view project"
more_works = "MORE WORKS"
scroll_down = "scroll down"

[params.call_to_action]
enable = true
Expand All @@ -89,6 +99,7 @@ summarylength = 25
secondary_button_url = "portfolio"

[params.footer]
params.footer.qr_print = false
# Footer Contact Info
[params.footer.contactInfo]
title = "Contact Info"
Expand Down Expand Up @@ -128,4 +139,6 @@ summarylength = 25
# Footer Service
[params.footer.service]
title = "We help brands:"
description = "develop design solutions<br>produce valuable cultural content<br>create fresh brand experience"
description = "develop design solutions<br>produce valuable cultural content<br>create fresh brand experience"
[params.footer.back_to_top]
description = "I want to <br> visit again"
4 changes: 2 additions & 2 deletions layouts/blog/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ <h3><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
<p>
{{ .Summary }} ...
</p>
<a href="{{ .Permalink }}" class="read-more">read more</a>
<a href="{{ .Permalink }}" class="read-more">{{ .Site.Params.blog.read_more }}</a>
</div>
</article>
</div>
Expand All @@ -46,4 +46,4 @@ <h3><a href="{{ .Permalink }}">{{ .Title }}</a></h3>

{{ partial "call-to-action.html" . }}

{{ end }}
{{ end }}
45 changes: 35 additions & 10 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,24 @@
<div class="container">
<div class="row">
<div class="col-12">
<div class="site-footer-logo"><a href="{{ .Site.BaseURL }}"><img src="{{ "images/logo-footer.png" | absURL }}" alt="logo-footer"></a></div>
<div class="site-footer-logo"><a href="{{ .Site.BaseURL }}"><img src="{{ .Site.Params.logo_footer | absURL }}" alt="logo-footer"></a></div>
</div>
{{ with .Site.Params.footer.contactInfo }}
<div class="col-lg-3 col-md-6">
<div class="site-footer-widget">
<h5 class="site-footer-widget-title">{{ .title }}</h5>
<p class="site-footer-widget-description">
{{ .address | safeHTML }}
<br>
<a href="tel:{{ .phone }}">{{ .phone }}</a>
<br>
<a href="mailto:{{ .email }}">{{ .email }}</a>
{{ if .address }}
{{ .address | safeHTML }}
<br>
{{ end }}
{{ if .phone }}
<a href="tel:{{ .phone }}">{{ .phone }}</a>
<br>
{{ end }}
{{ if .email }}
<a href="mailto:{{ .email }}">{{ .email }}</a>
{{ end }}
</p>
</div>
</div>
Expand Down Expand Up @@ -56,9 +62,7 @@ <h5 class="site-footer-widget-title">{{ .title }}</h5>
<a href="#top" class="site-footer-widget-top">
<img src="{{ "images/to-top.svg" | absURL }}" alt="back-to-top">
<p>
I want to
<br>
visit again
{{ .Site.Params.footer.back_to_top.description | safeHTML }}
</p>
</a>
</div>
Expand All @@ -68,6 +72,27 @@ <h5 class="site-footer-widget-title">{{ .title }}</h5>
</div>
</div>
</div>
{{ if .Site.Params.footer.qr_print }}
<div class="row d-none d-print-block">
<div class="col col-lg-2">
{{ $qrcode := resources.Get "js/qrcode.js" | minify }}
<script src="{{ $qrcode.Permalink }}"></script>

<div id="qrcode">
<script type="text/javascript">
new QRCode(document.getElementById("qrcode"), {
text: "{{ .Page.RelPermalink | absURL }}",
width: 128,
height: 128,
});
</script>
</div>
</div>
<div class="col col-md-auto">
{{ .Page.RelPermalink | absURL }}
</div>
</div>
{{ end }}
</div>
</footer>

Expand All @@ -76,4 +101,4 @@ <h5 class="site-footer-widget-title">{{ .title }}</h5>
{{ $vendor := resources.Get "js/vendor.js" | minify }}
<script src="{{ $vendor.Permalink }}"></script>
{{ $script := resources.Get "js/script.js" | minify }}
<script src="{{ $script.Permalink }}"></script>
<script src="{{ $script.Permalink }}"></script>
11 changes: 8 additions & 3 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@
{{ $style := resources.Get "scss/style.scss" | resources.ToCSS | minify }}
<link href="{{ $style.Permalink }}" rel="stylesheet" />

{{ range .Site.Params.custom_stylesheets -}}
{{ $style := resources.Get . | resources.ToCSS | minify }}
<link href="{{ $style.Permalink }}" rel="stylesheet" />
{{- end }}

<!--Favicon-->
<link rel="shortcut icon" href="{{ "images/favicon.png" | absURL }}" type="image/x-icon" />
<link rel="icon" href="{{ "images/favicon.ico" | absURL }}" type="image/x-icon" />
</head>
<link rel="shortcut icon" href="{{ .Site.Params.favicon_shortcut_icon | absURL }}" type="image/x-icon" />
<link rel="icon" href="{{ .Site.Params.favicon_icon | absURL }}" type="image/x-icon" />
</head>
2 changes: 1 addition & 1 deletion layouts/partials/header.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<nav class="navbar navbar-expand-lg site-navigation">
<div class="container">
<a class="navbar-brand" href="{{ .Site.BaseURL }}">
<img src="{{ "images/logo.png" | absURL }}" alt="logo" />
<img src="{{ .Site.Params.logo | absURL }}" alt="logo" />
</a>
<button
class="navbar-toggler collapsed"
Expand Down
6 changes: 3 additions & 3 deletions layouts/partials/portfolio.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ <h2>{{ .title }}</h2>
<div class="site-project-item-content">
<span>{{ delimit .Params.category ", " }}</span>
<h3>{{ .Title }}</h3>
<a href="{{ .Permalink }}" class="read-more">view project</a>
<a href="{{ .Permalink }}" class="read-more">{{ .Site.Params.portfolio.view_project }}</a>
</div>
</div>
</div>
{{ end }}
<div class="col-12 text-center text-lg-left">
<a href="portfolio" class="site-project-cta">MORE WORKS</a>
<a href="portfolio" class="site-project-cta">{{ .Site.Params.portfolio.more_works }}</a>
</div>
</div>
</div>
</section>
{{ end }}
{{ end }}
{{ end }}
6 changes: 3 additions & 3 deletions layouts/portfolio/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h1>
</div>
<div class="col-lg-4">
<a href="#project" class="site-project-header-action scroll-to">
<span>Scroll Down</span>
<span>{{ .Site.Params.portfolio.scroll_down }}</span>
<img src="{{ "images/arrow-down.svg" | absURL }}" alt="arrow-down">
</a>
</div>
Expand All @@ -32,7 +32,7 @@ <h1>
<div class="site-project-item-content">
<span>{{ delimit .Params.category ", " }}</span>
<h3>{{ .Title }}</h3>
<a href="{{ .Permalink }}" class="read-more">view project</a>
<a href="{{ .Permalink }}" class="read-more">{{ .Site.Params.portfolio.view_project }}</a>
</div>
</div>
</div>
Expand All @@ -48,4 +48,4 @@ <h3>{{ .Title }}</h3>

{{ partial "call-to-action.html" . }}

{{ end }}
{{ end }}

0 comments on commit eac3f49

Please sign in to comment.