Skip to content

Commit 6abbe11

Browse files
Created basic landing page
0 parents  commit 6abbe11

File tree

10 files changed

+226
-0
lines changed

10 files changed

+226
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Deploy Hugo site to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Install Hugo
22+
run: |
23+
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v0.135.0/hugo_extended_0.135.0_linux-amd64.deb
24+
sudo dpkg -i ${{ runner.temp }}/hugo.deb
25+
- uses: actions/checkout@v4
26+
with:
27+
submodules: recursive
28+
fetch-depth: 0
29+
- uses: actions/configure-pages@v5
30+
id: pages
31+
- name: Build
32+
working-directory: "./"
33+
env:
34+
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
35+
HUGO_ENVIRONMENT: production
36+
run: |
37+
hugo --gc --minify --baseURL "${{ steps.pages.outputs.base_url }}"
38+
- uses: actions/upload-pages-artifact@v3
39+
with:
40+
name: github-pages
41+
path: ./docs/public/
42+
43+
deploy:
44+
environment:
45+
name: github-pages
46+
url: ${{ steps.deployment.outputs.page_url }}
47+
runs-on: ubuntu-latest
48+
needs: build
49+
steps:
50+
- uses: actions/deploy-pages@v4
51+
id: deployment

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/public/
2+
/resources/
3+
/.hugo_build.lock

assets/logo.png

100 KB
Loading

