JoltQuiz

Your quiz card on your website

One line of code puts a live quiz card on your site. It counts down to your next quiz, shows the join code and QR when the doors open, and says “Live now” while you play. This guide covers putting it on your site, making it match without any code, and styling every part of it with your own CSS.

Someone else runs your website? Download the install guide (Word) and send it to them. Signed in, Website & camera has the same guide with your own lines already filled in.

1. Put it on your site

  1. In JoltQuiz go to Quizzes & settings → Website & camera. Your line of code is at the top, ready to copy.
  2. On your website, add a block that takes your own HTML. Most site builders call it Custom HTML, Embed or Code (WordPress: Custom HTML block; Wix: Embed code; Squarespace: Code block; Shopify: Custom Liquid).
  3. Paste the line in, save and publish. The card appears where the block is.

The line looks like this, with your own venue name in it:

<script src="https://www.joltquiz.com/embed.js" data-venue="your-venue"></script>

The card fills the width it is given. To stop it getting too wide, add data-width with the most pixels you want:

<script src="https://www.joltquiz.com/embed.js" data-venue="your-venue" data-width="520"></script>

No code on your site, or posting on Facebook? The same page gives you a link to share instead. It opens the same card as a page of its own.

The card sets its own height, so there is never a scroll bar or a gap under it. It updates by itself: nobody has to reload your page when the doors open.

2. Match it without code

Most venues never need CSS. On the same page, under How it looks:

See every stage. Above the preview, Show it as switches between what your website shows right now, a quiz coming up (the countdown), doors open (join code and QR), live now, and nothing booked. It uses a sample quiz so you can check every part before a real one.

Keep a look as a template. Type a name next to Save as a template and press it. Your look, CSS included, appears under Your templates, and one press brings it all back. Only you see your templates. Up to 12; press the × on one twice to remove it.

Everything shows in the Preview straight away. Nothing changes on your website until you press Save the look. Back to the JoltQuiz look undoes it all.

3. Your own CSS

For an exact match, type your CSS in the Your own CSS box under How it looks.

  1. Set the template, colours and fonts first. Your CSS is added on top of them, so you only write what is different.
  2. Type or paste your CSS. The preview updates as you type.
  3. Press Save the look. If something is not allowed, the message says which line and why, and nothing is saved.

It only ever changes the quiz card. It cannot reach the rest of your website, and your website’s own CSS cannot reach the card (it sits in its own frame). So the card will not pick up your site’s fonts or colours by itself: you set them here.

4. Every part, named

The card changes with the time: a countdown before your quiz, the join code and QR while the doors are open or the quiz is live, and a message the rest of the time. These are the names to use in your CSS.

NameWhat it isWhen it shows
#card, .lcThe whole card: background, border, corners, padding, shadowAlways
.lc-headThe top row holding your logo, name and status badgeAlways
.lc-logoYour logo pictureWhen you have a logo in Branding
.lc-orgYour name next to the logoUnless you turned it off
.lc-pill, .lc-dotThe status badge (“Doors open”, “Live now”) and its dot. It also has .is-live while the quiz playsDoors open and live
.lc-titleThe big heading: your quiz’s nameAlways
.lc-whenThe date and time lineWhen a quiz is booked
.lc-countThe whole countdownBefore the doors open
.lc-tiles, .lc-tileThe row of countdown boxes, and one box. The number is .lc-tile b, the word under it is .lc-tile emBefore the doors open
.lc-subThe line under the countdownBefore the doors open
.lc-roomThe join area: code and buttons on the left, QR on the rightDoors open and live
.lc-codeThe join code. The word “Code” is .lc-code em, the code itself is .lc-code bDoors open and live
.lc-howThe “On your phone: scan the QR…” lineDoors open and live
.lc-actsThe row holding the two buttonsDoors open and live
.lc-btnBoth buttonsDoors open and live
.lc-goThe “Join the quiz” buttonDoors open and live
.lc-watchThe “Watch live” buttonWhile live, when a watch link is set for the quiz
.lc-scanThe QR code (.lc-scan img) and “Scan to play” under it (.lc-scan span)Doors open and live
.lc-msgA message such as “No quiz booked right now”When nothing is on
.lc-nextThe “next quiz” lineWhen another quiz is booked
.lc-footThe bottom rowAlways
.lc-badge“Powered by” and the JoltQuiz logo. You can move it and restyle the words, but it must stay visible and clickable (see section 7)Always

The card also carries the settings you chose, so you can write CSS for one of them only:

5. Colour settings

The colour boxes set these CSS variables. Use them in your own CSS with var(--accent) and so on, and every rule you write follows the colours you pick. You can also set them in CSS on #card.

VariableColour boxUsed for
--panelCard backgroundThe card itself
--textTextHeadings and writing
--mutedWorked out from the text colourQuieter lines such as the date and labels
--accentButtons and numbersThe Join button, countdown numbers, the join code
--accent-inkWorked out for youWriting on the Join button: dark on a light button, white on a dark one
--blueSecond colour (badges, glow)The glow and badges
--lineLines and borderBorders and dividers
--live(CSS only)The “Live now” badge
--radiusCorners sliderThe card’s corners
--font-head, --font-bodyHeading and text fontAll writing on the card

6. Copy-and-paste examples

Each of these works on its own. Paste as many as you like into the box, one after another, and change the values to suit. Put any @import line at the very top.

Use your website’s own font

Find the font on Google Fonts, press Get font then Get embed code, and copy the address from the @import option.

@import url('https://fonts.googleapis.com/css2?family=Lobster&display=swap');
#card .lc-title { font-family: "Lobster", cursive; }

A photo behind the card

The dark layer on top keeps the writing readable. The picture must be on an https:// address.

#card {
  background: linear-gradient(rgba(0, 0, 0, .65), rgba(0, 0, 0, .65)),
              url("https://example.com/your-picture.jpg") center / cover;
}

A bigger Join button

#card .lc-go { font-size: 1.25rem; padding: 18px 36px; border-radius: 999px; }

Square buttons, boxes and code

#card .lc-btn, #card .lc-tile, #card .lc-code b, #card .lc-scan img { border-radius: 2px; }

Light countdown boxes

#card .lc-tile { background: #FFFFFF; border-color: #FFFFFF; }
#card .lc-tile b { color: #111111; }
#card .lc-tile em { color: #555555; }

Everything centred

The Text setting does this without code. This is the same thing in CSS, if you want to centre only some parts.

#card { text-align: center; }
#card .lc-head, #card .lc-tiles, #card .lc-acts, #card .lc-code, #card .lc-foot { justify-content: center; }

A bigger QR code

#card .lc-scan img { width: 220px; height: 220px; }

Hide the Watch live button

#card .lc-watch { display: none; }

Your own “Live now” colour

#card { --live: #00C853; }

Line it up with the rest of your page

The card fills the width it is given. If the sections on your page sit in a centred column, give the card the same width and side margins so it lines up with them. Change 1100px and 18px to your own page’s.

#card { box-sizing: border-box; width: auto; max-width: 1100px; margin: 0 auto 24px; }
@media (max-width: 640px) { #card { margin: 0 18px 24px; } }

No shadow or glow round the card

#card { box-shadow: none; }

7. What is allowed

Your CSS is checked every time you save. It keeps your players safe and your card working.

8. When something does not work

My change shows in the preview but not on my website.
Press Save the look, then reload your website. The preview shows changes before they are saved; your website only gets saved ones.
My CSS does nothing.
Put #card in front of the name, as the examples do: #card .lc-title rather than .lc-title. The style templates set some parts quite firmly, and #card makes sure your rule wins. Check the spelling of the name against section 4, and that every { has its }.
“Your CSS hides or covers the JoltQuiz logo at the bottom of the card, so it has been switched off.”
Something in your CSS covers or hides the logo at the bottom. Common causes: display: none on .lc-foot, a background or overlay placed over the footer, opacity on the whole card, or a very small height. Remove that rule and the rest of your CSS comes back.
“Line 3: url() must be an https:// address or a data:image.”
The message names the line. Change http:// to https://, or host the picture somewhere that has https.
The font does not change.
Put the @import line at the very top of the box, and use the font’s name exactly as Google Fonts writes it, in quotes.
I want to start again.
Press Back to the JoltQuiz look, then Save the look.

Still stuck? Email [email protected] with your venue name and what you are trying to do.