mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-11-17 13:25:57 -06:00
Add basic theme files
This commit is contained in:
parent
19bfe67de0
commit
03eb50ccca
15
.editorconfig
Normal file
15
.editorconfig
Normal file
@ -0,0 +1,15 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
|
||||
[*.html]
|
||||
indent_size = 4
|
||||
|
||||
[*.md]
|
||||
indent_size = 2
|
||||
|
||||
[config.toml]
|
||||
indent_size = 2
|
13
archetypes/blog.md
Normal file
13
archetypes/blog.md
Normal file
@ -0,0 +1,13 @@
|
||||
+++
|
||||
title = "{{ replace .Name "-" " " | title }}"
|
||||
date = "{{ .Date }}"
|
||||
draft = true
|
||||
|
||||
description = """
|
||||
Lorem ipsum
|
||||
"""
|
||||
|
||||
tags = [
|
||||
"awesome",
|
||||
]
|
||||
+++
|
8
archetypes/default.md
Normal file
8
archetypes/default.md
Normal file
@ -0,0 +1,8 @@
|
||||
+++
|
||||
title = "{{ replace .Name "-" " " | title }}"
|
||||
menu = "main"
|
||||
|
||||
description = """
|
||||
Lorem ipsum
|
||||
"""
|
||||
+++
|
0
layouts/404.html
Normal file
0
layouts/404.html
Normal file
27
layouts/_default/baseof.html
Normal file
27
layouts/_default/baseof.html
Normal file
@ -0,0 +1,27 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
{{- partial "head.html" . -}}
|
||||
|
||||
<body>
|
||||
{{- partial "header.html" . -}}
|
||||
{{ partial "navbar.html" . }}
|
||||
|
||||
<div class="row">
|
||||
{{ if and (ne .Params.Toc false) .IsPage }}
|
||||
<div class="side">
|
||||
<h3>Table of Contents</h3>
|
||||
{{ .TableOfContents }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="main">
|
||||
{{- block "main" . }}
|
||||
{{ .Content }}
|
||||
{{- end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{- partial "footer.html" . -}}
|
||||
</body>
|
||||
|
||||
</html>
|
0
layouts/_default/list.html
Normal file
0
layouts/_default/list.html
Normal file
4
layouts/_default/single.html
Normal file
4
layouts/_default/single.html
Normal file
@ -0,0 +1,4 @@
|
||||
{{ define "main" }}
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
{{ end }}
|
2
layouts/index.html
Normal file
2
layouts/index.html
Normal file
@ -0,0 +1,2 @@
|
||||
{{ define "main" }}
|
||||
{{ end }}
|
0
layouts/partials/footer.html
Normal file
0
layouts/partials/footer.html
Normal file
18
layouts/partials/head.html
Normal file
18
layouts/partials/head.html
Normal file
@ -0,0 +1,18 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/css/bobatheme.css">
|
||||
<link rel="alternate icon" href="/favicon.ico" />
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||
{{ end -}}
|
||||
|
||||
{{ $title := print .Title " | " .Site.Title }}
|
||||
{{ if .IsHome }}{{ $title = .Site.Title }}{{ end }}
|
||||
<title>{{ $title }}</title>
|
||||
|
||||
{{ template "_internal/opengraph.html" . }}
|
||||
{{ template "_internal/twitter_cards.html" . }}
|
||||
{{ template "_internal/schema.html" . }}
|
||||
</head>
|
3
layouts/partials/header.html
Normal file
3
layouts/partials/header.html
Normal file
@ -0,0 +1,3 @@
|
||||
<div class="header">
|
||||
<h1>{{ .Site.Title }}</h1>
|
||||
</div>
|
6
layouts/partials/navbar.html
Normal file
6
layouts/partials/navbar.html
Normal file
@ -0,0 +1,6 @@
|
||||
<div class="navbar">
|
||||
<a href="{{ "/" | relURL }}">Home</a>
|
||||
{{ range .Site.Menus.main }}
|
||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
</div>
|
2
layouts/robots.txt
Normal file
2
layouts/robots.txt
Normal file
@ -0,0 +1,2 @@
|
||||
User-Agent: *
|
||||
Sitemap: {{ "sitemap.xml" | absURL }}
|
118
static/css/bobatheme.css
Normal file
118
static/css/bobatheme.css
Normal file
@ -0,0 +1,118 @@
|
||||
@media screen and (max-width: 700px) {
|
||||
.row {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 400px) {
|
||||
.navbar a {
|
||||
float: none;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: sans-serif;
|
||||
margin: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
a {
|
||||
color: blue;
|
||||
}
|
||||
blockquote {
|
||||
border-left: 5px solid #ccc;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.header {
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
background: #4FA2F5;
|
||||
color: white;
|
||||
}
|
||||
.header h1 {
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
overflow: hidden;
|
||||
background-color: #999;
|
||||
}
|
||||
.navbar a {
|
||||
float: left;
|
||||
display: block;
|
||||
color: white;
|
||||
text-align: center;
|
||||
padding: 14px 20px;
|
||||
text-decoration: none;
|
||||
}
|
||||
/* .navbar a.right {
|
||||
float: right;
|
||||
} */
|
||||
.navbar a:hover {
|
||||
background-color: #ddd;
|
||||
color: black;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.row {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.side {
|
||||
width: 20%;
|
||||
background-color: lightgray;
|
||||
padding: 20px;
|
||||
}
|
||||
.main {
|
||||
width: 80%;
|
||||
background-color: white;
|
||||
padding: 20px;
|
||||
}
|
||||
.footer {
|
||||
padding: 20px;
|
||||
text-align: center;
|
||||
background: #ddd;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body {
|
||||
background-color: black;
|
||||
}
|
||||
a {
|
||||
color: #4da6ff;
|
||||
}
|
||||
blockquote {
|
||||
border-left: 5px solid #222;
|
||||
}
|
||||
.header {
|
||||
background: #1A406B;
|
||||
color: lightgray;
|
||||
}
|
||||
.navbar {
|
||||
background-color: #222;
|
||||
}
|
||||
.navbar a {
|
||||
color: lightgray;
|
||||
}
|
||||
.navbar a:hover {
|
||||
background-color: #444;
|
||||
color: white;
|
||||
}
|
||||
.side {
|
||||
background-color: #111;
|
||||
color: lightgray;
|
||||
}
|
||||
.main {
|
||||
background-color: black;
|
||||
color: lightgray;
|
||||
}
|
||||
.footer {
|
||||
background: #222;
|
||||
color: lightgray;
|
||||
}
|
||||
max-width: 650px;
|
||||
}
|
116
static/css/starwars.css
Normal file
116
static/css/starwars.css
Normal file
@ -0,0 +1,116 @@
|
||||
@media screen and (max-width: 700px) {
|
||||
.row {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 400px) {
|
||||
.navbar a {
|
||||
float: none;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
body, html {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: sans-serif;
|
||||
margin: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
a {
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.header {
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
background: url(../images/stars.png);
|
||||
background-size: cover;
|
||||
color: white;
|
||||
}
|
||||
.header h1 {
|
||||
font-size: 50px;
|
||||
font-weight: bold;
|
||||
transform-origin: 50% 100%;
|
||||
transform: perspective(350px) rotateX(25deg);
|
||||
color: yellow;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
overflow: hidden;
|
||||
background-color: #999;
|
||||
}
|
||||
.navbar a {
|
||||
float: left;
|
||||
display: block;
|
||||
color: white;
|
||||
text-align: center;
|
||||
padding: 14px 20px;
|
||||
text-decoration: none;
|
||||
}
|
||||
/* .navbar a.right {
|
||||
float: right;
|
||||
} */
|
||||
.navbar a:hover {
|
||||
background-color: #ddd;
|
||||
color: black;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.row {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.side {
|
||||
width: 25%;
|
||||
background-color: lightgray;
|
||||
padding: 20px;
|
||||
}
|
||||
.main {
|
||||
width: 75%;
|
||||
background-color: white;
|
||||
padding: 20px;
|
||||
}
|
||||
.footer {
|
||||
padding: 20px;
|
||||
text-align: center;
|
||||
background: #ddd;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body {
|
||||
background-color: black;
|
||||
}
|
||||
a {
|
||||
color: #4da6ff;
|
||||
}
|
||||
.navbar {
|
||||
background-color: #222;
|
||||
}
|
||||
.navbar a {
|
||||
color: lightgray;
|
||||
}
|
||||
.navbar a:hover {
|
||||
background-color: #444;
|
||||
color: white;
|
||||
}
|
||||
.side {
|
||||
background-color: #111;
|
||||
color: lightgray;
|
||||
}
|
||||
.main {
|
||||
background-color: black;
|
||||
color: lightgray;
|
||||
}
|
||||
.footer {
|
||||
background: #222;
|
||||
color: lightgray;
|
||||
}
|
||||
max-width: 650px;
|
||||
}
|
BIN
static/img/stars.png
Normal file
BIN
static/img/stars.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
15
theme.toml
Normal file
15
theme.toml
Normal file
@ -0,0 +1,15 @@
|
||||
# theme.toml template for a Hugo theme
|
||||
# See https://github.com/gohugoio/hugoThemes#themetoml for an example
|
||||
|
||||
name = "bobatheme"
|
||||
license = "MIT"
|
||||
licenselink = "https://github.com/BBaoVanC/bobatheme/blob/master/LICENSE"
|
||||
description = "Simple Hugo theme for boba.best and bbaovanc.com"
|
||||
homepage = "https://boba.best/"
|
||||
tags = []
|
||||
features = []
|
||||
min_version = "0.41.0"
|
||||
|
||||
[author]
|
||||
name = "bbaovanc"
|
||||
homepage = "https://bbaovanc.com"
|
Loading…
Reference in New Issue
Block a user