nitc :: CardMdSummary :: _headlines
Headlines found in the documentnitc :: CardMdSummary :: _id
nitc :: CardMdSummary :: _md_processor
Markdown processor used to extract and render the contentnitc :: CardMdSummary :: _title
nitc :: CardMdSummary :: defaultinit
nitc :: CardMdSummary :: headlines=
Headlines found in the documentnitc :: CardMdSummary :: md_processor
Markdown processor used to extract and render the contentnitc :: CardMdSummary :: md_processor=
Markdown processor used to extract and render the contentnitc $ CardMdSummary :: SELF
Type of this instance, automatically specialized in every classnitc $ CardMdSummary :: rendering
Service used to render the content of the template.nitc :: CardMdSummary :: _headlines
Headlines found in the documentnitc :: CardMdSummary :: _id
nitc :: CardMEntity :: _id
template :: Template :: _is_frozen
Is the template allowing more modification (add
)
template :: Template :: _is_writing
Flag to avoid infinite recursivity if a template contains itselfnitc :: CardMdSummary :: _md_processor
Markdown processor used to extract and render the contenttemplate :: Template :: _render_done
Flag to avoid multiple renderingnitc :: CardMdSummary :: _title
nitc :: CardMEntity :: _title
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitc :: CardMEntity :: defaultinit
nitc :: CardMDoc :: defaultinit
nitc :: CardMdSummary :: defaultinit
nitc :: StaticCard :: defaultinit
core :: Writable :: defaultinit
core :: Object :: defaultinit
template :: Template :: defaultinit
nitc :: CardMEntity :: full_doc=
Render the mentity full documentation?nitc :: CardMdSummary :: headlines=
Headlines found in the documenttemplate :: Template :: is_frozen=
Is the template allowing more modification (add
)
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
template :: Template :: is_writing
Flag to avoid infinite recursivity if a template contains itselftemplate :: Template :: is_writing=
Flag to avoid infinite recursivity if a template contains itselfnitc :: CardMdSummary :: md_processor
Markdown processor used to extract and render the contentnitc :: CardMdSummary :: md_processor=
Markdown processor used to extract and render the contentcore :: Object :: native_class_name
The class name of the object in CString format.core :: Object :: output_class_name
Display class name on stdout (debug only).template :: Template :: render_done=
Flag to avoid multiple renderingcore :: Writable :: write_to_bytes
Likewrite_to
but return a new Bytes (may be quite large)
core :: Writable :: write_to_file
Likewrite_to
but take care of creating the file
core :: Writable :: write_to_string
Likewrite_to
but return a new String (may be quite large).
# A card that displays the summary of a Markdown document
class CardMdSummary
super CardMDoc
autoinit(md_processor, headlines)
# Markdown processor used to extract and render the content
var md_processor: MarkdownProcessor is writable
# Headlines found in the document
var headlines: ArrayMap[String, HeadLine] is writable
redef var id = "summary"
redef var title = "Summary"
redef fun rendering do
addn "<h4>Summary</h4>"
addn "<div class='summary'>"
addn " <ul class='list-unstyled'>"
for id, headline in headlines do
var level = headline.level
var title = md_processor.process(headline.title)
addn "<li><a href='#{id}'><h{level}>{title}</h{level}></a></li>"
end
addn " </ul>"
addn "</div>"
end
end
src/doc/static/static_cards.nit:146,1--172,3