datasette/datasette/templates/_codemirror.html
Simon Willison 5eca46a4bc
Add cache-busted static asset helper (#2804)
* Add cache-busted static asset helper

Add a static() helper for Datasette, plugin, and mounted static assets that appends content-based hashes, caches hashes in production, and serves matching hashed asset URLs with immutable far-future cache headers.

Closes #2800
2026-06-23 13:44:58 -07:00

16 lines
573 B
HTML

<script src="{{ static('sql-formatter-2.3.3.min.js') }}" defer></script>
<script src="{{ static('cm-editor-6.0.1.bundle.js') }}"></script>
<style>
.cm-editor {
resize: both;
overflow: hidden;
width: 80%;
border: 1px solid #ddd;
}
/* Fix autocomplete icon positioning. The icon element gets border-box sizing set due to
the global reset, but this causes overlapping icon and text. Markup:
`<div class="cm-completionIcon cm-completionIcon-keyword" aria-hidden="true"></div>` */
.cm-completionIcon {
box-sizing: content-box;
}
</style>