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

Mustache.js can be clumsy for dealing with conditionals #3

Open
anthonyec opened this issue Aug 1, 2022 · 0 comments
Open

Mustache.js can be clumsy for dealing with conditionals #3

anthonyec opened this issue Aug 1, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@anthonyec
Copy link
Owner

anthonyec commented Aug 1, 2022

{{# collections.projects }}
  <div class="project {{^ isFirst }}project--hidden{{/ isFirst }} js-project">
    <img class="project__image js-project-thumbnail" src="{{ thumbnail }}" alt="">

    {{# image }}
      {{# isFirst }}
        <img class="project__image js-project-image" src="{{ image }}" alt="">
      {{/ isFirst }}
      {{^ isFirst }}
        <img class="project__image js-project-image" data-src="{{ image }}" alt="">
      {{/ isFirst }}
    {{/ image }}

    {{# video }}
      <video class="project__image js-project-video" src="{{ video }}" autoplay muted loop></video>
    {{/ video }}
  </div>
{{/ collections.projects }}
@anthonyec anthonyec added the enhancement New feature or request label Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant