Commit 0c9724c7 authored by Ayush's avatar Ayush

UI update

parent e6e6d487
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
padding: 20px; padding: 20px;
.card { .card {
border: 2px solid var(--color); border-bottom: 1px solid var(--color);
padding: 20px; padding: 20px;
height: 70vh; height: 70vh;
background: var(--dark); background: var(--dark);
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
display: inline-block; display: inline-block;
background: transparent; background: transparent;
color: #ddf; color: #ddf;
border: 2px solid #ddf;
margin: 2px; margin: 2px;
cursor: pointer; cursor: pointer;
transition: 0.25s all; transition: 0.25s all;
......
...@@ -32,9 +32,9 @@ export class ArenaComponent implements OnInit { ...@@ -32,9 +32,9 @@ export class ArenaComponent implements OnInit {
editor.setSize('auto', '70vh'); editor.setSize('auto', '70vh');
editor.setValue(this.problem.default_code[0]); editor.setValue(this.problem.default_code[0]);
Object.assign((document.getElementsByClassName('CodeMirror')[0] as HTMLTextAreaElement).style, { Object.assign((document.getElementsByClassName('CodeMirror')[0] as HTMLTextAreaElement).style, {
border: '2px solid #ddf', borderBottom: '1px solid #ddf',
padding: '20px', padding: '20px',
fontFamily: '"Anonymous Pro", monospace', fontFamily: '"Space Mono", monospace',
}); });
let activeLang = 0; let activeLang = 0;
......
...@@ -3,20 +3,17 @@ ...@@ -3,20 +3,17 @@
<button (click)="onClick()" id="myBtn" style="margin-left: 10px;">Upload A File</button> <button (click)="onClick()" id="myBtn" style="margin-left: 10px;">Upload A File</button>
</div> </div>
<div> <div class="container">
All submitted Files are listed Below! You have {{files.length}} files stored on the server:
</div> </div>
<div *ngFor="let file of files" class="card"> <div *ngFor="let file of files" class="card">
<div class="title">{{file.filename}}</div> <span class="title">{{file.filename}}{{file.language}}</span>
<div class="lang">{{file.language}}</div>
<div class="details">{{file.text}}</div>
<button style="margin-right: 15px;">Run File</button> <button>Run File</button>
<button style="margin-left: 15px; margin-right: 15px;">Edit File</button> <button>Edit File</button>
<button style="margin-left: 15px;">Remove From Database</button> <button>Remove From Database</button>
<!-- <button [routerLink]="['/arena', problem.id]" class="attempt">Attempt</button> -->
</div> </div>
<div id="myModal" class="modal"> <div id="myModal" class="modal">
......
#tray { #tray {
text-align: center; text-align: center;
// border: 3px solid white;
width: 100%; width: 100%;
button { button {
margin-top: 10px; margin-top: 10px;
margin-bottom: 10px; margin-bottom: 10px;
...@@ -11,17 +11,21 @@ ...@@ -11,17 +11,21 @@
} }
} }
.container {
margin-bottom: 20px;
}
.card { .card {
margin: 50px 20px;
border: 2px solid var(--color);
padding: 15px; padding: 15px;
background: var(--dark); background: var(--dark);
border-bottom: 1px solid #fff;
button {
float: right;
border:none;
}
.title { .title {
position: absolute;
transform: translateY(calc(-25px - 1.2em));
background: var(--color);
color: var(--bgcolor);
padding: 10px 20px; padding: 10px 20px;
font-size: 1.1em; font-size: 1.1em;
} }
...@@ -45,8 +49,8 @@ ...@@ -45,8 +49,8 @@
width: 100%; /* Full width */ width: 100%; /* Full width */
height: 100%; /* Full height */ height: 100%; /* Full height */
overflow: auto; /* Enable scroll if needed */ overflow: auto; /* Enable scroll if needed */
background-color: rgb(0,0,0); /* Fallback color */ background-color: rgb(0, 0, 0); /* Fallback color */
background-color: rgba(0,0,0,0.5); /* Black w/ opacity */ background-color: rgba(0, 0, 0, 0.5); /* Black w/ opacity */
} }
/* Modal Content */ /* Modal Content */
......
...@@ -2,7 +2,7 @@ nav { ...@@ -2,7 +2,7 @@ nav {
display: flex; display: flex;
justify-content: center; justify-content: center;
background: var(--mix); background: var(--mix);
border-bottom: 2px solid var(--color); border-bottom: 1px solid var(--color);
user-select: none; user-select: none;
a { a {
...@@ -15,12 +15,12 @@ nav { ...@@ -15,12 +15,12 @@ nav {
transition: all 0.25s; transition: all 0.25s;
&:hover { &:hover {
background: var(--tbg); background: var(--dark);
} }
&.active { &.active {
background: var(--color); background: var(--dark);
color: var(--bgcolor); border-bottom: 1px solid var(--color);
} }
} }
} }
.card { .card {
margin: 50px 20px; margin: 20px 20px;
border: 2px solid var(--color); border-bottom: 1px solid var(--color);
padding: 15px; padding: 15px;
background: var(--dark); background: var(--dark);
.title { .title {
position: absolute; padding: 10px 10px;
transform: translateY(calc(-25px - 1.2em)); font-size: 1.2em;
background: var(--color);
color: var(--bgcolor);
padding: 10px 20px;
font-size: 1.1em;
} }
.details { .details, .attempt {
margin: 10px; margin: 10px;
} }
.attempt {
margin: 10px 20px;
}
.stats { .stats {
display: inline-block; display: inline-block;
opacity: 0.9; opacity: 0.9;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
top: calc(40vh - 100px); top: calc(40vh - 100px);
width: 30vw; width: 30vw;
left: calc(35vw - 20px); left: calc(35vw - 20px);
border: 2px solid #ddf; border-bottom: 1px solid #ddf;
padding: 20px; padding: 20px;
background: #224; background: #224;
transform: scale(0); transform: scale(0);
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
display: inline-block; display: inline-block;
background: transparent; background: transparent;
color: #ddf; color: #ddf;
border: 2px solid #ddf;
margin: 2px; margin: 2px;
cursor: pointer; cursor: pointer;
transition: 0.25s all; transition: 0.25s all;
......
...@@ -45,9 +45,9 @@ export class IdeComponent implements OnInit { ...@@ -45,9 +45,9 @@ export class IdeComponent implements OnInit {
}); });
editor.setSize('auto', '70vh'); editor.setSize('auto', '70vh');
Object.assign((document.getElementsByClassName('CodeMirror')[0] as HTMLTextAreaElement).style, { Object.assign((document.getElementsByClassName('CodeMirror')[0] as HTMLTextAreaElement).style, {
border: '2px solid #ddf', borderBottom: '1px solid #ddf',
padding: '20px', padding: '20px',
fontFamily: '"Anonymous Pro", monospace', fontFamily: '"Space Mono", monospace',
}); });
let activeLang = 0; let activeLang = 0;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
top: calc(40vh - 100px); top: calc(40vh - 100px);
width: 30vw; width: 30vw;
left: calc(35vw - 20px); left: calc(35vw - 20px);
border: 2px solid #ddf; border-bottom: 1px solid #ddf;
padding: 20px; padding: 20px;
background: #224; background: #224;
transform: scale(0); transform: scale(0);
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
font-size: 1.1em; font-size: 1.1em;
background: transparent; background: transparent;
border: none; border: none;
font-family: 'Anonymous Pro', monospace; font-family: 'Space Mono', monospace;
resize: none; resize: none;
} }
...@@ -45,3 +45,8 @@ ...@@ -45,3 +45,8 @@
display: block; display: block;
} }
} }
#title {
display: block;
margin-bottom: 10px;
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div id="save-popup" [class.open]="isActive"> <div id="save-popup" [class.open]="isActive">
<div *ngIf="!isUploading"> <div *ngIf="!isUploading">
<label for="filenameInput">Enter Filename:</label> <label for="filenameInput" id="filenameInputLabel">Enter Filename:</label><br>
<input id="filenameInput" type="text" name="filenameInput" [(ngModel)]="file.filename"> <input id="filenameInput" type="text" name="filenameInput" [(ngModel)]="file.filename">
<span>{{file.language}}</span> <span>{{file.language}}</span>
<br> <br>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
top: calc(40vh - 100px); top: calc(40vh - 100px);
width: 30vw; width: 30vw;
left: calc(35vw - 20px); left: calc(35vw - 20px);
border: 2px solid #ddf; border-bottom: 1px solid #ddf;
padding: 20px; padding: 20px;
background: #224; background: #224;
transform: scale(0); transform: scale(0);
...@@ -27,8 +27,14 @@ ...@@ -27,8 +27,14 @@
font-family: Lato, sans-serif; font-family: Lato, sans-serif;
} }
#filenameInputLabel {
display: block;
margin-bottom: 10px;
}
#save-done, #save-cancel { #save-done, #save-cancel {
float: right; float: right;
margin: 0 2px;
} }
#save-cover { #save-cover {
......
...@@ -9,9 +9,8 @@ ...@@ -9,9 +9,8 @@
<div class="inline-code">{{user.username}}</div> <div class="inline-code">{{user.username}}</div>
<div class="inline-code"><i class="lnr lnr-star"></i> {{user.rating}}</div> <div class="inline-code"><i class="lnr lnr-star"></i> {{user.rating}}</div>
<div> <div>
<a href="" id="edit">Edit Details</a> <a href="" id="edit"><button>Edit Details</button></a>
&nbsp; <a href="" id=" Logout" (click)="logout()"><button>Logout</button></a>
<a href="" id=" Logout" (click)="logout()">Logout</a>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
padding: 20px; padding: 20px;
.card { .card {
border: 2px solid var(--color); border-bottom: 1px solid var(--color);
padding: 20px; padding: 20px;
margin: 20px 0; margin: 20px 0;
background: var(--dark); background: var(--dark);
...@@ -64,6 +64,10 @@ ...@@ -64,6 +64,10 @@
} }
a {
margin: 2px;
}
@media screen and (max-width: 800px) { @media screen and (max-width: 800px) {
#canvas { #canvas {
width: 70vw !important; width: 70vw !important;
......
...@@ -52,15 +52,32 @@ button { ...@@ -52,15 +52,32 @@ button {
} }
button { button {
position: relative;
background: transparent; background: transparent;
border: 2px solid var(--color); border: none;
border-bottom: 1px solid var(--color);
padding: 5px 10px; padding: 5px 10px;
cursor: pointer; cursor: pointer;
transition: all 0.25s; transition: all 0.1s;
&::after {
z-index: -1;
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 0;
background-color: #ddf;
transition: all 0.1s;
}
&:hover { &:hover {
background: var(--color);
color: var(--bgcolor); color: var(--bgcolor);
&::after {
height: 100%;
}
} }
&.disabled { &.disabled {
...@@ -70,6 +87,11 @@ button { ...@@ -70,6 +87,11 @@ button {
&:hover { &:hover {
background: transparent; background: transparent;
color: #eef; color: #eef;
&::after {
height: 0;
opacity: 0;
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment