Tenace Demo Demo Block - Let's templates
Unlock every premium block and template with All-Access from $20 / 3 months, cancel anytime. Get All-Access
All blocks
Free Demo

Tenace Demo

A demo block extracted from the Tenace template, available in Tailwind CSS and Bootstrap.

0 3
Tenace Demo preview
tenace.html
<!DOCTYPE html>
<html lang="en">
<head>
  <script>
    window.FontAwesomeConfig = { autoReplaceSvg: 'nest' };
  </script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/js/all.min.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Tenace Demo | Tailwind CSS UI Block</title>
  <meta name="description" content="A demo block extracted from the Tenace template, available in Tailwind CSS and Bootstrap.">
  <meta name="keywords" content="Tenace, Tailwind CSS template, HTML website template, education template, online course template, bridge school, card game lessons, e-learning platform, online academy">
  <meta name="author" content="Let's templates">
  <link rel="canonical" href="">

  <meta property="og:type" content="product">
  <meta property="og:site_name" content="Let's templates">
  <meta property="og:locale" content="en_US">
  <meta property="og:url" content="">
  <meta property="og:title" content="Tenace | Tailwind CSS Education Template">
  <meta property="og:description" content="A bold, geometric Tailwind CSS education template for online bridge schools, with an interactive bidding quiz, a course spotlight and a weekly lesson calendar.">
  <meta property="og:image" content="">
  <meta property="og:image:alt" content="Tenace template preview">

  <meta name="twitter:card" content="summary_large_image">
  <meta name="twitter:url" content="">
  <meta name="twitter:title" content="Tenace | Tailwind CSS Education Template">
  <meta name="twitter:description" content="A bold, geometric Tailwind CSS education template for online bridge schools, with an interactive bidding quiz, a course spotlight and a weekly lesson calendar.">
  <meta name="twitter:image" content="">
  <meta name="twitter:image:alt" content="Tenace template preview">
  <script src="https://cdn.tailwindcss.com/3.4.17"></script>
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Unbounded:wght@600;800&display=swap" rel="stylesheet">
  <script>
    tailwind.config = {
      theme: {
        extend: {
          colors: { indigo: { DEFAULT: '#2f2fa2', deep: '#23238a', soft: '#6b5bd2' }, sun: '#fbbf3c', petal: '#f9b4c0', blush: '#f6e9e8', ink: '#141414', heart: '#d6324f' },
          fontFamily: { sans: ['Inter', 'sans-serif'], display: ['Unbounded', 'sans-serif'] }
        }
      }
    }
  </script>
  <style>
    @view-transition { navigation: auto; }
    ::view-transition-old(root) { animation: 180ms ease-out both page-fade-out; }
    ::view-transition-new(root) { animation: 220ms ease-in both page-fade-in; }
    @keyframes page-fade-out { to { opacity: 0; } }
    @keyframes page-fade-in { from { opacity: 0; } }
    html { scroll-behavior: smooth; }
    [hidden] { display: none !important; }
    .marquee { display: flex; overflow: hidden; gap: 3rem; }
    .marquee-track { display: flex; flex-shrink: 0; align-items: center; gap: 3rem; animation: marquee 30s linear infinite; }
    .marquee:hover .marquee-track { animation-play-state: paused; }
    @keyframes marquee { to { transform: translateX(calc(-100% - 3rem)); } }
    .ring-progress { transition: stroke-dashoffset 1.2s cubic-bezier(.2,.8,.2,1); }
    .reveal-ready [data-ring] .ring-progress { stroke-dashoffset: 100; }
    .reveal-ready [data-ring].is-visible .ring-progress { stroke-dashoffset: var(--ring-offset); }
    .reveal-ready [data-reveal], .reveal-ready [data-tile] { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; transition-delay: var(--reveal-delay, 0ms); }
    .reveal-ready [data-tile] { transform: scale(.85); }
    .reveal-ready [data-reveal].is-visible, .reveal-ready [data-tile].is-visible { opacity: 1; transform: none; }
    @media (prefers-reduced-motion: reduce) {
      html { scroll-behavior: auto; }
      .marquee-track { animation: none; }
      .marquee { overflow-x: auto; }
      ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
    }
  </style>
</head>
<body class="bg-blush font-sans text-ink antialiased">
<% active_page = "index" %>
<% { "contacts" => "Contacts", "pricing" => "Choose a plan", "about" => "About us", "courses" => "Courses" }.each do |slug, label| %>
<% active = active_page == slug %>
<% end %>
<% { "index" => "Home", "courses" => "Courses", "pricing" => "Choose a plan", "about" => "About us", "contacts" => "Contacts", "login" => "Log in" }.each do |slug, label| %>
<% active = active_page == slug %>
<% end %>
<% tiles = [
    [:photo, "bg-sun", "rounded-full", "1438761681033-6461ffad8d80", "Young woman with auburn hair by a lake"],
    [:shape, "bg-indigo-soft", "rounded-tl-full rounded-br-full"],
    [:suit, "bg-indigo", "♥", "text-sun"],
    [:photo, "bg-petal", "rounded-t-full", "1507003211169-0a1dd7228f2d", "Smiling man with a beard"],
    [:shape, "bg-indigo-soft", "rounded-br-full"],
    [:shape, "bg-sun", "rounded-tr-full rounded-bl-full"],
    [:shape, "bg-indigo-soft", "rounded-full"],
    [:shape, "bg-indigo-soft", "rounded-tl-full"],
    [:shape, "bg-[#4b3fc4]", "rounded-b-full"],
    [:brand, "bg-petal", "rounded-t-full"],
    [:shape, "bg-indigo-soft", "rounded-tr-full"],
    [:suit, "bg-indigo", "♦", "text-petal"],
    [:photo, "bg-petal", "rounded-full", "1500648767791-00dcc994a43e", "Man in a grey sweater smiling"],
    [:shape, "bg-indigo-soft", "rounded-bl-full"],
    [:photo, "bg-sun", "rounded-t-full", "1573496359142-b8d87734a5a2", "Woman in a grey blazer smiling"],
    [:shape, "bg-petal", "rounded-tl-full"],
    [:shape, "bg-indigo-soft", "rounded-t-full"],
    [:suit, "bg-indigo", "♣", "text-indigo-soft"],
    [:shape, "bg-indigo-soft", "rounded-t-full"],
    [:shape, "bg-petal", "rounded-t-full"]
  ] %>
<% [["fa-whatsapp", "WhatsApp", "https://www.whatsapp.com"], ["fa-facebook-f", "Facebook", "https://www.facebook.com"], ["fa-twitter", "Twitter", "https://twitter.com"]].each do |icon, label, url| %>
<% end %>
<% tiles.each_with_index do |(kind, bg, *rest), index| %>
<% case kind %>
<% when :photo %>
<% when :suit %>
<% when :brand %>
<% else %>
<% end %>
<% end %>
<% hands = [
    { cards: [["K", "♠"], ["Q", "♠"], ["5", "♠"], ["A", "♥"], ["J", "♥"], ["9", "♥"], ["8", "♥"], ["4", "♥"], ["K", "♦"], ["6", "♦"], ["7", "♣"], ["3", "♣"], ["2", "♣"]], answer: "1♥", points: 13, why: "13 points and five hearts: open your longest suit. Five-card majors come first." },
    { cards: [["A", "♠"], ["Q", "♠"], ["4", "♠"], ["K", "♥"], ["10", "♥"], ["3", "♥"], ["Q", "♦"], ["J", "♦"], ["8", "♦"], ["2", "♦"], ["K", "♣"], ["9", "♣"], ["5", "♣"]], answer: "1NT", points: 15, why: "15 points and a balanced shape with no five-card major: that's a textbook 1NT." },
    { cards: [["J", "♠"], ["8", "♠"], ["6", "♠"], ["3", "♠"], ["Q", "♥"], ["7", "♥"], ["2", "♥"], ["K", "♦"], ["9", "♦"], ["4", "♦"], ["J", "♣"], ["10", "♣"], ["5", "♣"]], answer: "Pass", points: 7, why: "Only 7 points. Opening needs about 12, so pass and let partner speak." }
  ] %>
