Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update the code #234

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions views/todo.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
color: #333;
background-color: #1a1a1a;
color: white;
Comment on lines +8 to +9
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Dark theme implementation needs to be consistent across all elements.

The dark background change creates contrast issues with other elements that are still using light colors:

  • Form and list items still have white backgrounds
  • Links still use dark text color (#333)

This affects readability and user experience.

Consider updating these related styles for better dark theme compatibility:

ul li {
-    background: #fff;
+    background: #2d2d2d;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    padding: 10px;
    position: relative;
}

ul li a {
-    color: #333;
+    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

form {
-    background: #fff;
+    background: #2d2d2d;
    padding: 20px;
    margin-top: 20px;
}

Committable suggestion skipped: line range outside the PR's diff.

margin: 0;
padding: 0;
}
Expand Down Expand Up @@ -89,7 +89,7 @@
</head>

<body>
<h1>Hello Junoon Batch 8 (Jenkins), Write your plan on Learning Jenkins</h1>
<marquee><h1>Hello Burhan Testing (Jenkins), Write your plan on Learning Jenkins</h1></marquee>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

⚠️ Potential issue

Replace deprecated <marquee> with modern CSS animation.

The <marquee> element is deprecated and can cause accessibility issues. Additionally, the heading text appears to be hardcoded.

  1. Replace marquee with CSS animation:
-<marquee><h1>Hello Burhan Testing (Jenkins), Write your plan on Learning Jenkins</h1></marquee>
+<div class="scroll-container">
+    <h1 class="scroll-text">Hello <%= username %> (Jenkins), Write your plan on Learning Jenkins</h1>
+</div>

Add these CSS rules:

.scroll-container {
    overflow: hidden;
    white-space: nowrap;
}

.scroll-text {
    animation: scroll-left 20s linear infinite;
}

@keyframes scroll-left {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}
  1. Make the username dynamic by passing it through your route handler:
res.render('todo', {
    todolist: todolist,
    username: 'Burhan Testing' // Get this from user session/database
});

<ul>
<% todolist.forEach(function(todo, index) { %>
<li>
Expand Down