Fix home and login pages for Buefy theme

not sure what broke those so bad...they're still not "great"
This commit is contained in:
Lance Edgar 2019-08-04 20:43:31 -05:00
parent 5a25ffe6e4
commit 1b1d37b9df
4 changed files with 48 additions and 8 deletions

View file

@ -1,5 +1,5 @@
## -*- coding: utf-8; -*-
<%inherit file="/page.mako" />
<%inherit file="/form.mako" />
<%namespace name="base_meta" file="/base_meta.mako" />
<%def name="title()">Login</%def>
@ -11,11 +11,20 @@
<%def name="extra_styles()">
${parent.extra_styles()}
${h.stylesheet_link(request.static_url('tailbone:static/css/login.css'))}
% if use_buefy:
<style type="text/css">
.logo img {
display: block;
margin: 3rem auto;
}
</style>
% else:
${h.stylesheet_link(request.static_url('tailbone:static/css/login.css'))}
% endif
</%def>
<%def name="logo()">
${h.image(image_url, "{} logo".format(capture(base_meta.app_title)), id='logo', width=500)}
${h.image(image_url, "{} logo".format(capture(base_meta.app_title)))}
</%def>
<%def name="login_form()">
@ -24,11 +33,35 @@
</div>
</%def>
<%def name="render_this_page()">
${self.page_content()}
</%def>
<%def name="page_content()">
${self.logo()}
<div class="logo">
${self.logo()}
</div>
${self.login_form()}
% if use_buefy:
## note, we make 3 columns just to get 1 in the center
<div class="columns">
<div class="column"></div>
<div class="column">
<div class="card">
<div class="card-content">
<tailbone-form></tailbone-form>
</div>
</div>
</div>
<div class="column"></div>
</div>
% else:
${self.login_form()}
% endif
## TODO: obviously should remove this
% if request.rattail_config.demo():
<p class="tips">
Login with <strong>chuck / admin</strong> for full demo access