Skip to content

Commit

Permalink
chore: use upstream theme directly
Browse files Browse the repository at this point in the history
  • Loading branch information
p5 committed Dec 14, 2024
1 parent a3859a4 commit 3733312
Show file tree
Hide file tree
Showing 57 changed files with 413 additions and 3,013 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Website

This is the source code for my personal website. It is built using [Hugo](https://gohugo.io/) and a custom theme.
This is the source code for my personal website. It is built using [Hugo](https://gohugo.io/) and a slightly customized [theme](https://github.com/hugo-sid/hugo-blog-awesome).


## Development
Expand Down
6 changes: 0 additions & 6 deletions archetypes/default.md

This file was deleted.

1 change: 0 additions & 1 deletion assets/icons/site.webmanifest

This file was deleted.

267 changes: 267 additions & 0 deletions assets/sass/_layout.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,267 @@
// Author
.author {
margin-top: 6.3rem;
margin-bottom: 7.2rem;
text-align: center;

@include media-query($on-mobile) {
margin-bottom: 3em;
}

.author-avatar {
width: 70px;
height: 70px;
border-radius: 100%;
user-select: none;
-ms-user-select: none;
-webkit-user-select: none;
opacity: 1;
object-fit: cover;
}

.author-name {
font-size: 1.7em;
margin-bottom: 2px;
}

.author-bio {
margin: 0 auto;
opacity: 0.9;
max-width: 393px;
line-height: 1.688;
}
}

// Content
.posts-item-note {
padding-bottom: .3rem;
font-weight: 500;
color: $black;
}

// List of posts
.post-item {
display: flex;
padding-top: 5px;
padding-bottom: 6px;
justify-content: space-between;
flex-direction: row;
align-items: center;

&:not(:first-child) {
border-top: 1px solid $light;
}

.post-item-date {
min-width: 96px;
color: $black;

@include media-query($on-mobile) {
font-size: 16px;
}
}

.post-item-title {
margin: 0;
border: 0;
padding: 0;
font-size: $base-font-size;
font-weight: normal;
letter-spacing: 0.1px;

@include media-query($on-mobile) {
max-width: 15rem;
}

a {
color: $text-base-color;
transition: all 150ms ease-in 0s;

&:hover,
&focus {
color: $black;
}
}
}
}

// Footer
.footer {
margin-top: 8em;
margin-bottom: 2em;
text-align: center;

@include media-query($on-mobile) {
margin-top: 3em;
}

span.footer_item {
opacity: 0.8;
font-weight: $bold-weight;
font-size: $small-font-size;
}

a.footer_item {
opacity: 0.8;
text-decoration: none;

&:not(:last-child) {
margin-right: 10px;

&:hover {
opacity: 1;
}
}
}

&_copyright {
font-size: $small-font-size - 1;
display: block;
color: $gray;
opacity: 0.8;
margin-top: .7rem;
padding: .3rem .95rem;
}

&_social-icons {
a {
text-decoration: none;
margin-right: .31rem;

}

svg {
color: #888a90;
height: 24px;
width: 24px;

&:hover {
color: rgb(221, 221, 221);
}
}

}
}

.not-found {
text-align: center;
display: flex;
justify-content: center;
flex-direction: column;
height: 75vh;

.title {
font-size: 5em;
font-weight: $bold-weight;
line-height: 1.1;
color: $black;
text-shadow: 1px 0px 0px $text-link-blue;
}

.phrase {
color: $text-base-color;
}

.solution {
color: $text-link-blue;
letter-spacing: 0.5px;
}

.solution:hover {
color: $text-link-blue-active;
}
}


.search-article {
position: relative;
margin-bottom: 50px;

label[for="search-input"] {
position: relative;
top: 10px;
left: 11px;
}

input[type="search"] {
top: 0;
left: 0;
border: 0;
width: 100%;
height: 40px;
outline: none;
position: absolute;
border-radius: 5px;
padding: 10px 10px 10px 35px;
color: $text-base-color;
-webkit-appearance: none;
font-size: $base-font-size;
background-color: rgba(128, 128, 128, 0.1);
border: 1px solid rgba(128, 128, 128, 0.1);

&::-webkit-input-placeholder {
color: #808080;
}

&::-webkit-search-decoration,
&::-webkit-search-results-decoration {
display: none;
}
}
}

#search-results {
text-align: center;

li {
text-align: left;
}
}

.archive-tags {
height: auto;

.tag-item {
padding: 1px 3px;
border-radius: 2px;
border: 1px solid rgba(128, 128, 128, 0.1);
background-color: rgba(128, 128, 128, 0.1);
}
}


/* Add styles for sub, sup, kbd, mark */

sub,
sup {
font-size: 79%;
line-height: 0;
position: relative;
vertical-align: baseline;
}

sup {
top: -0.5em;
}

sub {
bottom: -0.25em;
}

kbd {
font-size: 85%;
border-radius: 3px;
color: $inline-code-text;
background: $inline-code-bg;
display: inline-block;
font-family: Consolas, monaco, monospace;
line-height: 1;
padding: 2px 4px;
white-space: nowrap;
}

mark {
background: #ff0;
color: #000;
border-radius: 3px;
}
File renamed without changes.
Empty file removed data/.gitkeep
Empty file.
5 changes: 5 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module github.com/rsturla/website

go 1.23.3

require github.com/hugo-sid/hugo-blog-awesome v1.18.0 // indirect
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github.com/hugo-sid/hugo-blog-awesome v1.18.0 h1:9+eWINeZCeQ/LL6P0cxRDAxvbfnsJlydkgCSNs+DGlY=
github.com/hugo-sid/hugo-blog-awesome v1.18.0/go.mod h1:3XVERF66wgQpTsruOajS5Swr+uvyTzov1acafNaqm1E=
45 changes: 43 additions & 2 deletions hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@ baseURL = 'https://robert.sturla.tech/'
title = 'Robert Sturla'
languageCode = 'en-gb'
defaultContentLanguage = "en-gb"
theme = "rsturla"
enableRobotsTXT = true
googleAnalytics = 'G-2TB8CV0J6V'

[module]
[[module.imports]]
path = "github.com/hugo-sid/hugo-blog-awesome"


[params.author]
name = "Robert Sturla"
avatar = "img/work-gopher.png"
description = "A Platform Engineer passionate about Cloud and Cyber Security."
description = "A Security Engineer with a passion for Cloud, DevOps, and Automation"


######################
Expand Down Expand Up @@ -56,3 +60,40 @@ url = "https://www.linkedin.com/in/robert-sturla/"
goToTop = true
mainSections = ['blog']
description = "Robert Sturla's personal website and blog"

[minify]
disableCSS = false
disableHTML = false
disableJS = false
disableJSON = false
disableSVG = false
disableXML = false
minifyOutput = false
[minify.tdewolff]
[minify.tdewolff.css]
inline = false
keepCSS2 = true
precision = 0
[minify.tdewolff.html]
keepComments = false
keepConditionalComments = false
keepDefaultAttrVals = true
keepDocumentTags = true
keepEndTags = true
keepQuotes = false
keepSpecialComments = true
keepWhitespace = false
templateDelims = ['', '']
[minify.tdewolff.js]
keepVarNames = false
precision = 0
version = 2022
[minify.tdewolff.json]
keepNumbers = false
precision = 0
[minify.tdewolff.svg]
inline = false
keepComments = false
precision = 0
[minify.tdewolff.xml]
keepWhitespace = false
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
{{ $avatar_img := .Site.Params.author.avatar }}
{{ $avatar_img_alt := .Site.Params.author.name }}
{{ $image := resources.Get $avatar_img }}

<div class="author">
{{ with $image }}
{{ if eq .MediaType.SubType "svg" }}
<svg width="25em" height="25em" xmlns="http://www.w3.org/2000/svg">
<image width="25em" height="25em" href="{{ $image.RelPermalink }}" />
</svg>
{{ else }}
{{ $image := $image.Fill "100x100 webp" }}
<img class="author-avatar" src="{{ $image.RelPermalink }}" alt="{{ $avatar_img_alt }}" width="{{ .Width }}"
height="{{ .Height }}" />
{{ end }}

{{ end }}
<h2 class="author-name">{{ .Site.Params.author.name }}</h2>
<p class="author-bio">{{ .Site.Params.author.description }}</p>
</div>
</div>
Loading

0 comments on commit 3733312

Please sign in to comment.