Skip to content

Commit b35c8cd

Browse files
committed
Added About-us Component modified Public-projects.
1 parent d0ac623 commit b35c8cd

15 files changed

+341
-18
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<div class="background" style="overflow: auto">
2+
<div class="bloquer"></div>
3+
<div class="content website-info d-flex justify-content-start align-content-top flex-wrap animated zoomIn">
4+
<div class="basic-bubble bubble1">
5+
<h1 class="inline">What's Team<p class="inline title-highlight">Code</p>?</h1>
6+
<br/>
7+
<p>TeamCode is an onlide coding tool centerd in provide an in-real-time comunication between a team conformed by an Owner, a Writer and Auditors.</p>
8+
<p style="transform: scale(2); margin: 1.6em auto 1.6em auto">👾</p>
9+
<p>TeamCode provides you the tools to upload your projects and share or discuss changes while you are live sharing this modifications with you teammates.</p>
10+
</div>
11+
</div>
12+
13+
<div class="content website-info d-flex justify-content-end align-content-top flex-wrap animated zoomIn">
14+
<div class="basic-bubble bubble2">
15+
<h1 class="inline">How to use it?</h1>
16+
<br/>
17+
<p>TeamCode only have one requeriment to start using it. You need to login using your GitHub account. This requeriment exists for two main reasons:</p>
18+
<br/>
19+
<ul>
20+
<li><p>Bring the maximum seccurity to our users relying in GitHub.</p></li>
21+
<li><p>Provide an integrated GitHub toolbox to interact with some advanced actions introduced in the "Advanced level tutorial".</p></li>
22+
</ul>
23+
</div>
24+
</div>
25+
26+
<div class="content website-info d-flex justify-content-start align-content-top flex-wrap animated zoomIn">
27+
<div class="basic-bubble bubble3">
28+
<h1 class="inline">Open Source!</h1>
29+
<br/>
30+
<p>TeamCode will remain as OpenSource to ensure we will reach an awesome project!</p>
31+
<img class="github-icon" src="../../assets/media/github-brands.svg" alt="github-project" style="width: 60px; height: 60px;"
32+
(click)="navigateToGithubProject()">
33+
</div>
34+
</div>
35+
</div>
36+
Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
@import "../../assets/themes/dark.scss";
2+
3+
.highlight {
4+
color: $accent-color;
5+
}
6+
7+
.main-title {
8+
color: $text-color;
9+
margin-left: 2em;
10+
margin-top: -1em;
11+
h1 {
12+
font-size: 40px;
13+
}
14+
}
15+
16+
.title-highlight {
17+
color: $accent-color;
18+
font-weight: 400;
19+
}
20+
21+
.content {
22+
width: 100%;
23+
}
24+
25+
.bloquer {
26+
min-height: 5em;
27+
}
28+
29+
.welcome-text {
30+
position: absolute;
31+
}
32+
33+
.background {
34+
background-image: url("../../assets/media/home.jpg");
35+
background-attachment: fixed;
36+
background-position: center;
37+
background-repeat: no-repeat;
38+
background-size: cover;
39+
40+
height: 100vh;
41+
min-width: 944px;
42+
43+
padding-top: 1em;
44+
}
45+
46+
.website-info {
47+
background-color: transparent;
48+
top: 30vh;
49+
user-select: none;
50+
51+
color: $text-color;
52+
text-align: center;
53+
}
54+
55+
.website-subinfo {
56+
margin-top: 2em;
57+
user-select: none;
58+
59+
color: $text-color;
60+
text-align: center;
61+
}
62+
63+
h1, .h1 {
64+
font-size: 6vh;
65+
}
66+
67+
.hidden {
68+
display: none;
69+
}
70+
71+
.basic-bubble {
72+
padding: 1.5em;
73+
border: solid $primary-color-variant 2px;
74+
border-radius: 50%;
75+
height: 30em;
76+
width: 30em;
77+
background-color: rgba($primary-color, .85);
78+
transition: .2s;
79+
text-align: center;
80+
}
81+
82+
.bubble1 {
83+
margin-left: 15vw;
84+
85+
h1 {
86+
font-size: 40px;
87+
margin-top: 1.5em;
88+
}
89+
}
90+
91+
.bubble2 {
92+
margin-top: -5em;
93+
margin-right: 15vw;
94+
95+
h1 {
96+
font-size: 40px;
97+
margin-top: 1em;
98+
margin-bottom: 0.5em;
99+
}
100+
}
101+
102+
.bubble1:hover, .bubble2:hover, .bubble3:hover {
103+
background-color: rgba($primary-color, .95);
104+
border: solid #777777 2px;
105+
transform: scale(1.05);
106+
}
107+
108+
.inline {
109+
display: inline-block;
110+
}
111+
112+
.bubble3 {
113+
height: 20em;
114+
width: 20em;
115+
margin-top: -15em;
116+
margin-left: 10vw;
117+
118+
h1 {
119+
font-size: 40px;
120+
margin-top: 1em;
121+
margin-bottom: 0.5em;
122+
}
123+
}
124+
125+
.github-icon:hover {
126+
cursor: pointer;
127+
}
128+
129+
@media (max-width: 1108px) {
130+
.bubble1 {
131+
margin-left: 10vw;
132+
}
133+
.bubble2 {
134+
margin-right: 10vw;
135+
}
136+
.bubble3 {
137+
margin-left: 5vw;
138+
}
139+
}
140+
141+
@media (max-width: 975px) {
142+
.bubble1 {
143+
margin-left: 5vw;
144+
}
145+
.bubble2 {
146+
margin-right: 5vw;
147+
}
148+
.bubble3 {
149+
margin-left: 2.5vw;
150+
}
151+
}
152+
153+
@media (max-width: 944px) {
154+
.bubble1 {
155+
margin-left: 5em;
156+
}
157+
.bubble2 {
158+
margin-right: 5em;
159+
}
160+
.bubble3 {
161+
margin-left: 2.5em;
162+
}
163+
}
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 { AboutUsComponent } from './about-us.component';
4+
5+
describe('AboutUsComponent', () => {
6+
let component: AboutUsComponent;
7+
let fixture: ComponentFixture<AboutUsComponent>;
8+
9+
beforeEach(async(() => {
10+
TestBed.configureTestingModule({
11+
declarations: [ AboutUsComponent ]
12+
})
13+
.compileComponents();
14+
}));
15+
16+
beforeEach(() => {
17+
fixture = TestBed.createComponent(AboutUsComponent);
18+
component = fixture.componentInstance;
19+
fixture.detectChanges();
20+
});
21+
22+
it('should create', () => {
23+
expect(component).toBeTruthy();
24+
});
25+
});
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { Component, OnInit } from '@angular/core';
2+
import { Router } from '@angular/router';
3+
import { routerNgProbeToken } from '@angular/router/src/router_module';
4+
5+
@Component({
6+
selector: 'app-about-us',
7+
templateUrl: './about-us.component.html',
8+
styleUrls: ['./about-us.component.scss']
9+
})
10+
export class AboutUsComponent implements OnInit {
11+
12+
constructor(
13+
public router: Router
14+
) { }
15+
16+
ngOnInit() {
17+
}
18+
19+
navigateToGithubProject() {
20+
window.open("https://github.com/Mrcel97/teamCode", "_blank");
21+
}
22+
23+
}

