diff --git a/api/static/css/report.css b/api/static/css/report.css new file mode 100644 index 0000000..957ae24 --- /dev/null +++ b/api/static/css/report.css @@ -0,0 +1,31 @@ +.main-section { + gap: 10rem; +} +.content-section { + gap: 3rem; +} +.heading-section { + display: flex; + flex-direction: column; + align-items: center; + line-height: 2.7rem; + font-family: var(--font-primary); +} +.report-form form { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 1rem; +} +.report-form form input { + width: 33vw; + height: 6vh; +} +.report-form form textarea { + border-radius: 5px; + width: 33vw; + height: 20vh; +} +::placeholder { + font-family: monospace; +} diff --git a/api/static/css/style.css b/api/static/css/style.css index fa00a12..7bc1757 100644 --- a/api/static/css/style.css +++ b/api/static/css/style.css @@ -118,6 +118,7 @@ ul { display: flex; flex-direction: column; justify-content: space-around; + align-items: center; padding: 1.87rem; border: 2px solid #d0d2d9; box-shadow: 5px 4px 20px 0px #b7b7c0; @@ -188,6 +189,7 @@ footer { } .footer-links { display: flex; + gap: 2rem; } .footer-links img { height: 2.5rem !important; @@ -248,7 +250,7 @@ footer { height: 42px; } */ /* animation */ -.slide-left { +/* .slide-left { opacity: 0; transform: translateX(-15px); transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), @@ -263,4 +265,4 @@ footer { .animate { transform: translateX(0) !important; opacity: 1 !important; -} +} */ diff --git a/api/static/img/Email.png b/api/static/img/Email.png new file mode 100644 index 0000000..6ab2aa4 Binary files /dev/null and b/api/static/img/Email.png differ diff --git a/api/static/img/Website.png b/api/static/img/Website.png new file mode 100644 index 0000000..9d145c9 Binary files /dev/null and b/api/static/img/Website.png differ diff --git a/api/static/img/github-logo.png b/api/static/img/github-logo.png new file mode 100644 index 0000000..9490ffc Binary files /dev/null and b/api/static/img/github-logo.png differ diff --git a/api/static/img/report-page-img.png b/api/static/img/report-page-img.png new file mode 100644 index 0000000..c7b86e2 Binary files /dev/null and b/api/static/img/report-page-img.png differ diff --git a/api/static/img/twitter-logo.png b/api/static/img/twitter-logo.png new file mode 100644 index 0000000..6d69991 Binary files /dev/null and b/api/static/img/twitter-logo.png differ diff --git a/api/static/js/app.js b/api/static/js/app.js new file mode 100644 index 0000000..3697add --- /dev/null +++ b/api/static/js/app.js @@ -0,0 +1,36 @@ +// function setSpeed(speed) { +// const needle = document.getElementById('needle') +// needle.style.transform = `rotate(${speed}deg)` +// } +// let transparencyScore = prompt('Enter transparency Score (0-100)') +// // adjusting according to transparency score +// if (transparencyScore >= 8) { +// setSpeed(270) +// } else if (transparencyScore <= 4) { +// setSpeed(90) +// } else { +// setSpeed(0) +// } +// animation +const img = document.querySelector('.animate-img') +const p = document.querySelector('.animate-p') +console.log(img.getBoundingClientRect().top, img.offsetHeight) +const animate = (element) => { + if ( + window.scrollY > + element.getBoundingClientRect().top + element.offsetHeight + ) { + element.classList.add('animate') + } + if ( + window.scrollY < + element.getBoundingClientRect().top + element.offsetHeight + 100 + ) { + element.classList.remove('animate') + } +} +const animateAll = () => { + animate(img) + animate(p) +} +document.addEventListener('scroll', animateAll) diff --git a/api/js/faqs.js b/api/static/js/faqs.js similarity index 64% rename from api/js/faqs.js rename to api/static/js/faqs.js index 3eb0d30..ea7525a 100644 --- a/api/js/faqs.js +++ b/api/static/js/faqs.js @@ -4,6 +4,12 @@ faqs.forEach((faq) => { const faqContent = faq.querySelector('.faq-answer') button.addEventListener('click', () => { button.classList.toggle('rotate') + if (faqContent.style.maxHeight) { + faqContent.style.maxHeight = null + } else { + faqContent.style.maxHeight = faqContent.scrollHeight + 100 + 'px' + } + faqContent.classList.toggle('show') }) }) diff --git a/api/templates/base.html b/api/templates/base.html index 904f732..ebdd2cb 100644 --- a/api/templates/base.html +++ b/api/templates/base.html @@ -6,7 +6,7 @@ - + @@ -15,10 +15,10 @@ - CogniGuard | {% block title %}{% endblock title %} - {% block head %} {% endblock head %} + CogniGuard | {% block title %}{% endblock title %} + @@ -26,7 +26,7 @@
{% block content%} @@ -96,10 +110,10 @@

CogniGuard

diff --git a/api/templates/report.html b/api/templates/report.html index 9c935d9..106e88f 100644 --- a/api/templates/report.html +++ b/api/templates/report.html @@ -7,12 +7,27 @@ {% block title %}Report Dark Pattern{% endblock title %} {% block head %} - + {% endblock head %} {% block content %} - -

Report for Dark Patterns here :

+
+
+

Welcome to CogniGuard

+

Report Center

+

Eradicate Dark Patterns

+
+
+
+ + + + + +
+
+
{% endblock content %}