Bladeren bron

Make tables responsive

JoostSijm 6 jaren geleden
bovenliggende
commit
ca68c78d36

+ 2 - 2
app/modules/vote/templates/main.j2

@@ -10,8 +10,8 @@
                     <a href="{{ url_for('vote.create') }}" class="btn btn-secondary btn-sm">Create</a>
                     <a href="{{ url_for('vote.create') }}" class="btn btn-secondary btn-sm">Create</a>
                 </div>
                 </div>
             </div>
             </div>
-            <div class="card-body">
-                <table class="table table-striped table-sm table-responsive">
+            <div class="card-body table-responsive">
+                <table class="table table-striped table-sm">
                     <thead>
                     <thead>
                         <tr>
                         <tr>
                             <th></th>
                             <th></th>

+ 1 - 1
app/modules/vote/templates/vote/codes.j2

@@ -10,7 +10,7 @@
                     <a href="{{ url_for('vote.create') }}" class="btn btn-secondary btn-sm">Create</a>
                     <a href="{{ url_for('vote.create') }}" class="btn btn-secondary btn-sm">Create</a>
                 </div>
                 </div>
             </div>
             </div>
-            <div class="card-body">
+            <div class="card-body table-responsive">
                 <table class="table table-striped table-sm">
                 <table class="table table-striped table-sm">
                     <thead>
                     <thead>
                         <tr>
                         <tr>

+ 26 - 24
app/modules/vote/templates/vote/public/index.j2

@@ -29,29 +29,31 @@
         {% endif %}
         {% endif %}
         {% endwith %}
         {% endwith %}
         <h1>Votes</h1>
         <h1>Votes</h1>
-        <table class="table table-striped table-sm">
-            <thead>
-                <tr>
-                    <th></th>
-                    <th>Naam</th>
-                    <th>Start</th>
-                    <th>Eindigt</th>
-                    <th>Aangemaakt door</th>
-                </tr>
-            </thead>
-            <tbody>
-                {% for ballot in ballots %}
-                <tr>
-                    <td>
-                        <a href="{{ url_for('vote.public_view', ballot_id=ballot.id) }}"><button class="btn btn-secondary btn-sm">View</button></a>
-                    </td>
-                    <td>{{ ballot.name }}</td>
-                    <td>{{ ballot.start_at }}</td>
-                    <td>{{ ballot.end_at }}</td>
-                    <td>{{ ballot.user.name }}</td>
-                </tr>
-                {%- endfor -%}
-            </tbody>
-        </table>
+        <div class="table-responsive">
+            <table class="table table-striped table-sm">
+                <thead>
+                    <tr>
+                        <th></th>
+                        <th>Naam</th>
+                        <th>Start</th>
+                        <th>Eindigt</th>
+                        <th>Aangemaakt door</th>
+                    </tr>
+                </thead>
+                <tbody>
+                    {% for ballot in ballots %}
+                    <tr>
+                        <td>
+                            <a href="{{ url_for('vote.public_view', ballot_id=ballot.id) }}"><button class="btn btn-secondary btn-sm">View</button></a>
+                        </td>
+                        <td>{{ ballot.name }}</td>
+                        <td>{{ ballot.start_at }}</td>
+                        <td>{{ ballot.end_at }}</td>
+                        <td>{{ ballot.user.name }}</td>
+                    </tr>
+                    {%- endfor -%}
+                </tbody>
+            </table>
+        </div>
     </div>
     </div>
 </body>
 </body>