Skip to content

Commit e29f331

Browse files
committed
add home button
1 parent 8fd64d0 commit e29f331

4 files changed

Lines changed: 64 additions & 22 deletions

File tree

angular.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,8 @@
6969
}
7070
}
7171
}
72+
},
73+
"cli": {
74+
"analytics": false
7275
}
7376
}

package-lock.json

Lines changed: 2 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/app.component.css

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,46 @@
5252
transition: all 0.2s ease;
5353
}
5454

55+
.home-button {
56+
position: fixed;
57+
top: 1.5rem;
58+
left: 1.5rem;
59+
background-color: transparent;
60+
border: none;
61+
border-radius: 50%;
62+
width: 2.5rem;
63+
height: 2.5rem;
64+
display: flex;
65+
align-items: center;
66+
justify-content: center;
67+
cursor: pointer;
68+
transition: all 0.2s ease;
69+
padding: 0;
70+
opacity: 0.5;
71+
z-index: 1000;
72+
text-decoration: none;
73+
}
74+
75+
.home-button:hover {
76+
opacity: 1;
77+
transform: scale(1.05);
78+
}
79+
80+
.home-button:hover .icon {
81+
color: var(--accent-color-2);
82+
}
83+
84+
.home-button:active {
85+
transform: scale(0.95);
86+
}
87+
88+
.home-button .icon {
89+
width: 1.25rem;
90+
height: 1.25rem;
91+
color: var(--main-color);
92+
transition: all 0.2s ease;
93+
}
94+
5595
header {
5696
text-align: center;
5797
color: var(--main-color);

src/app/app.component.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
11
<div class="container">
2+
<a
3+
class="home-button"
4+
href="https://johmara.github.io"
5+
title="Home"
6+
aria-label="Home"
7+
>
8+
<svg
9+
class="icon home-icon"
10+
xmlns="http://www.w3.org/2000/svg"
11+
viewBox="0 0 24 24"
12+
fill="none"
13+
stroke="currentColor"
14+
stroke-width="2"
15+
stroke-linecap="round"
16+
stroke-linejoin="round">
17+
<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path>
18+
<polyline points="9,22 9,12 15,12 15,22"></polyline>
19+
</svg>
20+
</a>
221
<button
322
class="theme-toggle"
423
(click)="toggleTheme()"

0 commit comments

Comments
 (0)