From 4b784a553b0039cfbe4aa28d832fd0d87b8154e7 Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Sun, 22 May 2022 09:27:48 +0200 Subject: [PATCH] Update index --- nummi/main/static/main/css/index.css | 45 ---------------------------- nummi/main/static/main/css/table.css | 44 +++++++++++++++++++++++++++ nummi/main/templates/main/index.html | 1 + nummi/main/views.py | 2 +- 4 files changed, 46 insertions(+), 46 deletions(-) create mode 100644 nummi/main/static/main/css/table.css diff --git a/nummi/main/static/main/css/index.css b/nummi/main/static/main/css/index.css index e56063e..fe155a3 100644 --- a/nummi/main/static/main/css/index.css +++ b/nummi/main/static/main/css/index.css @@ -6,51 +6,6 @@ h1 { margin: 0; } -.table { - display: grid; - margin: 2em 0; - border-radius: 1em 0 1em 0; - overflow: hidden; - border-bottom: .5em solid var(--bg-inv); -} -.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 > div { - display: contents; -} - -.table > div > * { - padding: 1em; - white-space: nowrap; -} -.table > div.g> * { - background: var(--bg-01); -} - -.table > div.header > * { - background: var(--bg-inv); - color: var(--text-inv); -} - -.table > div > .center { - text-align: center; -} -.table > div > .right { - text-align: right; -} -.table > div > .num { - font-feature-settings: "tnum", "ss01"; -} - -.table > div > span.text { - overflow: hidden; - text-overflow: ellipsis; -} - #categories > a { margin-right: var(--gap); } diff --git a/nummi/main/static/main/css/table.css b/nummi/main/static/main/css/table.css new file mode 100644 index 0000000..dbf4e0c --- /dev/null +++ b/nummi/main/static/main/css/table.css @@ -0,0 +1,44 @@ +.table { + display: grid; + margin: 2em 0; + border-radius: 1em 0 1em 0; + overflow: hidden; + border-bottom: .5em solid var(--bg-inv); +} +.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 > div { + display: contents; +} + +.table > div > * { + padding: 1em; + white-space: nowrap; +} +.table > div.g> * { + background: var(--bg-01); +} + +.table > div.header > * { + background: var(--bg-inv); + color: var(--text-inv); +} + +.table > div > .center { + text-align: center; +} +.table > div > .right { + text-align: right; +} +.table > div > .num { + font-feature-settings: "tnum", "ss01"; +} + +.table > div > span.text { + overflow: hidden; + text-overflow: ellipsis; +} diff --git a/nummi/main/templates/main/index.html b/nummi/main/templates/main/index.html index fc46057..8413e89 100644 --- a/nummi/main/templates/main/index.html +++ b/nummi/main/templates/main/index.html @@ -5,6 +5,7 @@ {% block link %} {{ block.super }} + {% endblock %} {% block body %} diff --git a/nummi/main/views.py b/nummi/main/views.py index f3805df..f348143 100644 --- a/nummi/main/views.py +++ b/nummi/main/views.py @@ -16,7 +16,7 @@ from .models import ( @login_required def index(request): - _transactions = Transaction.objects.all()[:5] + _transactions = Transaction.objects.all()[:10] _categories = Category.objects.all() _snapshots = Snapshot.objects.all()[:5]