Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* fix: custom login logo wp 6.7

* style: improve subtitle lock and feel
  • Loading branch information
arzola authored Nov 20, 2024
1 parent 62ba145 commit 63f5036
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions assets/dist/mix-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"/scripts/algolia-search.js": "/scripts/algolia-search.js?id=6f22930340ff44e023e868ea597e0806",
"/scripts/pressbooks-multiselect.js": "/scripts/pressbooks-multiselect.js?id=a4a0aa360e8e81270503660018409053",
"/scripts/pressbooks-reorderable-multiselect.js": "/scripts/pressbooks-reorderable-multiselect.js?id=127a77865fcaa415d450f331885fdc9d",
"/styles/pressbooks.css": "/styles/pressbooks.css?id=e5fc46cceb55f83d7715a12d1167391c",
"/styles/pressbooks.css": "/styles/pressbooks.css?id=df3e75ce58782d4ad22648fc47a52847",
"/styles/export.css": "/styles/export.css?id=9fdb8491dce9f80a5034f70a977022b7",
"/styles/covergenerator.css": "/styles/covergenerator.css?id=1cd35bfc7c79a060df8417f8d21d95e1",
"/styles/colors-pb-a11y.css": "/styles/colors-pb-a11y.css?id=f7b0995dd8e6d16522cbbd245dc20deb",
Expand All @@ -47,7 +47,7 @@
"/styles/organize.css": "/styles/organize.css?id=9461f0ebc6443ff59ab204dbd8f3f960",
"/styles/network-managers.css": "/styles/network-managers.css?id=b86dddd3dd20194fd3ffc29512038002",
"/styles/metadata.css": "/styles/metadata.css?id=409ee3b3e83fc7bb918cb938530cf3b8",
"/styles/login.css": "/styles/login.css?id=972a26edbd57d38d3d5a6adc555cffee",
"/styles/login.css": "/styles/login.css?id=954de9697d12187c403fd154362993a9",
"/styles/glossary-definition.css": "/styles/glossary-definition.css?id=822ab8be7758cfe7f7c76e84ab32ce41",
"/scripts/eventsource.polyfill.js": "/scripts/eventsource.polyfill.js?id=7d3bb72e2588790aa9f2ecbf9d0acaf7",
"/scripts/paged.polyfill.js": "/scripts/paged.polyfill.js?id=28be5336e03f6072740a5cad2f787314",
Expand Down
2 changes: 1 addition & 1 deletion assets/dist/styles/login.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/dist/styles/pressbooks.css

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions assets/src/styles/login.scss
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ body.pressbooks.login {
}

p.subtitle {
margin-bottom: 1.5rem;
font-size: 1.875rem;
margin-bottom: 1rem;
font-size: 2rem;
font-weight: 600;
line-height: 1;
text-align: center;
Expand All @@ -140,9 +140,8 @@ body.pressbooks.login {
width: 75px;
}
}

@media screen and (min-width: 768px) {
font-size: 2.25rem;
.wp-login-logo {
order: -1; /* Moves the H1 element above the subtitle */
}
}

Expand Down
6 changes: 4 additions & 2 deletions inc/admin/branding/namespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,14 @@ function custom_login_logo() {
if ( has_custom_logo() ) {
$custom_logo_id = get_theme_mod( 'custom_logo' );
$logo = sprintf(
'<style type="text/css">.login h1 a {background-image: url(%s);}</style>',
'<style>
.login .wp-login-logo a {background-image: url(%s);}
</style>',
wp_get_attachment_image_src( $custom_logo_id, 'logo' )[0]
);
} else {
$logo = sprintf(
'<style type="text/css">.login h1 a {background-image: url(%s);}</style>',
'<style>.login .wp-login-logo a {background-image: url(%s);}</style>',
PB_PLUGIN_URL . 'assets/dist/images/pb-logo.svg'
);
}
Expand Down

0 comments on commit 63f5036

Please sign in to comment.