Skip to content

Commit

Permalink
Merge pull request #1 from lucperkins/lperkins/initial-website
Browse files Browse the repository at this point in the history
Initial site scaffolding
  • Loading branch information
lucperkins authored Apr 29, 2019
2 parents 68b6b4a + ce25672 commit de94849
Show file tree
Hide file tree
Showing 17 changed files with 152 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Hugo-generated assets
public/
resources/

# npm assets
node_modules/
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
serve:
hugo server \
--buildDrafts \
--buildFuture

preview-build:
hugo \
--baseURL $(DEPLOY_PRIME_URL) \
--minify

production-build:
hugo \
--minify
10 changes: 10 additions & 0 deletions assets/sass/helpers.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
=flex
display: flex

=column
+flex
flex-direction: column

=full-height-column
+column
min-height: 100vh
5 changes: 5 additions & 0 deletions assets/sass/page.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.page
+full-height-column

.main
flex: 1
29 changes: 29 additions & 0 deletions assets/sass/style.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{{ $fonts := site.Params.fonts }}
{{ $fontSlice := (slice) }}
{{ range $fonts }}
{{ $fontSlice = $fontSlice | append (printf "%s:%s" (replace .name " " "+") (delimit .sizes ",")) }}
{{ end }}
{{ $fontsUrl := printf "https://fonts.googleapis.com/css?family=%s" (delimit $fontSlice "|") }}
{{ $sansSerifFont := (index (where $fonts "type" "sans_serif") 0).name }}
{{ $monospaceFont := (index (where $fonts "type" "monospace") 0).name }}
{{ $fontAwesomeVersion := site.Params.font_awesome_version }}
{{ $fontAwesomeUrl := printf "https://use.fontawesome.com/releases/v%s/css/all.css" $fontAwesomeVersion }}

@charset "utf-8"
@import url({{ $fontsUrl }})
@import url({{ $fontAwesomeUrl }})

@import "variables"
@import "bulma/sass/utilities/initial-variables"
@import "bulma/sass/utilities/functions"

// Bulma variable overwrites
$primary: $opentelemetry-blue
$family-sans-serif: "{{ $sansSerifFont }}", BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif
$family-code: "{{ $monospaceFont }}", monospace

@import "bulma/sass/utilities/derived-variables"
@import "bulma/bulma"

@import "helpers"
@import "page"
1 change: 1 addition & 0 deletions assets/sass/variables.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$opentelemetry-blue: #0979b9
16 changes: 16 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
title = "OpenTelemetry"
baseURL = "https://opentelemetry.io"
disableKinds = ["taxonomy", "taxonomyTerm"]

[params]
font_awesome_version = "5.8.1"

[[params.fonts]]
name = "Roboto"
sizes = [300,400,600,700]
type = "sans_serif"

[[params.fonts]]
name = "Roboto Mono"
sizes = [400]
type = "monospace"
Empty file added content/.gitkeep
Empty file.
14 changes: 14 additions & 0 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
{{ partial "css.html" . }}
</head>
<body class="page has-navbar-fixed-top">
<main class="main">
{{ partial "navbar.html" . }}

{{ block "main" . }}
{{ end }}
</main>
</body>
</html>
3 changes: 3 additions & 0 deletions layouts/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{ define "main" }}
{{ partial "home/hero.html" . }}
{{ end }}
16 changes: 16 additions & 0 deletions layouts/partials/css.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{ $favicon := "favicon.png" | relURL }}
{{ $inServerMode := site.IsServer }}
{{ $includePaths := (slice "node_modules") }}
{{ $sass := "sass/style.sass" }}
{{ $cssOutput := "css/style.css" }}
{{ $devOpts := (dict "targetPath" $cssOutput "includePaths" $includePaths "enableSourceMap" true) }}
{{ $prodOpts := (dict "targetPath" $cssOutput "includePaths" $includePaths "outputStyle" "compressed") }}
{{ $cssOpts := cond $inServerMode $devOpts $prodOpts }}
{{ $css := resources.Get $sass | resources.ExecuteAsTemplate $sass . | toCSS $cssOpts }}
{{ if $inServerMode }}
<link rel="stylesheet" href="{{ $css.RelPermalink }}">
{{ else }}
{{ $prodCss := $css | fingerprint }}
<link rel="stylesheet" href="{{ $prodCss.RelPermalink }}" integrity="{{ $prodCss.Data.Integrity }}">
{{ end }}
<link rel="shortcut icon" type="image/png" href="{{ $favicon }}">
10 changes: 10 additions & 0 deletions layouts/partials/home/hero.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{ $title := .Title }}
<section class="hero is-primary">
<div class="hero-body">
<div class="container">
<p class="title is-size-1 is-size-2-mobile has-text-weight-light">
{{ $title }}
</p>
</div>
</div>
</section>
3 changes: 3 additions & 0 deletions layouts/partials/navbar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<nav class="navbar is-primary is-fixed-top">

</nav>
12 changes: 12 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[build]
publish = "public"
command = "make production-build"

[build.environment]
HUGO_VERSION = "0.55.3"

[context.deploy-preview]
command = "make preview-build"

[context.branch-deploy]
command = "make preview-build"
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"private": true,
"devDependencies": {
"bulma": "^0.7.4"
}
}
Binary file added static/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


bulma@^0.7.4:
version "0.7.4"
resolved "https://registry.yarnpkg.com/bulma/-/bulma-0.7.4.tgz#7e74512e9118d9799021339e67e365ee0ac4f3f9"
integrity sha512-krG2rP6eAX1WE0sf6O0SC/FUVSOBX4m1PBC2+GKLpb2pX0qanaDqcv9U2nu75egFrsHkI0zdWYuk/oGwoszVWg==

0 comments on commit de94849

Please sign in to comment.