Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
nni
Commits
a4d8a4ea
Unverified
Commit
a4d8a4ea
authored
Mar 16, 2022
by
Yuge Zhang
Committed by
GitHub
Mar 16, 2022
Browse files
Update readme and index page (#4642)
parent
a1621236
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
165 additions
and
846 deletions
+165
-846
README.md
README.md
+47
-302
docs/extension/codesnippetcard.py
docs/extension/codesnippetcard.py
+4
-2
docs/source/index.rst
docs/source/index.rst
+101
-540
docs/source/index_zh.rst
docs/source/index_zh.rst
+1
-1
docs/static/css/material_custom.css
docs/static/css/material_custom.css
+12
-1
No files found.
README.md
View file @
a4d8a4ea
This diff is collapsed.
Click to expand it.
docs/extension/codesnippetcard.py
View file @
a4d8a4ea
...
...
@@ -47,7 +47,7 @@ CARD_TEMPLATE_LINK = """
.. raw:: html
<div class="codesnippet-card-link">
For a full tutorial, please go he
re
.
{seemo
re
}
<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
...
...
docs/source/index.rst
View file @
a4d8a4ea
This diff is collapsed.
Click to expand it.
docs/source/index_zh.rst
View file @
a4d8a4ea
..
1d789e3c2bde22f1392654fde31a688a
..
7f1c1f76edfd4524c037b283d7520561
###########################
Neural Network Intelligence
...
...
docs/static/css/material_custom.css
View file @
a4d8a4ea
...
...
@@ -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%
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment