init commit

This commit is contained in:
gangjun06 2020-08-12 22:15:08 +00:00
commit bbd3d0a885
15 changed files with 199 additions and 0 deletions

20
LICENSE Normal file
View File

@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2020 YOUR_NAME_HERE
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

2
archetypes/default.md Normal file
View File

@ -0,0 +1,2 @@
+++
+++

0
layouts/404.html Normal file
View File

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
{{- partial "head.html" . -}}
<body>
{{- partial "header.html" . -}}
<div id="content">
{{- block "main" . }}{{- end }}
</div>
{{- partial "footer.html" . -}}
</body>
</html>

View File

View File

11
layouts/index.html Normal file
View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="{{ $.Site.LanguageCode}}">
<head>
{{ partial "header.html" . }}
<title>{{ $.Site.Title }}</title>
</head>
<body>
{{ partial "navbar.html" . }}
{{ partial "home.html" . }}
</body>
</html>

View File

View File

View File

@ -0,0 +1,5 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/css/index.css" />
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">

View File

@ -0,0 +1,12 @@
<div>
<div id="mainBG" style="background-image: url('{{ $.Site.Params.mainbg }}');">
<div class="wave wave1"></div>
<div class="wave wave2"></div>
<div class="wave wave3"></div>
<div class="wave wave4"></div>
<div class="centerAll">
<div class="title">asdf</div>
<div class="text">asdf</div>
</div>
</div>
</div>

View File

@ -0,0 +1,44 @@
<nav class="fixed w-full" style="z-index:1000">
<div
class="container mx-auto flex items-center justify-between flex-wrap bg-transparency p-6"
>
<div class="flex items-center flex-shrink-0 text-white mr-6">
<a class="font-semibold text-xl tracking-tight" href="/"
>{{ $.Site.Title }}</a
>
</div>
<div class="block lg:hidden">
<button
class="flex items-center px-3 py-2 border rounded text-teal-200 border-white hover:text-white hover:border-white"
>
<svg
class="fill-current h-3 w-3"
viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
>
<title>Menu</title>
<path d="M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z" />
</svg>
</button>
</div>
<div class="w-full block flex-grow lg:flex lg:items-center lg:w-auto">
<div class="text-sm lg:flex-grow">
{{ $currentPage := . }} {{ range .Site.Menus.main }}
<a
href="{{ .URL }}"
class="block mt-4 lg:inline-block lg:mt-0 text-white hover:text-white mr-4"
>
{{ .Name }}
</a>
{{end}}
</div>
<div>
<a
href="#"
class="inline-block text-sm px-4 py-2 leading-none border rounded text-white border-white hover:border-transparent hover:text-teal-500 hover:bg-white mt-4 lg:mt-0"
>Blog</a
>
</div>
</div>
</div>
</nav>

73
static/css/index.css Normal file
View File

@ -0,0 +1,73 @@
.centerAll {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
#mainBG {
position: relative;
width: 100%;
height: 80vh;
overflow: hidden;
background-size: cover;
background-repeat: no-repeat;
color: #ffffff;
}
#mainBG .wave {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 100px;
background: url("/img/wave.png");
background-size: 1000px 100px;
}
#mainBG .wave.wave1 {
animation: wave-animate 30s linear infinite;
z-index: 303;
opacity: 1;
animation-delay: 0s;
bottom: 0;
}
#mainBG .wave.wave2 {
animation: wave-animate2 15s linear infinite;
z-index: 302;
opacity: 0.5;
animation-delay: -5s;
bottom: 10px;
}
#mainBG .wave.wave3 {
animation: wave-animate 30s linear infinite;
z-index: 301;
opacity: 0.2;
animation-delay: -2s;
bottom: 15;
}
#mainBG .wave.wave4 {
animation: wave-animate2 5s linear infinite;
z-index: 300;
opacity: 0.7;
animation-delay: -5s;
bottom: 20px;
}
@keyframes wave-animate {
0% {
background-position-x: 0;
}
100% {
background-position-x: 1000px;
}
}
@keyframes wave-animate2 {
0% {
background-position-x: 0;
}
100% {
background-position-x: -1000px;
}
}

BIN
static/img/wave.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

21
theme.toml Normal file
View File

@ -0,0 +1,21 @@
# theme.toml template for a Hugo theme
# See https://github.com/gohugoio/hugoThemes#themetoml for an example
name = "SimpleIntro"
license = "MIT"
licenselink = "https://github.com/yourname/yourtheme/blob/master/LICENSE"
description = ""
homepage = "http://example.com/"
tags = []
features = []
min_version = "0.41.0"
[author]
name = "Gangjun"
homepage = "https://gangjun.dev"
# If porting an existing theme
[original]
name = ""
homepage = ""
repo = ""