Merge pull request #28888 from sokumon/center-me-page

fix: Center /me, some other pages and fix /logout
This commit is contained in:
Akhil Narang 2025-01-01 10:55:12 +05:30 committed by GitHub
commit 3a0fdd3993
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 63 additions and 0 deletions

View file

@ -24,3 +24,4 @@ import "./bootstrap-4-web.bundle";
import "../../website/js/website.js";
import "./frappe/socketio_client.js";
import "./frappe/utils/logout.js";

View 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
View 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
View file

@ -0,0 +1,7 @@
import frappe
no_cache = 1
def get_context(context):
pass

10
frappe/www/me.css Normal file
View 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);
}

View file

@ -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 %}

View file

@ -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">