Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to resize images for clients #326

Open
kozo2 opened this issue Sep 27, 2021 · 1 comment
Open

How to resize images for clients #326

kozo2 opened this issue Sep 27, 2021 · 1 comment

Comments

@kozo2
Copy link

kozo2 commented Sep 27, 2021

I tried resizing the client's image in the partials below but it didn't work.
Please let me know if there is a way to resize the image in clients.

{{ if isset .Site.Params "clients" }}
{{ if .Site.Params.clients.enable }}
{{ if gt (len .Site.Data.clients) 0 }}
<section class="bar background-gray no-mb">
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <div class="heading text-center">
                    <h2>{{ .Site.Params.clients.title | markdownify }}</h2>
                </div>

                <p class="lead">
                  {{ .Site.Params.clients.subtitle | markdownify }}
                </p>

                <ul class="owl-carousel customers">
                    {{ range .Site.Data.clients }}
                    <li class="item" title="{{ .name }}">
                        {{ if .url }}
                          <a href="{{ .url }}" target="_blank">
                            <img src="{{ .image }}" alt="{{ .name }}" class="img-responsive" width="1000"/>
                          </a>
                        {{ else }}
                          <img src="{{ .image }}" alt="{{ .name }}" class="img-responsive" width="1000"/>
                        {{ end }}
                    </li>
                    {{ end }}
                </ul>
                <!-- /.owl-carousel -->
            </div>
        </div>
    </div>
</section>
{{ end }}
{{ end }}
{{ end }}
@ryanfox1985
Copy link
Contributor

ryanfox1985 commented Mar 19, 2022

have you tried to create a css style rule?

ul.customers img {
  max-height: 100px
}

overriding the custom.css styles: https://github.com/devcows/hugo-universal-theme#style

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

No branches or pull requests

2 participants