assets/main.sass

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
@import url("https://fonts.googleapis.com/css2?family=Roboto")
2+
3+
*, *::before, *::after
4+
margin: 0
5+
padding: 0
6+
box-sizing: border-box
7+
line-height: 1.5
8+
overflow-wrap: anywhere
9+
10+
.centre
11+
text-align: center
12+
13+
.sparse > *
14+
margin-block: 1em
15+
16+
.cta
17+
display: inline-block
18+
margin: 1.5em 0.25em
19+
padding: 0.5em 1em
20+
background: #40a849
21+
color: #000000
22+
text-decoration: none
23+
border: #aaaaaa solid 1px
24+
&:hover
25+
background: #63d46c
26+
27+
body
28+
display: grid
29+
grid-template: "head" 4em "content" 1fr "footer" min-content / 100vw
30+
min-height: 100vh
31+
font-family: "Roboto", sans-serif
32+
33+
header
34+
grid-area: head
35+
position: static
36+
top: 0
37+
backdrop-filter: blur(5px)
38+
background: linear-gradient(#aaaaaaff, #ffffff00)
39+
display: flex
40+
align-items: center
41+
gap: 2em
42+
.logo
43+
height: 3em
44+
border-radius: 4em
45+
margin-left: 0.5em
46+
nav ul
47+
list-style: none
48+
display: flex
49+
gap: 1em
50+
a
51+
text-decoration: none
52+
color: #1c8009
53+
&:hover
54+
color: #36572b
55+
56+
main
57+
grid-area: content
58+
> div
59+
max-width: 100ch
60+
margin-inline: auto
61+
62+
footer
63+
grid-area: footer
64+
text-align: center
65+
font-size: 0.9em
66+
padding-block: 1em
67+
background: #b8b8b8
68+
border-top: #aaaaaa solid 2px
69+
p
70+
margin-block: 1em
71+
a
72+
text-decoration: none
73+
color: #1c8009
74+
&:hover
75+
color: #36572b

content/_index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
Title: "Home"
3+
---
4+
<div class="centre sparse">
5+
<h1>Minecraft Access</h1>
6+
<p>
7+
A mod for minecraft java (fabric/neoforge) that specifically helps visually impaired players play Minecraft.
8+
</p>
9+
<a class="cta" href="https://docs.mcaccess.org/downloads">Download</a>
10+
<a class="cta" href="https://docs.mcaccess.org/">Documentation</a>
11+
<a class="cta" href="https://discord.gg/yQjjsDqWQX">Discord</a>
12+
<a class="cta" href="https://github.com/minecraft-access/minecraft-access/">GitHub</a>
13+
</div>

hugo.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
languageCode: en
2+
title: "Minecraft Access"
3+
disableKinds:
4+
- taxonomy
5+
- term
6+
- rss
7+
8+
security:
9+
funcs:
10+
getenv:
11+
- ^GITHUB_REPOSITORY$
12+
- ^GITHUB_REF_NAME$
13+
- ^GITHUB_SHA$

layouts/_default/baseof.html

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<!DOCTYPE html>
2+
<html lang="{{- .Site.LanguageCode -}}">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>{{- block "title" . -}}{{- default .Page.Path .Page.Title }} | {{ .Site.Title -}}{{- end -}}</title>
7+
{{- with resources.Get "main.sass" | toCSS | minify | fingerprint -}}
8+
<link rel="stylesheet" href="{{- .RelPermalink -}}" integrity="{{- .Data.Integrity -}}">
9+
{{- end -}}
10+
{{- with resources.Get "logo.png" | fingerprint -}}
11+
<link rel="shortcut icon" href="{{- .RelPermalink -}}" integrity="{{- .Data.Integrity -}}">{{- /**/ -}}
12+
<meta property="og:image" content="{{- .RelPermalink -}}">
13+
{{- end -}}
14+
<meta property="theme-color" media="(prefers-color-scheme: dark)" content="#267547">{{- /**/ -}}
15+
<meta property="theme-color" media="(prefers-color-scheme: light)" content="#40a849">{{- /**/ -}}
16+
<meta property="og:image:alt"
17+
content="Minecraft Access logo. A retro games controller graphic over a blurred background of a snowy mountain village next to a spruce forrest.">
18+
{{- template "_internal/opengraph.html" . -}}
19+
{{- template "_internal/schema.html" . -}}
20+
{{- template "_internal/twitter_cards.html" . -}}
21+
</head>
22+
<body>
23+
<header>
24+
{{- with resources.Get "logo.png" -}}
25+
<img class="logo"
26+
src="{{- .RelPermalink -}}"
27+
alt="Logo: A retro games controller over a blurred snowy mountain village next to a spruce forrest.">
28+
{{- end -}}
29+
<span>{{- .Site.Title -}}</span>
30+
<nav>
31+
<ul>
32+
<li><a href="https://docs.mcaccess.org/downloads">Download</a></li>
33+
<li><a href="https://docs.mcaccess.org/">Docs</a></li>
34+
</ul>
35+
</nav>
36+
</header>
37+
<main>
38+
<div>
39+
{{- block "main" . -}}{{- end -}}
40+
</div>
41+
</main>
42+
<footer>
43+
{{- with getenv "GITHUB_REPOSITORY" -}}
44+
<p>
45+
<a href="https://github.com/{{- . -}}">{{- . -}}</a>
46+
{{- with getenv "GITHUB_SHA" }}
47+
@ <a href="https://github.com/{{- getenv "GITHUB_REPOSITORY" -}}/commit/{{- . -}}">
48+
<abbr title="{{- . -}}">{{- . | truncate 9 "" -}}</abbr>
49+
</a>
50+
{{- end -}}
51+
</p>
52+
{{- end -}}
53+
<p>
54+
NOT AN OFFICIAL MINECRAFT PRODUCT. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.
55+
</p>
56+
</footer>
57+
</body>
58+
</html>

layouts/_default/list.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{{- define "main" -}}
2+
{{- .Content -}}
3+
{{- end -}}

layouts/_default/single.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{{- define "main" -}}
2+
{{- .Content -}}
3+
{{- end -}}

shell.nix

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{ pkgs ? import <nixpkgs> {} }:
2+
3+
pkgs.mkShell {
4+
nativeBuildInputs = with pkgs.buildPackages; [
5+
hugo
6+
];
7+
}

0 commit comments

Comments
 (0)