link fix
This commit is contained in:
@@ -18,11 +18,11 @@
|
|||||||
<div id="docPage">
|
<div id="docPage">
|
||||||
<div id="doc-container">
|
<div id="doc-container">
|
||||||
<h1>Autoplay</h1>
|
<h1>Autoplay</h1>
|
||||||
<p>The <a href="/src/plugins/autoplay/autoplay.js">autoplay</a> plugin automatically advances the presentation after a certain timeout expired.</p>
|
<p>The <a href="https://github.com/impress/impress.js/blob/master/src/plugins/autoplay/autoplay.js">autoplay</a> plugin automatically advances the presentation after a certain timeout expired.</p>
|
||||||
<h2>USAGE</h2>
|
<h2>USAGE</h2>
|
||||||
<p>You first have to enable the plugin by setting a global <code>data-autoplay</code> value on the impress-div. Then you can change individual <code>data-autoplay</code> values on each <em>step</em> by adding <code>data-autoplay</code> to it. If this value is set to <code>0</code>, there will be no more auto-advancing on this <em>step</em>. The value you enter is time in seconds to switch to the next slide.</p>
|
<p>You first have to enable the plugin by setting a global <code>data-autoplay</code> value on the impress-div. Then you can change individual <code>data-autoplay</code> values on each <em>step</em> by adding <code>data-autoplay</code> to it. If this value is set to <code>0</code>, there will be no more auto-advancing on this <em>step</em>. The value you enter is time in seconds to switch to the next slide.</p>
|
||||||
<h2>EXAMPLE</h2>
|
<h2>EXAMPLE</h2>
|
||||||
<p>Note: This only shows part of the HTML. If you want to know how to set up a presentation, I highly recommend you read our <a href="https://github.com/impress/impress.js/blob/master/GettingStarted.md">Getting Started Guide</a></p>
|
<p>Note: This only shows part of the HTML. If you want to know how to set up a presentation, I highly recommend you read our <a href="/docs/gettingStarted.html">Getting Started Guide</a></p>
|
||||||
<pre><code><div id=impress data-autoplay="5">
|
<pre><code><div id=impress data-autoplay="5">
|
||||||
<div class="step" data-autoplay="0">
|
<div class="step" data-autoplay="0">
|
||||||
This slide will not auto-advance
|
This slide will not auto-advance
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ of different divs.</p>
|
|||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>The <a href="../mouse-timeout/README.md">mouse-timeout</a> plugin can be leveraged to hide
|
<p>The <a href="/docs/plugins/mouse-timeout">mouse-timeout</a> plugin can be leveraged to hide
|
||||||
the toolbar from sight, and only make it visible when mouse is moved.</p>
|
the toolbar from sight, and only make it visible when mouse is moved.</p>
|
||||||
<pre><code>body.impress-mouse-timeout div#impress-toolbar {
|
<pre><code>body.impress-mouse-timeout div#impress-toolbar {
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ if ( prompt( 'Do you want to regenerate the plugins documentation? (y/n) ' ).toL
|
|||||||
( async () => {
|
( async () => {
|
||||||
let html = md2html.render( '' + data );
|
let html = md2html.render( '' + data );
|
||||||
storeHTML( await findLinks( html, path.join( pluginsPath + '/' + plugins[item] ) ), plugins[item], 'plugins' );
|
storeHTML( await findLinks( html, path.join( pluginsPath + '/' + plugins[item] ) ), plugins[item], 'plugins' );
|
||||||
} );
|
} ) ();
|
||||||
};
|
};
|
||||||
} );
|
} );
|
||||||
};
|
};
|
||||||
@@ -120,14 +120,14 @@ buildExamplesPage();
|
|||||||
*/
|
*/
|
||||||
async function findLinks ( html, path ) {
|
async function findLinks ( html, path ) {
|
||||||
let returnHTML = html;
|
let returnHTML = html;
|
||||||
for ( let letter in html ) {
|
for ( let letter in returnHTML ) {
|
||||||
if ( html[letter] === '<' ) {
|
if ( returnHTML[letter] === '<' ) {
|
||||||
if ( html.slice( parseInt( letter ), parseInt( letter ) + 9 ) === '<a href="' ) {
|
if ( returnHTML.slice( parseInt( letter ), parseInt( letter ) + 9 ) === '<a href="' ) {
|
||||||
let i = 9;
|
let i = 9;
|
||||||
while ( html.slice( parseInt( letter ) + i, parseInt( letter ) + i + 1 ) !== '"' ) {
|
while ( returnHTML.slice( parseInt( letter ) + i, parseInt( letter ) + i + 1 ) !== '"' ) {
|
||||||
i += 1;
|
i += 1;
|
||||||
};
|
};
|
||||||
returnHTML = html.slice( 0, parseInt( letter ) ) + await checkLinks( html.slice( parseInt( letter ) + 9, parseInt( letter ) + i ), path ) + html.slice( parseInt( letter ) + i + 2, parseInt( html.length ) );
|
returnHTML = returnHTML.slice( 0, parseInt( letter ) ) + await checkLinks( returnHTML.slice( parseInt( letter ) + 9, parseInt( letter ) + i ), path ) + returnHTML.slice( parseInt( letter ) + i + 2, parseInt( returnHTML.length ) );
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -186,7 +186,13 @@ async function checkLinks ( link, fpath ) {
|
|||||||
return '<a href="' + link + '">';
|
return '<a href="' + link + '">';
|
||||||
} else if ( link.slice( 0, 1 ) === '/' && link.slice( 1, 2 ) !== '.' ) {
|
} else if ( link.slice( 0, 1 ) === '/' && link.slice( 1, 2 ) !== '.' ) {
|
||||||
if ( link.slice( link.length - 3, link.length ).includes( '.' ) ) {
|
if ( link.slice( link.length - 3, link.length ).includes( '.' ) ) {
|
||||||
return '<a href="https://github.com/impress/impress.js/blob/master' + link + '">';
|
if ( link === '/GettingStarted.md' ) {
|
||||||
|
return '<a href="/docs/gettingStarted.html">';
|
||||||
|
} else if ( link === '/DOCUMENTATION.md' ) {
|
||||||
|
return '<a href="/docs/reference">';
|
||||||
|
} else {
|
||||||
|
return '<a href="https://github.com/impress/impress.js/blob/master' + link + '">';
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return '<a href="https://github.com/impress/impress.js/tree/master' + link + '">';
|
return '<a href="https://github.com/impress/impress.js/tree/master' + link + '">';
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user