Giter Site home page Giter Site logo

intorial's Introduction

Intorial Banner

Intorial (game of words: In (tu)torial and into real) is a native web components library designed to help you create interactive tutorials with ease. With Intorial, you can create modular, reusable, and encapsulated tutorials that can be used on any page.

Getting started

First of all you can install Intorial via npm:

npm i intorial

# Or you can use other package managers
pnpm add intorial    # PNPM
yarn add intorial    # Yarn
bun install intorial # Bun

Using with Nuxt Content or Next.js

You can use Nuxt Content MDC or Next.js MDX for creating pages with tutorials:

import "intorial" // Needed for side-effects

const Page = () => {
  return (<>
    <intorial-page>

      <intorial-section>
        <intorial-theory>
          Information about topic, some minimal examples
        </intorial-theory>

        <intorial-practice>
          Code blocks, notes and other stuff
        </intorial-practice>
      </intorial-section>

    <intorial-page>
  </>)
}

Using in plain HTML

You can also use Intorial with html, without any framework:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title></title>
    <link href="css/style.css" rel="stylesheet">
  </head>
  <body>

    <!-- WARN: You should import intorial before using this components -->
    <script>
      import "intorial"
    </script>

    <intorial-page>

      <intorial-section>
        <intorial-theory>
          Information about topic, some minimal examples
        </intorial-theory>

        <intorial-practice>
          Code blocks, notes and other stuff
        </intorial-practice>
      </intorial-section>

    </intorial-page>
  
  </body>
</html>

Imports

You can import all components from intorial via simple:

import "intorial"

You can also use separate imports, to import components, that you need:

import "intorial/theory"   // Theory, hint, diagram, tyan components
import "intorial/practice" // Practice, math, code components
import "intorial/quiz"     // Quiz and question components
import "intorial/control"  // Control component
import "intorial/section"  // Theory, practice and section components (without any content components)

Styling

TODO

Components

Component Name Description
intorial-page Page component, used when creating a full-page tutorial
intorial-section Section component, used when creating a dedicated section about one topic in a tutorial
intorial-control Control component, used when creating more than one section
intorial-theory Theory component, used to create a topic theory, which will be placed in the left part of the screen
intorial-practice Practice component, used to create a topic practice content. You can place codeblocks, code editors, and more practice content in this component.
intorial-code Codeblock component, used to paste theory/practice code
intorial-math Math component, LaTeX rendering block
intorial-diagram Diagram component, use can use mermaid syntax to show your ideas in diagrams
intorial-hint Hint component, used to provide hints for theory content
intorial-quiz Quiz component, used to create quizzes
intorial-question Question component, used to create questions for quizzes
intorial-tyan Girl mascot component, you can use it in hints

logo

Coded by tokiory with ❤️

intorial's People

Contributors

tokiory avatar

Watchers

 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.