ux: move banner from Create-Note page to About page (side-by-side intro)
The banner image was the first thing under the page title on the Create-Note page — taking significant vertical space before the user saw the textarea. The Create-Note page is for *doing*, not for *reading-about*. CHANGES - Banner removed from wp_notes_page_callback() — Create-Note page now opens straight into the form. - Banner added to the top of the About page in a new side-by-side row: image on the left capped at 320px wide (not full-bleed), and a short intro paragraph + "Go to WP Notes →" CTA on the right. Stacks vertically on narrow screens via flex-wrap. - The side-by-side block lives in its own .wp-notes-about-intro container so it doesn't tangle with the rest of the About page's pre-existing nested toggles (those are still on the Tier 2 list). - .wp-notes-header-banner / .wp-notes-banner-img CSS removed from wp-notes-styles.php — no longer referenced anywhere. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+49
-1
@@ -6,10 +6,58 @@
|
||||
*/
|
||||
function wp_notes_about_page() {
|
||||
?>
|
||||
<style>
|
||||
/* Banner + intro side-by-side row at the top of the About page.
|
||||
Stacks vertically on narrower screens. */
|
||||
.wp-notes-about-intro {
|
||||
display: flex;
|
||||
gap: 24px;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
margin: 16px 0 28px;
|
||||
padding: 18px;
|
||||
background: #fff;
|
||||
border: 1px solid #ccd0d4;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.wp-notes-about-intro__img {
|
||||
flex: 0 0 320px;
|
||||
max-width: 320px;
|
||||
}
|
||||
.wp-notes-about-intro__img img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.wp-notes-about-intro__body {
|
||||
flex: 1 1 320px;
|
||||
min-width: 0;
|
||||
}
|
||||
.wp-notes-about-intro__body h2 {
|
||||
margin-top: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="wrap" style="display: flex; gap: 20px;">
|
||||
<!-- Left Section: About Content (70%) -->
|
||||
<div style="flex: 0 0 70%;">
|
||||
|
||||
|
||||
<!-- Banner + intro, side by side -->
|
||||
<div class="wp-notes-about-intro">
|
||||
<div class="wp-notes-about-intro__img">
|
||||
<img src="<?php echo esc_url(WP_NOTES_URL); ?>assets/wp-notes-banner.jpg"
|
||||
alt="WP Notes banner">
|
||||
</div>
|
||||
<div class="wp-notes-about-intro__body">
|
||||
<h2>WP Notes <span style="color:#646970; font-weight:400;">v<?php echo esc_html(WP_NOTES_VERSION); ?></span></h2>
|
||||
<p>WP Notes is a lightweight task & logbook plugin for WordPress. Log your daily work, mark tasks as done, and keep a tidy history right inside the dashboard — perfect for freelancers showing clients what's been delivered.</p>
|
||||
<p style="margin-bottom:0;">
|
||||
<a href="<?php echo esc_url(admin_url('admin.php?page=wp-notes')); ?>" class="button button-primary">Go to WP Notes →</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h1>Welcome to WP Notes About Page v <?php echo esc_html(WP_NOTES_VERSION); ?></h1>
|
||||
<div class="wp-notes-welcome" style="background: #fff; padding: 20px; margin: 20px 0; border: 1px solid #ccc;">
|
||||
<p>WP Notes is your task management solution for WordPress. Keep track of your todos, collaborate with team members, and never lose important notes.</p>
|
||||
|
||||
@@ -11,18 +11,6 @@ if (!defined('ABSPATH')) {
|
||||
function wp_notes_admin_styles() {
|
||||
?>
|
||||
<style>
|
||||
/* Header banner image */
|
||||
.wp-notes-header-banner {
|
||||
margin: 16px 0 24px;
|
||||
}
|
||||
.wp-notes-banner-img {
|
||||
display: block;
|
||||
max-width: 1200px;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
/* Footer "buy me a coffee" — lives at the BOTTOM of the page */
|
||||
.wp-notes-footer-support {
|
||||
text-align: center;
|
||||
|
||||
Reference in New Issue
Block a user