From d735e66d7d9b2d8c9a965ec96753864ff8c306c2 Mon Sep 17 00:00:00 2001 From: Yorhel Date: Wed, 25 Sep 2019 18:37:29 +0200 Subject: v2rw: Add Elm & db_edit framework + Convert doc page editing Most of this is copied from v3. I did improve on a few aspects: - db_edit() and db_entry() use VNDB::Schema rather than dynamically querying the DB. This has the minor advantage of a faster startup. - The Elm code generator now writes to multiple files, this avoids the namespace pollution seen in v3's Lib.Gen and makes the dependency graph a bit more lean (i.e. faster incremental builds). - The Elm code generator doesn't update the timestamp of files that haven't been modified. This also speeds up incremental builds, the elm compiler can now skip rebuilding unmodified files. - The Elm API response generator code now uses plain functions rather than code references and all possible responses are now defined in Elm.pm. Turns out most API responses were used from more than a single place, so it makes sense to have them centrally defined. The doc page preview function is also much nicer; I'd like to apply this to all BBCode textareas as well. (Elm.pm itself is ugly as hell though. And we will prolly need some HTML form generation functions in Elm to make that part less verbose) --- data/style.css | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'data') diff --git a/data/style.css b/data/style.css index f603bcfa..afa16fb1 100644 --- a/data/style.css +++ b/data/style.css @@ -134,7 +134,8 @@ input.text, input.submit, select, textarea { padding: 0 1px 1px 1px; margin: 1px; } -form, fieldset { border: 0; display: block; } +div.preview { border: 1px solid $secborder$; margin: 1px; padding: 5px } +form, fieldset { border: 0; display: block } legend { display: none; } optgroup option { padding-left: 10px; font-style: normal; } input.submit { background: $boxbg$; padding: 1px; } @@ -152,6 +153,9 @@ table.formtable td { padding: 0; } table.formtable tr.newfield td { padding-top: 5px; } table.formtable tr.newpart td { padding-top: 20px; font-weight: bold; } +div.spinner { content: ''; border: 3px solid #9eaebd; border-bottom-color: transparent; border-radius: 100%; animation: spin 1s infinite linear; width: 14px; height: 14px; display: inline-block; margin: auto } +@keyframes spin { from { transform:rotate(0deg); } to { transform:rotate(360deg); } } + -- cgit v1.2.3