refactor: simplify UI to basic design
Browse files- public/css/style.css +25 -109
- views/index.ejs +17 -15
public/css/style.css
CHANGED
|
@@ -1,126 +1,42 @@
|
|
| 1 |
-
:root {
|
| 2 |
-
--glass-bg: rgba(255, 255, 255, 0.15);
|
| 3 |
-
--glass-border: rgba(255, 255, 255, 0.2);
|
| 4 |
-
--glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
|
| 5 |
-
--text-color: #333;
|
| 6 |
-
--primary-color: #4a90e2;
|
| 7 |
-
}
|
| 8 |
-
|
| 9 |
body {
|
| 10 |
-
|
| 11 |
-
padding:
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
min-height: 100vh;
|
| 15 |
-
color: #fff;
|
| 16 |
-
display: flex;
|
| 17 |
-
justify-content: center;
|
| 18 |
-
align-items: flex-start;
|
| 19 |
-
padding-top: 50px;
|
| 20 |
-
}
|
| 21 |
-
|
| 22 |
-
.container {
|
| 23 |
-
display: flex;
|
| 24 |
-
flex-wrap: wrap;
|
| 25 |
-
gap: 30px;
|
| 26 |
-
max-width: 1200px;
|
| 27 |
-
width: 95%;
|
| 28 |
-
}
|
| 29 |
-
|
| 30 |
-
.main-content {
|
| 31 |
-
flex: 2;
|
| 32 |
-
min-width: 300px;
|
| 33 |
-
}
|
| 34 |
-
|
| 35 |
-
.sidebar {
|
| 36 |
-
flex: 1;
|
| 37 |
-
min-width: 300px;
|
| 38 |
-
}
|
| 39 |
-
|
| 40 |
-
.glass-card {
|
| 41 |
-
background: var(--glass-bg);
|
| 42 |
-
backdrop-filter: blur(10px);
|
| 43 |
-
-webkit-backdrop-filter: blur(10px);
|
| 44 |
-
border-radius: 15px;
|
| 45 |
-
border: 1px solid var(--glass-border);
|
| 46 |
-
box-shadow: var(--glass-shadow);
|
| 47 |
-
padding: 25px;
|
| 48 |
-
margin-bottom: 25px;
|
| 49 |
-
}
|
| 50 |
-
|
| 51 |
-
h2,
|
| 52 |
-
h3 {
|
| 53 |
-
margin-top: 0;
|
| 54 |
-
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
| 55 |
-
}
|
| 56 |
-
|
| 57 |
-
form label {
|
| 58 |
-
display: block;
|
| 59 |
-
margin-bottom: 8px;
|
| 60 |
-
font-weight: 500;
|
| 61 |
}
|
| 62 |
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
padding: 10px;
|
| 66 |
-
margin-bottom: 15px;
|
| 67 |
-
border-radius: 8px;
|
| 68 |
-
border: none;
|
| 69 |
-
background: rgba(255, 255, 255, 0.9);
|
| 70 |
-
box-sizing: border-box;
|
| 71 |
-
font-size: 16px;
|
| 72 |
}
|
| 73 |
|
| 74 |
-
|
| 75 |
width: 100%;
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
background: linear-gradient(to right, #feb47b, #ff7e5f);
|
| 79 |
-
border: none;
|
| 80 |
-
border-radius: 8px;
|
| 81 |
-
color: white;
|
| 82 |
-
font-size: 18px;
|
| 83 |
-
font-weight: bold;
|
| 84 |
-
cursor: pointer;
|
| 85 |
-
transition: transform 0.2s;
|
| 86 |
-
}
|
| 87 |
-
|
| 88 |
-
button:hover {
|
| 89 |
-
transform: scale(1.02);
|
| 90 |
}
|
| 91 |
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
border-radius: 10px;
|
| 95 |
-
padding: 20px;
|
| 96 |
-
border-left: 5px solid #4cd137;
|
| 97 |
}
|
| 98 |
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
margin-top: 10px;
|
| 103 |
-
color: #fff;
|
| 104 |
-
background: rgba(0, 0, 0, 0.1);
|
| 105 |
-
border-radius: 8px;
|
| 106 |
-
overflow: hidden;
|
| 107 |
}
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
text-align: left;
|
| 113 |
-
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
| 114 |
}
|
| 115 |
|
| 116 |
-
|
| 117 |
-
|
|
|
|
| 118 |
}
|
| 119 |
|
| 120 |
-
.
|
| 121 |
-
|
| 122 |
-
padding:
|
| 123 |
-
|
| 124 |
-
background:
|
| 125 |
-
font-size: 0.9em;
|
| 126 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
body {
|
| 2 |
+
font-family: sans-serif;
|
| 3 |
+
padding: 20px;
|
| 4 |
+
background-color: #fff;
|
| 5 |
+
color: #000;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
}
|
| 7 |
|
| 8 |
+
h1, h2, h3 {
|
| 9 |
+
margin-top: 20px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
}
|
| 11 |
|
| 12 |
+
table {
|
| 13 |
width: 100%;
|
| 14 |
+
border-collapse: collapse;
|
| 15 |
+
margin-bottom: 20px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
}
|
| 17 |
|
| 18 |
+
table, th, td {
|
| 19 |
+
border: 1px solid #000;
|
|
|
|
|
|
|
|
|
|
| 20 |
}
|
| 21 |
|
| 22 |
+
th, td {
|
| 23 |
+
padding: 8px;
|
| 24 |
+
text-align: left;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
}
|
| 26 |
|
| 27 |
+
input, button {
|
| 28 |
+
padding: 5px;
|
| 29 |
+
margin-bottom: 10px;
|
|
|
|
|
|
|
| 30 |
}
|
| 31 |
|
| 32 |
+
.container {
|
| 33 |
+
max-width: 800px;
|
| 34 |
+
margin: 0 auto;
|
| 35 |
}
|
| 36 |
|
| 37 |
+
.result-box {
|
| 38 |
+
border: 1px solid #000;
|
| 39 |
+
padding: 10px;
|
| 40 |
+
margin: 20px 0;
|
| 41 |
+
background-color: #f0f0f0;
|
|
|
|
| 42 |
}
|
views/index.ejs
CHANGED
|
@@ -9,8 +9,8 @@
|
|
| 9 |
<div class="container">
|
| 10 |
<!-- Main Content: Form and Result -->
|
| 11 |
<div class="main-content">
|
| 12 |
-
<div
|
| 13 |
-
<h1>
|
| 14 |
<p>
|
| 15 |
Enter marks to determine personality traits based on academic
|
| 16 |
performance.
|
|
@@ -18,23 +18,21 @@
|
|
| 18 |
</div>
|
| 19 |
|
| 20 |
<% if (result) { %>
|
| 21 |
-
<div class="
|
| 22 |
-
<h3>
|
| 23 |
<p><strong>Student Name:</strong> <%= result.name %></p>
|
| 24 |
<p><strong>Average Marks:</strong> <%= result.avg %></p>
|
| 25 |
<p>
|
| 26 |
<strong>Grade Achieved:</strong>
|
| 27 |
-
<span
|
| 28 |
</p>
|
| 29 |
<p><strong>Personality Trait:</strong> <%= result.trait %></p>
|
| 30 |
<br />
|
| 31 |
-
<a href="/"
|
| 32 |
-
>Analyze Another Student</a
|
| 33 |
-
>
|
| 34 |
</div>
|
| 35 |
<% } %>
|
| 36 |
|
| 37 |
-
<div
|
| 38 |
<h3>Enter Marks</h3>
|
| 39 |
<form action="/result" method="post">
|
| 40 |
<label for="name">Student Name</label>
|
|
@@ -44,6 +42,7 @@
|
|
| 44 |
placeholder="e.g. Inderjeet"
|
| 45 |
required
|
| 46 |
/>
|
|
|
|
| 47 |
|
| 48 |
<label for="sub1">Subject 1 Marks (0-100)</label>
|
| 49 |
<input
|
|
@@ -54,6 +53,7 @@
|
|
| 54 |
max="100"
|
| 55 |
required
|
| 56 |
/>
|
|
|
|
| 57 |
|
| 58 |
<label for="sub2">Subject 2 Marks (0-100)</label>
|
| 59 |
<input
|
|
@@ -64,6 +64,7 @@
|
|
| 64 |
max="100"
|
| 65 |
required
|
| 66 |
/>
|
|
|
|
| 67 |
|
| 68 |
<label for="sub3">Subject 3 Marks (0-100)</label>
|
| 69 |
<input
|
|
@@ -74,6 +75,7 @@
|
|
| 74 |
max="100"
|
| 75 |
required
|
| 76 |
/>
|
|
|
|
| 77 |
|
| 78 |
<button type="submit">Analyze Personality</button>
|
| 79 |
</form>
|
|
@@ -82,8 +84,8 @@
|
|
| 82 |
|
| 83 |
<!-- Sidebar: Reference Tables & History -->
|
| 84 |
<div class="sidebar">
|
| 85 |
-
<div
|
| 86 |
-
<h3>
|
| 87 |
<% if (history && history.length > 0) { %>
|
| 88 |
<table>
|
| 89 |
<thead>
|
|
@@ -110,8 +112,8 @@
|
|
| 110 |
<% } %>
|
| 111 |
</div>
|
| 112 |
|
| 113 |
-
<div
|
| 114 |
-
<h3>
|
| 115 |
<table>
|
| 116 |
<thead>
|
| 117 |
<tr>
|
|
@@ -130,8 +132,8 @@
|
|
| 130 |
</table>
|
| 131 |
</div>
|
| 132 |
|
| 133 |
-
<div
|
| 134 |
-
<h3>
|
| 135 |
<table>
|
| 136 |
<thead>
|
| 137 |
<tr>
|
|
|
|
| 9 |
<div class="container">
|
| 10 |
<!-- Main Content: Form and Result -->
|
| 11 |
<div class="main-content">
|
| 12 |
+
<div>
|
| 13 |
+
<h1>Student Personality Analysis</h1>
|
| 14 |
<p>
|
| 15 |
Enter marks to determine personality traits based on academic
|
| 16 |
performance.
|
|
|
|
| 18 |
</div>
|
| 19 |
|
| 20 |
<% if (result) { %>
|
| 21 |
+
<div class="result-box">
|
| 22 |
+
<h3>Analysis Result</h3>
|
| 23 |
<p><strong>Student Name:</strong> <%= result.name %></p>
|
| 24 |
<p><strong>Average Marks:</strong> <%= result.avg %></p>
|
| 25 |
<p>
|
| 26 |
<strong>Grade Achieved:</strong>
|
| 27 |
+
<span><%= result.grade %></span>
|
| 28 |
</p>
|
| 29 |
<p><strong>Personality Trait:</strong> <%= result.trait %></p>
|
| 30 |
<br />
|
| 31 |
+
<a href="/">Analyze Another Student</a>
|
|
|
|
|
|
|
| 32 |
</div>
|
| 33 |
<% } %>
|
| 34 |
|
| 35 |
+
<div>
|
| 36 |
<h3>Enter Marks</h3>
|
| 37 |
<form action="/result" method="post">
|
| 38 |
<label for="name">Student Name</label>
|
|
|
|
| 42 |
placeholder="e.g. Inderjeet"
|
| 43 |
required
|
| 44 |
/>
|
| 45 |
+
<br>
|
| 46 |
|
| 47 |
<label for="sub1">Subject 1 Marks (0-100)</label>
|
| 48 |
<input
|
|
|
|
| 53 |
max="100"
|
| 54 |
required
|
| 55 |
/>
|
| 56 |
+
<br>
|
| 57 |
|
| 58 |
<label for="sub2">Subject 2 Marks (0-100)</label>
|
| 59 |
<input
|
|
|
|
| 64 |
max="100"
|
| 65 |
required
|
| 66 |
/>
|
| 67 |
+
<br>
|
| 68 |
|
| 69 |
<label for="sub3">Subject 3 Marks (0-100)</label>
|
| 70 |
<input
|
|
|
|
| 75 |
max="100"
|
| 76 |
required
|
| 77 |
/>
|
| 78 |
+
<br>
|
| 79 |
|
| 80 |
<button type="submit">Analyze Personality</button>
|
| 81 |
</form>
|
|
|
|
| 84 |
|
| 85 |
<!-- Sidebar: Reference Tables & History -->
|
| 86 |
<div class="sidebar">
|
| 87 |
+
<div>
|
| 88 |
+
<h3>Recent Analysis History</h3>
|
| 89 |
<% if (history && history.length > 0) { %>
|
| 90 |
<table>
|
| 91 |
<thead>
|
|
|
|
| 112 |
<% } %>
|
| 113 |
</div>
|
| 114 |
|
| 115 |
+
<div>
|
| 116 |
+
<h3>Grade Rules</h3>
|
| 117 |
<table>
|
| 118 |
<thead>
|
| 119 |
<tr>
|
|
|
|
| 132 |
</table>
|
| 133 |
</div>
|
| 134 |
|
| 135 |
+
<div>
|
| 136 |
+
<h3>Personality Traits</h3>
|
| 137 |
<table>
|
| 138 |
<thead>
|
| 139 |
<tr>
|