Skip to content
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

product page performance tweaks #1927

Merged
merged 1 commit into from
Oct 1, 2020
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
4 changes: 4 additions & 0 deletions mitxpro/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
<link href="https://fonts.googleapis.com/css?family=Rajdhani:300,400,500,600,700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,600,700&display=swap" rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css" rel="stylesheet"/>
<link rel="preload" as="font" href="{% static 'fonts/icomoon.eot' %}?dd3z7r" type="font/embedded-opentype" crossorigin>
<link rel="preload" as="font" href="{% static 'fonts/icomoon.ttf' %}?dd3z7r" type="font/truetype" crossorigin>
<link rel="preload" as="font" href="{% static 'fonts/icomoon.woff' %}?dd3z7r" type="font/woff" crossorigin>
<link rel="preload" as="font" href="{% static 'fonts/icomoon.svg' %}?dd3z7r" type="font/svg" crossorigin>
<script type="text/javascript">
var SETTINGS = {{ js_settings_json|safe }};
{% if CSOURCE_PAYLOAD %}
Expand Down
122 changes: 70 additions & 52 deletions mitxpro/templates/footer.html
Original file line number Diff line number Diff line change
@@ -1,62 +1,80 @@
{% load static %}

<footer class="footer">
<div class="footer-top">
<div class="container">
<div class="content-holder">
<div class="row">
<div class="col-sm-6 clearfix">
<img src={% static 'images/help.png' %}>
<div class="info">
<a href="https://xpro.zendesk.com/hc/">
<h2>Help & FAQ</h2>
</a>
<p>Find answers to your questions.</p>
</div>
</div>
<div class="col-sm-6 clearfix">
<img src={% static 'images/contact.png' %}>
<div class="info">
<a href="https://xpro.zendesk.com/hc/en-us/requests/new">
<h2>Contact Us</h2>
</a>
<p>Let us know how we can assist you.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="footer-top">
<div class="container">
<div class="footer-bottom">
<div class="mit-info">
<img src="{% static 'images/mit.png' %}" alt="MIT">
<address>
Massachusetts Institute of Technology <br>77 Massachusetts Avenue <br>Cambridge, MA 02139
</address>
<div class="content-holder">
<div class="row">
<div class="col-sm-6 clearfix">
<img src={% static 'images/help.png' %} alt="Help">
<div class="info">
<a href="https://xpro.zendesk.com/hc/">
<h2>Help & FAQ</h2>
</a>
<p>Find answers to your questions.</p>
</div>
<div class="right-info">
<ul class="footer-nav">
<li><a href="/about-us/">About Us</a></li>
</ul>
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2-legacy.js"></script>
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2.js"></script>
<script>
if (typeof hbspt !== 'undefined') {
hbspt.forms.create({
portalId: '{{ hubspot_portal_id }}',
formId: '{{ hubspot_footer_form_guid }}'
});
}
</script>
</div>
<div class="col-sm-6 clearfix">
<img src={% static 'images/contact.png' %} alt="Contact Us">
<div class="info">
<a href="https://xpro.zendesk.com/hc/en-us/requests/new">
<h2>Contact Us</h2>
</a>
<p>Let us know how we can assist you.</p>
</div>
</div>
</div>
<ul class="footer-sub-nav">
<li><a href="/terms-of-service/">Terms of Service</a></li>
<li><a href="/privacy-policy/">Privacy Policy</a></li>
<li><a href="/honor-code/">Honor Code</a></li>
<li><a target="_blank" href="https://accessibility.mit.edu/">Accessibility</a></li>
</div>
</div>
</div>
<div class="container">
<div class="footer-bottom">
<div class="mit-info">
<img src="{% static 'images/mit.png' %}" alt="MIT" />
<address>
Massachusetts Institute of Technology <br />77 Massachusetts Avenue
<br />Cambridge, MA 02139
</address>
</div>
<div class="right-info">
<ul class="footer-nav">
<li><a href="/about-us/">About Us</a></li>
</ul>
<span class="copyright">© 2019 All rights reserved. <a href="#">{{ site_name }}</a>.</span>
<script
charset="utf-8"
type="text/javascript"
src="//js.hsforms.net/forms/v2-legacy.js"
></script>
<script
charset="utf-8"
type="text/javascript"
src="//js.hsforms.net/forms/v2.js"
></script>
<script>
if (typeof hbspt !== "undefined") {
hbspt.forms.create({
portalId: "{{ hubspot_portal_id }}",
formId: "{{ hubspot_footer_form_guid }}",
});
}
</script>
</div>
</div>
<ul class="footer-sub-nav">
<li><a href="/terms-of-service/">Terms of Service</a></li>
<li><a href="/privacy-policy/">Privacy Policy</a></li>
<li><a href="/honor-code/">Honor Code</a></li>
<li>
<a
target="_blank"
href="https://accessibility.mit.edu/"
rel="noopener noreferrer"
>Accessibility</a
>
</li>
</ul>
<span class="copyright"
>© 2019 All rights reserved. <a href="#">{{ site_name }}</a>.</span
>
</div>
</footer>
7 changes: 0 additions & 7 deletions static/scss/icomoon.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
// sass-lint:disable mixins-before-declarations
@font-face {
font-family: "icomoon";
src: url("#{$static-path}/fonts/icomoon.eot?dd3z7r"),
url("#{$static-path}/fonts/icomoon.eot?dd3z7r#iefix")
format("embedded-opentype"),
url("#{$static-path}/fonts/icomoon.ttf?dd3z7r") format("truetype"),
url("#{$static-path}/fonts/icomoon.woff?dd3z7r") format("woff"),
url("#{$static-path}/fonts/icomoon.svg?dd3z7r#icomoon") format("svg");
Comment on lines -4 to -9
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might not fix everything we want to. Refer to the lighthouse report which still flags this as an issue:

Screenshot 2020-09-24 at 5 20 35 PM

The recommended way of fixing it:
https://web.dev/font-display/?utm_source=lighthouse&utm_medium=devtools

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's done exactly that way and I don't see that error on my side.

font-weight: normal;
font-style: normal;
}
Expand All @@ -21,7 +15,6 @@
font-variant: normal;
text-transform: none;
line-height: 1;

}

.icon-close-outline:before {
Expand Down