Unverified Commit a4d8a4ea authored by Yuge Zhang's avatar Yuge Zhang Committed by GitHub
Browse files

Update readme and index page (#4642)

parent a1621236
This diff is collapsed.
......@@ -47,7 +47,7 @@ CARD_TEMPLATE_LINK = """
.. raw:: html
<div class="codesnippet-card-link">
For a full tutorial, please go here.
{seemore}
<span class="material-icons right">arrow_forward</span>
</div>
"""
......@@ -58,6 +58,7 @@ class CodeSnippetCardDirective(Directive):
'icon': directives.unchanged,
'title': directives.unchanged,
'link': directives.unchanged,
'seemore': directives.unchanged,
}
has_content = True
......@@ -69,6 +70,7 @@ class CodeSnippetCardDirective(Directive):
title = self.options['title']
link = directives.uri(self.options['link'])
icon = directives.uri(self.options['icon'])
seemore = self.options.get('seemore', 'For a full tutorial, please go here.')
except ValueError as e:
print(e)
raise
......@@ -96,7 +98,7 @@ class CodeSnippetCardDirective(Directive):
refwarn=True,
refkeepformat=True)
# refkeepformat is handled in `patch_autodoc.py`
self.state.nested_parse(StringList(CARD_TEMPLATE_LINK.split('\n')), self.content_offset, link_node)
self.state.nested_parse(StringList(CARD_TEMPLATE_LINK.format(seemore=seemore).split('\n')), self.content_offset, link_node)
anchor_node += link_node
# close footer
......
This diff is collapsed.
.. 1d789e3c2bde22f1392654fde31a688a
.. 7f1c1f76edfd4524c037b283d7520561
###########################
Neural Network Intelligence
......
......@@ -80,6 +80,12 @@ nav.md-tabs .md-tabs__item:not(:last-child) .md-tabs__link:after {
padding-right: 1em;
}
/* for release icon, on home page */
.release-icon {
margin-left: 8px;
width: 40px;
}
/* Similar to cardlink, but used in codesnippet in index page. see sphinx_gallery.css */
.codesnippet-card-container {
display: flex;
......@@ -90,11 +96,16 @@ nav.md-tabs .md-tabs__item:not(:last-child) .md-tabs__link:after {
border-left: 0;
padding: 0;
margin: .5rem 1rem 1rem 0rem;
width: 100%;
}
/* Controlling the cards in containers only */
.codesnippet-card-container .codesnippet-card.admonition {
width: 47%;
}
@media only screen and (max-width:59.9375em) {
.codesnippet-card.admonition {
.codesnippet-card-container .codesnippet-card.admonition {
width: 100%;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment