Replace hardcoded 10
with actual button width
This commit is contained in:
parent
8d5429bcc0
commit
527d187e82
3 changed files with 9 additions and 9 deletions
|
@ -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 %}
|
||||
|
|
8
assets/js/main.min.js
vendored
8
assets/js/main.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -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];
|
||||
|
||||
|
|
Loading…
Reference in a new issue