Skip to content

Commit

Permalink
Merge pull request #58 from rohan-b-84/main
Browse files Browse the repository at this point in the history
feat: Add vercel.json and ui changes
  • Loading branch information
harshkhandeparkar authored May 16, 2024
2 parents 0175c14 + 1a7e3dc commit 12265c4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 37 deletions.
16 changes: 4 additions & 12 deletions frontend/src/pages/UploadPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { validate } from "../utils/validateInput";
const UploadPage: Component = () => {
const [qPapers, setQPapers] = createSignal<IQuestionPaperFile[]>([]);
const [isDragging, setIsDragging] = createSignal(false);
const [isVisible, setIsVisible] = createSignal(true);
const [selectedQPaper, setSelectedQPaper] =
createSignal<IQuestionPaperFile | null>(null);
const [awaitingResponse, setAwaitingResponse] =
Expand Down Expand Up @@ -174,30 +173,23 @@ const UploadPage: Component = () => {
<div class="upload-wrapper">
<div class="upload-instructions">
<h2
class={`accordion-heading ${
isVisible() ? "accordion-open" : ""
}`}
class={`instruction-heading}`}

>
Upload Instructions
</h2>
<div
class={`accordion-content ${
isVisible() ? "accordion-visible" : ""
}`}
class={`instructions`}
>
<div class="instruction-section">
<h3>File Format</h3>
<p>Only PDF files are accepted.</p>
</div>
<div class="instruction-section">
<h3>File Naming (optional)</h3>
<p>Use this format:</p>
<p class="file-format-example">course_code.pdf</p>
<p>Use this format: <span class="file-format-example">course_code.pdf</span></p>
<p>
<strong>Example:</strong>
<br />
<em>CS10001.pdf</em>
<strong>Example: </strong> <em>CS10001.pdf</em>
</p>
</div>
<div class="instruction-section">
Expand Down
30 changes: 5 additions & 25 deletions frontend/src/styles/upload_page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@
padding-bottom: 5rem;
}

.accordion-heading {
text-align: center;
.instruction-heading {
text-align: left;
margin-top: 0;
margin-bottom: 1rem;
font-size: 1.5rem;
display: flex;
justify-content: center;
gap: 1rem;
align-items: center;


.accordion-icon {
display: none;
transition: all 0.4s ease;
Expand Down Expand Up @@ -42,10 +38,11 @@
.instruction-section {
margin-bottom: 1rem;
h3 {
margin-bottom: 0.25rem;
margin-bottom: 0.5rem;
}
p {
margin: 0;
margin-bottom: 0.25rem;
}
.file-format-example {
background-color: $accent-color;
Expand Down Expand Up @@ -211,7 +208,6 @@
}

@media screen and (max-width: 1000px) {
padding: 0 1rem;
flex-direction: column;
align-items: center;
justify-content: start;
Expand All @@ -222,22 +218,6 @@
.upload-section .upload-area {
padding: 2rem;
}

.accordion-heading {
.accordion-icon {
display: block;
}
}

.accordion-content {
max-height: 0;
overflow: hidden;
transition: all 0.4s ease-in-out;
&.accordion-visible {
transition: all 0.4s ease-in-out;
max-height: 500px;
}
}
}
}

Expand Down
9 changes: 9 additions & 0 deletions frontend/vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"routes": [
{
"src": "/[^.]+",
"dest": "/",
"status": 200
}
]
}

0 comments on commit 12265c4

Please sign in to comment.