I can't do the PPT after working hard!
> View effect: https://nodeppt.js.org
npm install -g nodeppt
-
bug fix -
Add multi page editing public resources, which is split Chunks
-
New: Create a new md file using the online template -
Serve: Start the webpack dev server of an md file -
Build: compile and produce an 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 nodeppt -h # get help nodeppt serve -h
-
Page: ↑/↓/←/→ Space Home End -
Fullscreen: F -
Overview: -/+ -
Speaker Note: N -
Grid Background: Enter
title : Nodeppt markdown demo
speaker : Three clear waters
url : https://github.com/ksky521/nodeppt
js : - https://www.echartsjs.com/asset/theme/shine.js
prismTheme : solarizedlight
plugins : - echarts - mermaid - katex
-
Title: Speech topic -
Speaker: Speaker -
Url: address -
Js: js file array, placed in front of the body -
Css: css file array, put in the header -
PrismTheme: Prism color matching, value range ['dark', 'coy', 'funky', 'okaidia', 'tomorrow', 'solarizedlight', 'twilight'] -
Plugins: currently supported echarts , mermaid and katex Three plug-ins
{ 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' }] }
sequenceDiagram Alice ->> Bob: Hello Bob, how are you? Bob-->>John: How about you John? Bob--x Alice: I am good thanks! Bob-x John: I am good thanks! Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row. Bob-->Alice: Checking with John... Alice->John: Yes... John, how are you?
-
Class/style, etc.: Normal class classes can be centered, content location, background color, etc. through this control -
Image: background image, basic syntax image="img_url" -
Video: background video, basic syntax video="video_src1,video_src2" -
: class: the class of the wrap. Details are as follows
< section class =" slide " attrs... > < div class =" wrap " wrap =" true " > //Specific rendered contents of markdown </ div > </ section >
< slide :class =" size-50 " class =" bg-primary " > </ slide >
< section class =" slide bg-primary " > < div class =" wrap size-50 " wrap =" true " > //Specific rendered contents of markdown </ div > </ section >
< slide image = " https://source.unsplash.com/UJbHNoVPZW0/ " > # This is a common background image < slide image = " https://source.unsplash.com/UJbHNoVPZW0/ .dark " > # This background image will be covered with a black transparent layer < slide image = " https://source.unsplash.com/UJbHNoVPZW0/ .light " > # This background image will be covered with a white transparent layer < slide class = " bg-black aligncenter " image = " https://source.unsplash.com/n9WPPWiPPJw/ .anim " > # This background image will move slowly
# header {.style-me.class2} paragraph {data-toggle=modal}
< h1 class =" style-me class2 " > header </ h1 >
< p data-toggle =" modal " > paragraph </ p >
Use the css-module green on this paragraph. {.text-intro}
< p class =" text-intro " > Use the css-module green on this paragraph. </ p >
- list item ** bold ** {.red}
< ul >
< li class =" red " > list item < strong > bold </ strong > </ li >
</ ul >
- list item ** bold ** {.red}
< ul class =" red " >
< li > list item < strong > bold </ strong > </ li >
</ ul >
! ! [ ] ( https://webslides.tv/static/images/iphone.png .size-50.alignleft)
< img src =" https://webslides.tv/static/images/iphone.png " class =" size-50 alignleft " />
! ! [ figure ] ( https://webslides.tv/static/images/setup.png .aligncenter)
< figure > < img src =" https://webslides.tv/static/images/setup.png " class =" aligncenter " /> </ figure >
[ Normal button ] ( ) {.button} [ Rounded common button ] ( ) {.button.radius} [ hollow ] ( ) {.button.ghost} [ : fa github: icon in front ] ( ) {.button}
:fa-xxx: → <i class="fa fa-xxx"></i> :~fa-xxx:~ → <span><i class="fa fa-xxx"></i></span> ::fa-xxx:: → Block level <i class="fa fa-xxx"></i> , that is, it will not be p package
:span: :span: {.text-span}
-
fadeIn -
zoomIn -
rollIn -
moveIn -
fadeInUp -
slow
:::div {.content-left} ## title :::
< div class =" content-left " > < h2 > title </ h2 > </ div >
-
Card: card, one side is picture, the other side is content -
Column: column multi column layout -
Shadowbox: box with shadow -
Steps: step components -
cta: -
Gallery: pictures -
Flexblock: flex block layout, which supports multiple subtypes -
Note: speech notes
:::TYPE {.attrs} ## Part I Separate with hr tags ---
## Part II The content here is also :::
/**
*@ 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 posttml
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 > one ;
} 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 => {}
*/
}
} ) ;
-
Markdown it: it parses markdown files. If you want to enhance markdown syntax, you can use this type of plug-in -
Posthtml: it processes html tags. If you want to modify the output html content, you can use this type of plug-in
module . exports = {
//The ID here must start with markdown/posttml
//Respectively correspond to markdown it and posttml plug-in syntax
id : 'markdown-xxx' ,
//The application here is the actual content of the plug-in. See markdown it and posttml plug-in development for details
apply : ( ) => { }
} ;
js: - webslide_plugins.js
//Webslide_plugins.js content
window . WSPlugins_ = [
{
id : 'webslide_plugin_name' ,
//The following is the corresponding plug-in class
apply : class Plugin { }
}
] ;