[SOLVED] Disable Thumbnail

After removing the banner in front matter, the thumbnail in the recent post is still there with bg-dark. I’m fairly new to Hugo so can you please help me figure this out?

Im using this theme https://github.com/mmrath/hugo-bootstrap.git

here is the code:

{{ if .Site.Params.widgets.recent_articles }}
<div class="card card-block">
  <h4 class="card-title">RECENT POSTS</h4>
  <div class="card-text">
    <div class="widget">
      <ul id="recent-post">
        {{ range first 5 (where .Site.RegularPages "Type" "post") }}
        <li>
          <div class="item-thumbnail bg-dark">
              <a href="{{ .Permalink }}" class="thumbnail">
              {{ if isset .Params "banner" }}
                  {{if or (in (substr .Params.banner 0 7) "http://") (in (substr .Params.banner 0 8) "https://")}}
                  <span style="background-image:url({{ .Params.banner }})"
                    alt="{{ .Title | markdownify }}" class="thumbnail-image"></span>
                  {{ else if  (in (substr .Params.banner 0 1) "/" ) }}
                  <span style="background-image:url({{ .Params.banner | relURL }})"
                    alt="{{ .Title | markdownify }}" class="thumbnail-image"></span>
                  {{ else }}
                  <span style="background-image:url({{ .Permalink }}{{ .Params.banner }})"
                    alt="{{ .Title | markdownify }}" class="thumbnail-image"></span>
                  {{end}}
              {{else}}
                  <span class="thumbnail-image thumbnail-none"></span>
              {{ end }}
              </a>
          </div>
            <div class="item-inner">
              <p class="item-title"><a href="{{ .RelPermalink }}" class="title">{{ .Title | markdownify}}</a></p>
            </div>
        </li>
        {{ end }}
      </ul>
    </div>
  </div>
</div>
{{ end }}

Hi there

You can try to delete the following code below from your recent-articles.html

          <div class="item-thumbnail bg-dark">
              <a href="{{ .Permalink }}" class="thumbnail">
              {{ if isset .Params "banner" }}
                  {{if or (in (substr .Params.banner 0 7) "http://") (in (substr .Params.banner 0 8) "https://")}}
                  <span style="background-image:url({{ .Params.banner }})"
                    alt="{{ .Title | markdownify }}" class="thumbnail-image"></span>
                  {{ else if  (in (substr .Params.banner 0 1) "/" ) }}
                  <span style="background-image:url({{ .Params.banner | relURL }})"
                    alt="{{ .Title | markdownify }}" class="thumbnail-image"></span>
                  {{ else }}
                  <span style="background-image:url({{ .Permalink }}{{ .Params.banner }})"
                    alt="{{ .Title | markdownify }}" class="thumbnail-image"></span>
                  {{end}}
              {{else}}
                  <span class="thumbnail-image thumbnail-none"></span>
              {{ end }}
              </a>
          </div>

the thumbnail will be removed permanently,

Thank you.

It was successfully removed but the space is still there.

Glad to know it works. About the space You have to edit the style.

Go to directory static >> assets >> css >> style.css

find the following code below

#recent-post li {
  padding: 5px 0 5px 85px;
}

then change the padding value to 5px 0 5px 0px;

have a nice day

Thank You. You helped me a lot.