Merge pull request #28888 from sokumon/center-me-page
fix: Center /me, some other pages and fix /logout
This commit is contained in:
commit
3a0fdd3993
7 changed files with 63 additions and 0 deletions
|
|
@ -24,3 +24,4 @@ import "./bootstrap-4-web.bundle";
|
|||
|
||||
import "../../website/js/website.js";
|
||||
import "./frappe/socketio_client.js";
|
||||
import "./frappe/utils/logout.js";
|
||||
|
|
|
|||
11
frappe/public/js/frappe/utils/logout.js
Normal file
11
frappe/public/js/frappe/utils/logout.js
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
frappe.logout = function () {
|
||||
frappe.call({
|
||||
method: "logout",
|
||||
callback: function (r) {
|
||||
if (r.exc) {
|
||||
return;
|
||||
}
|
||||
window.location.href = "/login";
|
||||
},
|
||||
});
|
||||
};
|
||||
11
frappe/www/logout.html
Normal file
11
frappe/www/logout.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{% from "frappe/templates/includes/avatar_macro.html" import avatar %}
|
||||
{% extends "templates/web.html" %}
|
||||
{% block navbar %}{% endblock %}
|
||||
{% block footer %}{% endblock %}
|
||||
{% block page_content %}
|
||||
<script>
|
||||
window.onload = function () {
|
||||
frappe.logout()
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
||||
7
frappe/www/logout.py
Normal file
7
frappe/www/logout.py
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import frappe
|
||||
|
||||
no_cache = 1
|
||||
|
||||
|
||||
def get_context(context):
|
||||
pass
|
||||
10
frappe/www/me.css
Normal file
10
frappe/www/me.css
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
height: 100vh;
|
||||
max-width: 100vw;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background: var(--bg-light-gray);
|
||||
}
|
||||
|
|
@ -84,5 +84,15 @@ body {
|
|||
align-items: center;
|
||||
}
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
height: 100vh;
|
||||
max-width: 100vw;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,19 @@
|
|||
background-color: var(--subtle-fg);
|
||||
font-size: var(--text-base);
|
||||
}
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
height: 100vh;
|
||||
max-width: 100vw;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
/* styling the signup link */
|
||||
.portal-section, .pb-0{
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="portal-container">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue