Skip to content

Commit

Permalink
feat: add username to hero
Browse files Browse the repository at this point in the history
  • Loading branch information
moromis committed Feb 14, 2024
1 parent 67820a7 commit 0e744e6
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 4 deletions.
3 changes: 2 additions & 1 deletion content/_index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Hi! My name is Kevin Ulrich
title: Hi! My name is
realName: Kevin Ulrich
subtitle: I'm a software engineer with 4 years of industry experience.
seo_title: Moromis

Expand Down
6 changes: 4 additions & 2 deletions themes/hugo-liftoff/assets/scss/abstracts/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
// This file contains all application-wide Sass variables.
// -----------------------------------------------------------------------------

:root {
--color-primary: #4285F4;
}

:root, [data-theme="default"] {
--color-primary: rgb(18, 120, 175);
--color-inline-code: hsl(0, 81%, 35%);

/* color contrasts */
Expand Down Expand Up @@ -33,7 +36,6 @@
}

[data-theme="dark"] {
--color-primary: rgb(86, 184, 237);
--color-inline-code: hsl(0, 81%, 70%);

/* color contrasts */
Expand Down
41 changes: 41 additions & 0 deletions themes/hugo-liftoff/assets/scss/pages/_home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,48 @@
.hero-title {
font-weight: 900;
margin-top: 0;
margin-bottom: 0;
@include font-size('xl');
display: inline;
}

.names {
display: inline-flex;
flex-direction: column;

& .real-name{
border-radius: 8px;
margin-top: 0;
}

& .username {
color: var(--color-primary);
width: fit-content;
margin-top: 0;
margin-bottom: 0;
}
}

@keyframes strike{
0% { width : 0; }
100% { width: 100%; }
}
.strike {
position: relative;
}
.strike::after {
content: ' ';
position: absolute;
top: calc(50% - 4px);
left: 0;
width: 100%;
height: 8px;
background-color: var(--color-primary);
animation-name: strike;
animation-duration: 2s;
animation-timing-function: linear;
animation-iteration-count: 1;
animation-fill-mode: forwards;
}

.hero-subtitle {
Expand Down
6 changes: 5 additions & 1 deletion themes/hugo-liftoff/layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
<div class="container">
<section class="section hero">
<div class="hero-info">
<h1 class="hero-title">{{ .Title }}</h1>
<h1 class="hero-title">{{ .Title }} </h1>
<div class="names">
<h1 class="username strike">{{ .Site.Title }}</h1>
<h1 class="real-name">{{ .Params.realName }}</h1>
</div>
{{ with .Params.subtitle }}
<p class="hero-subtitle">{{. | markdownify}}</p>
{{ end }}
Expand Down

0 comments on commit 0e744e6

Please sign in to comment.