By far the best web version of the PPT presentation library

By far the best web version of the PPT presentation library

2022-12-22 0 1,036
Resource Number 50123 Last Updated 2025-02-21
¥ 0USD Upgrade VIP
Download Now Matters needing attention
Can't download? Please contact customer service to submit a link error!
Value-added Service: Installation Guide Environment Configuration Secondary Development Template Modification Source Code Installation

This is probably the best web demo library nodeppt so far.

By far the best web version of the PPT presentation library插图

nodeppt 2.0 Rebuilds based on webslides, webpackdown-it, and posthtmlmarkdown.

Installation

npm install -g  nodeppt

Usage

  • new: Create a new md file using the online template
  • serve: start a webpack dev server for md file
  • build: build a md file
# create a new slide with an official template  
$ nodeppt new slide.md

# create a new slide straight from a github template 
$ nodeppt new slide.md -t username/repo

# start local sever show slide 
$ nodeppt serve slide.md

# to build a slide 
$ nodeppt build slide.md

Help

# help nodeppt -h
# Get help 
nodeppt serve -h

nodeppt has a speaker mode, add after the page url? mode=speaker You can turn on the speaker mode and synchronize the two screens

Keyboard shortcuts

  • Page: ↑/↓/←/→ Space home page
  • Full screen: F
  • Overview: -/+
  • Speaker’s note: N
  • Grid background: Enter

public resources: public folder

If there is a public folder in the project folder, it can be accessed directly from the url, the contentBase option of the webpack dev server.

At build, the files in the public folder will be fully copied to the dist folder

Edit

The best experience is Chrome, which is meant for presentations, so consider non-Chrome connection issues

Here’s how to write it.

< Basic syntax

The entire markdown file is divided into two parts, the first part is written in the first configuration, and then the use of < slide> Separate the content of each slide.

nodeppt configuration is written directly at the top of the md file using yaml syntax, such as the following configuration:

title: nodeppt markdown presentation
speaker: Sanshui Kiyoshi
url: https://github.com/ksky521/nodeppt
js:
    - https://www.echartsjs.com/asset/theme/shine.js
prismTheme: solarizedlight
plugins:
    - echarts
    - mermaid
    - katex
  • js: js file classification, put before the main text
  • css: css file, resulting in
  • prism subject: prism color matching, value range [‘dark’, ‘coy’, ‘funky’, ‘okaidia’, ‘tomorrow’, ‘solarizedlight’, ‘twilight’]
  • plugins: Currently supported plugins echarts, mermaid and katex

plug-in

nodeppt chart plugin, support for KaTeX graphic symbols, now three.

< Chart

echarts theme color matching can be introduced directly in yaml configured js. echarts uses the fence syntax as follows:

{
    xAxis: {
        type: 'category',
        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
    },
    yAxis: {
        type: 'value'
    },
    series: [{
        data: [820, 932, 901, 934, 1290, 1330, 1320],
        type: 'line'
    }]
}

mermaid theme color matching can be introduced directly in yaml configured js. mermaid uses fence syntax as follows:

By far the best web version of the PPT presentation library插图1

< slide> Syntax

nodeppt will run according to < slide> Decompose the entire markdown file into a single page of slide content. < slide> Tags Support the following tags:

  • class/style, etc. : Normal class, through which we can control aligncenter, content position, background color, etc.
  • image: background image, basic syntax image=”img_url”
  • video: background video, basic syntax video=”video_src1,video_src2″
  • :class: wrap class, the following details

The slide resolves into the following html structure:

< section class="slide" attrs... > < div class="wrap" wrap="true"> // What exactly markdown renders < /div> < /section> 

where < slide> The class, etc., is resolved to the above < section> Tag, and :class is resolved to div.wrap, for example:

< slide :class="size-50" class="bg-primary"> < /slide> 

The output is

< section class="slide bg-primary"> < div class="wrap size-50" wrap="true"> // What exactly markdown renders < /div> < /section> 

Action

nodeppt supports dynamic effects as always, and version 2.0 supports dynamic effects mainly in the page.

Support for dynamic effects include:

  • fadeIn
  • zoomIn
  • rollIn
  • moveIn
  • fadeInUp
  • slow

Add.build to the parent node of the action action to be supported or add.tobuild+ action class to a specific element.

nodeppt also supports animate.css by convention.

Advanced gameplay

nodeppt.config.js

Create nodeppt.config.js file in the nodeppt execution path, you can configure the options related to webpack, in addition, you can support the self-developed nodeppt plug-in.

The default config.js built-in content is as follows:

/**
* @file  Default configuration 
 */
module.exports = () => ({
    // project deployment base
    baseUrl: '/',

    // where to output built files
    outputDir: 'dist',

    // where to put static assets (js/css/img/font/...)
    assetsDir: '',

    // filename for index.html (relative to outputDir)
    indexPath: 'index.html',
    // Plug-ins, including  markdown  and  posthtml
    plugins: [],
    // chainWebpack: [],

    // whether filename will contain hash part
    filenameHashing: true,

    // boolean, use full build?
    runtimeCompiler: false,

    // deps to transpile
    transpileDependencies: [
        /* string or regex */
    ],

    // sourceMap for production build?
    productionSourceMap: true,

    // use thread-loader for babel & TS in production build
    // enabled by default if the machine has more than 1 cores
    parallel: () => {
        try {
            return require('os').cpus().length > 1;
        } catch (e) {
            return false;
        }
    },

    // multi-page config
    pages: undefined,

    // <script type="module" crossorigin="use-credentials">
    // #1656, #1867, #2025
    crossorigin: undefined,

    // subresource integrity
    integrity: false,

    css: {
        extract: true
        // modules: false,
        // localIdentName: '[name]_[local]_[hash:base64:5]',
        // sourceMap: false,
        // loaderOptions: {}
    },

    devServer: {
        /*
      host: '0.0.0.0',
      port: 8080,
      https: false,
      proxy: null, // string | Object
      before: app => {}
    */
    }
}); 

Parser plug-in
Parsing plugins fall into two categories: markdown-it and posthtml

  • markdown-it: parses markdown files, if it is to enhance markdown syntax, you can use this type of plug-in
  • posthtml: is to deal with html tags, if it is to modify the output html content, you can use this kind of plug-in

Define a plugin:

module.exports = {
   // The id here must start with markdown/posthtml 
   // Corresponding to markdown-it and posthtml plugin syntax respectively 
   id: 'markdown-xxx',
   // apply here is the actual content of the plugin, see markdown-it and posthtml plugin development in detail 
   apply: () =>  {}
}; 

—END—

Open Source protocol: MIT license

资源下载此资源为免费资源立即下载
Telegram:@John_Software

Disclaimer: This article is published by a third party and represents the views of the author only and has nothing to do with this website. This site does not make any guarantee or commitment to the authenticity, completeness and timeliness of this article and all or part of its content, please readers for reference only, and please verify the relevant content. The publication or republication of articles by this website for the purpose of conveying more information does not mean that it endorses its views or confirms its description, nor does it mean that this website is responsible for its authenticity.

Ictcoder Free source code By far the best web version of the PPT presentation library https://ictcoder.com/kyym/by-far-the-best-web-version-of-the-ppt-presentation-library.html

Share free open-source source code

Q&A
  • 1, automatic: after taking the photo, click the (download) link to download; 2. Manual: After taking the photo, contact the seller to issue it or contact the official to find the developer to ship.
View details
  • 1, the default transaction cycle of the source code: manual delivery of goods for 1-3 days, and the user payment amount will enter the platform guarantee until the completion of the transaction or 3-7 days can be issued, in case of disputes indefinitely extend the collection amount until the dispute is resolved or refunded!
View details
  • 1. Heptalon will permanently archive the process of trading between the two parties and the snapshots of the traded goods to ensure that the transaction is true, effective and safe! 2, Seven PAWS can not guarantee such as "permanent package update", "permanent technical support" and other similar transactions after the merchant commitment, please identify the buyer; 3, in the source code at the same time there is a website demonstration and picture demonstration, and the site is inconsistent with the diagram, the default according to the diagram as the dispute evaluation basis (except for special statements or agreement); 4, in the absence of "no legitimate basis for refund", the commodity written "once sold, no support for refund" and other similar statements, shall be deemed invalid; 5, before the shooting, the transaction content agreed by the two parties on QQ can also be the basis for dispute judgment (agreement and description of the conflict, the agreement shall prevail); 6, because the chat record can be used as the basis for dispute judgment, so when the two sides contact, only communicate with the other party on the QQ and mobile phone number left on the systemhere, in case the other party does not recognize self-commitment. 7, although the probability of disputes is very small, but be sure to retain such important information as chat records, mobile phone messages, etc., in case of disputes, it is convenient for seven PAWS to intervene in rapid processing.
View details
  • 1. As a third-party intermediary platform, Qichou protects the security of the transaction and the rights and interests of both buyers and sellers according to the transaction contract (commodity description, content agreed before the transaction); 2, non-platform online trading projects, any consequences have nothing to do with mutual site; No matter the seller for any reason to require offline transactions, please contact the management report.
View details

Related Article

make a comment
No comments available at the moment
Official customer service team

To solve your worries - 24 hours online professional service