Replace hardcoded 10 with actual button width

This commit is contained in:
Michael Rose 2018-01-10 11:45:35 -05:00
parent 8d5429bcc0
commit 527d187e82
3 changed files with 9 additions and 9 deletions

View file

@ -9,7 +9,7 @@
{% endfor %}
{% else %}
<script src="{{ '/assets/js/main.min.js' | absolute_url }}"></script>
<script defer src="https://use.fontawesome.com/releases/v5.0.2/js/all.js"></script>
<script src="https://use.fontawesome.com/releases/v5.0.2/js/all.js"></script>
{% endif %}
{% if site.search == true or page.layout == "search" %}
@ -20,9 +20,9 @@
{% else %}
{% assign lang = "en" %}
{% endcase %}
<script defer src="{{ '/assets/js/lunr/lunr.min.js' | absolute_url }}"></script>
<script defer src="{{ '/assets/js/lunr/lunr-store.js' | absolute_url }}"></script>
<script defer src="{{ '/assets/js/lunr/lunr-' | append: lang | append: '.js' | absolute_url }}"></script>
<script src="{{ '/assets/js/lunr/lunr.min.js' | absolute_url }}"></script>
<script src="{{ '/assets/js/lunr/lunr-store.js' | absolute_url }}"></script>
<script src="{{ '/assets/js/lunr/lunr-' | append: lang | append: '.js' | absolute_url }}"></script>
{% endif %}
{% include analytics.html %}

File diff suppressed because one or more lines are too long

View file

@ -25,7 +25,7 @@ $(document).ready(function() {
function check() {
// Get instant state
availableSpace = $vlinks.width() - 10;
availableSpace = $vlinks.width() - $btn.width();
numOfVisibleItems = $vlinks.children().length;
requiredSpace = breakWidths[numOfVisibleItems - 1];