|
|
|
@ -53,8 +53,7 @@ export const template = ( |
|
|
|
|
|
|
|
|
|
<div id="ethdoc-viewer"> |
|
|
|
|
|
|
|
|
|
${ |
|
|
|
|
functions.length === 0 |
|
|
|
|
${functions.length === 0 |
|
|
|
|
? "No contract to display" |
|
|
|
|
: renderHeader(name, contractDoc) |
|
|
|
|
} |
|
|
|
@ -63,7 +62,7 @@ export const template = ( |
|
|
|
|
.map( |
|
|
|
|
(item) => ` |
|
|
|
|
<hr> |
|
|
|
|
<h6>${item.name} - ${item.type} </h6> |
|
|
|
|
<h6>${item.name}</h6> |
|
|
|
|
|
|
|
|
|
${getMethodDetails(item.devdoc)} |
|
|
|
|
|
|
|
|
@ -92,22 +91,21 @@ export const renderHeader = ( |
|
|
|
|
name: string, |
|
|
|
|
contractDoc: ContractDocumentation |
|
|
|
|
) => ` |
|
|
|
|
<h3>${name} ${ |
|
|
|
|
contractDoc.title ? `<small>: ${contractDoc.title}</small>` : "" |
|
|
|
|
}</h3> |
|
|
|
|
<h3>${name} ${contractDoc.title ? `<small>: ${contractDoc.title}</small>` : "" |
|
|
|
|
}</h3> |
|
|
|
|
|
|
|
|
|
${contractDoc.notice ? `<p class="lead">${contractDoc.notice}</p>` : ""} |
|
|
|
|
|
|
|
|
|
${contractDoc.author ? `<p>Author: ${contractDoc.author}</p>` : ""} |
|
|
|
|
|
|
|
|
|
<br /> |
|
|
|
|
<p><strong>Functions</strong></p> |
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
export const renderParameterDocumentation = ( |
|
|
|
|
parameters: ParameterDocumentation[] |
|
|
|
|
) => |
|
|
|
|
`${ |
|
|
|
|
parameters.length > 0 |
|
|
|
|
`${parameters.length > 0 |
|
|
|
|
? `<table class="table table-sm table-bordered table-striped">
|
|
|
|
|
<thead> |
|
|
|
|
<tr> |
|
|
|
|