From 54257d1a60b7a4bec231b2519636486e89ab15bc Mon Sep 17 00:00:00 2001 From: Piv <18462828+Piv200@users.noreply.github.com> Date: Tue, 1 Aug 2023 20:58:45 +0930 Subject: [PATCH] Initial commit - skeleton --- .gitignore | 2 ++ README.md | 18 ++++++++++++++ go.mod | 3 +++ index.html | 61 +++++++++++++++++++++++++++++++++++++++++++++++ main.go | 25 +++++++++++++++++++ package-lock.json | 21 ++++++++++++++++ package.json | 15 ++++++++++++ 7 files changed, 145 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 go.mod create mode 100644 index.html create mode 100644 main.go create mode 100644 package-lock.json create mode 100644 package.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..28f1ba7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules +.DS_Store \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..abec0a4 --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +# Michael Pivato + +A dead simple website showcasing my career and interests! + +## Build + +Ensure Go and npm are installed. + +First download pico css: + +`npm install` + +Then to build the webserver, run `go build .` + +## Debugging + +Easiest way to debug/visualise the content is to use the inbuilt IDE browser. VS Code/Codium can display a preview side-by-side by clicking the Open Preview to the Side button. +This will show changes live, exactly as the content will be rendered when run from another webserver (such as the Go webserver). diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..fb71807 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module website + +go 1.19 diff --git a/index.html b/index.html new file mode 100644 index 0000000..ea4bfc1 --- /dev/null +++ b/index.html @@ -0,0 +1,61 @@ + + + + Michael Pivato + + + + +
+ +
+
+
+

Michael Pivato

+

Career summary and interests

+
+
+
+

Career

+
+
+

PowerHealth Solutions

+

2019 - Current

+
+

Key Responsibilities

+
    +
  • +
+

Key Achievements

+
    +
  • +
+
+
+
+
+
+
+
+
+ diff --git a/main.go b/main.go new file mode 100644 index 0000000..75f1db3 --- /dev/null +++ b/main.go @@ -0,0 +1,25 @@ +package main + +import ( + "embed" + _ "embed" + "flag" + "fmt" + "log" + "net/http" +) + +//go:embed node_modules/@picocss/pico/css/pico.min.css index.html +var static embed.FS + +func main() { + var port int + + flag.IntVar(&port, "port", 8080, "Port to listen on") + + flag.Parse() + + http.Handle("/", http.FileServer(http.FS(static))) + log.Printf("Starting webserver on port %v", port) + http.ListenAndServe(fmt.Sprintf(":%v", port), nil) +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..504aa51 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,21 @@ +{ + "name": "personal-website", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "personal-website", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@picocss/pico": "^1.5.10" + } + }, + "node_modules/@picocss/pico": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/@picocss/pico/-/pico-1.5.10.tgz", + "integrity": "sha512-+LafMsrwPxXQMk6sI///TmSInCwwZmq+K7SikyL3N/4GhhwzyPC+TQLUEqmrLyjluR+uIpFFcqjty30Rtr6GxQ==" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..0bfa7fc --- /dev/null +++ b/package.json @@ -0,0 +1,15 @@ +{ + "name": "personal-website", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "@picocss/pico": "^1.5.10" + } +}