Skip to content

Commit

Permalink
feat: initial site with landing and about page (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe authored Jan 25, 2024
1 parent f767294 commit fb7319c
Show file tree
Hide file tree
Showing 14 changed files with 363 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/hugo-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "hugo: deploy to gh-pages"

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.121.2'

- name: build
run: hugo --minify

- name: deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
# cname: www.exampe.com
25 changes: 25 additions & 0 deletions .github/workflows/hugo-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "hugo: deploy to gh-pages"

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.121.2'

- name: build
run: hugo --minify
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
*~
.*.sw?
TODO

.hugo_build.lock
54 changes: 54 additions & 0 deletions config/_default/hugo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
baseURL = "https://varfish-org.github.io/"
title = "VarFish - Variant Analysis"
author = "VarFish Team"
copyright = "VarFish Team"
paginate = 10
languageCode = "en-us"
enableGitInfo = true
theme = "tailwind"

[menu]

[[menu.main]]
identifier = "index"
name = "Home"
pageRef = "/"
weight = 100

# [[menu.main]]
# identifier = "post"
# name = "Post"
# pageRef = "/posts"
# weight = 0

[[menu.main]]
identifier = "about"
name = "About"
pageRef = "/about"
weight = 200


# [taxonomies]
# category = "categories"
# tag = "tags"
# series = "series"


[markup]
[markup.goldmark]
[markup.goldmark.extensions]
definitionList = true
footnote = true
linkify = true
strikethrough = true
table = true
taskList = true
typographer = true
[markup.goldmark.parser]
attribute = true
autoHeadingID = true
autoHeadingIDType = "github"
[markup.goldmark.renderer]
hardWraps = false
unsafe = true
xhtml = false
16 changes: 16 additions & 0 deletions config/_default/params.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
time_format_default = "Jan 2, 2006"

# SEO keywords and description for site
keywords = "varfish, genetics, vcf"
subtitle = "VarFish Homepage"

# dir name of your blog content (default is `content/posts`).
# the list of set content will show up on your index page (baseurl).
contentTypeName = "post"

[header]
logo = "logo.svg"

[footer]
since = 2024
poweredby = false
8 changes: 8 additions & 0 deletions content/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
+++
title = "VarFish Homepage"
author = "VarFish Authors"
+++

```
Actual content is in layouts/index.html.html
```
14 changes: 14 additions & 0 deletions content/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
+++
title = "About"
author = "Hugo Authors"
toc = false
showReadingTime = false
+++

## Contact

Manuel Holtgrewe\
Berlin Institute of Health @Charité\
Core Unit Bioinformatics\
Luisenstraße 65\
10117 Berlin
5 changes: 5 additions & 0 deletions content/home.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
+++
author = "Hugo Authors"
+++

home.md
34 changes: 34 additions & 0 deletions layouts/index.html.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="{{ or site.Language.LanguageCode site.Language.Lang }}" dir="{{ or site.Language.LanguageDirection `ltr` }}">
<head>
{{ block "title" . }}
{{- $title := "" -}}
{{- $siteTitle := $.Site.Title -}}
{{- $subtitle := $.Site.Params.Subtitle -}}
{{- $mainTitle := $siteTitle -}}
{{- if $subtitle -}}
{{- $mainTitle = printf "%s - %s" $siteTitle $subtitle -}}
{{- end -}}

{{- if .IsHome -}}
{{- $title = $mainTitle -}}
{{- else -}}
{{- $title = printf "%s :: %s" .Title $mainTitle -}}
{{- end -}}
<title>{{- $title -}}</title>
{{ end }}
{{ partial "head.html" . }}
</head>
<body class="w-full bg-slate-50 dark:bg-gray-800">
<header class="flex flex-none justify-center z-10 {{- if $.Site.Params.header.sticky }} bg-slate-50 dark:bg-gray-800 sticky top-0{{ end -}}">
{{ partial "header_index.html" . }}
</header>
<main class="flex flex-auto justify-center">
{{ partial "index_content.html" }}
</main>
<footer class="flex flex-none justify-center">
{{ partial "footer.html" . }}
</footer>
{{ partial "extended_footer.html" . }}
</body>
</html>
48 changes: 48 additions & 0 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<div class="flex flex-row gap justify-between w-full max-w-4xl lg:max-w-5xl h-12 mt-3">
<div class="flex-none ml-2 md:ml-0">
<a href="{{ relLangURL "" }}" class="">
<img class="h-12 w-12 rounded-full object-cover bg-gray-100" src="{{ .Site.Params.header.logo | relURL }}" alt="logo">
</a>
</div>
<div class="flex-1"></div>
<div class="flex-none">
{{ partial "menu.html" . }}
</div>
{{ if (gt .Site.Home.AllTranslations.Len 1) }}
<div class="flex-none">
<div class="h-full static">
<button id="navbar-lang-toggle" type="button" class="inline-flex items-center p-2 text-sm text-slate-800 dark:text-slate-200 rounded-lg" aria-controls="navbar-menu" aria-expanded="false">
<span class="sr-only">{{ T "open_lang_switcher" }}</span>
<i class="w-8 h-8">
{{ partial "icon.html" "language" }}
</i>
</button>
<div class="absolute hidden top-16 z-50" id="navbar-lang">
<ul class="flex flex-col rounded-sm px-3 text-base font-medium text-slate-800 dark:text-slate-200 shadow-lg bg-white dark:bg-gray-600 shadow-slate-800/5 dark:shadow-slate-200/5 ring-1 ring-slate-900/5 dark:ring-slate-100/5">
{{ range .Site.Home.AllTranslations.ByWeight }}
<li class="">
<a class="block px-3 py-3 hover:text-emerald-600"
href="{{ .RelPermalink }}" title="{{ .Language.LanguageName }}">{{ .Language.LanguageName }}</a>
</li>
{{ end }}
</ul>
</div>
</div>
</div>
{{ else }}
<div class="flex-none mx-1"></div>
{{ end }}
<!-- <div class="darkmode-toggle flex flex-none mr-2 md:mr-0">
<label for="darkmode-toggle" class="flex items-center px-3 cursor-pointer rounded-full bg-gray-100 dark:bg-gray-600" title="{{ T "header.darkmode_toggle" }}">
<input name="darkmode-toggle" id="darkmode-toggle" type="checkbox" class="sr-only peer" aria-label="{{ T "header.darkmode_toggle" }}">
<div class="group flex flex-row gap-1 justify-center h-8 px-1 rounded-full bg-white dark:bg-gray-700">
<i class="h-6 w-6 flex-none rounded-full bg-yellow-400 place-self-center peer-checked:group-[]:invisible">
{{ partial "icon.html" "brightness-down" }}
</i>
<i class="h-6 w-6 flex-none rounded-full place-self-center invisible peer-checked:group-[]:visible">
{{ partial "icon.html" "moon-stars" }}
</i>
</div>
</label>
</div> -->
</div>
48 changes: 48 additions & 0 deletions layouts/partials/header_index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<div class="flex flex-row gap justify-between w-full max-w-4xl lg:max-w-5xl h-12 mt-3">
<!-- <div class="flex-none ml-2 md:ml-0">
<a href="{{ relLangURL "" }}" class="">
<img class="h-12 w-12 rounded-full object-cover bg-gray-100" src="{{ .Site.Params.header.logo | relURL }}" alt="logo">
</a>
</div> -->
<div class="flex-1"></div>
<div class="flex-none">
{{ partial "menu.html" . }}
</div>
{{ if (gt .Site.Home.AllTranslations.Len 1) }}
<div class="flex-none">
<div class="h-full static">
<button id="navbar-lang-toggle" type="button" class="inline-flex items-center p-2 text-sm text-slate-800 dark:text-slate-200 rounded-lg" aria-controls="navbar-menu" aria-expanded="false">
<span class="sr-only">{{ T "open_lang_switcher" }}</span>
<i class="w-8 h-8">
{{ partial "icon.html" "language" }}
</i>
</button>
<div class="absolute hidden top-16 z-50" id="navbar-lang">
<ul class="flex flex-col rounded-sm px-3 text-base font-medium text-slate-800 dark:text-slate-200 shadow-lg bg-white dark:bg-gray-600 shadow-slate-800/5 dark:shadow-slate-200/5 ring-1 ring-slate-900/5 dark:ring-slate-100/5">
{{ range .Site.Home.AllTranslations.ByWeight }}
<li class="">
<a class="block px-3 py-3 hover:text-emerald-600"
href="{{ .RelPermalink }}" title="{{ .Language.LanguageName }}">{{ .Language.LanguageName }}</a>
</li>
{{ end }}
</ul>
</div>
</div>
</div>
{{ else }}
<div class="flex-none mx-1"></div>
{{ end }}
<!-- <div class="darkmode-toggle flex flex-none mr-2 md:mr-0">
<label for="darkmode-toggle" class="flex items-center px-3 cursor-pointer rounded-full bg-gray-100 dark:bg-gray-600" title="{{ T "header.darkmode_toggle" }}">
<input name="darkmode-toggle" id="darkmode-toggle" type="checkbox" class="sr-only peer" aria-label="{{ T "header.darkmode_toggle" }}">
<div class="group flex flex-row gap-1 justify-center h-8 px-1 rounded-full bg-white dark:bg-gray-700">
<i class="h-6 w-6 flex-none rounded-full bg-yellow-400 place-self-center peer-checked:group-[]:invisible">
{{ partial "icon.html" "brightness-down" }}
</i>
<i class="h-6 w-6 flex-none rounded-full place-self-center invisible peer-checked:group-[]:visible">
{{ partial "icon.html" "moon-stars" }}
</i>
</div>
</label>
</div> -->
</div>
13 changes: 13 additions & 0 deletions layouts/partials/index_content.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<div class="w-full max-w-4xl lg:max-w-5xl">
<div class="flex flex-col gap-y-3 p-6 mt-6 mx-2 md:mx-0 rounded-lg shadow-md bg-white dark:bg-gray-700">
<h1 class="text-4xl font-semibold text-slate-800 dark:text-slate-100">
VarFish Variant Analysis
</h1>
<p>
Homepage Coming Soon
</p>
<p>
So long, visit us on GitHub <a href="https://github.com/varfish-org/">https://github.com/varfish-org/</a>.
</p>
</div>
</div>
Binary file added static/favicon.ico
Binary file not shown.
63 changes: 63 additions & 0 deletions static/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fb7319c

Please sign in to comment.