src/app/app-routing.module.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ import { HomepageComponent } from './homepage/homepage.component';
77
import { InterfaceComponent } from './interface/interface.component';
88
import { IdeComponent } from './ide/ide.component';
99
import { ProjectsListComponent } from './projects-list/projects-list.component';
10+
import { AboutUsComponent } from './about-us/about-us.component';
1011

1112
const routes: Routes = [
1213
{path: '', component: HomepageComponent},
13-
{path: 'collaborators', component: HomepageComponent},
14+
{path: 'about-us', component: AboutUsComponent},
1415
{path: 'public-projects', component: ProjectsListComponent},
16+
{path: 'public-projects/:project_name', component: ProjectsListComponent},
1517
{path: 'interface', component: InterfaceComponent},
1618
{path: 'workspace/:workspace_id', component: IdeComponent},
1719
];

src/app/app.module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import { firebaseConfig } from '../assets/configs/firebaseConfig';
3636
import { toasterConfig } from './../assets/configs/toasterConfig';
3737
import { IdeChatComponent } from './ide/ide-chat/ide-chat.component';
3838
import { ProjectsListComponent } from './projects-list/projects-list.component';
39+
import { AboutUsComponent } from './about-us/about-us.component';
3940

4041
@NgModule({
4142
declarations: [
@@ -57,6 +58,7 @@ import { ProjectsListComponent } from './projects-list/projects-list.component';
5758
AuthCollaboratorsModalComponent,
5859
IdeChatComponent,
5960
ProjectsListComponent,
61+
AboutUsComponent,
6062
],
6163
imports: [
6264
AngularFireModule.initializeApp(firebaseConfig),

src/app/auth/auth-workspace/auth-workspace.component.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export class AuthWorkspaceComponent implements OnInit, OnDestroy {
4444
this.hearRoute();
4545
this.hearWriteRequests();
4646
this.hearUser();
47+
this.workspaceId = this.router.url.split('/')[2];
4748
}
4849

4950
ngOnInit() {
@@ -73,8 +74,10 @@ export class AuthWorkspaceComponent implements OnInit, OnDestroy {
7374
}
7475

7576
swapWorkspacePrivacy() {
76-
if (this.workspaceId == null || this.userEmail == null) return;
77-
this.workspaceService.swapWorkspacePrivacy(this.workspaceId, this.userId);
77+
if (this.userEmail == null) return;
78+
var workspaceId = this.router.url.split('/')[2];
79+
80+
this.workspaceService.swapWorkspacePrivacy(workspaceId, this.userId);
7881
this.toasterMessages.swapWorkspacePrivacy(!this.isPrivate);
7982
}
8083

src/app/navbar/navbar.component.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
<links>
66
<ul [ngClass]="{'notVisible': isWorkspaceRoute()}" class="navbar-nav mr-auto mt-lg-0">
77
<li class="nav-item">
8-
<a [ngClass]="{'active': checkActivePath('')}" class="nav-link" (click)="navigate('')" mdbWavesEffect>About us</a>
8+
<a [ngClass]="{'active': checkActivePath('about-us')}" class="nav-link" (click)="navigate('about-us')" mdbWavesEffect>About us</a>
99
</li>
1010
<li class="divider-vertical"></li>
1111
<li class="nav-item">
12-
<a [ngClass]="{'active': checkActivePath('interface')}" class="nav-link" (click)="navigate('collaborators')" mdbWavesEffect>My interface</a>
12+
<a [ngClass]="{'active': checkActivePath('interface')}" class="nav-link" (click)="navigate('interface')" mdbWavesEffect>My interface</a>
1313
</li>
1414
<li class="divider-vertical"></li>
1515
<li class="nav-item">
@@ -25,7 +25,8 @@
2525

2626
<form class="form-inline waves-light spaced" mdbWavesEffect>
2727
<div class="md-form my-0">
28-
<input class="form-control mr-sm-2" type="text" placeholder="Search for a Project..."><i class="fas fa-search"></i>
28+
<input #input class="form-control mr-sm-2" type="text" placeholder="Search for a Project..." (keypress)="searchForProject(input.value, $event)">
29+
<i class="fas fa-search" (click)="searchForProject(input.value)"></i>
2930
</div>
3031
</form>
3132

src/app/navbar/navbar.component.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
import { Component, OnInit, Output, EventEmitter } from '@angular/core';
1+
import { Component, OnInit } from '@angular/core';
2+
import { Router } from '@angular/router';
3+
24

35
import { NavbarService } from '../services/navbar.service';
46
import { WorkspaceService } from './../services/workspace.service';
@@ -25,6 +27,7 @@ export class NavbarComponent implements OnInit {
2527
//notIdle: NotIdle;
2628

2729
constructor(
30+
private router: Router,
2831
public navbarService: NavbarService,
2932
private workspaceService: WorkspaceService
3033
) {
@@ -77,4 +80,10 @@ export class NavbarComponent implements OnInit {
7780
isWorkspaceRoute() {
7881
return this.navbarService.section == 'workspace';
7982
}
83+
84+
searchForProject(message, event?) {
85+
if ((event == null || event.keyCode == 13) && message != null) {
86+
this.workspaceService.getPublicWorkspaces(message);
87+
}
88+
}
8089
}

src/app/projects-list/projects-list.component.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,12 @@ <h6 class="inline item">Collabortors:</h6>
1717
<li *ngFor="let collaborator of workspace.collaborators">{{collaborator}}</li>
1818
</ul>
1919
</div>
20+
<div class="info-card" *ngIf="workspaces.length == 0" style="text-align: center">
21+
<h5>No public projects were found :(</h5>
22+
<div style="margin-top: 1.5em">
23+
<img src="../../assets/media/pacman.svg" alt="no-projects-found" style="height: 150px; margin-top: 1em">
24+
<img src="../../assets/media/signo-de-interrogacion.svg" alt="question-mark" style="position: absolute; height: 40px">
25+
</div>
26+
</div>
2027
</div>
2128
</div>

0 commit comments

Comments
 (0)