-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 2b72d5d
Showing
23 changed files
with
5,324 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
github: razonyang | ||
custom: | ||
- https://paypal.me/razonyang |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: lint | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 16 | ||
- run: npm ci | ||
- run: npm run lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
name: release-please | ||
|
||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: googleapis/release-please-action@v4 | ||
with: | ||
command: manifest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
public/ | ||
resources/ | ||
.hugo_build.lock | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
pull_request_rules: | ||
- name: Automatic merge for Renovate pull requests | ||
conditions: | ||
- author=renovate[bot] | ||
actions: | ||
merge: | ||
method: rebase | ||
|
||
- name: Automatic merge on approval | ||
conditions: | ||
- "#approved-reviews-by>=1" | ||
actions: | ||
merge: | ||
method: rebase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
".": "0.0.1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
**/*.tmpl.scss |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "stylelint-config-standard-scss", | ||
"rules": { | ||
"at-rule-no-unknown": null, | ||
"color-function-notation": null, | ||
"scss/at-rule-no-unknown": true, | ||
"scss/at-extend-no-missing-placeholder": null | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 HB Framework Authors | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# HB Blockquote Alerts Module | ||
|
||
[![Used By](https://flat.badgen.net/github/dependents-repo/hbstack/blockquote-alerts?icon=hugo&label=used+by&color=green)](https://github.com/hbstack/blockquote-alerts/network/dependents) | ||
![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/blockquote-alerts) | ||
[![License](https://flat.badgen.net/github/license/hbstack/blockquote-alerts)](https://github.com/hbstack/blockquote-alerts/blob/main/LICENSE) | ||
[![Version](https://flat.badgen.net/github/tag/hbstack/blockquote-alerts)](https://github.com/hbstack/blockquote-alerts/tags) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import "js/bootstrap/src/collapse"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module github.com/hbstack/blockquote-alerts | ||
|
||
go 1.19 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[module.hugoVersion] | ||
min = "0.134.0" | ||
|
||
[[module.imports]] | ||
path = "github.com/hbstack/hb" | ||
|
||
[[module.imports]] | ||
path = "github.com/hugomods/icons/vendors/bootstrap" | ||
|
||
# [params.hb.blockquote_alerts] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
alert_caution = 'Caution' | ||
alert_important = 'Important' | ||
alert_note = 'Note' | ||
alert_tip = 'Tip' | ||
alert_warning = 'Warning' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
alert_caution = '小心' | ||
alert_important = '重要' | ||
alert_note = '注意' | ||
alert_tip = '提示' | ||
alert_warning = '警告' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
alert_caution = '小心' | ||
alert_important = '重要' | ||
alert_note = '注意' | ||
alert_tip = '提示' | ||
alert_warning = '警告' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{{- $icons := partialCached "hb/modules/blockquote-alerts/icons" . }} | ||
{{- $icon := default "" (index $icons .AlertType) }} | ||
{{- $styles := dict | ||
"caution" "danger" | ||
"important" "primary" | ||
"note" "info" | ||
"question" "warning" | ||
"tip" "success" | ||
"warning" "warning" | ||
}} | ||
{{- $title := or .AlertTitle (printf "alert_%s" .AlertType | i18n) (title .AlertType) }} | ||
<blockquote class="alert alert-{{ default .AlertType (index $styles .AlertType) }}" role="alert"> | ||
{{- $alertID := printf "blockquote-alert-%d-%s" .Ordinal .AlertType }} | ||
{{- with .AlertSign }} | ||
<a | ||
class="alert-heading fw-bold text-decoration-none" | ||
data-bs-toggle="collapse" | ||
href="#{{ $alertID }}"> | ||
{{ $icon }}{{ $title }} | ||
</a> | ||
<div | ||
class="collapse mt-3{{ cond (eq . `+`) ` show` `` }}" | ||
id="{{ $alertID }}"> | ||
{{ $.Text }} | ||
</div> | ||
{{- else }} | ||
<p class="alert-heading fw-bold"> | ||
{{ $icon }}{{ $title }} | ||
</p> | ||
{{ .Text }} | ||
{{- end }} | ||
</blockquote> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
{{- $icons := dict | ||
"caution" (partial "icons/icon" (dict "vendor" "bootstrap" "name" "exclamation-octagon" "className" "text-danger me-1 me-lg-2")) | ||
"important" (partial "icons/icon" (dict "vendor" "bootstrap" "name" "exclamation-square" "className" "text-primary me-1 me-lg-2")) | ||
"note" (partial "icons/icon" (dict "vendor" "bootstrap" "name" "info-circle" "className" "text-info me-1 me-lg-2")) | ||
"question" (partial "icons/icon" (dict "vendor" "bootstrap" "name" "question-circle" "className" "text-warning me-1 me-lg-2")) | ||
"tip" (partial "icons/icon" (dict "vendor" "bootstrap" "name" "lightbulb" "className" "text-success me-1 me-lg-2")) | ||
"warning" (partial "icons/icon" (dict "vendor" "bootstrap" "name" "exclamation-triangle" "className" "text-warning me-1 me-lg-2")) | ||
}} | ||
{{- return $icons }} |
Oops, something went wrong.