Use RelPermalink
for background url (#605)
Signed-off-by: hossainemruz <hossainemruz@gmail.com>
This commit is contained in:
parent
3d6246f3c9
commit
6c8ab46a73
3 changed files with 9 additions and 10 deletions
|
@ -40,7 +40,7 @@
|
|||
<div class="content">
|
||||
<div class="container p-0 read-area">
|
||||
<!--Hero Area-->
|
||||
<div class="hero-area col-sm-12" id="hero-area" style='background-image: url({{ strings.TrimSuffix "/" site.BaseURL }}{{ partial "helpers/get-hero.html" . }});'>
|
||||
<div class="hero-area col-sm-12" id="hero-area" style='background-image: url({{ partial "helpers/get-hero.html" . }});'>
|
||||
</div>
|
||||
|
||||
<!--Content Start-->
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
{{/* don't use "background-image: url('{{ $achievementImageSm }}');" Otherwise the images won't show in https://themes.gohugo.io/ */}}
|
||||
<div
|
||||
class="achievement-entry text-center"
|
||||
style="background-image: url('{{ strings.TrimSuffix "/" site.BaseURL }}{{ $achievementImageSm }}');"
|
||||
style="background-image: url('{{ $achievementImageSm }}');"
|
||||
>
|
||||
<i class="fas fa-search-plus" id="enlarge-icon"></i>
|
||||
<h4 class="title" id="achievement-title">{{ .title }}</h4>
|
||||
|
@ -20,6 +20,6 @@
|
|||
<h4>{{ .title }}</h4>
|
||||
<p>{{ .summary | markdownify }}</p>
|
||||
</div>
|
||||
<span style="background-image: url('{{ strings.TrimSuffix "/" site.BaseURL }}{{ $achievementImageSm }}');" class="d-none" id="SmallImage" active="true"></span>
|
||||
<span style="background-image: url('{{ strings.TrimSuffix "/" site.BaseURL }}{{ $achievementImageLg }}');" class="d-none" id="LargeImage"></span>
|
||||
<span style="background-image: url('{{ $achievementImageSm }}');" class="d-none" id="SmallImage" active="true"></span>
|
||||
<span style="background-image: url('{{ $achievementImageLg }}');" class="d-none" id="LargeImage"></span>
|
||||
</div>
|
||||
|
|
|
@ -77,28 +77,27 @@
|
|||
<style>
|
||||
/* 0 to 299 */
|
||||
#homePageBackgroundImageDivStyled {
|
||||
/*background-image: url('{{ $tiny.RelPermalink }}'); This does not work on https://themes.gohugo.io/ */
|
||||
background-image: url('{{ strings.TrimSuffix "/" site.BaseURL }}{{ $tiny.RelPermalink }}');
|
||||
background-image: url('{{ $tiny.RelPermalink }}');
|
||||
}
|
||||
/* 300 to X */
|
||||
@media (min-width: 500px) and (max-width: 800px) { /* or 301 if you want really the same as previously. */
|
||||
#homePageBackgroundImageDivStyled {
|
||||
background-image: url('{{ strings.TrimSuffix "/" site.BaseURL }}{{ $small.RelPermalink }}');
|
||||
background-image: url('{{ $small.RelPermalink }}');
|
||||
}
|
||||
}
|
||||
@media (min-width: 801px) and (max-width: 1200px) { /* or 301 if you want really the same as previously. */
|
||||
#homePageBackgroundImageDivStyled {
|
||||
background-image: url('{{ strings.TrimSuffix "/" site.BaseURL }}{{ $medium.RelPermalink }}');
|
||||
background-image: url('{{ $medium.RelPermalink }}');
|
||||
}
|
||||
}
|
||||
@media (min-width: 1201px) and (max-width: 1500px) { /* or 301 if you want really the same as previously. */
|
||||
#homePageBackgroundImageDivStyled {
|
||||
background-image: url('{{ strings.TrimSuffix "/" site.BaseURL }}{{ $large.RelPermalink }}');
|
||||
background-image: url('{{ $large.RelPermalink }}');
|
||||
}
|
||||
}
|
||||
@media (min-width: 1501px) { /* or 301 if you want really the same as previously. */
|
||||
#homePageBackgroundImageDivStyled {
|
||||
background-image: url('{{ strings.TrimSuffix "/" site.BaseURL }}{{ $src.RelPermalink }}');
|
||||
background-image: url('{{ $src.RelPermalink }}');
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue