documentation-website
Advanced tools
Comparing version 1.0.264 to 1.0.265
{ | ||
"name": "documentation-website", | ||
"version": "1.0.264", | ||
"version": "1.0.265", | ||
"description": "Declarative multilanguage documentation website generator", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -50,8 +50,7 @@ <!-- !/usr/bin/env markdown | ||
<!--|deDE:Inhalt--> | ||
Content | ||
------- | ||
<!--Place for automatic generated table of contents.--> | ||
<div class="doc-toc"></div> | ||
<div class="doc-toc" style="display:none"> | ||
<!--|deDE:Inhalt--> | ||
<h2 id="content">Content</h2> | ||
</div> | ||
@@ -101,2 +100,19 @@ <!--|deDE:Merkmale--> | ||
```bash | ||
>>> curl \ | ||
https://raw.githubusercontent.com/thaibault/archinstall/master/archinstall.sh >archinstall.sh && \ | ||
chmod +x archinstall.sh | ||
``` | ||
### Executable code example | ||
<!--showExample--> | ||
```HTML | ||
<label> | ||
Name: | ||
<input type="text" placeholder="Max Musterman" /> | ||
</label> | ||
``` | ||
<!--|deDE:Klassische Dom-Integration--> | ||
@@ -103,0 +119,0 @@ ### Classical dom injection |
@@ -40,4 +40,2 @@ // #!/usr/bin/env babel-node | ||
* indicating controlled nodes. | ||
* @property static:_commonOptions.codeTableWrapper {string} - Markup to use as | ||
* wrapper for all code highlighted examples. | ||
* @property static:_commonOptions.showExample {Object} - Options object to | ||
@@ -79,3 +77,2 @@ * configure code example representation. | ||
static _commonOptions:DefaultOptions = { | ||
codeTableWrapper: '<div class="table-responsive">', | ||
domNodes: { | ||
@@ -134,2 +131,3 @@ aboutThisWebsiteLink: 'a[href="#about-this-website"]', | ||
* @param options - An options object. | ||
* | ||
* @returns Returns the current instance. | ||
@@ -363,2 +361,4 @@ */ | ||
$(this.options.domNodes.tableOfContentLinks) | ||
this.$domNodes.tableOfContent.css('display', 'initial') | ||
} | ||
@@ -371,9 +371,10 @@ /** | ||
_makeCodeEllipsis():void { | ||
const lengthLimit = 89 // 79 | ||
this.$domNodes.code.each((index:number, domNode:HTMLElement):void => { | ||
const $domNode:$T = $(domNode) | ||
const tableParent:$T = $domNode.closest('table') | ||
if (tableParent.length) | ||
tableParent.wrap(this.options.codeTableWrapper) | ||
let newContent = '' | ||
const codeLines:Array<string> = $domNode.html().split('\n') | ||
let subIndex = 0 | ||
@@ -386,3 +387,3 @@ for (const value of codeLines) { | ||
const excess:number = $(`<div>${value}</div>`).text( | ||
).length - 79 | ||
).length - lengthLimit | ||
if (excess > 0) | ||
@@ -394,2 +395,3 @@ newContent += this._replaceExcessWithDots(value, excess) | ||
newContent += '\n' | ||
subIndex += 1 | ||
@@ -405,2 +407,3 @@ } | ||
* @param excess - Amount of excess. | ||
* | ||
* @returns Returns the trimmed content. | ||
@@ -407,0 +410,0 @@ */ |
@@ -54,3 +54,2 @@ // -*- coding: utf-8 -*- | ||
export interface DefaultOptions { | ||
codeTableWrapper:string | ||
domNodes:DomNodes | ||
@@ -57,0 +56,0 @@ domNodeSelectorInfix:null|string |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
754523
3697