Skip to content

Commit

Permalink
Merge pull request #64 from dothidden/63-feat-add-logo-to-site
Browse files Browse the repository at this point in the history
feat: add logo and favicon
  • Loading branch information
Mathis-Dory authored Oct 22, 2023
2 parents 8219c64 + 40f17dc commit b6b6d7e
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 2 deletions.
4 changes: 4 additions & 0 deletions assets/css/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,7 @@ a:hover {
background: royalblue;
color: whitesmoke;
}

.background-logo:before {
opacity: 0.20;
}
23 changes: 23 additions & 0 deletions assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/* other vars */
--borderradius: 1px;
--taglineheight: 2.1em;
--logo-size: 75vh;
}
html {
color: #232333;
Expand Down Expand Up @@ -404,3 +405,25 @@ table td{
text-align: center;
margin: 4rem 4rem;
}

.background-logo:before {
content: "";
position: fixed;
height: var(--logo-size);
width: var(--logo-size);
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
-webkit-transform: translate(-50%, -50%);
background-image: url('/images/logo-4000x4000.png');
background-repeat: no-repeat;
background-size: contain;
opacity: 0.15;
z-index: -10;
}

@media screen and (min-height: 100vw) {
.background-logo:before {
--logo-size: 75vw;
}
}
2 changes: 1 addition & 1 deletion layouts/_default/baseof.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
{{- partial "header.html" . -}}
<body>
<body class="background-logo">
<div class="content">
{{- partial "head.html" . -}}
{{- block "main" . }}{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
{{ partial "header.html" . }}
<body>
<body class="background-logo">
<div class="content">
{{ partial "head.html" . }}

Expand Down
4 changes: 4 additions & 0 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
{{- $title := ( .Title ) -}}
{{- $siteTitle := ( .Site.Title ) -}}

<link rel="shortcut icon" type="image/png" href="/images/logo-192x192.png">
<link rel="shortcut icon" sizes="192x192" href="/images/logo-192x192.png">
<link rel="apple-touch-icon" href="/images/logo-192x192.png">

{{- if .IsHome -}}
<title>{{ $siteTitle }} | Home</title>
{{- else if eq .Kind "section" -}}
Expand Down
Binary file added static/images/logo-192x192.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 static/images/logo-4000x4000.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 static/images/logo-512x512.png
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 b6b6d7e

Please sign in to comment.