Skip to content

Commit

Permalink
SolidStudies - Added interface
Browse files Browse the repository at this point in the history
  • Loading branch information
hanschrome committed Mar 26, 2023
1 parent 792fe0d commit f2cf284
Show file tree
Hide file tree
Showing 10 changed files with 101 additions and 4 deletions.
Empty file.
@@ -0,0 +1 @@
<p>course-certificate works!</p>
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { CourseCertificateComponent } from './course-certificate.component';

describe('CourseCertificateComponent', () => {
let component: CourseCertificateComponent;
let fixture: ComponentFixture<CourseCertificateComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ CourseCertificateComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(CourseCertificateComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-course-certificate',
templateUrl: './course-certificate.component.html',
styleUrls: ['./course-certificate.component.css']
})
export class CourseCertificateComponent implements OnInit {

constructor() { }

ngOnInit() {
}

}
Expand Up @@ -70,7 +70,7 @@
</style>
</head>
<body onload="scrollToContent()">
<div class="container">
<div class="container" *ngIf="!loading && !course">
<div class="card z-depth-3">
<div class="card-image">
<img class="axolotl-image" src="/assets/img/cv-app/img-header-logo.png" alt="Axolotl">
Expand Down Expand Up @@ -105,6 +105,7 @@ <h5>Nota importante:</h5>
</div>
</div>
</div>
<app-loading *ngIf="loading"></app-loading>
<script>
function scrollToContent() {
const container = document.querySelector('.container');
Expand Down
@@ -0,0 +1,34 @@
#margin-content {margin-bottom: 1%;}
#number{font-size: 1.5em;}
#round-avatar{border-radius: 50%; }
#check{margin-left:50%;}
.text-nowrap{
white-space: nowrap;
}

.user-view {
text-align: center;
}

.circle {
margin: 0 auto;
position: relative;
}

@media screen and (max-width: 425px) {
.tabs .tab a {
font-size: 10px;
}
}

@media screen and (max-width: 375px) {
.tabs .tab a {
font-size: 9px;
}
}

@media screen and (max-width: 320px) {
.tabs .tab a {
font-size: 7px;
}
}
@@ -1 +1,6 @@
<p>training-header works!</p>
<div class="row">
<ul class="tabs" id="row-tab">
<li class="tab col s6"><a [ngClass]="{'active': this.index === 0}" class="active" href="/studies" routerLink="/studies"><span>1.</span>Estudiar</a></li>
<li class="tab col s6"><a [ngClass]="{'active': this.index === 1}" href="/studies/certificates" routerLink="/studies/certificates" ><span>2.</span>Certificados</a></li>
</ul>
</div>
@@ -1,4 +1,5 @@
import { Component, OnInit } from '@angular/core';
import {Router} from '@angular/router';

@Component({
selector: 'app-training-header',
Expand All @@ -7,9 +8,17 @@ import { Component, OnInit } from '@angular/core';
})
export class TrainingHeaderComponent implements OnInit {

constructor() { }
constructor(private router: Router) { }

index = 0;

url_index = {
'/studies': 0,
'/studies/certificates': 1
}

ngOnInit() {
this.index = this.url_index[this.router.url];
}

}
4 changes: 3 additions & 1 deletion src/app/app.module.ts
Expand Up @@ -26,6 +26,7 @@ import { TrainingAppComponent } from './app-components/training-app/training-app
import { CreateCourseComponent } from './app-components/training-app/create-course/create-course.component';
import { TrainingHeaderComponent } from './app-components/training-app/training-header/training-header.component';
import { CourseComponent } from './app-components/training-app/course/course.component';
import { CourseCertificateComponent } from './app-components/training-app/course-certificate/course-certificate.component';

export function HttpLoaderFactory(http: HttpClient) {
return new TranslateHttpLoader(http, 'assets/i18n/', '.json');
Expand All @@ -47,7 +48,8 @@ export function HttpLoaderFactory(http: HttpClient) {
TrainingAppComponent,
CreateCourseComponent,
TrainingHeaderComponent,
CourseComponent
CourseComponent,
CourseCertificateComponent
],
imports: [
BrowserModule,
Expand Down
5 changes: 5 additions & 0 deletions src/app/app.routes.ts
Expand Up @@ -10,6 +10,7 @@ import {CvAppExportComponent} from './app-components/cv-app/cv-app-export/cv-app
import {TrainingAppComponent} from "./app-components/training-app/training-app.component";
import {CreateCourseComponent} from './app-components/training-app/create-course/create-course.component';
import {CourseComponent} from './app-components/training-app/course/course.component';
import {CourseCertificateComponent} from './app-components/training-app/course-certificate/course-certificate.component';

const appRoutes: Routes = [
{path: '', component: HomepageComponent},
Expand Down Expand Up @@ -41,6 +42,10 @@ const appRoutes: Routes = [
{
path: 'course/:uuid',
component: CourseComponent
},
{
path: 'certificates',
component: CourseCertificateComponent
}
]
}
Expand Down

0 comments on commit f2cf284

Please sign in to comment.