<!-- block:start demo -->
  <section class="bg-indigo text-white" data-quiz>
    <div class="mx-auto grid max-w-7xl gap-12 px-5 py-20 md:px-12 md:py-28 lg:grid-cols-[1fr_1.5fr] lg:items-center">
      <div>
        <p class="text-sm font-semibold uppercase tracking-widest text-sun">Try it now</p>
        <h2 class="mt-3 font-display text-3xl font-extrabold uppercase leading-tight md:text-4xl">You're the dealer. What do you open?</h2>
        <p class="mt-5 max-w-md text-lg font-light text-white/80">This is how every Tenace lesson works: a real hand, one decision, and instant feedback that explains the why.</p>
        <p class="mt-8 text-sm text-white/60">Hand <span data-quiz-index>1</span> of <%= hands.size %> · Score <span data-quiz-score>0</span></p>
      </div>
      <div>
        <% hands.each_with_index do |hand, index| %>
          <div data-quiz-hand <%= 'hidden' unless index.zero? %> class="rounded-[2rem] bg-white/10 p-6 md:p-8">
            <ul class="flex flex-wrap justify-center gap-1.5 sm:flex-nowrap sm:gap-0 sm:-space-x-6" aria-label="Your hand: <%= hand[:cards].map { |rank, suit| "#{rank}#{suit}" }.join(', ') %>">
              <% hand[:cards].each_with_index do |(rank, suit), card_index| %>
                <li class="grid h-[4.5rem] w-12 shrink-0 rounded-lg bg-white px-1.5 py-1 font-semibold shadow-lg ring-1 ring-black/10 transition hover:-translate-y-2 sm:h-24 sm:w-16 <%= %w[♥ ♦].include?(suit) ? 'text-heart' : 'text-ink' %>" style="transform: rotate(<%= (card_index - 6) * 2 %>deg)" aria-hidden="true">
                  <span class="text-sm leading-none sm:text-base"><%= rank %><br><%= suit %></span>
                  <span class="self-end justify-self-end text-xl leading-none sm:text-3xl"><%= suit %></span>
                </li>
              <% end %>
            </ul>
            <p class="mt-8 text-center text-white/80"><%= hand[:points] %> high-card points. Pick your opening bid:</p>
            <div class="mt-4 grid grid-cols-3 gap-3" role="group" aria-label="Opening bid options">
              <% ["1♥", "1NT", "Pass"].each do |bid| %>
                <button type="button" data-quiz-option data-correct="<%= bid == hand[:answer] %>" class="rounded-xl bg-white py-4 font-display text-xl font-extrabold text-indigo transition hover:bg-sun aria-pressed:ring-4 aria-pressed:ring-sun"><%= bid %></button>
              <% end %>
            </div>
            <div data-quiz-feedback class="mt-6 rounded-xl bg-white/10 p-5" role="status" aria-live="polite">
              <p class="font-semibold"><span data-quiz-verdict>The answer is <%= hand[:answer] %>.</span></p>
              <p class="mt-1 text-white/80"><%= hand[:why] %></p>
            </div>
            <button type="button" data-quiz-next class="mt-6 inline-flex items-center gap-2 rounded-md bg-sun px-6 py-3 text-sm font-semibold uppercase text-ink transition hover:bg-white">Next hand<i class="fa-solid fa-arrow-right" aria-hidden="true"></i></button>
          </div>
        <% end %>
      </div>
    </div>
  </section>
  <!-- block:end demo -->
<script>
    document.querySelectorAll('[data-menu-toggle]').forEach((button) => {
      const menu = document.getElementById(button.getAttribute('aria-controls'));
      if (!menu) return;
      button.addEventListener('click', () => {
        const open = button.getAttribute('aria-expanded') === 'true';
        button.setAttribute('aria-expanded', String(!open));
        menu.classList.toggle('hidden', open);
      });
    });

    document.querySelectorAll('[data-quiz]').forEach((quiz) => {
      const hands = [...quiz.querySelectorAll('[data-quiz-hand]')];
      let current = 0;
      let score = 0;
      hands.forEach((hand) => {
        const feedback = hand.querySelector('[data-quiz-feedback]');
        const verdict = hand.querySelector('[data-quiz-verdict]');
        const answer = verdict.textContent;
        feedback.hidden = true;
        hand.querySelectorAll('[data-quiz-option]').forEach((option) => {
          option.addEventListener('click', () => {
            if (!feedback.hidden) return;
            const right = option.dataset.correct === 'true';
            option.setAttribute('aria-pressed', 'true');
            if (right) score += 1;
            verdict.textContent = right ? `Spot on: ${option.textContent.trim()} is right.` : `Not quite. ${answer}`;
            feedback.hidden = false;
            quiz.querySelector('[data-quiz-score]').textContent = score;
          });
        });
        hand.querySelector('[data-quiz-next]')?.addEventListener('click', () => {
          hand.hidden = true;
          current = (current + 1) % hands.length;
          if (current === 0) { score = 0; quiz.querySelector('[data-quiz-score]').textContent = 0; }
          const next = hands[current];
          next.hidden = false;
          next.querySelector('[data-quiz-feedback]').hidden = true;
          next.querySelectorAll('[data-quiz-option]').forEach((option) => option.removeAttribute('aria-pressed'));
          quiz.querySelector('[data-quiz-index]').textContent = current + 1;
          next.querySelector('[data-quiz-option]')?.focus();
        });
      });
    });

    document.querySelectorAll('[data-tabs]').forEach((tablist) => {
      const tabs = [...tablist.querySelectorAll('[role="tab"]')];
      const select = (tab) => tabs.forEach((other) => {
        const active = other === tab;
        other.setAttribute('aria-selected', String(active));
        other.tabIndex = active ? 0 : -1;
        document.getElementById(other.getAttribute('aria-controls')).hidden = !active;
      });
      tabs.forEach((tab, index) => {
        tab.addEventListener('click', () => select(tab));
        tab.addEventListener('keydown', (event) => {
          const step = { ArrowRight: 1, ArrowDown: 1, ArrowLeft: -1, ArrowUp: -1 }[event.key];
          if (!step) return;
          event.preventDefault();
          const next = tabs[(index + step + tabs.length) % tabs.length];
          next.focus();
          select(next);
        });
      });
    });

    document.querySelectorAll('[data-switcher]').forEach((root) => {
      root.addEventListener('click', (event) => {
        const button = event.target.closest('[data-switch]');
        if (!button) return;
        root.querySelectorAll('[data-switch]').forEach((other) => other.setAttribute('aria-selected', String(other === button)));
        root.querySelectorAll('[data-switch-panel]').forEach((panel) => { panel.hidden = panel.dataset.switchPanel !== button.dataset.switch; });
      });
    });

    document.querySelectorAll('[data-search-target]').forEach((input) => {
      const list = document.querySelector(input.dataset.searchTarget);
      const empty = list?.parentElement.querySelector('[data-search-empty]');
      input.addEventListener('input', () => {
        const query = input.value.trim().toLowerCase();
        let shown = 0;
        list.querySelectorAll('[data-search-item]').forEach((item) => {
          const match = !query || item.textContent.toLowerCase().includes(query);
          item.hidden = !match;
          if (match) shown += 1;
        });
        if (empty) empty.hidden = shown > 0;
      });
    });

    document.querySelectorAll('[data-course-tools]').forEach((tools) => {
      const grid = document.querySelector(tools.dataset.courseTools);
      const search = tools.querySelector('[data-course-search]');
      const sort = tools.querySelector('[data-course-sort]');
      const count = tools.querySelector('[data-course-count]');
      const apply = () => {
        const query = search.value.trim().toLowerCase();
        const items = [...grid.querySelectorAll('[data-course]')];
        items.sort((a, b) => Number(a.dataset[sort.value]) - Number(b.dataset[sort.value])).forEach((item) => grid.append(item));
        let shown = 0;
        items.forEach((item) => {
          const match = !query || item.textContent.toLowerCase().includes(query);
          item.hidden = !match;
          if (match) shown += 1;
        });
        count.textContent = shown;
      };
      search.addEventListener('input', apply);
      sort.addEventListener('change', apply);
    });

    document.querySelectorAll('[data-booking]').forEach((form) => {
      const summary = form.querySelector('[data-booking-summary]');
      const update = () => {
        const day = [...form.querySelectorAll('[name="day"]')].find((input) => input.checked);
        const time = [...form.querySelectorAll('[name="time"]')].find((input) => input.checked);
        summary.textContent = day && time ? `${day.value} at ${time.value}` : 'Pick a day and a time';
      };
      form.addEventListener('change', update);
      update();
    });

    document.querySelectorAll('[data-contact-form], [data-booking]').forEach((form) => {
      form.addEventListener('submit', (event) => {
        event.preventDefault();
        const status = form.querySelector('[data-form-status]');
        const groups = [...form.querySelectorAll('[data-required-group]')].every((group) => [...group.querySelectorAll('[name]')].some((choice) => choice.checked));
        if (!groups || !form.checkValidity()) {
          status.textContent = form.dataset.error;
          return;
        }
        status.textContent = form.dataset.success;
        form.reset();
        form.dispatchEvent(new Event('change'));
      });
    });

    document.querySelectorAll('[data-current-year]').forEach((el) => { el.textContent = new Date().getFullYear(); });

    (() => {
      const items = document.querySelectorAll('[data-reveal], [data-tile]');
      const skip = navigator.webdriver || !('IntersectionObserver' in window) || matchMedia('(prefers-reduced-motion: reduce)').matches;
      if (!items.length || skip) return;
      document.documentElement.classList.add('reveal-ready');
      const observer = new IntersectionObserver((entries) => {
        entries.forEach((entry) => {
          if (!entry.isIntersecting) return;
          entry.target.classList.add('is-visible');
          observer.unobserve(entry.target);
        });
      }, { rootMargin: '0px 0px -10% 0px' });
      items.forEach((item) => observer.observe(item));
    })();
  </script>
</body>
</html>

From this template

Tenace screenshot

Education

Tenace

Unlimited access to all products

Unlock the entire library of premium templates and blocks. Renews automatically, cancel anytime.

$20 / 3 months or $60 / year
Get Unlimited Access