Skip to content

Commit 05de085

Browse files
committed
chore: initial commit
0 parents  commit 05de085

22 files changed

+3170
-0
lines changed

.eslintrc.cjs

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = {
2+
extends: [
3+
'eslint:recommended',
4+
'plugin:@typescript-eslint/recommended'
5+
],
6+
parser: '@typescript-eslint/parser',
7+
plugins: ['@typescript-eslint'],
8+
root: true,
9+
ignorePatterns: [
10+
"*.tmpl.ts",
11+
"postcss.config.js",
12+
"purgecss.config.js"
13+
]
14+
};

.github/FUNDING.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ko_fi: razonyang
2+
custom:
3+
- https://paypal.me/razonyang

.github/workflows/lint.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: lint
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
lint:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
- uses: actions/setup-node@v3
12+
with:
13+
node-version: 16
14+
- run: npm ci
15+
- run: npm run lint

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.hugo_build.lock
2+
public/
3+
resources/
4+
node_modules/

.prettierrc

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"bracketSameLine": true,
3+
"goTemplateBracketSpacing": true,
4+
"overrides": [
5+
{
6+
"files": [
7+
"*.html"
8+
],
9+
"options": {
10+
"parser": "go-template",
11+
"bracketSameLine": true
12+
}
13+
}
14+
]
15+
}

.stylelintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
**/*.tmpl.scss

.stylelintrc.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "stylelint-config-standard-scss",
3+
"rules": {
4+
"at-rule-no-unknown": null,
5+
"color-function-notation": null,
6+
"scss/at-rule-no-unknown": true,
7+
"scss/at-extend-no-missing-placeholder": null
8+
}
9+
}

CODE_OF_CONDUCT.md

+128
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

LICENSE

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

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# HB Footer
2+
3+
[![Documentations](https://img.shields.io/badge/docs-references-blue?logo=hugo&style=flat-square)](https://hb.hugomods.com)
4+
[![Used By](https://img.shields.io/badge/dynamic/json?color=success&label=used+by&query=repositories_humanize&logo=hugo&style=flat-square&url=https://api.razonyang.com/v1/github/dependents/hbstack/footer)](https://github.com/hbstack/footer/network/dependents)
5+
![Hugo Requirements](https://img.shields.io/badge/dynamic/json?color=important&label=requirements&query=requirements&logo=hugo&style=flat-square&url=https://api.razonyang.com/v1/hugo/modules/github.com/hbstack/footer)
6+
[![License](https://img.shields.io/github/license/hbstack/footer?style=flat-square)](https://github.com/hbstack/footer/blob/main/LICENSE)
7+
[![Version](https://img.shields.io/badge/dynamic/json?color=blue&label=version&query=name&url=https://api.razonyang.com/v1/github/tag/hbstack/footer&style=flat-square)](https://github.com/hbstack/footer/tags)
8+
[![Lint](https://github.com/hbstack/footer/actions/workflows/lint.yml/badge.svg?style=flat-square)](https://github.com/hbstack/footer/actions/workflows/lint.yml)
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.hb-footer-menus {
2+
a {
3+
color: inherit;
4+
text-decoration: none;
5+
6+
&:hover {
7+
text-decoration: underline;
8+
}
9+
}
10+
}

go.mod

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module github.com/hbstack/footer
2+
3+
go 1.18
4+
5+
require (
6+
github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2 v2.21100.20000 // indirect
7+
github.com/hbstack/hb v0.1.0 // indirect
8+
github.com/hugomods/base v0.1.0 // indirect
9+
)

go.sum

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2 v2.21100.20000 h1:GZxx4Hc+yb0/t3/rau1j8XlAxLE4CyXns2fqQbyqWfs=
2+
github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2 v2.21100.20000/go.mod h1:mFberT6ZtcchrsDtfvJM7aAH2bDKLdOnruUHl0hlapI=
3+
github.com/hbstack/hb v0.1.0 h1:GbnJbJi9c9gdXkfESqjt5eCZZ5NQmuhbsLCnMOnPyu4=
4+
github.com/hbstack/hb v0.1.0/go.mod h1:0AZsAVtgylZcPEAF4bwX1Zyy/hRBGSXoj+usD/wMr4A=
5+
github.com/hugomods/base v0.1.0 h1:3o9Y85BvXHjkYzZfswM/EtthQ8GOYKN8aXHkIWqu3/8=
6+
github.com/hugomods/base v0.1.0/go.mod h1:hnWCPbVxuhXBwdFax3mmbMlWKmIo/7OP36MCLOyHtT4=

hugo.toml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[[module.imports]]
2+
path = "github.com/hbstack/hb"
3+
4+
[[module.imports]]
5+
path = "github.com/hugomods/base"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<footer class="hb-footer pt-4 pt-md-5 pb-2 pb-md-3 bg-body-tertiary">
2+
<div class="container-fluid container-lg px-4 px-md-3 text-body-secondary">
3+
{{- partial "hugopress/functions/render-hooks" (dict "Name" "hb-footer-begin" "Page" .) }}
4+
<div class="row">
5+
{{- partialCached "hb/modules/footer/site-info" . }}
6+
{{- partialCached "hb/modules/footer/menus" . }}
7+
</div>
8+
{{- partial "hugopress/functions/render-hooks" (dict "Name" "hb-footer-end" "Page" .) }}
9+
</div>
10+
</footer>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{{- .Pre -}}
2+
{{- with .Params.icon }}
3+
{{- partial "icons/icon" (merge (dict "width" "1em" "height" "1em" "className" "hb-footer-menu-icon me-2") .) }}
4+
{{- end }}
5+
{{- .Name -}}
6+
{{- .Post -}}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{{- range $idx, $menu :=.Site.Menus.footer }}
2+
<div class="col-6 col-lg-2{{ cond (eq $idx 0) ` offset-lg-1` `` }} mb-3">
3+
<div class="mb-3 d-flex align-items-center h5">
4+
{{- partial "hb/modules/footer/menu-text" . -}}
5+
</div>
6+
<ul class="hb-footer-menus list-unstyled ms-1">
7+
{{- range .Children }}
8+
<li class="mb-2">
9+
{{- $external := partial "base/functions/is-menu-external" . }}
10+
<a
11+
class="hb-footer-menu"
12+
href="{{ .URL }}"
13+
{{ if $external }}target="_blank"{{ end }}>
14+
{{- partial "hb/modules/footer/menu-text" . -}}
15+
</a>
16+
</li>
17+
{{- end }}
18+
</ul>
19+
</div>
20+
{{- end }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{{- if default true .Site.Params.hb.footer.powered_by }}
2+
<li class="mt-2">
3+
Built with ❤️ from
4+
<a href="https://gohugo.io" target="_blank" rel="external">Hugo</a> and
5+
<a href="https://hb.hugomods.com" target="_blank" rel="external">HB Framework</a>.
6+
</li>
7+
{{- end -}}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<div class="hb-footer-site-info col mb-3 {{ cond (isset .Site.Menus `footer`) `col-lg-3` `text-center` }}">
2+
{{- partial "hugopress/functions/render-hooks" (dict "Name" "hb-footer-site-info-begin" "Page" .) }}
3+
<div class="h5">{{ .Site.Title }}</div>
4+
<ul class="list-unstyled small mb-2">
5+
{{- with .Site.Params.description }}
6+
<li class="mt-2">{{ . }}</li>
7+
{{- end }}
8+
{{- with .Site.Copyright }}
9+
<li class="mt-2">
10+
{{- replace . "{year}" now.Year | markdownify -}}
11+
</li>
12+
{{- end }}
13+
{{- partialCached "hb/modules/footer/powered-by" . }}
14+
</ul>
15+
{{- partial "hugopress/functions/render-hooks" (dict "Name" "hb-footer-site-info-end" "Page" .) }}
16+
</div>

0 commit comments

Comments
 (0)