Skip to content

Temporarily add tutorials survey #2715

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions _static/css/custom2.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* Survey banner .css */

.survey-banner {
margin-top: 10px;
background-color: #f3f4f7;
padding-top: 15px;
padding-left: 10px;
padding-bottom: 1px;
}

@media screen and (max-width: 600px) {
.survey-banner {
padding-top: 5px;
padding-left: 5px;
padding-bottom: -1px;
font-size: 12px;
margin-bottom: 5px;
}
}
11 changes: 10 additions & 1 deletion _templates/layout.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{% extends "!layout.html" %}


{%- block content %}
{{ super() }}
<script>
Expand Down Expand Up @@ -113,4 +112,14 @@
</script>

<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"/>

//temporarily add a link to survey
<script>
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>'
if ($(".pytorch-call-to-action-links").length) {
$(".pytorch-call-to-action-links").before(survey);
} else {
$("#pytorch-article").prepend(survey);
}
</script>
{% endblock %}
3 changes: 2 additions & 1 deletion conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,8 @@ def reset_seeds(gallery_conf, fname):

html_css_files = [
'https://cdn.jsdelivr.net/npm/katex@0.10.0-beta/dist/katex.min.css',
'css/custom.css'
'css/custom.css',
'css/custom2.css'
]

def setup(app):
Expand Down