Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Login Page #244

Open
wants to merge 34 commits into
base: stage
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
57b031c
synced from old repo
JingleH Feb 12, 2025
78a00a1
wip
JingleH Feb 13, 2025
d482fd5
partial success
JingleH Feb 13, 2025
7b1ef2c
init login-page
JingleH Feb 18, 2025
0f3712d
rm custom analytics clientid event
JingleH Feb 18, 2025
093c63c
login-page init
JingleH Feb 20, 2025
f9bbc4c
fix bg height
JingleH Feb 21, 2025
a038c40
hide mobile bg
JingleH Feb 21, 2025
d235b12
Merge branch 'stage' into susi-light
JingleH Feb 25, 2025
6c7abd5
fix stage merge
JingleH Feb 25, 2025
4c05741
added responsive bg imgs
JingleH Feb 26, 2025
621c6c9
using all 6 images
JingleH Feb 26, 2025
b9b343f
use css only
JingleH Mar 3, 2025
c00cb33
supported bubbles footer
JingleH Mar 3, 2025
03294e0
shift padding from title to tablist
JingleH Mar 3, 2025
fa99c92
test dctx_id
JingleH Mar 4, 2025
e364080
avoid conflicts with banner.css
JingleH Mar 4, 2025
a74ac7e
hide icons and title for edu-express variant
JingleH Mar 5, 2025
536c8f7
rm nested blocks
JingleH Mar 5, 2025
a3dfd0e
reduce cls
JingleH Mar 5, 2025
01e446d
accessibility
JingleH Mar 5, 2025
2a32976
fx accessibility css
JingleH Mar 5, 2025
a60d63f
perf
JingleH Mar 6, 2025
961a4ee
ut wip
JingleH Mar 7, 2025
b257b55
added dctx id
JingleH Mar 7, 2025
be58469
done ut
JingleH Mar 7, 2025
d6ca877
squared footer
JingleH Mar 7, 2025
d258b17
border radius for footer
JingleH Mar 10, 2025
2275203
width finetuning
JingleH Mar 10, 2025
6821c53
width
JingleH Mar 10, 2025
6c908bf
added floating-panel
JingleH Mar 11, 2025
e1d372b
added fork
JingleH Mar 11, 2025
aea9c3f
added logos
JingleH Mar 11, 2025
f15d073
ut for floating-panel
JingleH Mar 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions express/code/blocks/floating-panel/floating-panel.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
.floating-panel {
line-height: 130%;
padding: 16px;
border-radius: 16px;
box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.16);
position: fixed;
z-index: 2;
bottom: 100px;
box-sizing: border-box;
width: 343px;
left: 50%;
transform: translateX(-50%);
}

.floating-panel.dark {
color: var(--color-white);
background-color: #000b1d;
}

.floating-panel .header {
font-weight: 700;
font-size: var(--body-font-size-l);
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 8px;;
}
.floating-panel .header .icon{
width: 10px;
height: 10px;
padding: 7px;
}

.floating-panel .subheader {
font-weight: 400;
font-size: var(--body-font-size-s);
padding-bottom: 16px;
}

.floating-panel .link-rows-container {
display: flex;
flex-direction: column;
gap: 8px;
}

.floating-panel-link-row {
display: flex;
justify-content: space-between;
}

.floating-panel-link-row div {
display: flex;
gap: 8px;
align-items: center;
}

.floating-panel-link-row .icon {
width: 22px;
height: 22px;
gap: 4px;
}

.floating-panel .floating-panel-link-row a.con-button {
/* min-width: 100px; */
margin: 0;
}
28 changes: 28 additions & 0 deletions express/code/blocks/floating-panel/floating-panel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { getLibs, getIconElementDeprecated } from '../../scripts/utils.js';

const iconRegex = /icon-\s*([^\s]+)/;
let decorateButtons; let createTag;

export default async function init(el) {
[{ decorateButtons }, { createTag }] = await Promise.all([import(`${getLibs()}/utils/decorate.js`), import(`${getLibs()}/utils/utils.js`)]);

decorateButtons(el);
const rows = [...el.children];
const [header, subheader, ...linkRows] = rows;
header.classList.add('header');
header.append(getIconElementDeprecated('close-white'));
subheader.classList.add('subheader');

const linkRowsContainer = createTag('div', { class: 'link-rows-container' });
linkRows.forEach((link) => {
link.classList.add('floating-panel-link-row');
const icon = link.querySelector('.icon');
const match = icon && iconRegex.exec(icon.className);
if (match?.[1]) {
icon.append(getIconElementDeprecated(match[1]));
}
linkRowsContainer.append(link);
});
el.append(linkRowsContainer);
return el;
}
62 changes: 62 additions & 0 deletions express/code/blocks/login-page/login-page.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/* make susi-light in the same ax-login-page section hover */
.section.ax-login-page {
display: flex;
justify-content: center;
align-items: center;
}

.login-page .background img {
display: none;
width: 100vw; /* not needed if authored right images */
}

@media (min-width: 768px) {
.login-page .background .m-background {
display: block;
}
}

@media (min-width: 1024px) {
.login-page .background .m-background {
display: none;
}
.login-page .background .tablet-background {
display: block;
}
}

@media (min-width: 1280px) {
.login-page .background .tablet-background {
display: none;
}
.login-page .background .l-background {
display: block;
}
}

@media (min-width: 1440px) {
.login-page .background .l-background {
display: none;
}
.login-page .background .desktop-background {
display: block;
}
}

@media (min-width: 1680px) {
.login-page .background .desktop-background {
display: none;
}
.login-page .background .xl-background {
display: block;
}
}

@media (min-width: 1920px) {
.login-page .background .xl-background {
display: none;
}
.login-page .background .xxl-background {
display: block;
}
}
10 changes: 10 additions & 0 deletions express/code/blocks/login-page/login-page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// 768/1024/1280/1440/1600/1920
const breakpoints = ['m', 'tablet', 'l', 'desktop', 'xl', 'xxl'];
export default async function init(el) {
const background = el.children[0];
background.classList.add('background');
const imgs = [...background.querySelectorAll('img')];
imgs.forEach((img, index) => {
img.classList.add(`${breakpoints[index]}-background`);
});
}
140 changes: 140 additions & 0 deletions express/code/blocks/susi-light/susi-light.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,143 @@
width: 360px;
min-height: 462px;
}

.susi-light {
display: flex;
align-items: center;
justify-content: center;
}

.susi-tabs {
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
}

.susi-tabs .express-logo {
width: unset;
height: 24px;
padding-top: 32px;
}

.susi-tabs .title {
font-size: var(--heading-font-size-s);
line-height: 28.6px;
font-weight: 900;
padding-top: 12px;
text-align: center;
}

.susi-tabs [role='tablist'] {
background-color: #e6e6e6;
border-radius: 8px;
display: flex;
gap: 4px;
padding: 4px;
margin-top: 16px;
box-shadow: 0px 2px 8px 0px #00000029;
}

.susi-tabs [role='tablist']:has(:first-child:last-child) {
display: none;
}

.susi-tabs [role='tab'] {
background-color: #e6e6e6;
color: #222222;
border: initial;
font-family: var(--body-font-family);
font-size: var(--body-font-size-xs);
font-weight: 700;
padding: 8px 12px 10px;
line-height: 130%;
cursor: pointer;
}

.susi-tabs [role='tab'][aria-selected='true'] {
background-color: var(--color-white);
border-radius: 6px;
}

.susi-tabs [role='tabpanel'] {
width: 400px;
max-width: 95vw;
}

.susi-tabs [role='tabpanel'].hide {
display: none;
}

/* reduce CLS */
.susi-tabs [role='tabpanel'].standard .susi-wrapper {
min-height: 457.5px;
}

.susi-tabs [role='tabpanel'].edu-express .susi-wrapper {
min-height: 366.5px;
}

.susi-tabs .footer {
font-size: var(--body-font-size-s);
text-align: center;
padding: 16px 0;
font-weight: 700;
color: #292929;
line-height: 20.8px;
}

.susi-tabs .footer a {
text-decoration: underline;
color: initial;
font-weight: 500;
}

.susi-tabs .footer.susi-banner {
background-color: #f3f3f3;
}

.susi-tabs .footer.susi-bubbles h2 {
font-size: var(--body-font-size-l);
font-weight: 700;
}

.susi-tabs .footer .susi-bubble-container {
display: flex;
gap: 12px;
justify-content: center;
padding-top: 8px;
}

.susi-tabs .footer .susi-bubble {
font-size: var(--body-font-size-s);
background-color: #f3f3f3;
display: flex;
flex-direction: column;
padding: 12px 24px;
border-radius: 8px;
margin: 0;
}

/* ax-login-page section metadata styles */
.section.ax-login-page .susi-tabs {
background-color: var(--color-white);
border-radius: 16px;
}

.section.ax-login-page .susi-light {
padding-bottom: 32px;
}
.section.ax-login-page .susi-tabs .footer {
border-radius: 8px;
}

@media (min-width: 768px) {
.section.ax-login-page .susi-light {
position: absolute;
padding-top: 30px;
}
.section.ax-login-page .susi-tabs .footer {
border-radius: 0 0 16px 16px;
}
}
Loading
Loading