Mobile optimization

* adds table-responsive class to BaseClass
* adds html meta attributes for proper small device rendering
This commit is contained in:
mipel 2021-08-19 08:44:47 +02:00
parent c82ee8afbc
commit 7dbf4d5b91
3 changed files with 3 additions and 2 deletions

View File

@ -27,7 +27,7 @@ class BaseTable(tables.tables.Table):
class Meta:
attrs = {
"class": "table table-hover",
"class": "table table-hover table-responsive-md table-responsive-sm",
}
def __init__(self, request: HttpRequest = None, filter_set=None, queryset=None, *args, **kwargs):

View File

@ -3,6 +3,7 @@
<html lang="{{ language }}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ base_title }}</title>
{% bootstrap_css %}
{% bootstrap_javascript jquery='full' %}

View File

@ -4,7 +4,7 @@
{% block body %}
<div class="row">
<div class="col-md-6 col-lg-4 border">
<table class="table">
<table class="table table-responsive">
<tr>
<th scope="row">{% trans 'Username' %}</th>
<td>{{user.username}}</td>