Skip to content

Commit 242ced3

Browse files
committed
IDE added
1 parent 7275326 commit 242ced3

20 files changed

Lines changed: 215 additions & 4 deletions

codecamp-front/src/app/app-routing.module.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { PracticeComponent } from './components/practice/practice.component';
1212
import { DiscussComponent } from './components/discuss/discuss.component';
1313
import { ContestComponent } from './components/contest/contest.component';
1414
import { AboutComponent } from './components/about/about.component';
15+
import { IdeComponent } from './components/ide/ide.component';
1516

1617

1718

@@ -23,7 +24,8 @@ const appRoutes: Routes = [
2324
{path: 'practice' , component: PracticeComponent},
2425
{path: 'contest' , component: ContestComponent},
2526
{path: 'discuss' , component: DiscussComponent},
26-
{path: 'profile' , component: ProfileComponent}
27+
{path: 'profile' , component: ProfileComponent},
28+
{path: 'ide', component: IdeComponent}
2729
]
2830

2931
@NgModule({

codecamp-front/src/app/app.module.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ import { AboutComponent } from './components/about/about.component';
1919
import { AuthService } from './services/auth.service';
2020
import { ValidateService } from './services/validate.service';
2121
import { HttpModule } from '@angular/http';
22+
import { SubmissionComponent } from './components/submission/submission.component';
23+
import { SolutionComponent } from './components/solution/solution.component';
24+
import { RanklistComponent } from './components/ranklist/ranklist.component';
25+
import { IdeComponent } from './components/ide/ide.component';
2226

2327

2428
@NgModule({
@@ -32,7 +36,11 @@ import { HttpModule } from '@angular/http';
3236
PracticeComponent,
3337
DiscussComponent,
3438
ContestComponent,
35-
AboutComponent
39+
AboutComponent,
40+
SubmissionComponent,
41+
SolutionComponent,
42+
RanklistComponent,
43+
IdeComponent
3644
],
3745
imports: [
3846
BrowserModule,
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
input[type=file] {
2+
padding:5px;
3+
border:none;
4+
-webkit-border-radius: 5px;
5+
border-radius: 5px;
6+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<div class="container">
2+
<div class="row">
3+
<div class="col-md-12">
4+
<p>Online IDE</p>
5+
<textarea name="" id="" cols="118" rows="28" ></textarea>
6+
<div class="row">
7+
<div class="col-md-8">
8+
<input type="file" class="form-control-file">
9+
</div>
10+
<div class="col-md-4">
11+
<div class="form-check">
12+
<input type="checkbox" class="form-check-input" id="exampleCheck1">
13+
<label class="form-check-label" for="exampleCheck1">Check me out</label>
14+
<button class="btn btn-dark">Compile</button>
15+
</div>
16+
</div>
17+
</div>
18+
</div>
19+
</div>
20+
</div>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { IdeComponent } from './ide.component';
4+
5+
describe('IdeComponent', () => {
6+
let component: IdeComponent;
7+
let fixture: ComponentFixture<IdeComponent>;
8+
9+
beforeEach(async(() => {
10+
TestBed.configureTestingModule({
11+
declarations: [ IdeComponent ]
12+
})
13+
.compileComponents();
14+
}));
15+
16+
beforeEach(() => {
17+
fixture = TestBed.createComponent(IdeComponent);
18+
component = fixture.componentInstance;
19+
fixture.detectChanges();
20+
});
21+
22+
it('should create', () => {
23+
expect(component).toBeTruthy();
24+
});
25+
});
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Component, OnInit } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-ide',
5+
templateUrl: './ide.component.html',
6+
styleUrls: ['./ide.component.css']
7+
})
8+
export class IdeComponent implements OnInit {
9+
10+
constructor() { }
11+
12+
ngOnInit() {
13+
}
14+
15+
}

codecamp-front/src/app/components/navbar/navbar.component.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@
3030
routerLinkActive="active"
3131
>Practice</a>
3232
</li>
33+
<li class="nav-item">
34+
<a class="nav-link"
35+
routerLink="/ide"
36+
routerLinkActive="active"
37+
>Online IDE</a>
38+
</li>
39+
3340
<li class="nav-item">
3441
<a class="nav-link"
3542
routerLink="/discuss"

codecamp-front/src/app/components/ranklist/ranklist.component.css

Whitespace-only changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<p>
2+
ranklist works!
3+
</p>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { RanklistComponent } from './ranklist.component';
4+
5+
describe('RanklistComponent', () => {
6+
let component: RanklistComponent;
7+
let fixture: ComponentFixture<RanklistComponent>;
8+
9+
beforeEach(async(() => {
10+
TestBed.configureTestingModule({
11+
declarations: [ RanklistComponent ]
12+
})
13+
.compileComponents();
14+
}));
15+
16+
beforeEach(() => {
17+
fixture = TestBed.createComponent(RanklistComponent);
18+
component = fixture.componentInstance;
19+
fixture.detectChanges();
20+
});
21+
22+
it('should create', () => {
23+
expect(component).toBeTruthy();
24+
});
25+
});

0 commit comments

Comments
 (0)