forked from TypeStrong/typedoc-default-themes
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add custom helpers, obsolete tag support
- Loading branch information
1 parent
fcca68f
commit 8c824b8
Showing
6 changed files
with
59 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Displays obsolete notification in tags | ||
// | ||
// <dl class="tsd-comment-tags"> | ||
// <dt class="ts-flagObsolete">see</dt> | ||
// <dd class="ts-flagObsolete"><p><a href="#">Dispatcher.EVENT_BEGIN</a></p></dd> | ||
// </dl> | ||
// | ||
dl.tsd-comment-tags | ||
|
||
.ts-flagObsolete | ||
border-top: 1px solid #D01717 | ||
border-bottom: 1px solid #D01717 | ||
border-right: 1px solid #D01717 | ||
padding: 5px | ||
margin-bottom: 10px | ||
|
||
dd.ts-flagObsolete | ||
color: #D01717 | ||
|
||
dt.ts-flagObsolete | ||
background-color: #D01717 | ||
color: white | ||
border-radius: 0 | ||
|
||
.tsd-flag.ts-flagObsolete | ||
background-color: #D01717 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
var helpers = { | ||
containsTag: function ( value, declaration, options ) { | ||
// fallback... | ||
var array = []; | ||
if(declaration && declaration.signatures){ | ||
declaration.signatures.forEach(function(s){ | ||
if(s.comment && s.comment.tags){ | ||
array = array.concat(s.comment.tags); | ||
} | ||
}); | ||
|
||
//if(array) console.log("contains", value, array); | ||
} | ||
|
||
array = array.map(function(t){ | ||
if (t) { | ||
return t.tagName; | ||
} | ||
return false; | ||
}); | ||
return (array.indexOf(value) > -1) ? options.fn( this ) : ""; | ||
}, | ||
|
||
ifEquals: function ( value1, value2, options ) { | ||
return value1 === value2 ? options.fn(this) : ""; | ||
} | ||
}; | ||
module.exports = helpers; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters