Skip to content

Commit

Permalink
update webpage.
Browse files Browse the repository at this point in the history
  • Loading branch information
tamada committed Apr 15, 2020
1 parent 86f5851 commit f9b9a4a
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 8 deletions.
8 changes: 5 additions & 3 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ PWD := ${CURDIR}
DOCKER_IMAGE_NAME := "wwwrrh"
CONTAINER_REMOVE_FLAG := "--rm"
BASE_URL := "https://tamada.github.io/rrh"
JOJOMI_VERSION := 0.69.0

build:
docker run ${CONTAINER_REMOVE_FLAG} -d --name ${DOCKER_IMAGE_NAME} -p 1313:1313 -v "${PWD}":/src -v ${PWD}/public:/output -e HUGO_THEME=cayman-hugo-theme -e HUGO_BASEURL=${BASE_URL} jojomi/hugo:${JOJOMI_VERSION}

start:
docker run ${CONTAINER_REMOVE_FLAG} -d --name ${DOCKER_IMAGE_NAME} -p 1313:1313 -v "${PWD}":/src -v "$(PWD)"/public:/output -e HUGO_THEME=cayman-hugo-theme -e HUGO_WATCH="true" -e HUGO_BASEURL=${BASE_URL} jojomi/hugo:latest
docker run ${CONTAINER_REMOVE_FLAG} -d --name ${DOCKER_IMAGE_NAME} -p 1313:1313 -v "${PWD}":/src -v "$(PWD)"/public:/output -e HUGO_THEME=cayman-hugo-theme -e HUGO_WATCH="true" -e HUGO_BASEURL=${BASE_URL} jojomi/hugo:${JOJOMI_VERSION}

stop:
docker stop wwwrrh

build:
docker run ${CONTAINER_REMOVE_FLAG} -d --name ${DOCKER_IMAGE_NAME} -p 1313:1313 -v "${PWD}":/src -v ${PWD}/public:/output -e HUGO_THEME=cayman-hugo-theme -e HUGO_BASEURL=${BASE_URL} jojomi/hugo:latest
1 change: 1 addition & 0 deletions docs/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ pygmentsStyle = "pygments"
[params]
project_name = "rrh"
project_tagline = "A simple git repository manager"
project_logo = "images/logo.png"
dateFormat = "2006-01-02"

footer = "[![GitHub](https://img.shields.io/badge/GitHub-tamada/rrh-blueviolet.svg?logo=github)](https://github.com/tamada/rrh) Made with [Hugo](https://gohugo.io/). Theme by [Cayman](https://github.com/zwbetz-gh/cayman-hugo-theme). Deployed to [GitHub Pages](https://pages.github.com/)."
Expand Down
4 changes: 2 additions & 2 deletions docs/layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{ define "main" }}

<h1>{{ .Title }}</h1>
<h1>{{ .Title | emojify }}</h1>

{{ .Content }}

Expand All @@ -11,7 +11,7 @@ <h1>{{ .Title }}</h1>
{{ $dateFormat := $.Site.Params.dateFormat | default "Jan 2, 2006" }}
{{ .PublishDate.Format $dateFormat }}
<a href="{{ .Permalink }}">
{{ .Title }}
{{ .Title | emojify }}
</a>
</li>
{{ end }}
Expand Down
7 changes: 4 additions & 3 deletions docs/layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
{{ $options := (dict "targetPath" "css/cayman.css") }}
{{ $caymanCss := resources.Get $caymanScss | resources.ExecuteAsTemplate $caymanScss . | toCSS $options | fingerprint }}
<link rel="stylesheet" href="{{ $caymanCss.Permalink | relURL }}">
<link rel="stylesheet" href="{{ .Site.BaseURL | relURL }}/style.css">
<!-- Icon made by Freepik, from Flaticon, licensed by CC 3.0. -->
<!-- https://www.flaticon.com/free-icon/island_1530732 -->
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="{{ "favicon-32x32.png" | relURL }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ "favicon-16x16.png" | relURL }}">
<link rel="apple-touch-icon" sizes="180x180" href="/images/harry.png">
<link rel="icon" type="image/png" sizes="32x32" href="/images/harry.png">
<link rel="icon" type="image/png" sizes="16x16" href="/images/harry.png">
{{ partial "katex.html" . }}
<title>{{ .Title }} | {{ $.Site.Title }}</title>
</head>
21 changes: 21 additions & 0 deletions docs/layouts/partials/header-nav.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<section class="page-header">
{{ if isset .Site.Params "project_logo" }}
<img src="{{ .Site.BaseURL }}{{ .Site.Params.project_logo }}" class="avatar" alt="project_logo">
{{ end }}
<h1 class="project-name">
{{ $.Site.Params.project_name | default "project_name goes here" | markdownify }}
</h1>
<h2 class="project-tagline">
{{ $.Site.Params.project_tagline | default "project_tagline goes here" | markdownify }}
</h2>
<nav>
{{ $current := . }}
{{ range .Site.Menus.nav }}
{{ $active := or ($current.IsMenuCurrent "nav" .) ($current.HasMenuCurrent "nav" .) }}
{{ $active = or $active (eq .Name $current.Title) }}
{{ $active = or $active (and (eq .Name "Blog") (eq $current.Section "post")) }}
{{ $active = or $active (and (eq .Name "Tags") (eq $current.Section "tags")) }}
<a href="{{ .URL }}" class="btn">{{ .Name | emojify }}</a>
{{ end }}
</nav>
</section>
Binary file removed docs/static/apple-touch-icon.png
Binary file not shown.
Binary file removed docs/static/favicon-16x16.png
Binary file not shown.
Binary file removed docs/static/favicon-32x32.png
Binary file not shown.
Binary file removed docs/static/favicon-64x64.png
Binary file not shown.
Binary file removed docs/static/favicon.ico
Binary file not shown.
15 changes: 15 additions & 0 deletions docs/static/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.avatar {
display: inline-block;
vertical-align: middle;
margin-right: 15px;
height: 96px;
width: 96px;
}

.avatar_caption {
display: inline;
width: 50%;
}
.project-name {
display: inline-block;
}

0 comments on commit f9b9a4a

Please sign in to comment.