Skip to content

Commit

Permalink
improve UI on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
trim21 committed Sep 2, 2024
1 parent e770ad7 commit bd7d669
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions server/templates/patch.html.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
}
}
</style>
<script>
const isMobile = (window.innerWidth <= 800);
</script>
{% endblock %}

{% block content %}
Expand Down Expand Up @@ -218,7 +221,7 @@
fileContentToggle: false,
matching: 'lines',
maxLineSizeInBlockForComparison: 80,
outputFormat: 'side-by-side',
outputFormat: isMobile ? 'line-by-line' : 'side-by-side',
synchronisedScroll: true,
renderNothingWhenEmpty: false,
};
Expand All @@ -240,7 +243,7 @@
maxLineSizeInBlockForComparison: 80,
fileContentToggle: false,
matching: 'words',
outputFormat: 'side-by-side',
outputFormat: isMobile ? 'line-by-line' : 'side-by-side',
synchronisedScroll: true,
renderNothingWhenEmpty: false,
};
Expand Down

0 comments on commit bd7d669

Please sign in to comment.