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

Button branding and theme specific styling #298

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
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
16 changes: 16 additions & 0 deletions includes/stylehandler.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

function styleHandler($theme){

$theme = strtolower(str_replace(' ', '', $theme));
$defaultStyle = plugin_dir_url(__DIR__) . 'public/css/1cc-product-checkout.css';
$cssFilePath = plugin_dir_path( __DIR__ ). '/public/css/'. $theme .'.css';
$css = plugin_dir_url(__DIR__) . 'public/css/'. $theme .'.css';

return is_file($cssFilePath)?
$css
:$defaultStyle;

}

?>
21 changes: 19 additions & 2 deletions public/css/1cc-product-checkout.css
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
width: 100%;
}
#btn-1cc-pdp {
margin-left: 5px;
position: relative;
top: 12px;
width: 250px;
z-index: 1;
}
#rzp-spinner-backdrop {
position: fixed;
Expand Down Expand Up @@ -43,6 +46,11 @@
visibility: visible;
opacity: 1;
}

#icon{
position: fixed;
align-items: center;
}
@keyframes rotate {
0% {
transform: rotate(0);
Expand All @@ -58,8 +66,9 @@
border: 4px solid;
border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important;
animation: 1s linear 0s infinite normal none running rotate;
margin-top: 2px;
/* margin-top: -6px; */
box-sizing: content-box;
line-height: 14px;
}
#icon {
position: absolute;
Expand All @@ -76,4 +85,12 @@
#rzp-logo {
height: 45px !important;
}
}

.single_add_to_cart_button.button{
z-index: 2 !important;
}

.quantity{
z-index: 2 !important;
}
90 changes: 90 additions & 0 deletions public/css/astra.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
#btn-1cc {
display: block !important;
width: 100%;
}
#btn-1cc-mini-cart {
display: block !important;
width: 100%;
}
#btn-1cc-pdp {
position: relative;
top: 10px;
display: block !important;
width: 220px;
}
#rzp-spinner-backdrop {
position: fixed;
top: 0;
left: 0;
z-index: 9999;
width: 100%;
height: 100%;
background: rgba(0, 0, 0);
visibility: hidden;
opacity: 0;
}
#rzp-spinner-backdrop.show {
visibility: visible;
opacity: 0.4;
}
#rzp-spinner {
visibility: hidden;
opacity: 0;
/* positioning and centering */
position: fixed;
left: 0;
top: 0;
bottom: 0;
right: 0;
margin: auto;
z-index: 10000;
display: flex !important;
align-items: center;
justify-content: center;
}
#rzp-spinner.show {
visibility: visible;
opacity: 1;
}
@keyframes rotate {
0% {
transform: rotate(0);
}
100% {
transform: rotate(360deg);
}
}
#loading-indicator {
border-radius: 50%;
width: 80px;
height: 80px;
border: 4px solid;
border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important;
animation: 1s linear 0s infinite normal none running rotate;
margin-top: 2px;
box-sizing: content-box;
}
#icon {
position: absolute;
}
#rzp-logo{
width: auto;
height: 80px !important;
}
@media (max-device-height: 768px), (max-device-width: 768px) {
#loading-indicator {
width: 45px;
height: 45px;
}
#rzp-logo {
height: 45px !important;
}
}

.single_add_to_cart_button.button{
z-index: 2 !important;
}

.quantity{
z-index: 2 !important;
}
101 changes: 101 additions & 0 deletions public/css/bigstore.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
#btn-1cc {
display: block !important;
width: 100%;
}
#btn-1cc-mini-cart {
display: block !important;
width: 100%;
}
#btn-1cc-pdp {
display:block !important;
position: relative;
top: 12px;
width: 355px;
}
#rzp-spinner-backdrop {
position: fixed;
top: 0;
left: 0;
z-index: 9999;
width: 100%;
height: 100%;
background: rgba(0, 0, 0);
visibility: hidden;
opacity: 0;
}
#rzp-spinner-backdrop.show {
visibility: visible;
opacity: 0.4;
}
#rzp-spinner {
visibility: hidden;
opacity: 0;
/* positioning and centering */
position: fixed;
left: 0;
top: 0;
bottom: 0;
right: 0;
margin: auto;
z-index: 10000;
display: flex !important;
align-items: center;
justify-content: center;
}
#rzp-spinner.show {
visibility: visible;
opacity: 1;
}
@keyframes rotate {
0% {
transform: rotate(0);
}
100% {
transform: rotate(360deg);
}
}
#loading-indicator {
border-radius: 50%;
width: 80px;
height: 80px;
border: 4px solid;
border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important;
animation: 1s linear 0s infinite normal none running rotate;
margin-top: 2px;
box-sizing: content-box;
}
#icon {
position: absolute;
}
#rzp-logo{
width: auto;
height: 80px !important;
}
@media (max-device-height: 768px), (max-device-width: 768px) {
#loading-indicator {
width: 45px;
height: 45px;
}
#rzp-logo {
height: 45px !important;
}
}

@media screen and (max-width: 1024px){

#btn-1cc-pdp{
width: 323px;
padding-top: 20px;
}

}

@media screen and (max-width: 767px){
#btn-1cc-pdp{
width: 235px;
padding-top: 20px;
}

}


82 changes: 82 additions & 0 deletions public/css/blossomshop.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
#btn-1cc {
display: block !important;
width: 100%;
}
#btn-1cc-mini-cart {
display: block !important;
width: 100%;
}
#btn-1cc-pdp {
display:block !important;
position: relative;
top: 11px;
width: 243px;
}
#rzp-spinner-backdrop {
position: fixed;
top: 0;
left: 0;
z-index: 9999;
width: 100%;
height: 100%;
background: rgba(0, 0, 0);
visibility: hidden;
opacity: 0;
}
#rzp-spinner-backdrop.show {
visibility: visible;
opacity: 0.4;
}
#rzp-spinner {
visibility: hidden;
opacity: 0;
/* positioning and centering */
position: fixed;
left: 0;
top: 0;
bottom: 0;
right: 0;
margin: auto;
z-index: 10000;
display: flex !important;
align-items: center;
justify-content: center;
}
#rzp-spinner.show {
visibility: visible;
opacity: 1;
}
@keyframes rotate {
0% {
transform: rotate(0);
}
100% {
transform: rotate(360deg);
}
}
#loading-indicator {
border-radius: 50%;
width: 80px;
height: 80px;
border: 4px solid;
border-color: rgb(59, 124, 245) transparent rgb(59, 124, 245) rgb(59, 124, 245) !important;
animation: 1s linear 0s infinite normal none running rotate;
margin-top: 2px;
box-sizing: content-box;
}
#icon {
position: absolute;
}
#rzp-logo{
width: auto;
height: 80px !important;
}
@media (max-device-height: 768px), (max-device-width: 768px) {
#loading-indicator {
width: 45px;
height: 45px;
}
#rzp-logo {
height: 45px !important;
}
}
Empty file modified public/css/bootstrap.min.css
100644 → 100755
Empty file.
Loading