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 %} {% endfor %}
{% else %} {% else %}
<script src="{{ '/assets/js/main.min.js' | absolute_url }}"></script> <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 %} {% endif %}
{% if site.search == true or page.layout == "search" %} {% if site.search == true or page.layout == "search" %}
@ -20,9 +20,9 @@
{% else %} {% else %}
{% assign lang = "en" %} {% assign lang = "en" %}
{% endcase %} {% endcase %}
<script defer src="{{ '/assets/js/lunr/lunr.min.js' | absolute_url }}"></script> <script src="{{ '/assets/js/lunr/lunr.min.js' | absolute_url }}"></script>
<script defer src="{{ '/assets/js/lunr/lunr-store.js' | absolute_url }}"></script> <script 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-' | append: lang | append: '.js' | absolute_url }}"></script>
{% endif %} {% endif %}
{% include analytics.html %} {% 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() { function check() {
// Get instant state // Get instant state
availableSpace = $vlinks.width() - 10; availableSpace = $vlinks.width() - $btn.width();
numOfVisibleItems = $vlinks.children().length; numOfVisibleItems = $vlinks.children().length;
requiredSpace = breakWidths[numOfVisibleItems - 1]; requiredSpace = breakWidths[numOfVisibleItems - 1];