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

styled the new contests page #183

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions models/contests.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "./contests.css".
Copy link
Member

Choose a reason for hiding this comment

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

You should not import any css in the models
This is just the mongodb model.

Also I think there no any contests.css so remove this from here.

var mongoose = require('mongoose');

var contests = new mongoose.Schema({
Expand Down
41 changes: 38 additions & 3 deletions views/new_contest.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,50 @@
<link href='https://fonts.googleapis.com/css?family=Sofia' rel='stylesheet'>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="/css/grid.css">
<style>
h1{
font-family: Verdana, Geneva, Tahoma, sans-serif;
color:border: 1px solid #c59f21;
padding:20px;
border-radius:5px;
background-color: burlywood;
color:darkcyan
}
input[type="text"],
input[type="date"],
input[type="time"]{
border: 1px solid orange;
padding:10px;
margin:10px;
background-color:honeydew;
width:100%;
}
button[type="submit"]{
border: none;
background-color: khaki;
padding:10px;
width:100%;
color:lightslategrey
}
button[type="submit"]:hover{
border:none;
background-color:#40e068;
padding:10px;
width:100%;
color:lightslategrey

}


</style>
Copy link
Member

Choose a reason for hiding this comment

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

The styles you added here doesn't look good or match with the Theme.
You could have tried to add colors in the whole inner box and giving a brown background at the heading makes it ugly.

image

Copy link
Member

Choose a reason for hiding this comment

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

You can try to make it center and instead of using different colors, try using the same color scheme with different contrast.

Yellow somewhere blue somewhere brown doesn't look good.
I hope you get it.

</head>

<body>
<header>
<% include partials/header %>
</header>
<!-- <div class="main"> -->

<div class="grid-content content small">
<div class="box">
<a href="/admin/add" style="font-size: 15px;">ADD PROBLEM</a> |
Expand All @@ -35,7 +70,7 @@
Duration (minutes): <span style="color:red">*</span><input type="text" name="duration"><br>
Make the contest visible to the public? (1 for yes, 0 for no) <span style="color:red">*</span><input type="text" name="visibility"><br>
Problems to be included (qID "," comma separated): <input type="text" name="problemsID"><br>
<button type="submit" class="btn btn-success btn-md">Create Contest</button>
<button type="submit" class="btn btn-success btn-md">Create Contest</button>
</form>
</div>
</div>
Expand All @@ -45,4 +80,4 @@
</footer>
</body>

</html>
</html>