Skip to content

Commit

Permalink
Avoid scroll in add strings to screenshot
Browse files Browse the repository at this point in the history
- Added a height limit to the first table showing strings related to the screenshot. to prevent scroll and hiding the second table.
- Fixed buttons overallaping in the actions of the tables on mobile devices

Fixes: WeblateOrg#7085
  • Loading branch information
meel-hd committed Sep 4, 2024
1 parent 21c927f commit 114588b
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 2 deletions.
26 changes: 26 additions & 0 deletions weblate/static/styles/screenshots/screenshot_detail.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright © Michal Čihař <[email protected]>
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/

#sources-listing {
max-height: 400px;
overflow-y: auto;
}

@media (max-width: 767px) {
#sources-listing {
max-height: 300px;
}

#sources-listing td > .btn {
margin-bottom: 5px;
}

.panel-footer {
gap: 20px;
display: flex;
flex-direction: column;
}
}
7 changes: 5 additions & 2 deletions weblate/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,11 @@
<meta property="og:title" content="{% if title %}{{ title }}{% elif object %}{{ object }}{% elif page_user %}{{ page_user }}{% else %}{{ site_title }}{% endif %}" />
<meta property="og:description" content="{{ description }}" />

{% block extra_meta %}
{% endblock %}
{% block extra_meta %}
{% endblock %}

{% block extra_styles %}
{% endblock %}

</head>

Expand Down
4 changes: 4 additions & 0 deletions weblate/templates/screenshots/screenshot_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
{% endcompress %}
{% endblock %}

{% block extra_styles %}
<link rel="stylesheet" href="{% static 'styles/screenshots/screenshot_detail.css' %}{{ cache_param }}" />
{% endblock %}

{% block breadcrumbs %}
{% path_object_breadcrumbs object.translation.component %}
<li><a href="{% url 'screenshots' path=object.translation.component.get_url_path %}">{% trans "Screenshots" %}</a></li>
Expand Down

0 comments on commit 114588b

Please sign in to comment.