Skip to content

Commit

Permalink
Work.
Browse files Browse the repository at this point in the history
  • Loading branch information
PJB3005 committed Jun 25, 2017
1 parent 51dae18 commit 2d06cb6
Show file tree
Hide file tree
Showing 18 changed files with 166 additions and 25 deletions.
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
* text=auto

*.woff2 binary
*.woff binary
*.css text
*.jpg binary
*.svg text
*.md text
*.js text
*.toml text
*.py text
*.html text
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.DS_Store
.vscode
1 change: 1 addition & 0 deletions config.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
baseURL = "https://space-wizards.github.io"
languageCode = "en-us"
title = "Space Station 14"
ignoreFiles = ["\\.ts$", "tsconfig.json$"]
9 changes: 9 additions & 0 deletions content/about/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
+++
title = "About Space Station 14"
description = "Hey look an about page!"
date = "2017-06-25"
type = "about"
tags = ["about"]
+++

hrrrrm...
12 changes: 12 additions & 0 deletions content/post/2017-06/24-new-site.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
+++
title = "New site for SS14!"
description = "We made a new site for updates about SS14. It's fancy!"
tags = ["SS14", "site"]
date = "2017-06-24"
categories = [
"Site"
]
type = "post"
+++


1 change: 1 addition & 0 deletions layouts/about/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yay!
8 changes: 7 additions & 1 deletion layouts/index.html
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
F A R T
{{ partial "header.html" }}

{{ range first 10 .Data.Pages }}
{{ .Render "summary"}}
{{ end }}

{{ partial "footer.html" }}
4 changes: 4 additions & 0 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
</div>
</div>
</body>
</html>
4 changes: 4 additions & 0 deletions layouts/partials/head_includes.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<link rel="stylesheet" type="text/css" href="/css/main.css" />
<link rel="stylesheet" type="text/css" href="/fonts/animal_silence/stylesheet.css" />
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet" />
<script src="/js/main.js"></script>
34 changes: 34 additions & 0 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="X-UA-Compatible" content="IE=Edge" /> <!-- Ah the memories -->

{{ partial "meta.html" }}

<base href="{{ .Site.BaseURL }}" />
<title>{{ if .Title }}{{ .Title }} | {{ end }}Space Station 14</title>
<link rel="canonical" href="{{ .Permalink }}" />
{{ if .RSSLink }}<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Title }}" />{{ end }}

{{ partial "head_includes.html" }}
</head>
<body lang="en">
<div id="background"> </div>
<div id="centercolumn">
<nav id="header">
<div class="left">
<span id="name">
Space Station 14
</span>
<br>
<span id="subname">
<br>
</span>
</div>
<div class="right">
<a class="navlink" href="/about/">About</a>
<!--<a class="navlink" href="#">Get Involved</a>-->
</div>
</div>
<div id="main">
1 change: 1 addition & 0 deletions layouts/partials/meta.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<meta name="X-UA-Compatible" content="IE=Edge"/>
7 changes: 7 additions & 0 deletions layouts/post/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{{ partial "header.html" }}

{{ range first 10 .Data.Pages }}
{{ .Summary }}
{{ end }}

{{ partial "footer.html" }}
31 changes: 31 additions & 0 deletions publish.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env python3
# Used to push an update to the submodule.

import datetime
import os
import sys
import subprocess

def main():
print("Deploying update to the main repo.")

subprocess.run(["hugo"])
os.chdir("public")
subprocess.run(["git", "add", "-A"])

msg = ""

if len(sys.argv) == 2:
msg = sys.argv[1]

else:
date = datetime.datetime.utcnow()
msg = f"Rebuilding site {date.isoformat(timespec='seconds')}"


subprocess.run(["git", "commit", "-m", msg])
subprocess.run(["git", "push", "origin", "master"])


if __name__ == '__main__':
main()
24 changes: 0 additions & 24 deletions publish.sh

This file was deleted.

Binary file added static/favicon.ico
Binary file not shown.
11 changes: 11 additions & 0 deletions static/js/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"use strict";
function pick(array) {
return array[Math.floor(Math.random() * array.length)];
}
document.addEventListener("DOMContentLoaded", function () {
document.getElementById("subname").innerHTML = pick([
"Crashing SS13, with no survivors!",
"Get dat fukken remake!",
"Soon&trade;"
]) + "<br />";
});
18 changes: 18 additions & 0 deletions static/ts/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Update the random text below the logo.

/**
* Picks a random element from an array.
* @param array The array to pick from.
*/
function pick<T>(array: Array<T>): T {
return array[Math.floor(Math.random() * array.length)];
}

document.addEventListener("DOMContentLoaded", () => {
document.getElementById("subname").innerHTML = pick([
"Crashing SS13, with no survivors!",
"Get dat fukken remake!",
"Soon&trade;"
]) + "<br />";
});

14 changes: 14 additions & 0 deletions static/ts/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"files": [
"main.ts"
],
"compileOnSave": true,
"compilerOptions": {
"outDir": "../js",
"removeComments": true,
"alwaysStrict": true,
"charset": "utf-8",
"newLine": "LF",
"target": "es3"
}
}

0 comments on commit 2d06cb6

Please sign in to comment.