diff --git a/nummi/main/static/main/css/plot.css b/nummi/main/static/main/css/plot.css
index 4109c6b..e956ef4 100644
--- a/nummi/main/static/main/css/plot.css
+++ b/nummi/main/static/main/css/plot.css
@@ -1,31 +1,4 @@
-.plot table {
- border-collapse: collapse;
- width: 100%;
- table-layout: auto;
-}
-.plot thead {
- background: var(--bg-01);
-}
-.plot col.desc, .plot col.value {width: 8rem}
-.plot col.icon {width: 1ch}
-.plot tr {
- padding-bottom: .5rem;
- border: .1rem solid var(--gray);
-}
-.plot th {text-align: left}
-.plot th.r {text-align: right}
-.plot th.l {text-align: left}
-.plot td.c {text-align: center}
-
-.plot td, .plot th, .plot td.bar div {
- position: relative;
- height: 2rem;
- line-height: 2rem;
- white-space: nowrap;
-}
-.plot td, .plot th {
- padding: .5rem var(--gap);
-}
+col.bar {width: auto}
.plot td.bar {
position: relative;
@@ -33,17 +6,8 @@
}
.plot td.bar div {
position: absolute;
- top: .5rem;
-}
-.plot td.m {
- text-align: right;
-}
-.plot tbody th {
- font-feature-settings: var(--num);
-}
-.plot td.value {
- font-feature-settings: var(--num);
- text-align: right;
+ height: .5rem;
+ top: 0;
}
.plot td.bar div:not(.tot) {
diff --git a/nummi/main/static/main/css/table.css b/nummi/main/static/main/css/table.css
index 86710ac..1b27340 100644
--- a/nummi/main/static/main/css/table.css
+++ b/nummi/main/static/main/css/table.css
@@ -1,60 +1,26 @@
-.table {
- display: grid;
- margin: 2em 0;
- border-radius: var(--radius);
- overflow: hidden;
- border-bottom: var(--border) solid var(--theme);
+table {
+ border-collapse: collapse;
+ width: 100%;
}
-.table.col2 {grid-template-columns: repeat(2, auto)}
-.table.col3 {grid-template-columns: repeat(3, auto)}
-.table.col4 {grid-template-columns: repeat(4, auto)}
-.table.col5 {grid-template-columns: repeat(5, auto)}
-.table.col6 {grid-template-columns: repeat(6, auto)}
-.table.col1-1 {grid-template-columns: min-content auto}
-.table.col1-1-1 {grid-template-columns: min-content auto min-content}
-.table.col2-4 {grid-template-columns: repeat(2, min-content) repeat(4, auto)}
-.table.col1-5 {grid-template-columns: min-content repeat(5, auto)}
-.table.col2-5 {grid-template-columns: repeat(2, min-content) repeat(5, auto)}
-.table.col1-6 {grid-template-columns: min-content repeat(6, auto)}
-.table.col1-7 {grid-template-columns: min-content repeat(7, auto)}
-
-.table > div {
- display: contents;
+thead {
+ background: var(--bg-01);
}
-
-.table > div > * {
- padding: 1em;
+col {width: 8rem}
+col.icon {width: 1ch}
+tr {
+ border: .1rem solid var(--gray);
+ height: 2rem;
+ line-height: 2rem;
+}
+td, th {
+ padding: 0 var(--gap);
+ position: relative;
white-space: nowrap;
-}
-.table > div:nth-child(odd) > * {background: var(--bg-01)}
-.table > div:nth-child(even) > * {background: var(--bg)}
-
-.table > div.header > * {
- background: var(--theme);
-}
-
-.table > div > .center {
- text-align: center;
-}
-.table > div > .right {
- text-align: right;
-}
-.table > div > .num {
- font-feature-settings: var(--num);
-}
-.table > div > span.value {
- filter: brightness(95%);
- font-weight: 600;
-}
-
-.table > div > span.text {
- overflow: hidden;
text-overflow: ellipsis;
}
-.table > div.full-line > * {
- grid-column: 1 / -1;
- text-align: center;
-}
-.table > .invoice.new > a {
- grid-column: 2 / -1;
+.date, .value {
+ font-feature-settings: var(--num);
}
+.l {text-align: left}
+.r, .value {text-align: right}
+.c, .date {text-align: center}
diff --git a/nummi/main/templates/main/plot/category.html b/nummi/main/templates/main/plot/category.html
index 0ad4584..8a15510 100644
--- a/nummi/main/templates/main/plot/category.html
+++ b/nummi/main/templates/main/plot/category.html
@@ -12,8 +12,8 @@
{% translate "Category" %}
- {% translate "Expenses" %}
- {% translate "Income" %}
+ {% translate "Expenses" %}
+ {% translate "Income" %}
+ + | +{% translate "Date" %} | +{% translate "Name" %} | +{% translate "Value" %} | +{% translate "Trader" %} | + {% if not category %} +{% translate "Category" %} | + {% endif %} + {% if not account %} +{% translate "Account" %} | + {% endif %} + + + {% for trans in transactions %} +||||
---|---|---|---|---|---|---|---|---|---|---|
+ {% for invoice in trans.invoices %} + + + + {% endfor %} + | +{{ trans.date|date:"Y-m-d" }} | ++ {{ trans.name }} + | +{{ trans.value|pmvalue }} | +{{ trans.trader|default_if_none:"–" }} | + {% if not category %} + {% if trans.category %} ++ + | ++ {{ trans.category }} + | + {% else %} +– | + {% endif %} + + {% endif %} + {% if not account %} ++ + | ++ {{ trans.account }} + | + {% endif %} +