Skip to content

Commit 381ddb2

Browse files
committed
added feedback
1 parent 2ad3342 commit 381ddb2

File tree

3 files changed

+108
-2
lines changed

3 files changed

+108
-2
lines changed

index.html

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@
140140
<br>
141141
<p>
142142
<div class="visitor-widget">
143-
<span>CodeIt Visitors:</span>
144-
<div style="display: flex; margin-left: 160px; margin-top: -40px;">
143+
<span>CodeIt Execution Tally:</span>
144+
<div style="display: flex; margin-left: 220px; margin-top: -40px;">
145145
<!-- Third-party visitor counter widget code -->
146146
<a href="http://www.freevisitorcounters.com"></a>
147147
<script type="text/javascript"
@@ -295,6 +295,15 @@
295295
</div>
296296
<div id="feedback" reveal></div>
297297

298+
<p class="subheading" style="text-align:center; margin-left: 50vw; transform: translate(-50%); margin-top: 100px; margin-bottom: 30px;">What Users Say About CodeIt</p>
299+
<div class="scroll-container">
300+
<div class="scroll-content" id="scroll-content">
301+
<!-- Feedback cards will be dynamically loaded here -->
302+
</div>
303+
</div>
304+
305+
306+
298307
<footer>
299308
<div class="left_last">
300309
<div class="contact"

resources/scripts/homeScript.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,41 @@ window.embeddedChatbotConfig = {
158158
};
159159

160160
document.getElementById("copyright").textContent = new Date().getFullYear();
161+
162+
163+
const scrollContent = document.getElementById("scroll-content");
164+
165+
const feedbackData = [
166+
{ name: "Yuvraj Sinha", feedback: "This website is really<br> useful for me.", rating: 5 },
167+
{ name: "Aditya", feedback: "Very good very very.", rating: 4 },
168+
{ name: "Biresh", feedback: "Starting out, it is a pretty site.", rating: 5 },
169+
{ name: "Randi Khanbasha", feedback: "Good tool.", rating: 4 },
170+
{ name: "Aditi", feedback: "Now that's innovative! CodeIt is <br>quite helpful for organising and <br>securing my code. Wonderful tool.", rating: 5 },
171+
];
172+
173+
function createFeedbackCard(user) {
174+
const card = document.createElement("div");
175+
card.className = "feedback-card";
176+
177+
card.innerHTML = `
178+
<h4>${user.name}</h4>
179+
<hr>
180+
<p>${user.feedback}</p>
181+
<div class="stars">${"★".repeat(user.rating)}${"☆".repeat(5 - user.rating)}</div>
182+
`;
183+
return card;
184+
}
185+
186+
function loadFeedback() {
187+
feedbackData.forEach((user) => {
188+
const card = createFeedbackCard(user);
189+
scrollContent.appendChild(card);
190+
});
191+
192+
feedbackData.forEach((user) => {
193+
const card = createFeedbackCard(user);
194+
scrollContent.appendChild(card.cloneNode(true));
195+
});
196+
}
197+
198+
loadFeedback();

resources/styles/home-style.css

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,3 +624,62 @@ a{
624624
margin-top: 10px;
625625
}
626626
}
627+
628+
.scroll-container {
629+
overflow: hidden;
630+
white-space: nowrap;
631+
position: relative;
632+
width: 100%;
633+
height: min-content;
634+
background-color: #ffffff00;
635+
margin-bottom: 100px;
636+
}
637+
638+
.scroll-content {
639+
display: inline-flex;
640+
animation: scroll 15s linear infinite;
641+
}
642+
643+
.feedback-card {
644+
max-width: 300px;
645+
margin: 10px;
646+
padding: 15px;
647+
border: 1px solid #cccccc76;
648+
border-radius: 8px;
649+
background: #353535a2;
650+
text-align: center;
651+
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
652+
word-break: break-all;
653+
word-wrap: break-word;
654+
}
655+
.feedback-card h4 {
656+
margin: 5px 0;
657+
color: #d6d6d6;
658+
}
659+
660+
.feedback-card p {
661+
margin: 5px 0;
662+
color: #ffffff;
663+
}
664+
665+
.feedback-card .stars {
666+
color: gold;
667+
font-size: 20px;
668+
}
669+
670+
@keyframes scroll {
671+
from {
672+
transform: translateX(0%);
673+
}
674+
to {
675+
transform: translateX(-50%);
676+
}
677+
}
678+
679+
.scroll-container:hover .scroll-content {
680+
animation-play-state: paused;
681+
}
682+
683+
hr{
684+
opacity: 0.1;
685+
}

0 commit comments

Comments
 (0)