Skip to content

Commit 81e8af6

Browse files
authored
Merge pull request #5 from matlantis-pfcc/v1.2.1
Update to v1.2.1
2 parents 16b2fac + b1ccfb2 commit 81e8af6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+330
-389
lines changed

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ $ poetry install
1717
You can choose a language for build from `ja` or `en`.
1818

1919
```sh
20+
$ poetry run python misc/split_notebook.py
2021
$ poetry run make html -e LANG="ja"
2122
```

docs/_static/css/cookie-consent.css

Lines changed: 0 additions & 99 deletions
This file was deleted.

docs/_static/css/custom.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,23 @@
3232
.md-icon.md-icon--menu.md-header-nav__button {
3333
margin-top: 17px;
3434
}
35+
36+
.nboutput .output_area .highlight pre {
37+
word-break: break-all;
38+
word-wrap: break-word;
39+
white-space: pre-wrap;
40+
}
41+
42+
.md-typeset__table .head code.docutils{
43+
background: #616161;
44+
padding: 2px;
45+
white-space: nowrap;
46+
font-weight: bold;
47+
color: #FFF;
48+
}
49+
50+
.md-typeset h1,
51+
.md-typeset h2 {
52+
color: rgba(0,0,0,.87);
53+
font-weight: bold;
54+
}

docs/_static/js/cookie-consent-init.umd.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/_static/js/cookie-consent.umd.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/_static/js/external-link.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
$(document).ready(function () {
2+
$('a[href^="http://"], a[href^="https://"]').not('a[class*=internal]').attr({
3+
target: '_blank',
4+
referrerpolicy: "no-referrer",
5+
rel: "noopener noreferrer"
6+
});
7+
});

docs/_templates/header.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@
2424
<span class="md-header-nav__topic"> {{ title|striptags|e }} </span>
2525
</div>
2626
</div>
27+
<div class="md-flex__cell md-flex__cell--shrink">
28+
<div style="width: 85px; height: 57px; font-size: 16px; line-height: 57px;">
29+
<a href="https://docs.matlantis.com/atomistic-simulation-tutorial/ja/" hreflang="ja">JA</a>
30+
|
31+
<a href="https://docs.matlantis.com/atomistic-simulation-tutorial/en/" hreflang="en">EN</a>
32+
</div>
33+
</div>
2734
<div class="md-flex__cell md-flex__cell--shrink">
2835
<label class="md-icon md-icon--search md-header-nav__button" for="__search"></label>
2936
{% include "searchbox.html" %}

docs/_templates/layout.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
{% block htmltitle %}
44
{{ super() }}
55
<!-- Workaround: need to import cookie-consent library before importing require.js -->
6-
<script src="_static/js/cookie-consent.umd.js"></script>
7-
<script src="_static/js/cookie-consent-init.umd.js"></script>
6+
<script src="https://docs.matlantis.com/assets/js/cookie-consent.umd.js"></script>
7+
<script src="https://docs.matlantis.com/assets/js/cookie-consent-init.umd.js"></script>
88
{% endblock %}
99

1010
{% block relbar1 %}

docs/conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,11 @@
103103

104104
html_css_files = [
105105
'css/custom.css',
106-
'css/cookie-consent.css',
106+
'https://docs.matlantis.com/assets/css/cookie-consent.css',
107107
]
108108

109+
html_js_files = ['js/external-link.js']
110+
109111
# Avoid to plotly error
110112
# See https://github.com/spatialaudio/nbsphinx/issues/572#issuecomment-853389268
111113
mathjax_path = 'https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=TeX-AMS-MML_HTMLorMML'

docs/misc/split_notebook.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ def split_notebook(
111111
)
112112

113113
# Copy `output` directory
114-
shutil.copytree(tutorials_bilingual / "output", tutorials_jp / "output")
115-
shutil.copytree(tutorials_bilingual / "output", tutorials_en / "output")
114+
shutil.copytree(tutorials_bilingual / "output", tutorials_jp / "output", dirs_exist_ok=True)
115+
shutil.copytree(tutorials_bilingual / "output", tutorials_en / "output", dirs_exist_ok=True)
116116

117117
if args.remove_bilingual_dir:
118118
shutil.rmtree(tutorials_bilingual)

0 commit comments

Comments
 (0)