Giter Site home page Giter Site logo

hanniche-walid / quizdown-js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bonartm/quizdown-js

0.0 0.0 0.0 6.63 MB

Markdown syntax for generating interactive quizzes in the browser

Home Page: https://bonartm.github.io/quizdown-live-editor/

License: MIT License

Svelte 50.49% JavaScript 4.94% HTML 7.38% TypeScript 37.19%

quizdown-js's Introduction

quizdown npm version Build

Markdownish syntax to instantly create simple interactive quiz apps for your static website.

๐Ÿš€ Try the quizdown live editor

  • supports markdown text formatting, images, syntax highlighting and math rendering.
  • different quiz-types: single-choice, multiple-choice, sequence.
  • support for hints and explanations.
  • options for color theme, question shuffling, localization.
  • can be easily included in any website, static site generator or other web projects.
  • mobile friendly with touch support for all question types.

Usage

quizdown is easy to setup and best used in combination with existing static site generators like Jekyll, Hugo or Sphinx. Check out the extensions hugo-quiz and sphinxcontrib-quizdown.

๐Ÿ“š Documentation

Stand-alone Example

Add the library to your website and initialize with default options:

<head>
	...
    <script 
	src="https://cdn.jsdelivr.net/npm/quizdown@latest/public/build/quizdown.js">
	</script>
	<script>quizdown.init();</script>
	...
</head>

To keep the bundle size low, syntax highlighting and math rendering are implemented in separate extensions that can be loaded and registered manually if needed:

<head>
	...
    <script src="./build/quizdown.js"></script>
	<script src="./build/extensions/quizdownKatex.js"></script>
	<script src="./build/extensions/quizdownHighlight.js"></script>
	<script>
		quizdown.register(quizdownKatex).register(quizdownHighlight).init();
	</script>
	...
</head>

Write questions within a quizdown class (edit in the ๐Ÿš€quizdown editor):

...
<div class="quizdown">
	---
	primaryColor: steelblue
	shuffleQuestions: false
	shuffleAnswers: true
	---

	### Select your superpowers!

	- [ ] Enhanced Strength
	- [ ] Levitation
	- [x] Shapeshifting

	### What's the capital of Germany?

	> Hint: The _largest_ city in Germany...

	1. [x] Berlin
	1. [ ] Frankfurt
	1. [ ] Paris
	1. [ ] Cologne
</div>
...

Contributing

Pull requests and feature requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

I'm working on this project to learn more about modern web development and languages. I'm happy for any feedback on how to improve the code base.

After cloning, install the packages with

npm install

Build the library with

npm run build

You can also preview a live version with

npm run dev

Credits

Inspired by the mermaid library and the python package quizdown.

quizdown-js's People

Contributors

voborgus avatar hanniche-walid avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.