Extract table component, use for blog tags

This commit is contained in:
Oliver Davies 2018-01-13 18:51:38 +00:00
parent c1a3f0ddf3
commit ac6b0ad08f
5 changed files with 19 additions and 14 deletions

View file

@ -1,8 +1,16 @@
.table-responsive {
@apply .mb-4 .border .w-full;
overflow-x: auto;
overflow-y: hidden;
}
.table-responsive table {
@apply .mb-0 .border-0 .whitespace-no-wrap;
}
.table { .table {
@apply .w-full; @apply .w-full;
@apply .table-collapse; @apply .table-collapse;
@apply .border;
@apply .border-grey-light;
} }
.table tr:nth-child(odd) { .table tr:nth-child(odd) {
@ -10,9 +18,9 @@
} }
.table tr th { .table tr th {
@apply .text-left .p-2 .bg-white; @apply .text-left .p-3 .bg-white;
} }
.table td { .table td {
@apply .px-2 .py-3 .border-t; @apply .px-3 .py-3 .border-t;
} }

View file

@ -62,9 +62,6 @@ svg {
.table-collapse { border-collapse: collapse } .table-collapse { border-collapse: collapse }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-hidden { overflow-y: hidden; }
@import 'components/listing'; @import 'components/listing';
@import 'components/post'; @import 'components/post';
@import 'components/post/about-author'; @import 'components/post/about-author';

View file

@ -1,5 +1,5 @@
<tr> <tr>
<td class="whitespace-no-wrap"> <td>
{{ row.event.date|date(row.event.fuzzy_date ? 'F Y' : 'j F Y') }} {{ row.event.date|date(row.event.fuzzy_date ? 'F Y' : 'j F Y') }}
{% if row.event.time is defined %} {% if row.event.time is defined %}
@ -10,7 +10,7 @@
</td> </td>
{% if not talk_page %} {% if not talk_page %}
<td class="whitespace-no-wrap"> <td>
{% if row.talk.url is not empty %} {% if row.talk.url is not empty %}
<a href="{{ row.talk.url }}"> <a href="{{ row.talk.url }}">
{{ row.talk.title }} {{ row.talk.title }}
@ -29,7 +29,7 @@
</td> </td>
{% endif %} {% endif %}
<td class="whitespace-no-wrap"> <td>
{% if row.event.website is not empty %} {% if row.event.website is not empty %}
<a href="{{ row.event.website }}"> <a href="{{ row.event.website }}">
{{ row.event.name }} {{ row.event.name }}
@ -46,7 +46,7 @@
</td> </td>
{% if not upcoming %} {% if not upcoming %}
<td class="whitespace-no-wrap"> <td>
{% if row.event.feedback and row.event.date <= today %} {% if row.event.feedback and row.event.date <= today %}
<a href="{{ row.event.feedback }}" <a href="{{ row.event.feedback }}"
class="button" class="button"

View file

@ -1,5 +1,5 @@
<div class="overflow-x-auto overflow-y-hidden w-full mb-4 border"> <div class="table-responsive">
<table class="table w-full mb-0 border-0"> <table class="table">
<thead> <thead>
<tr> <tr>
<th class="w-1/4">Date</th> <th class="w-1/4">Date</th>

View file

@ -15,7 +15,7 @@ generator:
{% block content %} {% block content %}
<h1>Tag: {{ page.tag }}</h1> <h1>Tag: {{ page.tag }}</h1>
<div class="overflow-auto"> <div class="table-responsive">
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>