Skip to content

Commit

Permalink
hover courses
Browse files Browse the repository at this point in the history
  • Loading branch information
danitorrel committed Jan 22, 2022
1 parent d3d5e7a commit 94c1df4
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 27 deletions.
6 changes: 3 additions & 3 deletions blackrock/src/app/pages/courses/courses.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
<h1>¡Estos son los cursos recomendados para ti!</h1>
<div class='content'>
<div class='card' *ngFor="let course of CourseLevel1">
<mat-card class="course-card">
<mat-card class="course-card" (click)="openDialog()">
<div class="maininfo">
<img mat-card-image src='{{course.image}}' alt="courseimage">
<mat-card-title>{{course.name}}</mat-card-title>
<mat-card-subtitle>{{course.topic}}</mat-card-subtitle>
</div>
<div class='hover-info'>
<div class='hover-info'>
<mat-card-content>
<p>{{course.description}}</p>
</mat-card-content>
<mat-card-actions>
<button mat-button> Comenzar </button>
<button mat-button> Compartir </button>
</mat-card-actions>
</div>
</div>
</mat-card>
</div>
</div>
Expand Down
53 changes: 30 additions & 23 deletions blackrock/src/app/pages/courses/courses.component.scss
Original file line number Diff line number Diff line change
@@ -1,40 +1,47 @@
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;700&display=swap');
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;700&display=swap");

.course-card{
font-family: "Noto Sans", sans-serif;
width: 100%;
box-shadow : 0 5px 20px rgba(0,0,0,0.5);
button{
.course-card {
font-family: "Noto Sans", sans-serif;
width: 100%;
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
button {
background-color: black;
color: white;
display: flex;
justify-content: center;
align-items: center;
font-size: 12px;
margin-left: 3px;
margin-left: 3px;
}
.mat-card-actions {
display: flex;
justify-content: space-around;
}
}
}

.content{
display:flex;
.content {
display: flex;
}
.card{
margin: 2em;
display:flex;

.card {
margin: 2em;
display: flex;
&:nth-child(n + 2) {
-webkit-filter: grayscale(100%);
filter: grayscale(100%);
}
&:hover {
-webkit-filter: grayscale(0%);
filter: grayscale(0%);
}
}
h1{
margin: 1em 0 0 1em;
font-family: "Noto Sans", sans-serif;
h1 {
margin: 1em 0 0 1em;
font-family: "Noto Sans", sans-serif;
}
footer{
margin: 0%;
width: 100%;
height: 50px;
background-color: #FECE00;
margin-top: 5.4rem;
footer {
margin: 0%;
width: 100%;
height: 50px;
background-color: #fece00;
margin-top: 5.4rem;
}
2 changes: 1 addition & 1 deletion blackrock/src/app/pages/results/results.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h3 (click)="openDialog()">Registrate para comenzar a aprender</h3>
</div>
</section>
<section class="img">
<img src="../../../assets/obi-results.png" alt="guerrero">
<img id=levelimg alt="guerrero">
</section>
</div>
<div class="white-div"></div>
16 changes: 16 additions & 0 deletions blackrock/src/app/pages/results/results.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,22 @@ level: any
ngOnInit(){
this.userName= sessionStorage.getItem('Nombre')
this.level = sessionStorage.getItem("level")
const img = document.querySelector("#levelimg") as Element;
if(this.level === "Iniciado Jedi"){
img.setAttribute("src", "../../../assets/yoda_1.jpg");
}
if(this.level === "Padawan Jedi"){
img.setAttribute("src", "../../../assets/padawan_2.png")
}
if(this.level === "Caballero Jedi"){
img.setAttribute("src", "../../../assets/obi-results.png")
}
if(this.level === "Maestro Jedi"){
img.setAttribute("src", "../../../assets/mace_windu_4.jpg")
}
if(this.level === "Maestro Yoda"){
img.setAttribute("src", "../../../assets/yoda_5.jpg")
}
}
openDialog() {
const dialogRef = this.dialog.open(RegisterComponent);
Expand Down
Binary file added blackrock/src/assets/jedibaby_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blackrock/src/assets/mace_windu_4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blackrock/src/assets/padawan_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blackrock/src/assets/yoda_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blackrock/src/assets/yoda_5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 94c1df4

Please sign in to comment.