Jump to content

Recommended Posts

  • Replies 10
  • Created
  • Last Reply

Top Posters In This Topic

Can you send CSS/JS? We can help easier

Normal CSS should be insert to Design > Custom CSS, HTML/JS add to Settings > Advanced > Code Injection > Footer

Edited by tuanphan

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 1 month later...
On 7/28/2022 at 11:27 AM, tuanphan said:

Can you send CSS/JS? We can help easier

Normal CSS should be insert to Design > Custom CSS, HTML/JS add to Settings > Advanced > Code Injection > Footer

Hi Sorry I didn't see you answer to me 

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="style.css" />
<title><img src="/Users/Desktop/Image/Logo/unamed-1copie.png"></title>
<title> La Capilla </title>
</head>
<title> Vérification d'âge </title>
<body>
<img src="/Users/Desktop/Image/Logo/Logo La Capilla.png">
 
<br/>
<label> Veuillez saisir votre âge </label>
<input id="text1" type="number">
<p><button id="btn1"> Envoyer </button></p>
</form>
<script>
let btn = document.getElementById('btn1');
btn.onclick = function() {
verif() };
 
function verif(){
 
 
age = document.getElementById('text1').value;
console.log(age);
if ( age < 18){
alert("Vous n'êtes pas un adulte");
window.location.href = "https://www.google.com";
}
else {
 
alert("Vous êtes majeur");
window.location.href = "https://capilla-wine.com";
}
}
</script>
</body>
</html>
Link to comment
On 7/28/2022 at 11:27 AM, tuanphan said:

Can you send CSS/JS? We can help easier

Normal CSS should be insert to Design > Custom CSS, HTML/JS add to Settings > Advanced > Code Injection > Footer

body{
background-color: #A9A9A9;
font-family: 'Copperplate-Gothic-Light-Regular', serif;
font-weight: normal;
}
 
input,button,label{
display: flex;
justify-content: center;
align-items: center;
margin-left: auto;
margin-right: auto;
}
 
input{
box-shadow: 1px 1px 1px 1px;
}
Link to comment
On 8/31/2022 at 9:08 PM, Haiko__ said:

Hi Sorry I didn't see you answer to me 

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="style.css" />
<title><img src="/Users/Desktop/Image/Logo/unamed-1copie.png"></title>
<title> La Capilla </title>
</head>
<title> Vérification d'âge </title>
<body>
<img src="/Users/Desktop/Image/Logo/Logo La Capilla.png">
 
<br/>
<label> Veuillez saisir votre âge </label>
<input id="text1" type="number">
<p><button id="btn1"> Envoyer </button></p>
</form>
<script>
let btn = document.getElementById('btn1');
btn.onclick = function() {
verif() };
 
function verif(){
 
 
age = document.getElementById('text1').value;
console.log(age);
if ( age < 18){
alert("Vous n'êtes pas un adulte");
window.location.href = "https://www.google.com";
}
else {
 
alert("Vous êtes majeur");
window.location.href = "https://capilla-wine.com";
}
}
</script>
</body>
</html>

I think your code missing some tags. Where did you get this code?

You can find some free code on Codepen with keywords "age verification" then share me link. We can convert it to Squarespace.

For ex this code: https://codepen.io/jonbp1993/pen/woKVbr

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
On 9/3/2022 at 11:01 AM, tuanphan said:

I think your code missing some tags. Where did you get this code?

You can find some free code on Codepen with keywords "age verification" then share me link. We can convert it to Squarespace.

For ex this code: https://codepen.io/jonbp1993/pen/woKVbr

I created this code myself because I saw on one of the posts on this forum that you would have to pay to have an age limit so I decided to create it myself.

 

How you convert it to Squarespace?

Link to comment
On 9/5/2022 at 7:37 PM, Haiko__ said:

I created this code myself because I saw on one of the posts on this forum that you would have to pay to have an age limit so I decided to create it myself.

 

How you convert it to Squarespace?

Depend on the code. Which CodePen you want to convert?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 4 weeks later...

Try a Code Block > Paste this code (or you can also add to Page Header or Code Injection)

<form>
        <label> Veuillez saisir votre âge </label>
            <input id="text1" type="number">
        <p><button id="btn1"> Envoyer </button></p>
      </form>
<style>
  input,button,label{
    font-family: 'copperplate_gothic_light_regular',serif;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: auto;
    margin-right: auto;
    text-decoration: underline;
}

input{
    box-shadow: 1px 1px 1px 1px;
}
</style>
<script>
        let btn = document.getElementById('btn1');
        btn.onclick = function() {
            verif() };
 
        function verif(){
     

            age = document.getElementById('text1').value;
            console.log(age);
            if ( age < 18){
                alert("Vous n'êtes pas un adulte");
                window.location.href = "https://www.google.com";
            }
            else {

                alert("Vous êtes majeur");
                window.location.href = "https://capilla-wine.com";
            }
        }
      </script>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.