From acec9274b340ce9e4622ef29e1144e5aeaec1bf7 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Fri, 23 Feb 2024 14:12:41 -0800 Subject: [PATCH] Initial action menus prototype, refs #2281 --- datasette/static/app.css | 17 +++++---- datasette/templates/table.html | 67 ++++++++++++++++++++++++---------- 2 files changed, 57 insertions(+), 27 deletions(-) diff --git a/datasette/static/app.css b/datasette/static/app.css index 80dfc6775a..3e61bd26e5 100644 --- a/datasette/static/app.css +++ b/datasette/static/app.css @@ -176,15 +176,12 @@ h6, font-size: 2rem; padding-right: 0.2em; } -.page-header details { - display: inline-flex; -} -.page-header details > summary { + +.page-action-menu details > summary { list-style: none; - display: inline-flex; cursor: pointer; } -.page-header details > summary::-webkit-details-marker { +.page-action-menu details > summary::-webkit-details-marker { display: none; } @@ -364,13 +361,17 @@ details .nav-menu-inner { } /* Table/database actions menu */ -.page-header { +.page-header, +.page-action-menu { position: relative; } +.actions-menu-links { + display: inline; +} .actions-menu-links .dropdown-menu { position: absolute; top: calc(100% + 10px); - left: -10px; + left: 0; } /* Components ============================================================== */ diff --git a/datasette/templates/table.html b/datasette/templates/table.html index 5aee6319ab..de3e413f29 100644 --- a/datasette/templates/table.html +++ b/datasette/templates/table.html @@ -21,29 +21,58 @@ {% endblock %} {% block content %} + +{% endif %} {{ top_table() }}