Skip to content

Commit

Permalink
Remove hover mode for homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
akariv committed Jul 22, 2024
1 parent 2c37c07 commit a54e893
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 24 deletions.
5 changes: 1 addition & 4 deletions projects/srm/src/app/homepage/homepage.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ <h1 class='tagline'>

<div class='homepage-groups' #homepageGroups>
@for (group of groups; track group.title) {
<div class='homepage-group' [class.hovered]='hovered === group.title'
(mouseover)='hovered = group.title' (mouseleave)='hovered = null'
(touchstart)='hovered = group.title' (touchend)='hovered = null'
>
<div class='homepage-group'>
@if (!!group.query) {
<div class='homepage-group-title'>
<h3>
Expand Down
39 changes: 20 additions & 19 deletions projects/srm/src/app/homepage/homepage.component.less
Original file line number Diff line number Diff line change
Expand Up @@ -418,30 +418,31 @@
background-size: 16px;
width: 16px;
height: 16px;
}
}
&:hover {
text-decoration: underline;
font-weight: 400;
}
}

.transition(border-color background-color);
border: 1px solid rgba(255,255,255,0);
background-color: rgba(255,255,255,0);;
&.hovered {
border: 1px solid @color-blue-6;
background: @color-blue-8;
border-radius: 8px;
h3 {
span {
color: @color-blue-1;
}
.arrow-left {
opacity: 1;
}
text-decoration: underline;
text-decoration-color: @color-blue-1;
}
.homepage-group-more {
text-decoration: underline;
}
}
// &.hovered {
// border: 1px solid @color-blue-6;
// background: @color-blue-8;
// border-radius: 8px;
// h3 {
// span {
// color: @color-blue-1;
// }
// .arrow-left {
// opacity: 1;
// }
// text-decoration: underline;
// text-decoration-color: @color-blue-1;
// }
// }

.homepage-group-items {
display: flex;
Expand Down
1 change: 0 additions & 1 deletion projects/srm/src/app/homepage/homepage.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export class HomepageComponent implements AfterViewInit{
group_link: string,
items: HomepageEntry[]
}[] = [];
hovered: string | null = null;

@ViewChild('search') search: ElementRef;
@ViewChild('homepageGroups') homepageGroups: ElementRef;
Expand Down

0 comments on commit a54e893

Please sign in to comment.