Which Pair of Pants Suits Your Personality?
body {
font-family: ‘Arial’, sans-serif;
max-width: 900px;
margin: 0 auto;
padding: 20px;
background-color: #f4f4f9;
text-align: center;
line-height: 1.6;
}
h1 {
color: #2c3e50;
font-size: 2.5em;
margin-bottom: 20px;
}
.quiz-container, .results-container, .welcome-message {
background: #ffffff;
padding: 30px;
border-radius: 15px;
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
margin-bottom: 30px;
}
.question {
font-size: 1.5em;
margin-bottom: 20px;
color: #34495e;
}
.options {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 15px;
margin-bottom: 20px;
}
.option {
background: #ecf0f1;
padding: 15px;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s ease;
font-size: 1em;
text-align: center;
}
.option:hover {
background: #dfe6e9;
transform: translateY(-2px);
}
.option.selected {
background: #3498db;
color: #fff;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.next-btn, .shop-btn, .start-btn {
background: #e74c3c;
color: #fff;
padding: 12px 30px;
border: none;
border-radius: 8px;
cursor: pointer;
font-size: 1.1em;
transition: background 0.3s;
margin-top: 20px;
}
.next-btn:hover, .shop-btn:hover, .start-btn:hover {
background: #c0392b;
}
.results-container, .quiz-container {
display: none;
}
.result-img {
max-width: 100%;
height: auto;
border-radius: 10px;
margin: 20px 0;
}
.result-text {
font-size: 1.2em;
color: #2c3e50;
margin-bottom: 20px;
}
.share-buttons {
display: flex;
justify-content: center;
gap: 15px;
margin-top: 20px;
}
.share-btn {
background: #34495e;
color: #fff;
padding: 10px 15px;
border-radius: 8px;
text-decoration: none;
font-size: 1em;
transition: background 0.3s;
display: inline-flex;
align-items: center;
gap: 5px;
}
.share-btn:hover {
background: #2c3e50;
}
.share-btn i {
font-size: 1.2em;
}
.disclosure {
font-size: 0.9em;
color: #7f8c8d;
margin-top: 20px;
}
.welcome-message {
display: none;
}
.welcome-message p {
font-size: 1.2em;
color: #34495e;
}
@media (max-width: 600px) {
h1 {
font-size: 1.8em;
}
.question {
font-size: 1.2em;
}
.options {
grid-template-columns: 1fr;
}
.option {
padding: 12px;
}
}
https://www.googletagmanager.com/gtag/js?id=UA-XXXXX-Y
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag(‘js’, new Date());
gtag(‘config’, ‘G-ZREN9LSKEH’); // Replace with your Google Analytics ID
Next
const questions = [
{
question: “What’s your ideal weekend vibe?”,
options: [
{ text: “Chasing adventures in nature”, score: { bohemian: 3, classic: 0, bold: 1 } },
{ text: “Strolling through the city in style”, score: { bohemian: 0, classic: 2, bold: 3 } },
{ text: “Cozying up with a good book”, score: { bohemian: 1, classic: 3, bold: 0 } }
]
},
{
question: “Which color palette speaks to you?”,
options: [
{ text: “Earthy tones (greens, browns)”, score: { bohemian: 3, classic: 1, bold: 0 } },
{ text: “Timeless neutrals (black, white)”, score: { bohemian: 0, classic: 3, bold: 1 } },
{ text: “Vibrant prints and brights”, score: { bohemian: 1, classic: 0, bold: 3 } }
]
},
{
question: “What’s your go-to accessory?”,
options: [
{ text: “Flowy scarves or beaded jewelry”, score: { bohemian: 3, classic: 0, bold: 1 } },
{ text: “Classic watch or pearl earrings”, score: { bohemian: 0, classic: 3, bold: 0 } },
{ text: “Statement necklace or bold hat”, score: { bohemian: 1, classic: 0, bold: 3 } }
]
},
{
question: “Where are you wearing these pants?”,
options: [
{ text: “To a music festival or beach”, score: { bohemian: 3, classic: 0, bold: 2 } },
{ text: “To work or a dinner date”, score: { bohemian: 0, classic: 3, bold: 1 } },
{ text: “To a bold photoshoot”, score: { bohemian: 1, classic: 0, bold: 3 } }
]
},
{
question: “What’s your ideal pants fit?”,
options: [
{ text: “Loose and flowy”, score: { bohemian: 3, classic: 0, bold: 1 } },
{ text: “Tailored and fitted”, score: { bohemian: 0, classic: 3, bold: 1 } },
{ text: “Dramatic and wide-leg”, score: { bohemian: 1, classic: 0, bold: 3 } }
]
},
{
question: “What inspires your fashion choices?”,
options: [
{ text: “Nature and travel”, score: { bohemian: 3, classic: 0, bold: 1 } },
{ text: “Timeless elegance and professionalism”, score: { bohemian: 0, classic: 3, bold: 0 } },
{ text: “Trends and bold statements”, score: { bohemian: 1, classic: 0, bold: 3 } }
]
}
];
const results = {
bohemian: {
text: “You’re a Bohemian Dreamer! These ANRABESS Linen Palazzo Pants are perfect for your free-spirited style.”,
img: “https://via.placeholder.com/400×300?text=ANRABESS+Palazzo+Pants”, // Replace with Amazon image URL
shopLink: “https://www.amazon.com/dp/B0CXXXXX?tag=youraffiliateid-20&utm_source=quiz&utm_medium=web&utm_campaign=pants_quiz&utm_content=bohemian”
},
classic: {
text: “You’re a Classic Trendsetter! These DLOODA Bootcut Dress Pants suit your timeless elegance.”,
img: “https://via.placeholder.com/400×300?text=DLOODA+Dress+Pants”, // Replace with Amazon image URL
shopLink: “https://www.amazon.com/dp/B0DYYYYY?tag=youraffiliateid-20&utm_source=quiz&utm_medium=web&utm_campaign=pants_quiz&utm_content=classic”
},
bold: {
text: “You’re a Bold Fashionista! These CFLONGE Floral Palazzo Pants match your vibrant energy.”,
img: “https://via.placeholder.com/400×300?text=CFLONGE+Floral+Pants”, // Replace with Amazon image URL
shopLink: “https://www.amazon.com/dp/B0FZZZZZ?tag=youraffiliateid-20&utm_source=quiz&utm_medium=web&utm_campaign=pants_quiz&utm_content=bold”
}
};
let currentQuestion = 0;
let scores = { bohemian: 0, classic: 0, bold: 0 };
let currentResult = null;
// Get shareable URL with UTM parameters
function getShareUrl(platform, resultKey) {
const baseUrl = window.location.href.split(‘?’)[0]; // Remove existing query params
const utmParams = `result=${resultKey}&utm_source=${platform}&utm_medium=social&utm_campaign=pants_quiz_share&utm_content=${resultKey}`;
return `${baseUrl}?${utmParams}`;
}
function loadQuestion() {
const q = questions[currentQuestion];
document.getElementById(‘question’).innerText = q.question;
const optionsDiv = document.getElementById(‘options’);
optionsDiv.innerHTML = ”;
q.options.forEach((option, index) => {
const btn = document.createElement(‘div’);
btn.className = ‘option’;
btn.innerText = option.text;
btn.setAttribute(‘role’, ‘radio’);
btn.setAttribute(‘aria-checked’, ‘false’);
btn.tabIndex = 0;
btn.onclick = () => selectOption(option.score);
btn.onkeydown = (e) => { if (e.key === ‘Enter’ || e.key === ‘ ‘) selectOption(option.score); };
optionsDiv.appendChild(btn);
});
document.getElementById(‘next-btn’).style.display = ‘none’;
}
function selectOption(score) {
document.querySelectorAll(‘.option’).forEach(btn => {
btn.classList.remove(‘selected’);
btn.setAttribute(‘aria-checked’, ‘false’);
});
event.target.classList.add(‘selected’);
event.target.setAttribute(‘aria-checked’, ‘true’);
for (let key in score) {
scores[key] += score[key];
}
document.getElementById(‘next-btn’).style.display = ‘block’;
gtag(‘event’, ‘select_option’, {
event_category: ‘Quiz’,
event_label: `Question ${currentQuestion + 1}`,
value: 1
});
}
function nextQuestion() {
currentQuestion++;
if (currentQuestion scores[key] === maxScore);
currentResult = resultKey;
const result = results[resultKey];
document.getElementById(‘result-text’).innerText = result.text;
document.getElementById(‘result-img’).src = result.img;
document.getElementById(‘shop-link’).href = result.shopLink;
document.getElementById(‘results’).style.display = ‘block’;
document.getElementById(‘welcome’).style.display = ‘none’;
gtag(‘event’, ‘quiz_complete’, {
event_category: ‘Quiz’,
event_label: `Result: ${resultKey}`,
value: 1
});
}
function trackShopClick() {
gtag(‘event’, ‘shop_click’, {
event_category: ‘Quiz’,
event_label: `Shop Link: ${currentResult}`,
value: 1
});
}
function trackShare(platform) {
gtag(‘event’, ‘share’, {
event_category: ‘Quiz’,
event_label: `Share: ${platform} – ${currentResult}`,
value: 1
});
}
function shareOnFacebook() {
const resultText = document.getElementById(‘result-text’).innerText;
const shareUrl = encodeURIComponent(getShareUrl(‘facebook’, currentResult));
window.open(`https://www.facebook.com/sharer/sharer.php?u=${shareUrl}"e=${encodeURIComponent(resultText)}`, ‘_blank’);
}
function shareOnTwitter() {
const resultText = document.getElementById(‘result-text’).innerText;
const shareUrl = encodeURIComponent(getShareUrl(‘twitter’, currentResult));
window.open(`https://twitter.com/intent/tweet?text=${encodeURIComponent(resultText + ‘ ‘ + shareUrl)}`, ‘_blank’);
}
function shareOnPinterest() {
const resultText = document.getElementById(‘result-text’).innerText;
const shareUrl = encodeURIComponent(getShareUrl(‘pinterest’, currentResult));
const img = encodeURIComponent(document.getElementById(‘result-img’).src);
window.open(`https://pinterest.com/pin/create/button/?url=${shareUrl}&media=${img}&description=${encodeURIComponent(resultText)}`, ‘_blank’);
}
function startQuiz() {
document.getElementById(‘welcome’).style.display = ‘none’;
document.getElementById(‘quiz’).style.display = ‘block’;
loadQuestion();
}
// Check for result in URL on page load
window.onload = function() {
const urlParams = new URLSearchParams(window.location.search);
const result = urlParams.get(‘result’);
if (result && results[result]) {
document.getElementById(‘welcome-text’).innerText = `Your friend got “${results[result].text}” Take the quiz to find your style!`;
document.getElementById(‘welcome’).style.display = ‘block’;
gtag(‘event’, ‘view_shared_result’, {
event_category: ‘Quiz’,
event_label: `Shared Result: ${result}`,
value: 1
});
} else {
document.getElementById(‘welcome’).style.display = ‘block’;
}
};
Discover more from atenajos
Subscribe to get the latest posts sent to your email.
-
What you eat shows up on your skin. Here are the science-backed foods that genuinely support a clear, glowing complexion, and why they work.

-
Premature ageing is driven by a handful of everyday factors most people never notice. Here is what actually speeds it up, and how to slow it back down.

-
Nine practical swaps for eating more sustainably on a budget. No special ingredients, no extra cost, just smarter choices at the same grocery store.


