Skip to content

Commit 6f61bdf

Browse files
committed
Add 2023 survey
1 parent 35e2cb0 commit 6f61bdf

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

_static/css/custom2.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/* Survey banner .css */
2+
3+
.survey-banner {
4+
margin-top: 10px;
5+
background-color: #f3f4f7;
6+
padding-top: 15px;
7+
padding-left: 10px;
8+
padding-bottom: 1px;
9+
}
10+
11+
@media screen and (max-width: 600px) {
12+
.survey-banner {
13+
padding-top: 5px;
14+
padding-left: 5px;
15+
padding-bottom: -1px;
16+
font-size: 12px;
17+
margin-bottom: 5px;
18+
}
19+
}

_templates/layout.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{% extends "!layout.html" %}
22

3-
43
{%- block content %}
54
{{ super() }}
65
<script>
@@ -113,4 +112,13 @@
113112
</script>
114113

115114
<img height="1" width="1" style="border-style:none;" alt="" src="https://www.googleadservices.com/pagead/conversion/795629140/?label=txkmCPmdtosBENSssfsC&amp;guid=ON&amp;script=0"/>
115+
116+
<script>
117+
var survey = '<div class="survey-banner"><p><i class="fas fa-poll" aria-hidden="true">&nbsp </i> Take the annual <a href="https://forms.gle/jdNexNU6eZ8mCGDY7">PyTorch Tutorials survey</a>.</p></div>'
118+
if ($(".pytorch-call-to-action-links").length) {
119+
$(".pytorch-call-to-action-links").before(survey);
120+
} else {
121+
$("#pytorch-article").prepend(survey);
122+
}
123+
</script>
116124
{% endblock %}

conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,8 @@ def reset_seeds(gallery_conf, fname):
285285

286286
html_css_files = [
287287
'https://cdn.jsdelivr.net/npm/katex@0.10.0-beta/dist/katex.min.css',
288-
'css/custom.css'
288+
'css/custom.css',
289+
'css/custom2.css'
289290
]
290291

291292
def setup(app):

0 commit comments

Comments
 (0)