Skip to content

Commit

Permalink
Revert "j"
Browse files Browse the repository at this point in the history
This reverts commit 8a6f3c1.
  • Loading branch information
RobertJGabriel committed Mar 17, 2021
1 parent 08e46b4 commit 3948ac7
Show file tree
Hide file tree
Showing 28 changed files with 14,535 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
https://www.coffeeandfun.com
https://coffeeandfun.com
44 changes: 44 additions & 0 deletions app/assets/css/override.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
footer {
background-color: #222b37 !important;
padding: 2rem !important;
color: #fff !important;
}


@import url('https://fonts.googleapis.com/css2?family=Montserrat&display=swap');

html {
scroll-behavior: smooth;
font-family: 'Montserrat', sans-serif !important;
}

.pink {
background-color: rgba(220, 51, 99, 1) !important;
}


.footer_text {
background-color: #000;
color: #fff;
text-align: center;
padding: 1rem;
}

.coral-white .svg-fill {
fill: #dc3363 !important;
}


.feature_check {
width: 35px;
}

.check {
margin-right: 10px;
}

.large_font {
font-size: 2rem;
fill: rgba(220, 51, 99, 1);
color: rgba(220, 51, 99, 1);
}
1 change: 1 addition & 0 deletions app/assets/css/override.min.css

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

4 changes: 4 additions & 0 deletions app/assets/css/styles.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions app/assets/css/styles.min.css

Large diffs are not rendered by default.

Binary file added app/assets/images/favicon.ico
Binary file not shown.
Binary file added app/assets/images/logos/clean.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/logos/full.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/logos/markdown.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions app/assets/js/core/notifactions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import {
Notyf
} from 'notyf';
import 'notyf/notyf.min.css'; // for React and Vue
const notyf = new Notyf({
ripple: true,
duration: 9000,
position: {
x: 'center',
y: 'bottom',
}
});


async function popup(message) {
setTimeout(() => {

notyf.success(message);
}, 2000), {
once: true
}

}


export {
popup
}; // a list of exported variables
88 changes: 88 additions & 0 deletions app/assets/js/core/stripe.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
import {
loadStripe
} from '@stripe/stripe-js';
import {
Notyf
} from 'notyf';
import 'notyf/notyf.min.css'; // for React and Vue
const notyf = new Notyf();



async function load() {





const stripe = await loadStripe('pk_live_DG2IMIp7QYpSiuiTFvQI7ZFW00OEARkk0s');
let removemyporn = document.getElementById('checkout-button-plan_GWiDO5WS3j8fNG'); //Remove my porn
let markdownEditor = document.getElementById('checkout-button-price_HLvALnfLmoVK3j');


if (removemyporn !== null) {
removemyporn.addEventListener('click', () => {
// When the customer clicks on the button, redirect
// them to Checkout.

notyf.success('Loading.....');
stripe.redirectToCheckout({
lineItems: [{price: 'plan_GWiDO5WS3j8fNG', quantity: 1}],
mode: 'subscription',
// Do not rely on the redirect to the successUrl for fulfilling
// purchases, customers may not always reach the success_url after
// a successful payment.
// Instead use one of the strategies described in
// https://stripe.com/docs/payments/checkout/fulfillment
successUrl: 'https://www.coffeeandfun.com/?status=success',
cancelUrl: 'https://www.coffeeandfun.com/?status=canceled',
})
.then(({error}) => {
if (error) {
// If `redirectToCheckout` fails due to a browser or network
// error, display the localized error message to your customer.

notyf.error(error.message);

}
});
});

}




if (markdownEditor !== null) {
markdownEditor.addEventListener('click', () => {
// When the customer clicks on the button, redirect
// them to Checkout.
notyf.success('Loading.....');
stripe.redirectToCheckout({
lineItems: [{price: 'price_HLvALnfLmoVK3j', quantity: 1}],
mode: 'subscription',
// Do not rely on the redirect to the successUrl for fulfilling
// purchases, customers may not always reach the success_url after
// a successful payment.
// Instead use one of the strategies described in
// https://stripe.com/docs/payments/checkout/fulfillment
successUrl: 'https://www.coffeeandfun.com/?status=success',
cancelUrl: 'https://www.coffeeandfun.com/?status=canceled',

})
.then(({error}) => {
if (error) {
// If `redirectToCheckout` fails due to a browser or network
// error, display the localized error message to your customer.
notyf.error(error.message);
}
});
});


}
}

export {
load
}; // a list of exported variables
55 changes: 55 additions & 0 deletions app/assets/js/core/third-party.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
async function crisp() {

setTimeout(() => {
// Crisp
window.$crisp = [];
window.CRISP_WEBSITE_ID = "8db9bf53-290b-4a06-a5b9-498da087cd20";

let d = document;
let s = d.createElement("script");
s.src = "https://client.crisp.chat/l.js";
s.async = 1;
d.getElementsByTagName("head")[0].appendChild(s);

}, 2000), {
once: true
}
}




async function tagManager() {
setTimeout(() => {

let d = document;
let s = d.createElement("script");
s.src = "https://www.googletagmanager.com/gtag/js?id=UA-39444052-20";
s.async = 1;
d.getElementsByTagName("head")[0].appendChild(s);
}, 2000), {
once: true
}
}


async function loadManager() {
setTimeout(() => {
window.dataLayer = window.dataLayer || [];

function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'UA-39444052-20');

}, 2000), {
once: true
}
}

export {
crisp,
tagManager,
loadManager
}; // a list of exported variables
36 changes: 36 additions & 0 deletions app/assets/js/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import '../css/override.min.css';
import '../css/styles.min.css';
// Js
import * as stripe from './core/stripe';
import * as thirdParty from './core/third-party';
import '@fortawesome/fontawesome-free/js/all';

async function loader() {


await stripe.load(); // Load Stripe

await thirdParty.crisp();
await slider.initComparisons();



await thirdParty.tagManager();
await thirdParty.loadManager();
}


loader();


if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/service-worker.js').then(registration => {

//console.log('SW registered: ', registration);
}).catch(registrationError => {

console.log('SW registration failed: ', registrationError);
});
});
}
2 changes: 2 additions & 0 deletions app/assets/setup/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
https://www.coffeeandfun.com
https://coffeeandfun.com
Loading

0 comments on commit 3948ac7

Please sign in to comment.