Skip to content

Commit bd61dd4

Browse files
committed
customize intro styling
1 parent e3975de commit bd61dd4

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

tutorials/_static/custom.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,12 @@ span.inputnumrole {
1616
span.outputnumrole {
1717
color: #D84315
1818
}
19+
20+
.intro {
21+
background-color: #d8ebf3;
22+
padding: 12px;
23+
border: 1px solid #9dcde1;
24+
border-radius: 6px;
25+
margin-top: 32px;
26+
margin-bottom: 32px;
27+
}

tutorials/astropy.tpl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
{%- extends 'display_priority.tpl' -%}
22

33
{% block header %}
4-
54
{# Remove the exec_ prefix #}
65
{% set nb_name = resources.metadata.name[5:] %}
7-
86
`Download tutorial notebook <../_static/{{ nb_name }}/{{ nb_name }}.ipynb>`_ -
97
`Interactive tutorial notebook <https://beta.mybinder.org/v2/gh/astropy/astropy-tutorials/master?filepath=/tutorials/notebooks/{{ nb_name }}/{{ nb_name }}.ipynb>`_
108

@@ -89,7 +87,14 @@
8987
{% endblock data_html %}
9088

9189
{% block markdowncell scoped %}
90+
{% if cell.source.startswith('# Introduction') %}
91+
.. rst-class:: intro
92+
9293
{{ cell.source | markdown2rst }}
94+
{% else %}
95+
{{ cell.source | markdown2rst }}
96+
{% endif %}
97+
9398
{% endblock markdowncell %}
9499

95100
{%- block rawcell scoped -%}

0 commit comments

Comments
 (0)