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

adding a carousel #39

Closed
ghost opened this issue Mar 12, 2018 · 1 comment
Closed

adding a carousel #39

ghost opened this issue Mar 12, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Mar 12, 2018

I was wondering if there was a way to add a carousel to the theme? I tried to add an image carousel using instructions form the Hugo universal theme. (with owl.js) I couldn't figure out how to do it. I was wondering how I would go about adding a small image carousel under the main logo. Or maybe creating a separate partial for it. I'm new to Hugo

@tomanistor
Copy link
Owner

tomanistor commented Dec 20, 2018

@yeah-nothing, this would require copying the osprey/layouts/partials/body-top.html file in the theme folder and adding it to your hugo folder under yourHugoSite/layouts/partials.

Your new, duplicated file will overwrite the theme file and you'll be able to edit this area and insert your carousel:

  <header class="row middle-xs center-xs">
    <div class="col-xs-12">
      <div class="row middle-xs center-xs">
        <div class="col-xs-12"><img src="{{ .Site.Params.logoBig}}" alt="{{ .Site.Title }}"></div>
      </div>
      <div class="row middle-xs center-xs">
        <div class="col-xs-12">
          <h1>{{ .Site.Params.tagline }}<span class="cursor">|</span></h1>
        </div>
      </div>
    </div>
  </header>
{{ end }}

You'll likely have to add some JavaScript. I would recommend doing the same thing with the osprey/layouts/partials/body-bottom.html and adding it in there as a script link or inline.

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

1 participant