Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Unable to show images #12

Open
lt-shy-john opened this issue Aug 4, 2020 · 4 comments
Open

Unable to show images #12

lt-shy-john opened this issue Aug 4, 2020 · 4 comments

Comments

@lt-shy-john
Copy link

When I tried to show a background image in the settings, for example

{{% jumbo img="/images/screenshot.jpg" imgLabel="screen shot" %}}

I can't get the image show in the background. The image is at /content/images.

@ilaborie
Copy link
Contributor

ilaborie commented Aug 4, 2020

Try to put the images into the static/images/ folder

@lt-shy-john
Copy link
Author

I've done that before I moved under the folder content.

@lt-shy-john
Copy link
Author

But it's interesting because I can get the logos showed up. They are not defined within the curly brackets but as parameters or in the main content.

@pabluk
Copy link

pabluk commented Jul 27, 2022

Hello, I was facing the same issue and I'm not very sure but after digging a little bit the issue seems related to the removal of the style property on this commit deb49f7#diff-30a351aa9673444666a261fad2256e77f2e182aa2a3df78b57ecdc10017b89e4

--- a/layouts/shortcodes/jumbo.html
+++ b/layouts/shortcodes/jumbo.html
@@ -1,10 +1,9 @@
 {{ $_hugo_config := `{ "version": 1 }` }}
+{{ $img := .Get "img" }}
 {{ $imgLabel := .Get "imgLabel" }}
 {{ $logo := .Site.Params.logos.jumbo }}
 <div class="jumbo">
-       <div class="jumbo-cover" style="background-image: url('{{ .Get "img" }}')" {{ if $imgLabel }}aria-label="{{ $imgLabel }}"{{ end }}></div>
-       <img id="jumbo-img" src="{{ .Get "img" }}" />
-       <div id="jumbo-overlay"></div>
+       <div class="jumbo-cover"></div>
        <div class="inner-wrapper">
                {{ if $logo }}
                <img class="jumbo-logo" src="{{ $logo }}" alt="logo {{ .Site.Title }}">

maybe because the property was moved to a SCSS file for the site-devfest-2020 https://github.com/GDGToulouse/site-devfest-2020/blob/9ea5bf897bdc1a572ddcc5a42f5ddd6067c09eb5/src/styles/home.scss#L23-L39

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants