Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunoPavlinic98 committed Oct 25, 2024
1 parent 928561a commit 45fb754
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 26 deletions.
59 changes: 36 additions & 23 deletions assets/css/setup-wizard.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,11 @@ body.wpo-wcpdf-setup {
background-attachment: fixed!important;
font-size: 14px;
line-height: 22px;
background: #771787;
background: -webkit-linear-gradient(10deg, #3c105d, #771787);
background: -o-linear-gradient(10deg, #3c105d, #771787);
background: linear-gradient(100deg, #3c105d, #771787);
background: #fcfbfe;
}

body.wpo-wcpdf-setup a:link, body.wpo-wcpdf-setup a:visited {
color: #771787;
color: #6e1edc;
text-decoration: none;
}

Expand All @@ -34,8 +31,8 @@ body.wpo-wcpdf-setup a:hover {
body.wpo-wcpdf-setup input:focus,
body.wpo-wcpdf-setup textarea:focus,
body.wpo-wcpdf-setup select:focus {
border-color: #239bb9!important;
box-shadow: 0 0 0 1px #239bb9!important;
border-color: #6e1edc!important;
box-shadow: 0 0 0 1px #6e1edc!important;
outline: 2px solid transparent!important;
color: black!important;
}
Expand Down Expand Up @@ -64,7 +61,8 @@ body.wpo-wcpdf-setup form {
background-color: #fff;
padding: 0;
overflow: hidden;
box-shadow: 0 20px 50px 20px rgba(0,0,0,0.2);
border-radius: 20px;
box-shadow: 10px 10px 30px rgba(43, 12, 86, 0.1), -10px -10px 30px rgba(43, 12, 86, 0.02);
}

.wpo-plugin-title {
Expand Down Expand Up @@ -93,6 +91,10 @@ body.wpo-wcpdf-setup form {
margin: 0;
}

.wpo-progress-bar li a {
box-shadow: none;
}

.wpo-progress-bar li:first-child {
width: calc( ( 12.5% - ( 12.5% - 35px ) ) / 2 + 12.5% );
}
Expand All @@ -114,7 +116,7 @@ body.wpo-wcpdf-setup form {

.wpo-progress-bar li.active::after,
.wpo-progress-bar li.completed::after {
background-color: #771787;
background-color: #6e1edc;
}

.wpo-progress-marker {
Expand Down Expand Up @@ -144,20 +146,20 @@ body.wpo-wcpdf-setup form {
}

li.active .wpo-progress-marker::before {
color: #771787;
color: #6e1edc;
}

li.completed .wpo-progress-marker::before {
color: #fff;
}

.wpo-progress-bar li.completed .wpo-progress-marker {
background-color: #771787;
border-color: #771787;
background-color: #6e1edc;
border-color: #6e1edc;
}

.wpo-progress-bar li.active .wpo-progress-marker {
border-color: #771787;
border-color: #6e1edc;
background-color: #fff;
}

Expand Down Expand Up @@ -212,33 +214,40 @@ li.completed .wpo-progress-marker::before {
}

.wpo-setup-card .wpo-button-next {
background-color: #1c6c8b;
border: 1px solid #1c6c8b;
background-color: #6e1edc;
border: 1px solid #6e1edc;
color: #fff!important;
}

.wpo-setup-card .wpo-button-previous,
.wpo-setup-input span.button {
background-color: transparent;
border: 1px solid #1c6c8b;
color: #1c6c8b;
border: 1px solid #6e1edc;
color: #6e1edc;
}

.wpo-setup-card .wpo-button-next:hover,
.wpo-setup-card .wpo-button-previous:hover,
.wpo-setup-input span.button:hover {
background-color: #239bb9;
background-color: #6e1edc;
color: #fff!important;
text-decoration: none;
border-color: #239bb9;
border-color: #6e1edc;
}

.wpo-setup-card .wpo-button-next:hover {
background-color: transparent;
color: #6e1edc!important;
text-decoration: none;
border-color: #6e1edc;
}

.wpo-setup-card .wpo-button-next:focus,
.wpo-setup-card .wpo-button-previous:focus,
.wpo-setup-input span.button:focus {
background-color: #239bb9;
box-shadow: none;
background-color: #6e1edc;
color: #fff!important;
border-color: #239bb9;
border-color: #6e1edc;
}

.wpo-setup-card .wpo-button-next,
Expand All @@ -249,7 +258,7 @@ li.completed .wpo-progress-marker::before {

.wpo-setup-card .wpo-button-previous {
float: left;
color: #1c6c8b!important;
color: #6e1edc!important;
}

.wpo-setup-card .wpo-skip-step {
Expand All @@ -264,6 +273,10 @@ li.completed .wpo-progress-marker::before {
text-decoration: none;
}

.wpo-setup-card .wpo-skip-step:focus {
box-shadow: none;
}

/* Shop address */

.wpo-setup-input .shop-name {
Expand Down
41 changes: 41 additions & 0 deletions assets/css/toggle-switch.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
label.slider {
display: inline-block;
background: #ccc;
border: 1px solid #ccc;
width: 32px;
height: 18px;
margin: 0 30px 0 5px;
border-radius: 9px;
vertical-align: middle!important;
box-sizing: border-box;
transition: 0.05s 0.05s;
cursor: pointer;
position: relative;
}

label.slider::before {
content: '';
display: block;
width: 16px;
height: 16px;
background: #f9f9f9;
border: 1px solid #fff;
box-sizing: border-box;
border-radius: 50%;
box-shadow: inset 2px 2px 2px rgba(255, 255, 255, 1), inset -1px -1px 2px rgba(0, 0, 0, 0.2);
transition: 0.1s;
transform: translateX(0);
}

input[type="checkbox"] {
display: none;
}

input[type="checkbox"]:checked + label.slider {
background: #6e1edc;
border-color: #6e1edc;
}

input[type="checkbox"]:checked + label.slider::before {
transform: translateX(14px);
}
2 changes: 1 addition & 1 deletion assets/js/confetti.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jQuery(document).ready(function($) {
var DEG_TO_RAD = Math.PI / 180;
var RAD_TO_DEG = 180 / Math.PI;
var colors = [
["#771787", "#239bb9"],
["#6e1edc"],
];

function Vector2(_x, _y) {
Expand Down
8 changes: 7 additions & 1 deletion includes/SetupWizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ public function setup_wizard() {
array( 'dashicons', 'install' ),
WPO_WCPDF_VERSION
);
wp_enqueue_style(
'wpo-wcpdf-toggle-switch',
WPO_WCPDF()->plugin_url() . '/assets/css/toggle-switch'.$suffix.'.css',
array( 'dashicons', 'install' ),
WPO_WCPDF_VERSION
);
wp_register_script(
'wpo-wcpdf-media-upload',
WPO_WCPDF()->plugin_url() . '/assets/js/media-upload'.$suffix.'.js',
Expand Down Expand Up @@ -214,7 +220,7 @@ public function setup_wizard_footer() {
public function get_step_link( $step ) {
$step_keys = array_keys( $this->steps );
if ( end( $step_keys ) === $this->step && empty( $step ) ) {
return admin_url('admin.php?page=wpo_wcpdf_options_page');
return admin_url('admin.php?page=wpo_wcpdf_options_page&tab=upgrade');
}
return esc_url_raw( add_query_arg( 'step', $step ) );
}
Expand Down
1 change: 1 addition & 0 deletions views/setup-wizard/attach-to.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<th>
<input type="hidden" value="" name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][attach_to_email_ids][%1$s]">
<input id="%1$s" type="checkbox" %3$s name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][attach_to_email_ids][%1$s]" value="1">
<label for="%1$s" class="slider"></label>
</th>
<td>
<label for="%1$s" class="checkbox">%2$s</label>
Expand Down
2 changes: 2 additions & 0 deletions views/setup-wizard/display-options.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<td>
<input type="hidden" name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_email]" value="">
<input id="display-email" type="checkbox" <?php echo ! empty( $current_settings['display_email'] ) ? 'checked' : ''; ?> name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_email]" value="1">
<label for="display-email" class="slider"></label>
</td>
</tr>
<tr>
Expand All @@ -45,6 +46,7 @@
<td>
<input type="hidden" name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_phone]" value="">
<input id="display-phone" type="checkbox" <?php echo ! empty( $current_settings['display_phone'] ) ? 'checked' : ''; ?> name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_phone]" value="1">
<label for="display-phone" class="slider"></label>
</td>
</tr>
<tr>
Expand Down
4 changes: 3 additions & 1 deletion views/setup-wizard/show-action-buttons.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@
if ( in_array( 'wc_actions', $hidden ) )
$actions = false
?>
<input id="show-action-buttons" type="checkbox" <?php echo $actions !== false ? 'checked' : ''; ?> name="wc_show_action_buttons" value="1"><label for="show-action-buttons" class="checkbox"><?php esc_html_e( 'Show action buttons', 'woocommerce-pdf-invoices-packing-slips' ); ?></label>
<input id="show-action-buttons" type="checkbox" <?php echo $actions !== false ? 'checked' : ''; ?> name="wc_show_action_buttons" value="1">
<label for="show-action-buttons" class="slider"></label>
<label for="show-action-buttons" class="checkbox"><?php esc_html_e( 'Show action buttons', 'woocommerce-pdf-invoices-packing-slips' ); ?></label>
</div>

0 comments on commit 45fb754

Please sign in to comment.