splashstand 3.0.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- splashstand/Dockerfile +8 -0
- splashstand/Procfile +1 -0
- splashstand/__init__.py +0 -0
- splashstand/__main__.py +4 -0
- splashstand/actions/__init__.py +0 -0
- splashstand/adapters/__init__.py +0 -0
- splashstand/adapters/admin/__init__.py +0 -0
- splashstand/adapters/admin/_base.py +10 -0
- splashstand/adapters/admin/_templates/base/base.html +37 -0
- splashstand/adapters/admin/_templates/base/js/serviceworker.js +129 -0
- splashstand/adapters/admin/_templates/old/actions.html +53 -0
- splashstand/adapters/admin/_templates/old/analytics.html +117 -0
- splashstand/adapters/admin/_templates/old/content.html +48 -0
- splashstand/adapters/admin/_templates/old/details_modal.html +73 -0
- splashstand/adapters/admin/_templates/old/edit_modal.html +0 -0
- splashstand/adapters/admin/_templates/old/help.html +7 -0
- splashstand/adapters/admin/_templates/old/index.html +322 -0
- splashstand/adapters/admin/_templates/old/layout.html +95 -0
- splashstand/adapters/admin/_templates/old/lib.html +470 -0
- splashstand/adapters/admin/_templates/old/list.html +281 -0
- splashstand/adapters/admin/_templates/old/modal.html +64 -0
- splashstand/adapters/admin/_templates/old/offline.html +0 -0
- splashstand/adapters/admin/_templates/old/preview.html +7 -0
- splashstand/adapters/admin/_templates/old/redis_console.html +40 -0
- splashstand/adapters/admin/_templates/old/redis_response.html +0 -0
- splashstand/adapters/admin/_templates/old/row_actions.html +46 -0
- splashstand/adapters/admin/_templates/old/site_edit.html +0 -0
- splashstand/adapters/admin/_templates/old/static.html +0 -0
- splashstand/adapters/admin/_templates/old/storage_list.html +280 -0
- splashstand/adapters/admin/_templates/old/store.html +7 -0
- splashstand/adapters/admin/_templates/old/support.html +7 -0
- splashstand/adapters/admin/_templates/old/theme_details_modal.html +0 -0
- splashstand/adapters/admin/_templates/old/theme_edit.html +112 -0
- splashstand/adapters/admin/_templates/old/theme_list.html +96 -0
- splashstand/adapters/admin/_templates/webawesome/sqladmin/blocks/display_menu.html +10 -0
- splashstand/adapters/admin/_templates/webawesome/sqladmin/blocks/head.html +25 -0
- splashstand/adapters/admin/_templates/webawesome/sqladmin/blocks/menu_category.html +7 -0
- splashstand/adapters/admin/_templates/webawesome/sqladmin/blocks/menu_item.html +9 -0
- splashstand/adapters/admin/_templates/webawesome/sqladmin/blocks/render_field.html +17 -0
- splashstand/adapters/admin/_templates/webawesome/sqladmin/blocks/render_form_fields.html +12 -0
- splashstand/adapters/admin/_templates/webawesome/sqladmin/blocks/tail.html +0 -0
- splashstand/adapters/admin/_templates/webawesome/sqladmin/blocks/title.html +4 -0
- splashstand/adapters/admin/_templates/webawesome/sqladmin/create.html +37 -0
- splashstand/adapters/admin/_templates/webawesome/sqladmin/details.html +1 -0
- splashstand/adapters/admin/_templates/webawesome/sqladmin/edit.html +43 -0
- splashstand/adapters/admin/_templates/webawesome/sqladmin/index.html +6 -0
- splashstand/adapters/admin/_templates/webawesome/sqladmin/layout.html +41 -0
- splashstand/adapters/admin/_templates/webawesome/sqladmin/list.html +5 -0
- splashstand/adapters/admin/_templates/webawesome/sqladmin/login.html +56 -0
- splashstand/adapters/admin/sqladmin.py +1260 -0
- splashstand/adapters/analytics/__init__.py +0 -0
- splashstand/adapters/analytics/_base.py +7 -0
- splashstand/adapters/analytics/google.py +32 -0
- splashstand/adapters/analytics/plausible.py +1 -0
- splashstand/adapters/app/__init__.py +0 -0
- splashstand/adapters/app/_base.py +22 -0
- splashstand/adapters/app/_templates/base/base.html +39 -0
- splashstand/adapters/app/_templates/base/blocks/head.html +16 -0
- splashstand/adapters/app/_templates/base/blocks/tail.html +41 -0
- splashstand/adapters/app/_templates/base/blocks/title.html +6 -0
- splashstand/adapters/app/_templates/base/js/serviceworker.js +146 -0
- splashstand/adapters/app/_templates/base/sitemap.xml +0 -0
- splashstand/adapters/app/_templates/base/sitemapindex.xml +0 -0
- splashstand/adapters/app/_templates/webawesome/404.html +2 -0
- splashstand/adapters/app/_templates/webawesome/500.html +2 -0
- splashstand/adapters/app/_templates/webawesome/home.html +2 -0
- splashstand/adapters/app/_templates/webawesome/index.html +6 -0
- splashstand/adapters/app/_templates/webawesome/layout.html +48 -0
- splashstand/adapters/app/_templates/webawesome/offline.html +1 -0
- splashstand/adapters/app/_templates/webawesome/privacy_policy.html +105 -0
- splashstand/adapters/app/_templates/webawesome/service_terms.html +70 -0
- splashstand/adapters/app/default.py +148 -0
- splashstand/adapters/app/demo.py +325 -0
- splashstand/adapters/auth/__init__.py +0 -0
- splashstand/adapters/auth/_base.py +69 -0
- splashstand/adapters/auth/firebase.py +169 -0
- splashstand/adapters/captcha/__init__.py +0 -0
- splashstand/adapters/captcha/_base.py +13 -0
- splashstand/adapters/captcha/google.py +122 -0
- splashstand/adapters/mail/__init__.py +0 -0
- splashstand/adapters/mail/mail.py +181 -0
- splashstand/adapters/marketing/__init__.py +0 -0
- splashstand/adapters/marketing/mailchimp.py +0 -0
- splashstand/adapters/messaging/__init__.py +0 -0
- splashstand/adapters/messaging/firebase.py +0 -0
- splashstand/adapters/pwa/__init__.py +0 -0
- splashstand/adapters/pwa/_base.py +34 -0
- splashstand/adapters/pwa/_routes.py +30 -0
- splashstand/adapters/pwa/_templates/serviceworker.js +1 -0
- splashstand/adapters/pwa/app.py +16 -0
- splashstand/adapters/schemas/__init__.py +0 -0
- splashstand/adapters/schemas/_base.py +7 -0
- splashstand/adapters/schemas/_models/__init__.py +98 -0
- splashstand/adapters/schemas/_models/creative_work.py +186 -0
- splashstand/adapters/schemas/_models/event.py +48 -0
- splashstand/adapters/schemas/_models/organization.py +46 -0
- splashstand/adapters/schemas/_models/person.py +74 -0
- splashstand/adapters/schemas/_models/place.py +54 -0
- splashstand/adapters/schemas/schemaorg.py +255 -0
- splashstand/adapters/social/__init__.py +0 -0
- splashstand/adapters/social/facebook.py +0 -0
- splashstand/cli.py +275 -0
- splashstand/main.py +10 -0
- splashstand-3.0.10.dist-info/METADATA +39 -0
- splashstand-3.0.10.dist-info/RECORD +107 -0
- splashstand-3.0.10.dist-info/WHEEL +4 -0
- splashstand-3.0.10.dist-info/licenses/LICENSE +28 -0
splashstand/Dockerfile
ADDED
splashstand/Procfile
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
web: uvicorn --port $PORT --host 0.0.0.0 --app-dir="/app" splashstand.main:app
|
splashstand/__init__.py
ADDED
|
File without changes
|
splashstand/__main__.py
ADDED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
[% block head %]
|
|
6
|
+
[[ render_block('head.html') ]]
|
|
7
|
+
[% endblock head %]
|
|
8
|
+
</head>
|
|
9
|
+
|
|
10
|
+
<body>
|
|
11
|
+
[% block body %]
|
|
12
|
+
|
|
13
|
+
[% block messages %]
|
|
14
|
+
[% endblock messages %]
|
|
15
|
+
|
|
16
|
+
[% block nav %]
|
|
17
|
+
[% endblock nav %]
|
|
18
|
+
|
|
19
|
+
[% block header %]
|
|
20
|
+
[% endblock header %]
|
|
21
|
+
|
|
22
|
+
[% block main %]
|
|
23
|
+
[% endblock main %]
|
|
24
|
+
|
|
25
|
+
[% block footer %]
|
|
26
|
+
[% endblock footer %]
|
|
27
|
+
|
|
28
|
+
[% block tail %]
|
|
29
|
+
[[ render_block('tail.html') ]]
|
|
30
|
+
[% endblock tail %]
|
|
31
|
+
|
|
32
|
+
[% endblock body %]
|
|
33
|
+
</body>
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
</html>
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
const staticCacheName = "[[ config.APP_NAME ]]-[[ sw_timestamp ]]";
|
|
2
|
+
|
|
3
|
+
const urlsToCache = [
|
|
4
|
+
'/',
|
|
5
|
+
[%- for page in config.SITE_PAGES %]
|
|
6
|
+
'/[[ page|lstrip('_') ]]',
|
|
7
|
+
[%- endfor %]
|
|
8
|
+
'/offline',
|
|
9
|
+
'/dashboard_offline',
|
|
10
|
+
'/manifest.json'
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
const networkOnlyUrls = [
|
|
14
|
+
'googleusercontent.com',
|
|
15
|
+
[%- for ext in config.VIDEO_EXTS + config.AUDIO_EXTS %]
|
|
16
|
+
'[[ ext ]]',
|
|
17
|
+
[%- endfor %]
|
|
18
|
+
'/verify',
|
|
19
|
+
'/admin',
|
|
20
|
+
'/form',
|
|
21
|
+
'/widget',
|
|
22
|
+
'/__'
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
const cacheFirstUrls = [
|
|
26
|
+
'.css',
|
|
27
|
+
'.js',
|
|
28
|
+
'.json'];
|
|
29
|
+
|
|
30
|
+
function networkOnlyUrl(event) {
|
|
31
|
+
var only = false;
|
|
32
|
+
for (const url of networkOnlyUrls) {
|
|
33
|
+
if (event.request.url.indexOf(url) !== -1 && event.request.url.indexOf('.css') === -1 && event.request.url.indexOf('.js') === -1) {
|
|
34
|
+
only = true;
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return only;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
[%- if ac.debug.serviceworker %]
|
|
42
|
+
console.log('Site t.URL: [[ config.DOMAIN ]]');
|
|
43
|
+
console.log('Invocation: [[ get_invocation ]]');
|
|
44
|
+
[%- endif %]
|
|
45
|
+
|
|
46
|
+
self.addEventListener('install', function (event) {
|
|
47
|
+
event.waitUntil(
|
|
48
|
+
caches.open(staticCacheName).then(function (cache) {
|
|
49
|
+
[%- if ac.debug.serviceworker %]
|
|
50
|
+
console.log('Opened app cache');
|
|
51
|
+
console.log('Caching: ' + urlsToCache);
|
|
52
|
+
[%- endif %]
|
|
53
|
+
return cache.addAll(urlsToCache);
|
|
54
|
+
}).then(function () {
|
|
55
|
+
return self.skipWaiting();
|
|
56
|
+
})
|
|
57
|
+
);
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
self.addEventListener('fetch', function (event) {
|
|
61
|
+
[%- if ac.debug.serviceworker %]
|
|
62
|
+
console.log('Fetching: ', event.request.url);
|
|
63
|
+
[%- endif %]
|
|
64
|
+
if (event.request.method !== 'GET') {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
if (networkOnlyUrl(event)) {
|
|
68
|
+
[%- if ac.debug.serviceworker %]
|
|
69
|
+
console.log('Fetch network only: ', event.request.url);
|
|
70
|
+
[%- endif %]
|
|
71
|
+
return; } else if (event.request.url.indexOf('[[ config.DOMAIN ]]') !== -1
|
|
72
|
+
[%- if not site.is_deployed %]
|
|
73
|
+
|| event.request.url.indexOf('.css') !== -1
|
|
74
|
+
|| event.request.url.indexOf('.js') !== -1
|
|
75
|
+
|| event.request.url.indexOf('.json') !== -1
|
|
76
|
+
[%- endif %]
|
|
77
|
+
) {
|
|
78
|
+
[%- if ac.debug.serviceworker %]
|
|
79
|
+
console.log('Fetch network first: ', event.request.url);
|
|
80
|
+
[%- endif %]
|
|
81
|
+
event.respondWith(fetch(event.request).catch(function () {
|
|
82
|
+
return caches.match(event.request);
|
|
83
|
+
}).catch(function () {
|
|
84
|
+
console.log('Failed to get ', event.request.url);
|
|
85
|
+
return caches.match('/offline');
|
|
86
|
+
})
|
|
87
|
+
);
|
|
88
|
+
}else{
|
|
89
|
+
[%- if ac.debug.serviceworker %]
|
|
90
|
+
console.log('Fetch cache first: ', event.request.url);
|
|
91
|
+
[%- endif %]
|
|
92
|
+
event.respondWith(
|
|
93
|
+
caches.open(staticCacheName)
|
|
94
|
+
.then(function (cache) {
|
|
95
|
+
return cache.match(event.request)
|
|
96
|
+
.then(function (response) {
|
|
97
|
+
return response || fetch(event.request)
|
|
98
|
+
.then(function (response) {
|
|
99
|
+
if (!(event.request.url.indexOf('http') === 0)) return;
|
|
100
|
+
cache.put(event.request, response.clone());
|
|
101
|
+
return response;
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
})
|
|
105
|
+
.catch(function () {
|
|
106
|
+
console.log('Failed to get ', event.request.url);
|
|
107
|
+
return caches.match('/offline');
|
|
108
|
+
})
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
self.addEventListener('activate', function (event) {
|
|
115
|
+
[%- if ac.debug.serviceworker %]
|
|
116
|
+
console.log('Activating app service worker...');
|
|
117
|
+
[%- endif %]
|
|
118
|
+
event.waitUntil(
|
|
119
|
+
caches.keys().then(function (cacheNames) {
|
|
120
|
+
return Promise.all(
|
|
121
|
+
cacheNames.map(function (cacheName) {
|
|
122
|
+
if (staticCacheName !== cacheName && cacheName.startsWith("[[ config.APP_NAME ]]-")) {
|
|
123
|
+
return caches.delete(cacheName);
|
|
124
|
+
}
|
|
125
|
+
})
|
|
126
|
+
);
|
|
127
|
+
})
|
|
128
|
+
);
|
|
129
|
+
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
% import 'static.html' as admin_static with context
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
% macro dropdown(actions)
|
|
5
|
+
<div class="level-item level-left">
|
|
6
|
+
<div class="dropdown actions-dropdown">
|
|
7
|
+
<button class="button is-grey dropdown-trigger" aria-haspopup="true"
|
|
8
|
+
aria-controls="dropdown-menu">
|
|
9
|
+
<span>[[ _gettext('Selected') ]]</span>
|
|
10
|
+
<span class="icon is-small">
|
|
11
|
+
<i class="fas fa-angle-down" aria-hidden="true"></i></span>
|
|
12
|
+
</button>
|
|
13
|
+
<div class="dropdown-menu" id="dropdown-menu" role="menu">
|
|
14
|
+
<div class="dropdown-content selected-dropdown">
|
|
15
|
+
% for p in actions
|
|
16
|
+
<a href="javascript:void(0)"
|
|
17
|
+
class="dropdown-item has-text-left"
|
|
18
|
+
onclick="return modelActions.execute('[[ p[0] ]]');">
|
|
19
|
+
<span class="icon selected-icon">
|
|
20
|
+
<i class="fas fa-[[ p[2] ]]"> </i>
|
|
21
|
+
</span>
|
|
22
|
+
<span class="action-text">[[ _gettext(p[1]) ]]</span>
|
|
23
|
+
</a>
|
|
24
|
+
% endfor
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
% endmacro
|
|
30
|
+
|
|
31
|
+
% macro form(actions, url)
|
|
32
|
+
% if actions
|
|
33
|
+
<form id="action_form" action="[[ url ]]" method="POST"
|
|
34
|
+
style="display: none">
|
|
35
|
+
% if action_form.csrf_token
|
|
36
|
+
[[ action_form.csrf_token ]]
|
|
37
|
+
% elif csrf_token
|
|
38
|
+
<input type="hidden" name="csrf_token"
|
|
39
|
+
value="[[ csrf_token() ]]"/>
|
|
40
|
+
% endif
|
|
41
|
+
[[ action_form.url(value=return_url) ]]
|
|
42
|
+
[[ action_form.action() ]]
|
|
43
|
+
</form>
|
|
44
|
+
% endif
|
|
45
|
+
% endmacro
|
|
46
|
+
|
|
47
|
+
% macro script(message, actions, actions_confirmation)
|
|
48
|
+
% if actions
|
|
49
|
+
<script>
|
|
50
|
+
[% include admin_actions_js %]
|
|
51
|
+
</script>
|
|
52
|
+
% endif
|
|
53
|
+
% endmacro
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
% extends [% extends "../../base/templates/base.html" %]
|
|
2
|
+
% import 'lib.html' as lib with context
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
% block head
|
|
6
|
+
[[ super() ]]
|
|
7
|
+
<script>
|
|
8
|
+
(function (w, d, s, g, js, fs) {
|
|
9
|
+
g = w.gapi || (w.gapi = {});
|
|
10
|
+
g.analytics = {
|
|
11
|
+
q: [], ready: function (f) {
|
|
12
|
+
this.q.push(f);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
js = d.createElement(s);
|
|
16
|
+
fs = d.getElementsByTagName(s)[0];
|
|
17
|
+
js.src = 'https://apis.google.com/js/platform.js';
|
|
18
|
+
fs.parentNode.insertBefore(js, fs);
|
|
19
|
+
js.onload = function () {
|
|
20
|
+
g.load('analytics');
|
|
21
|
+
};
|
|
22
|
+
}(window, document, 'script'));
|
|
23
|
+
</script>
|
|
24
|
+
% endblock head
|
|
25
|
+
|
|
26
|
+
% block body
|
|
27
|
+
<div class="section">
|
|
28
|
+
<h1 class="has-text-centered title is-spaced is-4">
|
|
29
|
+
Analytics
|
|
30
|
+
</h1>
|
|
31
|
+
</div>
|
|
32
|
+
<div class="section analytics-container">
|
|
33
|
+
% for days in ga_days_line
|
|
34
|
+
<div id="chart-[[ loop.index ]]-container"></div>
|
|
35
|
+
<div class="has-text-centered title is-5">
|
|
36
|
+
<p>Last [[ days|humanize_days ]]</p>
|
|
37
|
+
</div>
|
|
38
|
+
% endfor
|
|
39
|
+
% set days_length = ga_days_line|count + 1
|
|
40
|
+
% set dimensions_length = ga_dimensions_table|count
|
|
41
|
+
% for i in range(days_length, days_length + dimensions_length, 2)
|
|
42
|
+
<div class="columns">
|
|
43
|
+
<div class="column">
|
|
44
|
+
<div id="chart-[[ i ]]-container"></div>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="column">
|
|
47
|
+
<div id="chart-[[ i + 1 ]]-container"></div>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
% endfor
|
|
51
|
+
</div>
|
|
52
|
+
<div id="pageloader" class="pageloader is-light is-active is-right-to-left
|
|
53
|
+
primary-loader"></div>
|
|
54
|
+
% endblock body
|
|
55
|
+
|
|
56
|
+
% block tail
|
|
57
|
+
<script>
|
|
58
|
+
$(document).ready(function () {
|
|
59
|
+
setTimeout(function () {
|
|
60
|
+
$('#pageloader').removeClass('is-active');
|
|
61
|
+
$('.analytics').css('visibility', 'visible');
|
|
62
|
+
}, 4200);
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
gapi.analytics.ready(function () {
|
|
66
|
+
gapi.analytics.auth.authorize({
|
|
67
|
+
'serverAuth': {
|
|
68
|
+
'access_token': '[[ ga_access_token ]]'
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
[% for d in ga_days_line %]
|
|
73
|
+
const dataChart[[ loop.index ]] = new gapi.analytics.googleCharts
|
|
74
|
+
.DataChart({
|
|
75
|
+
query: {
|
|
76
|
+
'ids': 'ga:[[ ga_view_id ]]',
|
|
77
|
+
'start-date': '[[ d ]]daysAgo',
|
|
78
|
+
'end-date': 'yesterday',
|
|
79
|
+
'metrics': 'ga:sessions,ga:pageviews',
|
|
80
|
+
'dimensions': 'ga:date'
|
|
81
|
+
},
|
|
82
|
+
chart: {
|
|
83
|
+
'container': 'chart-[[ loop.index ]]-container',
|
|
84
|
+
'type': 'LINE',
|
|
85
|
+
'options': {
|
|
86
|
+
'width': '100%'
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
dataChart[[ loop.index ]].execute();
|
|
91
|
+
[% endfor %]
|
|
92
|
+
[% for dimension in ga_dimensions_table %]
|
|
93
|
+
[% set c = loop.index + ga_days_line | length %]
|
|
94
|
+
const dataChart[[ c ]] = new gapi.analytics.googleCharts
|
|
95
|
+
.DataChart({
|
|
96
|
+
query: {
|
|
97
|
+
'ids': 'ga:[[ ga_view_id ]]',
|
|
98
|
+
'start-date': '365daysAgo',
|
|
99
|
+
'end-date': 'yesterday',
|
|
100
|
+
'dimensions': 'ga:[[ dimension ]]',
|
|
101
|
+
'metrics': 'ga:sessions',
|
|
102
|
+
'sort': '-ga:sessions',
|
|
103
|
+
'max-results': '6'
|
|
104
|
+
},
|
|
105
|
+
chart: {
|
|
106
|
+
type: 'TABLE',
|
|
107
|
+
container: 'chart-[[ c ]]-container',
|
|
108
|
+
options: {
|
|
109
|
+
width: '100%'
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
dataChart[[ c ]].execute();
|
|
114
|
+
[% endfor %]
|
|
115
|
+
});
|
|
116
|
+
</script>
|
|
117
|
+
% endblock tail
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
% extends [% extends "../../base/templates/base.html" %]
|
|
2
|
+
% import 'lib.html' as lib with context
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
% block body
|
|
6
|
+
<div class="container">
|
|
7
|
+
<div class="section">
|
|
8
|
+
<h1 class="has-text-centered title is-spaced is-4">
|
|
9
|
+
Content
|
|
10
|
+
</h1>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="tiles section is-vertical">
|
|
13
|
+
<div class="tile wrapped-tiles">
|
|
14
|
+
% if current_user.is_authenticated
|
|
15
|
+
% set count = namespace(a=0)
|
|
16
|
+
% for item in admin_view.admin.menu()[1:]
|
|
17
|
+
% if item.is_accessible() and item.is_visible()
|
|
18
|
+
<div class="tile field-tile is-5">
|
|
19
|
+
<div class="field">
|
|
20
|
+
<div class="control">
|
|
21
|
+
<a class="button is-fullwidth is-link is-outlined is-rounded"
|
|
22
|
+
href="[[ item.get_url() ]]">
|
|
23
|
+
<span class="icon">
|
|
24
|
+
<i class="fas fa-list"></i>
|
|
25
|
+
</span>
|
|
26
|
+
<span class="link-text">
|
|
27
|
+
[[ item.name|title ]]
|
|
28
|
+
</span>
|
|
29
|
+
</a>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
% set count.a = count.a + 1
|
|
34
|
+
% endif
|
|
35
|
+
% if loop.last and (count.a is odd)
|
|
36
|
+
<div class="tile field-tile is-5">
|
|
37
|
+
</div>
|
|
38
|
+
% endif
|
|
39
|
+
% endfor
|
|
40
|
+
% endif
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
[#<div class="content has-text-centered section">
|
|
45
|
+
[[ admin_info|safe ]]
|
|
46
|
+
</div>#]
|
|
47
|
+
<div id="pageloader" class="pageloader is-light is-right-to-left white-loader"></div>
|
|
48
|
+
% endblock body
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
% import 'static.html' as admin_static with context
|
|
2
|
+
% import 'lib.html' as lib with context
|
|
3
|
+
|
|
4
|
+
% block body
|
|
5
|
+
|
|
6
|
+
<header class="modal-card-head is-paddingless">
|
|
7
|
+
% block header_text
|
|
8
|
+
<p class="modal-card-title has-text-weight-semibold">
|
|
9
|
+
[[ 'View Record #' + request.args.get('id') ]]
|
|
10
|
+
</p>
|
|
11
|
+
<button class="delete modal-delete"
|
|
12
|
+
data-dismiss="modal" aria-label="close"></button>
|
|
13
|
+
% endblock
|
|
14
|
+
</header>
|
|
15
|
+
|
|
16
|
+
<section class="modal-card-body">
|
|
17
|
+
% block details_table
|
|
18
|
+
<div class="details-modal content">
|
|
19
|
+
% for c, name in details_columns
|
|
20
|
+
% if c == 'fs_uniquifier'
|
|
21
|
+
% continue
|
|
22
|
+
% endif
|
|
23
|
+
% if get_value(model, c)|safe
|
|
24
|
+
% if c in ['position', 'active', 'fit_image', 'visible', 'login_count', 'start', 'end', 'youtube_id']
|
|
25
|
+
<div class="level is-mobile">
|
|
26
|
+
<h5 class="level-item level-left has-text-weight-semibold is-marginless">
|
|
27
|
+
% if c == 'youtube_id'
|
|
28
|
+
YouTube ID
|
|
29
|
+
% else
|
|
30
|
+
[[ name|replace(' Id', 'ID') ]]
|
|
31
|
+
% endif
|
|
32
|
+
</h5>
|
|
33
|
+
<div class="level-item level-left">
|
|
34
|
+
% if get_value(model, c) is sameas true
|
|
35
|
+
<span class="icon">
|
|
36
|
+
<i class="fas fa-check-circle fa-lg has-text-success"></i>
|
|
37
|
+
</span>
|
|
38
|
+
% elif get_value(model, c) is sameas false
|
|
39
|
+
<span class="icon">
|
|
40
|
+
<i class="fas fa-times-circle fa-lg has-text-danger"></i>
|
|
41
|
+
</span>
|
|
42
|
+
% else
|
|
43
|
+
[[ get_value(model, c)|safe ]]
|
|
44
|
+
% endif
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
% else
|
|
48
|
+
<h5 class="has-text-weight-semibold">
|
|
49
|
+
% if c == 'create_datetime'
|
|
50
|
+
Created At
|
|
51
|
+
% elif c == 'update_datetime'
|
|
52
|
+
Updated At
|
|
53
|
+
% else
|
|
54
|
+
[[ name ]]
|
|
55
|
+
% endif
|
|
56
|
+
</h5>
|
|
57
|
+
[[ get_value(model, c)|safe]]
|
|
58
|
+
% endif
|
|
59
|
+
% if c not in ['visible']
|
|
60
|
+
<hr>
|
|
61
|
+
% endif
|
|
62
|
+
% endif
|
|
63
|
+
% endfor
|
|
64
|
+
</div>
|
|
65
|
+
% endblock
|
|
66
|
+
</section>
|
|
67
|
+
<footer class="modal-card-foot">
|
|
68
|
+
</footer>
|
|
69
|
+
% endblock
|
|
70
|
+
% block tail
|
|
71
|
+
<script src="[[ admin_static.url(filename='admin/js/details_filter.js', v='1.0.0') ]]"></script>
|
|
72
|
+
<script src="[[ admin_static.url(filename='admin/js/bs3_modal.js', v='1.0.0') ]]"></script>
|
|
73
|
+
% endblock
|
|
File without changes
|