mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-12-18 21:33:25 +00:00
Ongoing rewrite work
This commit is contained in:
11
src/frontend/js/app/empty/main.ejs
Normal file
11
src/frontend/js/app/empty/main.ejs
Normal file
@@ -0,0 +1,11 @@
|
||||
<% if (title) { %>
|
||||
<h1 class="h2 mb-3"><%- title %></h1>
|
||||
<% }
|
||||
|
||||
if (subtitle) { %>
|
||||
<p class="h4 text-muted font-weight-normal mb-7"><%- subtitle %></p>
|
||||
<% }
|
||||
|
||||
if (link) { %>
|
||||
<a class="btn btn-teal" href="#"><%- link %></a>
|
||||
<% } %>
|
||||
30
src/frontend/js/app/empty/main.js
Normal file
30
src/frontend/js/app/empty/main.js
Normal file
@@ -0,0 +1,30 @@
|
||||
'use strict';
|
||||
|
||||
const Mn = require('backbone.marionette');
|
||||
const template = require('./main.ejs');
|
||||
|
||||
module.exports = Mn.View.extend({
|
||||
className: 'text-center m-7',
|
||||
template: template,
|
||||
|
||||
ui: {
|
||||
action: 'a'
|
||||
},
|
||||
|
||||
events: {
|
||||
'click @ui.action': function (e) {
|
||||
e.preventDefault();
|
||||
this.getOption('action')();
|
||||
}
|
||||
},
|
||||
|
||||
templateContext: function () {
|
||||
return {
|
||||
title: this.getOption('title'),
|
||||
subtitle: this.getOption('subtitle'),
|
||||
link: this.getOption('link'),
|
||||
action: typeof this.getOption('action') === 'function'
|
||||
};
|
||||
}
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user