Move verse selector to htmx
This commit is contained in:
1 parent
dd0021ce15
commit
ba3b588ac5
9 files changed
+394
-135
No files matched your search
+8
-2
@@ -59,14 +59,20 @@
|
||||
// content is already escaped -- compile_bible.py escapes as it writes and
|
||||
// notice.njk comes out of nunjucks -- which is what the |safe on it in
|
||||
// base.njk is for.
|
||||
compose: function (fragment, mark) {
|
||||
//
|
||||
// chrome is what the shell needs and the fragment cannot carry: the
|
||||
// bookmark, and the navbar picker's model. Both are null from boot.html,
|
||||
// which has no worker to ask for either, and both render as a hidden
|
||||
// slot that fills itself if one ever appears.
|
||||
compose: function (fragment, chrome) {
|
||||
var title = (TITLE_RE.exec(fragment) || ['', ''])[1].trim();
|
||||
var content = fragment.replace(TITLE_RE, '');
|
||||
var name = (TEMPLATE_RE.exec(content) || ['', 'page'])[1] + '.njk';
|
||||
return render(name, {
|
||||
title: title,
|
||||
content: content,
|
||||
mark: mark || null
|
||||
mark: (chrome && chrome.mark) || null,
|
||||
reference: (chrome && chrome.reference) || null
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
Reference in new issue
Block a user