initial site commit
This commit is contained in:
commit
f797271fa5
20 changed files with 314 additions and 0 deletions
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
.hugo_build.lock
|
||||
/public/
|
||||
/resources/
|
||||
6
archetypes/default.md
Normal file
6
archetypes/default.md
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
title: "{{ replace .Name "-" " " | title }}"
|
||||
date: {{ .Date }}
|
||||
tags: draft
|
||||
---
|
||||
|
||||
4
config.yml
Normal file
4
config.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
baseURL: https://warwick-new.co.uk
|
||||
languageCode: en-us
|
||||
title: Warwick's Portfolio Site
|
||||
theme: warwick_portfolio
|
||||
9
content/greeter.md
Normal file
9
content/greeter.md
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
title: "Greeter"
|
||||
date: 2023-10-15T21:48:35+01:00
|
||||
---
|
||||
### Hi, I'm Warwick. And I:
|
||||
- Make Games
|
||||
- Make Websites
|
||||
- Research Papers
|
||||
- Teach Computing at Falmouth University
|
||||
7
content/posts/hello-world.md
Normal file
7
content/posts/hello-world.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: "Hello World!"
|
||||
date: 2023-10-15 20:25:14.038 +0100
|
||||
---
|
||||
|
||||
# Hello World!
|
||||
Eyy *Finger Guns*
|
||||
20
themes/warwick_portfolio/LICENSE
Normal file
20
themes/warwick_portfolio/LICENSE
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2023 YOUR_NAME_HERE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
2
themes/warwick_portfolio/archetypes/default.md
Normal file
2
themes/warwick_portfolio/archetypes/default.md
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
+++
|
||||
+++
|
||||
21
themes/warwick_portfolio/assets/css/greeter.css
Normal file
21
themes/warwick_portfolio/assets/css/greeter.css
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
@keyframes slideInLeft {
|
||||
0% {
|
||||
transform: translateX(-100%);
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
transform: translateX(0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
#greeter {
|
||||
margin: 5% 10% 5% 50%;
|
||||
animation: 1s ease-out 0s 1 slideInLeft;
|
||||
background: var(--paper);
|
||||
padding: 40px;
|
||||
}
|
||||
|
||||
#greeter li {
|
||||
font-size: 133%;
|
||||
}
|
||||
76
themes/warwick_portfolio/assets/css/main.css
Normal file
76
themes/warwick_portfolio/assets/css/main.css
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
/* Font stuff */
|
||||
@import url('https://fonts.googleapis.com/css?family=Abel:700|Abel:400');
|
||||
body {
|
||||
font-family: 'Abel';
|
||||
font-weight: 400;
|
||||
}
|
||||
h1, h2, h3, h4, h5 {
|
||||
font-family: 'Abel';
|
||||
font-weight: 700;
|
||||
}
|
||||
html {font-size: 100%;} /* 16px */
|
||||
h1 {font-size: 4.210rem; /* 67.36px */}
|
||||
h2 {font-size: 3.158rem; /* 50.56px */}
|
||||
h3 {font-size: 2.369rem; /* 37.92px */}
|
||||
h4 {font-size: 1.777rem; /* 28.48px */}
|
||||
h5 {font-size: 1.333rem; /* 21.28px */}
|
||||
small {font-size: 0.750rem; /* 12px */}
|
||||
|
||||
/* Colour Scheme stuff
|
||||
:root[data-theme="light"] {
|
||||
--text: #070808;
|
||||
--background: #f7f8f8;
|
||||
--primary: #aeb4bc;
|
||||
--secondary: #dcd5d5;
|
||||
--accent: #7d7468;
|
||||
}
|
||||
:root[data-theme="dark"] {
|
||||
--text: #f7f8f8;
|
||||
--background: #070808;
|
||||
--primary: #434951;
|
||||
--secondary: #2a2323;
|
||||
--accent: #978e82;
|
||||
}*/
|
||||
:root {
|
||||
/*color-scheme: light dark;*/
|
||||
--text: #f7f8f8;
|
||||
--background: #070808;
|
||||
--primary: #434951;
|
||||
--secondary: #2a2323;
|
||||
--accent: #978e82;
|
||||
--paper: #181b1b;
|
||||
}
|
||||
|
||||
/* Custom CSS */
|
||||
body {
|
||||
color-scheme: dark;
|
||||
background-color: var(--background);
|
||||
accent-color: var(--accent);
|
||||
caret-color: var(--text);
|
||||
color: var(--text);
|
||||
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
a:link, a:active{
|
||||
color: var(--primary);
|
||||
}
|
||||
a:hover {
|
||||
color: var(--secondary);
|
||||
}
|
||||
a:visited {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.homepage-header {
|
||||
background-color: var(--paper);
|
||||
padding: 2rem;
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 1000px;
|
||||
padding: 10px;
|
||||
background-color: var(--paper);
|
||||
margin: 0 auto;
|
||||
}
|
||||
86
themes/warwick_portfolio/assets/js/background.js
Executable file
86
themes/warwick_portfolio/assets/js/background.js
Executable file
|
|
@ -0,0 +1,86 @@
|
|||
// create background element
|
||||
let canvas = document.createElement("canvas");
|
||||
document.body.appendChild(canvas);
|
||||
canvas.style.cssText = `
|
||||
background: var(--background);
|
||||
position:fixed;
|
||||
left:0;
|
||||
top:0;
|
||||
z-index:-99999;
|
||||
`
|
||||
// set it's size
|
||||
canvas.width = window.innerWidth;
|
||||
canvas.height = window.innerHeight;
|
||||
|
||||
let context = canvas.getContext('2d');
|
||||
|
||||
// this will be populated and used later
|
||||
drawableObjectList = [];
|
||||
|
||||
// this is the object that'll look cool
|
||||
class Point {
|
||||
constructor() {
|
||||
this.x = Math.random() * window.innerWidth;
|
||||
this.y = Math.random() * window.innerHeight;
|
||||
|
||||
this.dx = (Math.random()) - 0.5;
|
||||
this.dy = (Math.random()) - 0.5;
|
||||
}
|
||||
draw() {
|
||||
context.fillStyle = "#2a2323"
|
||||
context.strokeStyle = "#2a2323"
|
||||
// find and draw links
|
||||
drawableObjectList.forEach((point) => {
|
||||
if (point.x > this.x - 100 && point.x < this.x + 100 &&
|
||||
point.y > this.y - 100 && point.y < this.y + 100) {
|
||||
context.beginPath()
|
||||
context.moveTo(this.x, this.y)
|
||||
context.lineTo(point.x, point.y)
|
||||
context.stroke();
|
||||
}
|
||||
});
|
||||
|
||||
// draw point
|
||||
context.beginPath();
|
||||
context.arc(this.x, this.y, 3, 0, Math.PI * 2, false);
|
||||
context.fill();
|
||||
context.stroke();
|
||||
|
||||
// move point
|
||||
this.x += this.dx;
|
||||
this.y += this.dy;
|
||||
|
||||
// keep point in bounds
|
||||
if (this.x > window.innerWidth || this.x < 0) {
|
||||
this.dx *= -1
|
||||
}
|
||||
if (this.y > window.innerHeight || this.y < 0) {
|
||||
this.dy *= -1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// populate element array
|
||||
for (let i = 0; i < 100; i++) {
|
||||
drawableObjectList.push(new Point());
|
||||
}
|
||||
|
||||
function loop() {
|
||||
// Loop and clear frame
|
||||
requestAnimationFrame(loop);
|
||||
context.clearRect(0, 0, window.innerWidth, window.innerHeight);
|
||||
|
||||
// Draw objects.
|
||||
drawableObjectList.forEach((point) => {
|
||||
point.draw();
|
||||
});
|
||||
|
||||
// Handle page size change
|
||||
if (canvas.width != window.innerWidth) {
|
||||
canvas.width = window.innerWidth;
|
||||
}
|
||||
if (canvas.height != window.innerHeight) {
|
||||
canvas.height = window.innerHeight;
|
||||
}
|
||||
}
|
||||
loop();
|
||||
0
themes/warwick_portfolio/layouts/404.html
Normal file
0
themes/warwick_portfolio/layouts/404.html
Normal file
11
themes/warwick_portfolio/layouts/_default/baseof.html
Normal file
11
themes/warwick_portfolio/layouts/_default/baseof.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
{{- partial "head.html" . -}}
|
||||
<body>
|
||||
{{- partial "header.html" . -}}
|
||||
<div id="content">
|
||||
{{- block "main" . }}{{- end }}
|
||||
</div>
|
||||
{{- partial "footer.html" . -}}
|
||||
</body>
|
||||
</html>
|
||||
0
themes/warwick_portfolio/layouts/_default/list.html
Normal file
0
themes/warwick_portfolio/layouts/_default/list.html
Normal file
13
themes/warwick_portfolio/layouts/_default/single.html
Normal file
13
themes/warwick_portfolio/layouts/_default/single.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{{define "main"}}
|
||||
<div class="container">
|
||||
<section id="single-article">
|
||||
<article id="article-content">
|
||||
<h1> {{.Title}} </h1>
|
||||
<time datetime="{{.Params.date.Format "2006-01-02T15:04:05"}}" class="index-article__date">{{.Params.date.Format "2 January 2006"}}</span>
|
||||
|
||||
<hr>
|
||||
{{ .Content }}
|
||||
</article>
|
||||
</section>
|
||||
</div>
|
||||
{{end}}
|
||||
22
themes/warwick_portfolio/layouts/index.html
Normal file
22
themes/warwick_portfolio/layouts/index.html
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{{ define "main" }}
|
||||
{{ partial "greeter.html" .}}
|
||||
<header class="homepage-header">
|
||||
<div class="container">
|
||||
<h1>{{.Title}}</h1>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<div class="container">
|
||||
{{ range where .Site.RegularPages "Type" "posts" }}
|
||||
<div class="index-article">
|
||||
<a class="index-article__link" href="{{ .Permalink }}"><h4>{{ .Title }}</h4></a>
|
||||
<p>{{.Summary}}</p>
|
||||
<span class="index-article__date">{{.Params.date.Format "2 January 2006"}}</span>
|
||||
<hr>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
{{ end }}
|
||||
0
themes/warwick_portfolio/layouts/partials/footer.html
Normal file
0
themes/warwick_portfolio/layouts/partials/footer.html
Normal file
7
themes/warwick_portfolio/layouts/partials/greeter.html
Normal file
7
themes/warwick_portfolio/layouts/partials/greeter.html
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{{ with .Site.GetPage "/greeter" }}
|
||||
{{$greeter_style := resources.Get "css/greeter.css"}}
|
||||
<link rel="stylesheet" type="" href="{{$greeter_style.RelPermalink}}">
|
||||
<div id="greeter">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ end }}
|
||||
6
themes/warwick_portfolio/layouts/partials/head.html
Normal file
6
themes/warwick_portfolio/layouts/partials/head.html
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<head>
|
||||
{{$styles := resources.Get "css/main.css"}}
|
||||
<link rel="stylesheet" type="" href="{{$styles.RelPermalink}}">
|
||||
{{$background := resources.Get "js/background.js"}}
|
||||
<script type="text/javascript" src="{{$background.RelPermalink}}" defer></script>
|
||||
</head>
|
||||
0
themes/warwick_portfolio/layouts/partials/header.html
Normal file
0
themes/warwick_portfolio/layouts/partials/header.html
Normal file
21
themes/warwick_portfolio/theme.toml
Normal file
21
themes/warwick_portfolio/theme.toml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# theme.toml template for a Hugo theme
|
||||
# See https://github.com/gohugoio/hugoThemes#themetoml for an example
|
||||
|
||||
name = "Warwick_portfolio"
|
||||
license = "MIT"
|
||||
licenselink = "https://github.com/yourname/yourtheme/blob/master/LICENSE"
|
||||
description = ""
|
||||
homepage = "http://example.com/"
|
||||
tags = []
|
||||
features = []
|
||||
min_version = "0.41.0"
|
||||
|
||||
[author]
|
||||
name = ""
|
||||
homepage = ""
|
||||
|
||||
# If porting an existing theme
|
||||
[original]
|
||||
name = ""
|
||||
homepage = ""
|
||||
repo = ""
|
||||
Loading…
Reference in a new issue