Skip to content

Commit 6299b62

Browse files
committed
final fixes
1 parent 89eea55 commit 6299b62

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

fmriprep/viz/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"sub_reports":
2+
"sections":
33
[
44
{
55
"name": "Summary",

fmriprep/viz/report.tpl

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,25 @@
1111
<style type="text/css">
1212
.sub-report-title {}
1313
.run-title {}
14-
.elem-title {
15-
padding-top: 25px;
16-
}
14+
15+
h1 { padding-top: 35px; }
16+
h2 { padding-top: 20px; }
17+
h3 { padding-top: 15px; }
18+
1719
.elem-desc {}
1820
.elem-filename {}
1921
2022
div.elem-image {
2123
width: 100%;
2224
page-break-before:always;
23-
padding: 5px 0;
2425
}
2526
2627
.elem-image object.svg-reportlet {
2728
width: 100%;
29+
padding-bottom: 5px;
2830
}
2931
body {
30-
padding-top: 65px;
32+
padding: 65px 10px 10px;
3133
}
3234
</style>
3335
</head>
@@ -36,7 +38,7 @@ body {
3638
<nav class="navbar navbar-default navbar-fixed-top">
3739
<div class="container collapse navbar-collapse">
3840
<ul class="nav navbar-nav">
39-
{% for sub_report in sub_reports %}
41+
{% for sub_report in sections %}
4042
{% if sub_report.isnested %}
4143
<li class="dropdown">
4244
<a class="nav-item nav-link dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" href="">
@@ -70,7 +72,7 @@ body {
7072
<h1 class="text-danger"> The navigation menu uses Javascript. Without it this report might not work as expected </h1>
7173
</noscript>
7274

73-
{% for sub_report in sub_reports %}
75+
{% for sub_report in sections %}
7476
<div id="{{ sub_report.name }}">
7577
<h1 class="sub-report-title">{{ sub_report.name }}</h1>
7678
{% if sub_report.isnested %}
@@ -84,7 +86,8 @@ body {
8486
{% for content in elem.contents %}
8587
{% if elem.raw %}{{ content }}{% else %}
8688
<div class="elem-image">
87-
<object class="svg-reportlet" type="image/svg+xml" data="./{{ content }}">filename:{{ content }}</object>
89+
<object class="svg-reportlet" type="image/svg+xml" data="./{{ content }}">
90+
Problem loading figure {{ content }}. If the link below works, please try reloading the report in your browser.</object>
8891
</div>
8992
<div class="elem-filename">
9093
Get figure file: <a href="./{{ content }}" target="_blank">{{ content }}</a>

fmriprep/viz/reports.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def generate_report(self):
174174
trim_blocks=True, lstrip_blocks=True
175175
)
176176
report_tpl = env.get_template('viz/report.tpl')
177-
report_render = report_tpl.render(sub_reports=self.sections, errors=self.errors)
177+
report_render = report_tpl.render(sections=self.sections, errors=self.errors)
178178
with open(os.path.join(self.out_dir, "fmriprep", self.out_filename), 'w') as fp:
179179
fp.write(report_render)
180180
return len(self.errors)

0 commit comments

Comments
 (0)