Skip to content

Commit

Permalink
Admin page style updates
Browse files Browse the repository at this point in the history
  • Loading branch information
nateconley committed Jun 18, 2024
1 parent 684b96b commit 412b786
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 26 deletions.
34 changes: 22 additions & 12 deletions css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@
--mailchimp-max-width: 56.25rem; /* 900 pixels */
}

.error_msg,
.success_msg,
.notes_msg,
table.mc-user,
.mc-list-row,
.mc-list-note,
.mc-section {
max-width: 900px;
width: 100%;
}

/* Header */
.mailchimp-header {
align-items: center;
Expand Down Expand Up @@ -57,7 +68,6 @@ table.mc-widefat tr:first-child th {
line-height: 1;
margin: 12px 0;
padding: 9px;
width: 900px;
}

.success_msg,
Expand All @@ -70,13 +80,11 @@ table.mc-widefat tr:first-child th {
line-height: 1;
margin: 12px 0;
padding: 9px;
width: 900px;
}

/* User */
table.mc-user {
margin-top: 19px;
width: 900px;
}

table.mc-user tr {
Expand All @@ -102,7 +110,6 @@ table.mc-user tr {
/* List Selection */
.mc-list-row {
margin-bottom: 12px;
width: 900px;
}

.mc-list-row td:first-of-type {
Expand All @@ -123,15 +130,20 @@ table.mc-user tr {
margin-bottom: 8px;
margin-top: 7px;
padding: 0 0 18px;
width: 900px;
}

table.mc-list-select {
margin-bottom: -40px;
}

/* Headings */
.mailchimp-header h2,
.mailchimp-header h1 {
font-weight: 600;
margin: 0.75em 0;
padding: 0;
}

.mailchimp-header h1,
.mc-h2,
.mc-h3,
.mc-p {
Expand All @@ -157,11 +169,9 @@ table.mc-list-select {
margin-bottom: 0;
}

.mc-a {
.mc-p a {
color: var(--mailchimp-color-link);
font-size: 0.875rem;
font-weight: 400;
margin-bottom: 0;
}

/* Table */
Expand All @@ -179,7 +189,7 @@ table.mc-widefat .last-row th {

table.mc-widefat th {
color: var(--mailchimp-color-text-light) !important;
font-weight: 700;
font-weight: 700 !important;
width: 130px;
}

Expand Down Expand Up @@ -241,6 +251,6 @@ th.mailchimp-connect {
width: 100% !important;
}

#wpfooter {
margin-left: 0 !important;
#mc-message {
margin-top: 26px;
}
1 change: 0 additions & 1 deletion icon.svg

This file was deleted.

29 changes: 16 additions & 13 deletions views/setup_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<title><?php esc_html_e( 'Mailchimp Freddie', 'mailchimp_i18n' ); ?></title>
<path fill="#241C15" fill-rule="evenodd" d="M35.363 24.328c.507 0 1.303.587 1.303 2.003 0 1.408-.581 3.004-.718 3.358-2.095 5.046-7.095 7.855-13.052 7.677-5.552-.166-10.288-3.11-12.36-7.911-1.254 0-2.546-.553-3.528-1.427-1.035-.922-1.673-2.114-1.798-3.358-.096-.969.022-1.87.324-2.655l-1.164-.992c-5.326-4.52 11.333-23.13 16.661-18.459.027.024 1.813 1.785 1.817 1.789l.99-.422c4.674-1.945 8.466-1.006 8.47 2.097.003 1.614-1.02 3.495-2.66 5.202.595.554 1.07 1.42 1.343 2.41.23.731.27 1.473.29 1.949.03.658.06 2.19.064 2.217.042.013.515.143.658.184 1.255.354 2.147.825 2.584 1.286.436.46.652.905.731 1.428.074.422.064 1.166-.49 1.999 0 0 .143.313.281.757.138.445.238.814.254.868Zm-12.941 2.335.002.005-.002-.004v-.001Zm13.002.145c.127-.843-.06-1.17-.313-1.326-.268-.166-.59-.108-.59-.108s-.146-1.009-.56-1.924c-1.23.975-2.814 1.66-4.02 2.009-1.391.401-3.274.71-5.375.584-1.165-.095-1.936-.437-2.226.51 2.662.98 5.48.56 5.48.56a.1.1 0 0 1 .109.09.107.107 0 0 1-.062.106s-2.164 1.01-5.602-.059c.095.81.881 1.174 1.257 1.32.472.186.99.271.99.271 4.26.736 8.242-1.712 9.14-2.328.066-.046.11-.001.057.08a1.467 1.467 0 0 1-.088.126c-1.097 1.423-4.048 3.07-7.886 3.07-1.674 0-3.348-.593-3.962-1.504-.953-1.413-.047-3.476 1.541-3.261l.696.079c1.985.222 4.859-.058 7.228-1.163 2.167-1.01 2.985-2.123 2.862-3.024a1.298 1.298 0 0 0-.373-.736c-.39-.383-1.007-.681-2.049-.975-.344-.097-.578-.16-.83-.243-.447-.148-.668-.267-.718-1.112-.021-.37-.086-1.658-.109-2.19-.04-.933-.152-2.207-.94-2.734a1.315 1.315 0 0 0-.672-.216c-.235-.01-.352.031-.4.04-.449.076-.714.316-1.045.594-.982.822-1.81.957-2.732.917-.551-.024-1.135-.11-1.804-.15-.13-.007-.26-.016-.39-.022-1.545-.08-3.2 1.26-3.475 3.163-.383 2.649 1.525 4.017 2.076 4.82.07.096.152.232.152.36 0 .154-.1.276-.197.38-1.574 1.628-2.078 4.214-1.485 6.369.074.27.168.526.28.772 1.392 3.27 5.712 4.794 9.932 3.409.565-.186 1.1-.416 1.603-.681a8.429 8.429 0 0 0 2.456-1.844c1.12-1.176 1.785-2.454 2.044-4.03Zm-7.017-8.188c-.197-.252-.373-.659-.472-1.135-.176-.846-.157-1.46.335-1.539.492-.08.73.432.905 1.279.119.569.096 1.092-.035 1.395a2.838 2.838 0 0 0-.733 0Zm-4.224.67c-.352-.156-.809-.329-1.36-.295-.782.048-1.46.393-1.655.37-.083-.011-.118-.047-.128-.094-.032-.146.191-.386.427-.56.713-.515 1.638-.626 2.413-.29.38.162.736.45.91.736.084.138.1.245.046.3-.085.09-.3-.012-.653-.167Zm-.708.406c.631-.076 1.094.22 1.202.395.046.075.028.125.013.148-.05.08-.16.065-.39.039-.417-.048-.838-.076-1.476.154 0 0-.232.093-.336.093a.11.11 0 0 1-.11-.113c0-.094.085-.229.223-.35.163-.142.416-.294.874-.366Zm3.505 1.49c-.31-.153-.473-.463-.361-.691.111-.228.454-.289.765-.135.312.154.474.463.362.692-.111.228-.454.288-.765.134Zm2.002-1.757c.253.004.453.29.447.639-.006.348-.216.627-.468.623-.253-.004-.454-.29-.448-.639.006-.349.216-.628.469-.623Zm-13.137-7.626c-.047.054.022.131.08.089 1.14-.834 2.704-1.61 4.752-2.111 2.295-.563 4.504-.327 5.853-.016.068.015.11-.102.05-.136-.891-.503-2.26-.844-3.23-.851-.049 0-.075-.056-.047-.095.168-.226.398-.45.608-.613.047-.036.019-.113-.04-.11-1.383.086-2.959.751-3.865 1.372-.044.03-.102-.01-.091-.063.07-.342.293-.792.409-1.003.027-.05-.027-.104-.077-.078-1.456.748-3.082 2.082-4.402 3.615Zm-6.86 7.294c1.521-4.105 4.063-7.889 7.426-10.492C18.908 6.512 21.6 5.01 21.6 5.01s-1.45-1.69-1.888-1.814c-2.693-.732-8.51 3.3-12.225 8.628-1.503 2.156-3.655 5.973-2.626 7.936.127.244.844.869 1.23 1.192.644-.941 1.697-1.622 2.893-1.856Zm2.008 9.01c1.947-.334 2.456-2.459 2.136-4.545-.363-2.356-1.948-3.187-3.025-3.246-.299-.016-.576.011-.806.058-1.92.389-3.005 2.031-2.792 4.165.193 1.93 2.137 3.558 3.935 3.606.187.005.371-.008.552-.038Zm.736-2.425c.1-.024.204-.048.267.031.022.026.058.086.016.185-.072.167-.355.396-.76.38-.416-.032-.88-.336-.942-1.094-.031-.374.11-.83.196-1.067.167-.461.016-.944-.376-1.201a1.011 1.011 0 0 0-1.408.294c-.12.188-.193.423-.232.55l-.025.077c-.088.238-.23.308-.324.295-.045-.006-.107-.037-.147-.146-.108-.298-.02-1.142.539-1.762.354-.394.91-.595 1.45-.526.563.072 1.03.414 1.317.962.381.73.042 1.495-.16 1.953l-.06.136c-.127.303-.134.568-.019.746a.511.511 0 0 0 .432.22c.087.002.166-.017.236-.033Z" clip-rule="evenodd"/>
</svg>
<h2><?php esc_html_e( 'Mailchimp List Subscribe Form', 'mailchimp_i18n' ); ?> </h2>
<h1><?php esc_html_e( 'Mailchimp List Subscribe Form', 'mailchimp_i18n' ); ?> </h1>
</div>
<?php

Expand All @@ -26,7 +26,7 @@
// Display our success/error message(s) if have them
if ( mailchimp_sf_global_msg() !== '' ) {
?>
<div id="mc_message" class=""><?php echo wp_kses_post( mailchimp_sf_global_msg() ); ?></div>
<div id="mc-message" class=""><?php echo wp_kses_post( mailchimp_sf_global_msg() ); ?></div>
<?php
}

Expand All @@ -51,7 +51,7 @@
);
?>
</p>
<p class="mc-a">
<p class="mc-p">
<?php
printf(
'%1$s <a href="http://www.mailchimp.com/signup/" target="_blank">%2$s</a>',
Expand All @@ -60,7 +60,7 @@
);
?>
</p>
<div style="width: 900px;">
<div class="mc-section">
<table class="widefat mc-widefat mc-api">
<form method="POST" action="">
<tr valign="top">
Expand Down Expand Up @@ -95,7 +95,7 @@
// End of login form
} else { // Start logout form
?>
<table style="min-width:400px;" class="mc-user" cellspacing="0">
<table class="mc-user" cellspacing="0">
<tr>
<td><h3><?php esc_html_e( 'Logged in as', 'mailchimp_i18n' ); ?>: <?php echo esc_html( $user['username'] ); ?></h3>
</td>
Expand Down Expand Up @@ -144,7 +144,7 @@
<?php
} else {
?>
<table style="min-width:400px" class="mc-list-select" cellspacing="0">
<table class="mc-list-select" cellspacing="0">
<tr class="mc-list-row">
<td>
<label class="screen-reader-text" for="mc_list_id"><?php esc_html_e( 'Select a list', 'mailchimp_i18n' ); ?></label>
Expand Down Expand Up @@ -201,7 +201,7 @@

<div>
<form method="post" action="options-general.php?page=mailchimp_sf_options">
<div style="width:900px;">
<div class="mc-section">
<input type="hidden" name="mcsf_action" value="change_form_settings">
<?php wp_nonce_field( 'update_general_form_settings', '_mcsf_nonce_action' ); ?>

Expand All @@ -212,7 +212,7 @@
<label for="mc_header_content"><?php esc_html_e( 'Header', 'mailchimp_i18n' ); ?></label>
</th>
<td>
<textarea id="mc_header_content" name="mc_header_content" rows="2" cols="70"><?php echo wp_kses_post( get_option( 'mc_header_content' ) ); ?></textarea><br/>
<textarea class="widefat" id="mc_header_content" name="mc_header_content" rows="2"><?php echo wp_kses_post( get_option( 'mc_header_content' ) ); ?></textarea><br/>
<?php esc_html_e( 'Add your own text, HTML markup (including image links), or keep it blank.', 'mailchimp_i18n' ); ?>
</td>
</tr>
Expand All @@ -222,7 +222,7 @@
<label for="mc_subheader_content"><?php esc_html_e( 'Sub-header', 'mailchimp_i18n' ); ?></label>
</th>
<td>
<textarea id="mc_subheader_content" name="mc_subheader_content" rows="2" cols="70"><?php echo wp_kses_post( get_option( 'mc_subheader_content' ) ); ?></textarea><br/>
<textarea class="widefat" id="mc_subheader_content" name="mc_subheader_content" rows="2"><?php echo wp_kses_post( get_option( 'mc_subheader_content' ) ); ?></textarea><br/>
<?php esc_html_e( 'Add your own text, HTML markup (including image links), or keep it blank.', 'mailchimp_i18n' ); ?>.<br/>
<?php esc_html_e( 'This will be displayed under the heading and above the form.', 'mailchimp_i18n' ); ?>
</td>
Expand All @@ -233,7 +233,7 @@
<label for="mc_submit_text"><?php esc_html_e( 'Submit Button', 'mailchimp_i18n' ); ?></label>
</th>
<td>
<input type="text" id="mc_submit_text" name="mc_submit_text" size="70" value="<?php echo esc_attr( get_option( 'mc_submit_text' ) ); ?>"/>
<input class="widefat" type="text" id="mc_submit_text" name="mc_submit_text" size="70" value="<?php echo esc_attr( get_option( 'mc_submit_text' ) ); ?>"/>
</td>
</tr>
</table>
Expand Down Expand Up @@ -346,7 +346,7 @@

</div>

<div style="width:900px;">
<div class="mc-section">

<input type="submit" value="<?php esc_attr_e( 'Update Subscribe Form Settings', 'mailchimp_i18n' ); ?>" class="button mc-submit" /><br/>

Expand Down Expand Up @@ -417,7 +417,9 @@
$igs = get_option( 'mc_interest_groups' );
if ( is_array( $igs ) && ! isset( $igs['id'] ) ) {
?>
<h3 class="mc-h3"><?php esc_html_e( 'Group Settings', 'mailchimp_i18n' ); ?></h3>
<div class="mc-section">
<h3 class="mc-h3"><?php esc_html_e( 'Group Settings', 'mailchimp_i18n' ); ?></h3>
</div>
<?php
// Determines whether or not to continue processing. Only false if there was an error.
$continue = true;
Expand Down Expand Up @@ -468,7 +470,7 @@
}
}
?>
<div style="width: 900px; margin-top: 35px;">
<div class="mc-section" style="margin-top: 35px;">
<table class="widefat mc-widefat">
<tr><th colspan="2">CSS Cheat Sheet</th></tr>
<tr valign="top">
Expand Down Expand Up @@ -518,3 +520,4 @@
</table>
</div>
</form>
</div>

0 comments on commit 412b786

Please sign in to comment.