Skip to content

Commit 73ce3b6

Browse files
committedFeb 7, 2023
updated footer to chnage bg-image, bg-color etc
1 parent c8373b1 commit 73ce3b6

File tree

6 files changed

+108
-11
lines changed

6 files changed

+108
-11
lines changed
 

‎content/english/_index.md

+5
Original file line numberDiff line numberDiff line change
@@ -151,4 +151,9 @@ blog:
151151
call_to_action:
152152
enable: false
153153

154+
footer:
155+
footer_light: false
156+
# bg_color: "#1e384c"
157+
# bg_image: "images/bg-banner-page.jpg"
158+
# bg_image_overlay_color: "rgba(0,0,0,.65)"
154159
---

‎content/english/optimizor.md

+5
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,9 @@ work_process:
5353
content_color: ""
5454

5555

56+
footer:
57+
footer_light: false
58+
bg_color: "#1e384c"
59+
# bg_image: "images/bg-banner-page.jpg"
60+
# bg_image_overlay_color: "rgba(0,0,0,.65)"
5661
---

‎themes/delta/assets/scss/templates/_main.scss

+33-1
Original file line numberDiff line numberDiff line change
@@ -1113,7 +1113,7 @@ main:empty {
11131113
position: relative;
11141114
z-index: 1;
11151115
overflow-x: hidden;
1116-
&::after {
1116+
.bottom-bg {
11171117
position: absolute;
11181118
content: "";
11191119
height: calc(50% - 55px);
@@ -1457,6 +1457,8 @@ a.share-icon {
14571457

14581458
// footer
14591459
footer {
1460+
position: relative;
1461+
z-index: 1;
14601462
padding: 100px 0 0;
14611463
@include desktop {
14621464
padding: 90px 0 0;
@@ -1471,6 +1473,15 @@ footer {
14711473
border: 2px solid rgba($white, 1) !important;
14721474
}
14731475
}
1476+
.footer-overlay {
1477+
position: absolute;
1478+
top: 0;
1479+
left: 0;
1480+
width: 100%;
1481+
height: 100%;
1482+
pointer-events: none;
1483+
z-index: -1;
1484+
}
14741485
.footer-menu {
14751486
margin-top: 60px;
14761487
padding: 60px 0;
@@ -1496,6 +1507,27 @@ footer {
14961507
}
14971508
}
14981509
}
1510+
&.bg-light {
1511+
.btn-search-footer {
1512+
cursor: text;
1513+
border: 2px solid rgba($dark, 0.4) !important;
1514+
&:hover {
1515+
border: 2px solid rgba($dark, 1) !important;
1516+
}
1517+
}
1518+
.footer-menu {
1519+
border-top: 1px solid rgba($dark, 0.2);
1520+
border-bottom: 1px solid rgba($dark, 0.2);
1521+
ul li {
1522+
a {
1523+
color: #555;
1524+
&:hover {
1525+
color: $dark;
1526+
}
1527+
}
1528+
}
1529+
}
1530+
}
14991531
.footer-bottom {
15001532
padding: 55px 0;
15011533
@include tablet {

‎themes/delta/layouts/partials/call-to-action-2.html

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
{{ $bg_color := .Params.footer.bg_color | default false }}
2+
{{ $bg_image := resources.Get .Params.footer.bg_image | default false }}
3+
14
{{if site.Params.call_to_action.enable}}
25
<section class="section pb-0 call-to-action call-to-action-2">
3-
<div class="container container-delta">
6+
{{ if not $bg_image }}
7+
<div class="bottom-bg" style="{{- if $bg_color -}}background-color:{{$bg_color}}!important;{{- end -}}"></div>
8+
{{ end }}
9+
<div class="container container-delta" {{- if $bg_image -}}style="margin-bottom:100px"{{- end -}}>
410
<div class="row">
511
<div class="col-lg-12">
612
<div class="block bg-white rounded-lg shadow">
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{{ $logoPath:= site.Params.logo }}
2+
{{ $logoWidth:= replace site.Params.logo_width "px" "x" }}
3+
4+
<!-- checking logo existance -->
5+
{{ if $logoPath }}
6+
{{ if fileExists (add `assets/` $logoPath) }}
7+
{{ $logo:= resources.Get $logoPath }}
8+
9+
<!-- checking gif -->
10+
{{ $logoExt := path.Ext $logo }}
11+
{{ if eq $logoExt ".gif" }}
12+
{{ .Scratch.Set "logo" ($logo.Resize $logoWidth).RelPermalink }}
13+
<!-- checking svg -->
14+
{{ else if eq $logoExt ".svg"}}
15+
{{ .Scratch.Set "logo" $logo.RelPermalink }}
16+
<!-- logo fallback for svg -->
17+
{{ .Scratch.Set "logo_fallback" $logo.RelPermalink }}
18+
{{ else }}
19+
<!-- logo processing to webp -->
20+
{{ $logoDefaultWidth:= add (string $logo.Width) "x"}}
21+
{{ $logoWidth:= $logoWidth | default $logoDefaultWidth }}
22+
{{ $options := add (string $logoWidth) " webp" }}
23+
{{ .Scratch.Set "logo" ($logo.Resize $options).RelPermalink }}
24+
<!-- logo fallback -->
25+
{{ .Scratch.Set "logo_fallback" ($logo.Resize $logoWidth).RelPermalink }}
26+
{{ end }}
27+
28+
<img loading="prelaod" decoding="async" class="img-fluid" {{if ne $logoExt `.svg`}}
29+
width="{{$logoWidth | default $logo.Width}}" height="{{$logo.Height}}" {{end}} src="{{.Scratch.Get `logo`}}"
30+
alt="{{ site.Title }}" onerror="this.onerror=null;this.src='{{.Scratch.Get `logo_fallback`}}'">
31+
{{ end }}
32+
<!-- logo text -->
33+
{{ else if site.Params.logo_text }}
34+
{{ site.Params.logo_text | markdownify }}
35+
<!-- logo title -->
36+
{{ else }}
37+
{{ site.Title | markdownify }}
38+
{{ end }}

‎themes/delta/layouts/partials/footer.html

+20-9
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,25 @@
1-
<footer class="bg-dark px-1 wave-block">
1+
{{ $footer_light := .Params.footer.footer_light | default false }}
2+
{{ $bg_color := .Params.footer.bg_color | default false }}
3+
{{ $bg_image := resources.Get .Params.footer.bg_image | default false }}
4+
{{ $overlay := .Params.footer.bg_image_overlay_color | default false }}
5+
6+
<footer class="{{if $footer_light}}bg-light{{else}}bg-dark{{end}} px-1 wave-block"
7+
style="{{- if $bg_color -}}background-color:{{$bg_color}}!important;{{- end -}}{{- if $bg_image -}}background-image: url({{$bg_image | absURL}}); background-repeat: no-repeat; background-position: center center; background-attachment: fixed; background-size: cover;{{- end -}}">
8+
{{- if and $overlay $bg_image -}}<div class="footer-overlay" style="background-color:{{$overlay | safeCSS}}"></div>{{- end -}}
29
<div class="container container-delta">
310
<div class="row align-items-center gy-3">
411
<div class="col-lg-4 mx-auto text-center text-lg-start">
512
<a class="footer-brand" href="{{ site.BaseURL | relLangURL }}" title="{{site.Title}}">
13+
{{if $footer_light}}
14+
{{ partial "footer-logo-dark.html" . }}
15+
{{else}}
616
{{ partial "footer-logo.html" . }}
17+
{{end}}
718
</a>
819
</div>
920
<div class="col-lg-4 text-center">
1021
{{ if site.Params.fullSiteSearch }}
11-
<button class="btn-search-footer rounded-sm border-0 outline-none py-1 ps-3 pe-4 text-start bg-transparent text-white" data-bs-toggle="modal" data-bs-target="#searchModal">
22+
<button class="btn-search-footer rounded-sm border-0 outline-none py-1 ps-3 pe-4 text-start bg-transparent {{if $footer_light}}text-dark{{else}}text-white{{end}}" data-bs-toggle="modal" data-bs-target="#searchModal">
1223
<i class="fas fa-search me-1"></i>
1324
<span>Search Intelops ..</span>
1425
</button>
@@ -28,7 +39,7 @@
2839
<div class="row gy-4 row-cols-1 row-cols-sm-3 row-cols-lg-5">
2940
{{with site.Menus.footer_menu_1}}
3041
<div class="col block">
31-
<h4 class="footer-menu-title text-white">{{i18n `footer_menu_1_title`}}</h4>
42+
<h4 class="footer-menu-title {{if $footer_light}}text-dark{{else}}text-white{{end}}">{{i18n `footer_menu_1_title`}}</h4>
3243
<ul class="list-unstyled mb-0">
3344
{{range .}}
3445
<li><a href="{{.URL}}">{{.Name}}</a></li>
@@ -38,7 +49,7 @@ <h4 class="footer-menu-title text-white">{{i18n `footer_menu_1_title`}}</h4>
3849
{{end}}
3950
{{with site.Menus.footer_menu_2}}
4051
<div class="col block">
41-
<h4 class="footer-menu-title text-white">{{i18n `footer_menu_2_title`}}</h4>
52+
<h4 class="footer-menu-title {{if $footer_light}}text-dark{{else}}text-white{{end}}">{{i18n `footer_menu_2_title`}}</h4>
4253
<ul class="list-unstyled mb-0">
4354
{{range .}}
4455
<li><a href="{{.URL}}">{{.Name}}</a></li>
@@ -48,7 +59,7 @@ <h4 class="footer-menu-title text-white">{{i18n `footer_menu_2_title`}}</h4>
4859
{{end}}
4960
{{with site.Menus.footer_menu_3}}
5061
<div class="col block">
51-
<h4 class="footer-menu-title text-white">{{i18n `footer_menu_3_title`}}</h4>
62+
<h4 class="footer-menu-title {{if $footer_light}}text-dark{{else}}text-white{{end}}">{{i18n `footer_menu_3_title`}}</h4>
5263
<ul class="list-unstyled mb-0">
5364
{{range .}}
5465
<li><a href="{{.URL}}">{{.Name}}</a></li>
@@ -58,7 +69,7 @@ <h4 class="footer-menu-title text-white">{{i18n `footer_menu_3_title`}}</h4>
5869
{{end}}
5970
{{with site.Menus.footer_menu_4}}
6071
<div class="col block">
61-
<h4 class="footer-menu-title text-white">{{i18n `footer_menu_4_title`}}</h4>
72+
<h4 class="footer-menu-title {{if $footer_light}}text-dark{{else}}text-white{{end}}">{{i18n `footer_menu_4_title`}}</h4>
6273
<ul class="list-unstyled mb-0">
6374
{{range .}}
6475
<li><a href="{{.URL}}">{{.Name}}</a></li>
@@ -68,7 +79,7 @@ <h4 class="footer-menu-title text-white">{{i18n `footer_menu_4_title`}}</h4>
6879
{{end}}
6980
{{with site.Menus.footer_menu_5}}
7081
<div class="col block">
71-
<h4 class="footer-menu-title text-white">{{i18n `footer_menu_5_title`}}</h4>
82+
<h4 class="footer-menu-title {{if $footer_light}}text-dark{{else}}text-white{{end}}">{{i18n `footer_menu_5_title`}}</h4>
7283
<ul class="list-unstyled mb-0">
7384
{{range .}}
7485
<li><a href="{{.URL}}">{{.Name}}</a></li>
@@ -88,10 +99,10 @@ <h4 class="footer-menu-title text-white">{{i18n `footer_menu_5_title`}}</h4>
8899
</div>
89100

90101
<div class="has-wave">
91-
<svg class="wave-left text-white" style="opacity:0.15" width="313" height="230" viewBox="0 0 313 230" fill="none" xmlns="http://www.w3.org/2000/svg">
102+
<svg class="wave-left {{if $footer_light}}text-dark{{else}}text-white{{end}}" style="opacity:0.15" width="313" height="230" viewBox="0 0 313 230" fill="none" xmlns="http://www.w3.org/2000/svg">
92103
<path d="M-14.8194 14.9839C3.13821 37.9424 36.9915 27.6999 61.6547 27.5681C84.2532 27.4016 106.769 35.7678 122.993 51.6513C138.323 66.5174 146.99 89.3198 139.352 110.086C131.009 132.997 107.852 148.309 83.7288 148.845C72.5181 149.081 58.5368 146.113 50.8212 137.176C42.421 127.407 45.0441 112.296 53.7244 103.604C70.3422 87.0585 102.952 91.1301 123.155 97.9693C145.591 105.666 164.921 121.085 172.951 143.847C181.535 167.923 174.754 193.715 169.644 217.622C166.685 231.087 164.023 244.891 165.095 258.789C166.016 270.831 170.68 282.45 177.16 292.612C190.153 312.814 212.5 327.616 236.798 329.331C248.749 330.2 249.041 348.944 236.936 348.163C195.469 345.218 158.214 313.978 148.665 273.181C143.449 251.044 148.105 228.831 152.906 207.045C157.341 187.105 163.047 163.876 153.199 144.516C144.114 126.658 125.512 116.747 106.475 112.813C96.88 110.89 86.1704 110.224 76.5058 112.43C70.8344 113.762 58.0659 121.748 68.0603 127.018C84.7687 135.773 108.523 126.454 118.163 111.279C128.021 95.7732 122.768 77.6448 110.371 65.3791C93.9698 49.189 72.473 45.2436 50.2436 46.9349C23.3926 48.9432 -9.28315 52.3721 -28.1024 28.2753C-31.2832 24.1825 -31.9544 18.9474 -28.03 14.9438C-24.8161 11.6571 -17.8793 10.9235 -14.8194 14.9839Z" fill="currentColor"/>
93104
</svg>
94-
<svg class="wave-right text-white" style="opacity:0.15" width="291" height="170" viewBox="0 0 291 170" fill="none" xmlns="http://www.w3.org/2000/svg">
105+
<svg class="wave-right {{if $footer_light}}text-dark{{else}}text-white{{end}}" style="opacity:0.15" width="291" height="170" viewBox="0 0 291 170" fill="none" xmlns="http://www.w3.org/2000/svg">
95106
<path d="M40.6178 -98.5373C26.3888 -74.758 17.9858 -47.7259 16.9774 -19.9086C16.1931 1.51518 20.3386 27.5378 38.6011 41.4464C50.9255 50.7562 72.5492 51.2049 83.305 39.0909C86.4422 35.6137 92.3803 22.1538 84.5375 20.247C80.7281 19.3496 76.5826 24.0606 74.4539 26.6404C70.4204 31.3514 67.6195 37.2963 65.4907 43.1289C61.9054 53.1117 61.9054 64.2162 72.8853 68.9272C82.1846 72.9652 93.2766 71.7313 102.8 69.2637C125.656 63.431 148.512 49.4102 162.181 29.7811C163.638 27.6499 164.198 25.7431 165.206 23.4998C165.654 22.4903 163.414 23.3876 166.215 24.0606C164.87 23.7241 163.638 23.7241 162.293 23.7241C157.139 24.0606 152.21 26.5283 148.4 30.0054C140.782 37.2963 139.661 48.5129 144.927 57.4862C150.529 67.0204 161.733 69.3758 172.041 69.2637C184.029 69.1515 195.905 66.6839 208.005 66.6839C222.795 66.5717 236.239 71.0584 248.228 79.583C259.992 87.9955 270.188 98.4269 281.504 107.512C305.704 126.917 333.266 142.396 362.284 153.164C372.368 156.866 367.998 173.242 357.803 169.428C325.311 157.202 295.06 140.041 268.059 118.168C255.51 107.961 244.306 95.2863 229.741 87.9955C215.96 81.0412 200.275 83.7332 185.597 85.1913C171.144 86.6495 155.347 87.0981 142.686 78.6856C129.914 70.161 123.079 54.9064 125.32 39.7639C127.449 24.8458 138.877 12.7318 153.106 8.35734C159.94 6.22618 168.455 5.66532 174.73 9.59115C181.788 13.8535 183.357 22.6025 180.892 30.0054C176.298 44.0262 162.069 56.028 150.641 64.6648C138.317 73.9746 123.976 81.0411 109.074 85.0791C95.7415 88.6684 81.0642 90.0144 67.9556 84.8548C53.3904 79.1343 44.9874 65.6743 46.78 49.971C48.5727 34.7164 57.0877 17.4428 69.7482 8.24514C82.5208 -0.952511 99.8869 3.98282 104.032 19.6861C111.315 46.9426 82.4087 65.6744 58.6563 65.0014C29.1898 64.2162 9.6948 40.2125 3.30853 13.0683C-4.31018 -19.0113 1.96406 -54.2315 14.6246 -84.1799C17.9858 -92.0316 21.7951 -99.6589 26.1647 -106.95C31.5426 -116.26 46.1078 -107.847 40.6178 -98.5373Z" fill="currentColor"/>
96107
</svg>
97108
</div>

0 commit comments

Comments
 (0)