mirror of
https://github.com/imfing/hextra.git
synced 2025-07-01 11:17:21 -04:00
Compare commits
5 Commits
v0.8.0
...
a0096a821d
Author | SHA1 | Date | |
---|---|---|---|
a0096a821d | |||
e3b582676e | |||
56f6f19978 | |||
2fb6f63b41 | |||
1313415c8b |
@ -74,7 +74,7 @@
|
|||||||
/* CommentPreprocFile */ .chroma .cpf { color: #8b949e; font-weight: bold; font-style: italic }
|
/* CommentPreprocFile */ .chroma .cpf { color: #8b949e; font-weight: bold; font-style: italic }
|
||||||
/* Generic */ .chroma .g { }
|
/* Generic */ .chroma .g { }
|
||||||
/* GenericDeleted */ .chroma .gd { color: #ffa198; background-color: #490202 }
|
/* GenericDeleted */ .chroma .gd { color: #ffa198; background-color: #490202 }
|
||||||
/* GenericEmph */ .chroma .ge { font-style: italic }
|
/* GenericEmph */ .chroma .ge { color: inherit; font-style: italic }
|
||||||
/* GenericError */ .chroma .gr { color: #ffa198 }
|
/* GenericError */ .chroma .gr { color: #ffa198 }
|
||||||
/* GenericHeading */ .chroma .gh { color: #79c0ff; font-weight: bold }
|
/* GenericHeading */ .chroma .gh { color: #79c0ff; font-weight: bold }
|
||||||
/* GenericInserted */ .chroma .gi { color: #56d364; background-color: #0f5323 }
|
/* GenericInserted */ .chroma .gi { color: #56d364; background-color: #0f5323 }
|
||||||
|
@ -914,9 +914,15 @@ video {
|
|||||||
.hx-overflow-x-hidden {
|
.hx-overflow-x-hidden {
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
.hx-overflow-y-hidden {
|
||||||
|
overflow-y: hidden;
|
||||||
|
}
|
||||||
.hx-overscroll-contain {
|
.hx-overscroll-contain {
|
||||||
overscroll-behavior: contain;
|
overscroll-behavior: contain;
|
||||||
}
|
}
|
||||||
|
.hx-overscroll-x-contain {
|
||||||
|
overscroll-behavior-x: contain;
|
||||||
|
}
|
||||||
.hx-text-ellipsis {
|
.hx-text-ellipsis {
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
document.querySelectorAll('.tabs-toggle').forEach(function (button) {
|
document.querySelectorAll('.hextra-tabs-toggle').forEach(function (button) {
|
||||||
button.addEventListener('click', function (e) {
|
button.addEventListener('click', function (e) {
|
||||||
// set parent tabs to unselected
|
// set parent tabs to unselected
|
||||||
const tabs = Array.from(e.target.parentElement.querySelectorAll('.tabs-toggle'));
|
const tabs = Array.from(e.target.parentElement.querySelectorAll('.hextra-tabs-toggle'));
|
||||||
tabs.map(tab => tab.dataset.state = '');
|
tabs.map(tab => tab.dataset.state = '');
|
||||||
|
|
||||||
// set current tab to selected
|
// set current tab to selected
|
||||||
e.target.dataset.state = 'selected';
|
e.target.dataset.state = 'selected';
|
||||||
|
|
||||||
// set all panels to unselected
|
// set all panels to unselected
|
||||||
const panelsContainer = e.target.parentElement.nextElementSibling;
|
const panelsContainer = e.target.parentElement.parentElement.nextElementSibling;
|
||||||
Array.from(panelsContainer.children).forEach(function (panel) {
|
Array.from(panelsContainer.children).forEach(function (panel) {
|
||||||
panel.dataset.state = '';
|
panel.dataset.state = '';
|
||||||
});
|
});
|
||||||
|
@ -251,6 +251,23 @@ Options for `flexsearch.index`:
|
|||||||
- `heading` - level 1 and level 2 headings
|
- `heading` - level 1 and level 2 headings
|
||||||
- `title` - only include the page title
|
- `title` - only include the page title
|
||||||
|
|
||||||
|
To customize the search tokenize, set the `params.search.flexsearch.tokenize` parameter in the config file:
|
||||||
|
|
||||||
|
```yaml {filename="hugo.yaml"}
|
||||||
|
params:
|
||||||
|
# ...
|
||||||
|
flexsearch:
|
||||||
|
# full | forward | reverse | strict
|
||||||
|
tokenize: forward
|
||||||
|
```
|
||||||
|
|
||||||
|
Options for [`flexsearch.tokenize`](https://github.com/nextapps-de/flexsearch/#tokenizer-prefix-search):
|
||||||
|
|
||||||
|
- `strict` - index whole words
|
||||||
|
- `forward` - incrementally index words in forward direction
|
||||||
|
- `reverse` - incrementally index words in both directions
|
||||||
|
- `full` - index every possible combination
|
||||||
|
|
||||||
To exclude a page from the search index, set the `excludeSearch: true` in the front matter of the page:
|
To exclude a page from the search index, set the `excludeSearch: true` in the front matter of the page:
|
||||||
|
|
||||||
```yaml {filename="content/docs/guide/configuration.md"}
|
```yaml {filename="content/docs/guide/configuration.md"}
|
||||||
|
@ -219,6 +219,25 @@ params:
|
|||||||
- `heading` - 一级和二级标题
|
- `heading` - 一级和二级标题
|
||||||
- `title` - 仅搜索标题
|
- `title` - 仅搜索标题
|
||||||
|
|
||||||
|
要自定义检索分词,请在配置文件中设置`params.search.flexsearch.tokenize`:
|
||||||
|
|
||||||
|
```hugo.yaml
|
||||||
|
params:
|
||||||
|
# ...
|
||||||
|
flexsearch:
|
||||||
|
# full | forward | reverse | strict
|
||||||
|
tokenize: forward
|
||||||
|
```
|
||||||
|
|
||||||
|
[`flexsearch.tokenize`](https://github.com/nextapps-de/flexsearch/#tokenizer-prefix-search)的可选项:
|
||||||
|
|
||||||
|
- `strict` - 严格单词匹配
|
||||||
|
- `forward` - 单词前缀匹配
|
||||||
|
- `reverse` - 单词前后缀匹配
|
||||||
|
- `full` - 单词子串匹配。
|
||||||
|
|
||||||
|
> 在默认的分词逻辑下,中文一句话就是一个“单词”
|
||||||
|
|
||||||
要从搜索索引中排除页面,更改 front matter 中的 `excludeSearch: true`:
|
要从搜索索引中排除页面,更改 front matter 中的 `excludeSearch: true`:
|
||||||
|
|
||||||
```yaml {filename="content/docs/guide/configuration.md"}
|
```yaml {filename="content/docs/guide/configuration.md"}
|
||||||
|
@ -28,14 +28,28 @@ Hugo از سینتکس [مارکداون](https://en.wikipedia.org/wiki/Markd
|
|||||||
|
|
||||||
[^1]: نقلقول بالا گزیدهای از [سخنرانی](https://www.youtube.com/watch?v=PAAkCSZUG1c) راب پایک در Gopherfest، در تاریخ ۲۷ آبان ۱۳۹۴ است.
|
[^1]: نقلقول بالا گزیدهای از [سخنرانی](https://www.youtube.com/watch?v=PAAkCSZUG1c) راب پایک در Gopherfest، در تاریخ ۲۷ آبان ۱۳۹۴ است.
|
||||||
|
|
||||||
|
```markdown {filename=Markdown}
|
||||||
|
> با اشتراکگذاری حافظه ارتباط برقرار نکنید، حافظه را با برقراری ارتباط به اشتراک بگذارید.<br>
|
||||||
|
> — <cite>راب پایک[^1]</cite>
|
||||||
|
|
||||||
|
[^1]: نقلقول بالا گزیدهای از [سخنرانی](https://www.youtube.com/watch?v=PAAkCSZUG1c) راب پایک در Gopherfest، در تاریخ ۲۷ آبان ۱۳۹۴ است.
|
||||||
|
```
|
||||||
|
|
||||||
### جدولها
|
### جدولها
|
||||||
|
|
||||||
جدولها بخشی از مشخصات اصلی مارکداون نیستند، اما Hugo از آنها در خارج از جعبه پشتیبانی میکند.
|
جدولها بخشی از مشخصات اصلی مارکداون نیستند، اما Hugo از آنها در خارج از جعبه پشتیبانی میکند.
|
||||||
|
|
||||||
نام | سن
|
| نام | سن |
|
||||||
--------|------
|
|--------|------|
|
||||||
گودرز | ۳۰
|
| گودرز | ۳۰|
|
||||||
آصف | ۳۴
|
| آصف | ۳۴ |
|
||||||
|
|
||||||
|
```markdown {filename=Markdown}
|
||||||
|
| نام | سن |
|
||||||
|
|--------|------|
|
||||||
|
| گودرز | ۳۰|
|
||||||
|
| آصف | ۳۴ |
|
||||||
|
```
|
||||||
|
|
||||||
#### مارکداون درونخطی درون جدولها
|
#### مارکداون درونخطی درون جدولها
|
||||||
|
|
||||||
@ -43,6 +57,12 @@ Hugo از سینتکس [مارکداون](https://en.wikipedia.org/wiki/Markd
|
|||||||
| -------- | -------- | ------ |
|
| -------- | -------- | ------ |
|
||||||
| *کج* | **توپر** | `کد` |
|
| *کج* | **توپر** | `کد` |
|
||||||
|
|
||||||
|
```markdown {filename=Markdown}
|
||||||
|
| کج | توپر | کد |
|
||||||
|
| -------- | -------- | ------ |
|
||||||
|
| *کج* | **توپر** | `کد` |
|
||||||
|
```
|
||||||
|
|
||||||
### بلوکهای کد
|
### بلوکهای کد
|
||||||
|
|
||||||
{{< cards >}}
|
{{< cards >}}
|
||||||
@ -57,12 +77,24 @@ Hugo از سینتکس [مارکداون](https://en.wikipedia.org/wiki/Markd
|
|||||||
2. دومین آیتم
|
2. دومین آیتم
|
||||||
3. سومین آیتم
|
3. سومین آیتم
|
||||||
|
|
||||||
|
```markdown {filename=Markdown}
|
||||||
|
1. اولین آیتم
|
||||||
|
2. دومین آیتم
|
||||||
|
3. سومین آیتم
|
||||||
|
```
|
||||||
|
|
||||||
#### فهرست مرتبنشده
|
#### فهرست مرتبنشده
|
||||||
|
|
||||||
* فهرست آیتم
|
* فهرست آیتم
|
||||||
* یک آیتم دیگه
|
* یک آیتم دیگه
|
||||||
* و یک آیتم دیگه
|
* و یک آیتم دیگه
|
||||||
|
|
||||||
|
```markdown {filename=Markdown}
|
||||||
|
* فهرست آیتم
|
||||||
|
* یک آیتم دیگه
|
||||||
|
* و یک آیتم دیگه
|
||||||
|
```
|
||||||
|
|
||||||
#### فهرست تو در تو
|
#### فهرست تو در تو
|
||||||
|
|
||||||
* میوه
|
* میوه
|
||||||
@ -73,13 +105,31 @@ Hugo از سینتکس [مارکداون](https://en.wikipedia.org/wiki/Markd
|
|||||||
* شیر
|
* شیر
|
||||||
* پنیر
|
* پنیر
|
||||||
|
|
||||||
|
```markdown {filename=Markdown}
|
||||||
|
* میوه
|
||||||
|
* سیب
|
||||||
|
* پرتقال
|
||||||
|
* موز
|
||||||
|
* لبنیات
|
||||||
|
* شیر
|
||||||
|
* پنیر
|
||||||
|
```
|
||||||
|
|
||||||
### عکسها
|
### عکسها
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
```markdown {filename=Markdown}
|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
با توضیحات:
|
با توضیحات:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
```markdown {filename=Markdown}
|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
## پیکربندی
|
## پیکربندی
|
||||||
|
|
||||||
|
@ -28,14 +28,28 @@ Blockquote with attribution
|
|||||||
|
|
||||||
[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
|
[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
|
||||||
|
|
||||||
|
```markdown {filename=Markdown}
|
||||||
|
> Don't communicate by sharing memory, share memory by communicating.<br>
|
||||||
|
> — <cite>Rob Pike[^1]</cite>
|
||||||
|
|
||||||
|
[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
|
||||||
|
```
|
||||||
|
|
||||||
### Tables
|
### Tables
|
||||||
|
|
||||||
Tables aren't part of the core Markdown spec, but Hugo supports them out-of-the-box.
|
Tables aren't part of the core Markdown spec, but Hugo supports them out-of-the-box.
|
||||||
|
|
||||||
Name | Age
|
| Name | Age |
|
||||||
--------|------
|
|--------|------|
|
||||||
Bob | 27
|
| Bob | 27 |
|
||||||
Alice | 23
|
| Alice | 23 |
|
||||||
|
|
||||||
|
```markdown {filename=Markdown}
|
||||||
|
| Name | Age |
|
||||||
|
|--------|------|
|
||||||
|
| Bob | 27 |
|
||||||
|
| Alice | 23 |
|
||||||
|
```
|
||||||
|
|
||||||
#### Inline Markdown within tables
|
#### Inline Markdown within tables
|
||||||
|
|
||||||
@ -43,6 +57,12 @@ Tables aren't part of the core Markdown spec, but Hugo supports them out-of-the-
|
|||||||
| -------- | -------- | ------ |
|
| -------- | -------- | ------ |
|
||||||
| *italics* | **bold** | `code` |
|
| *italics* | **bold** | `code` |
|
||||||
|
|
||||||
|
```markdown {filename=Markdown}
|
||||||
|
| Italics | Bold | Code |
|
||||||
|
| -------- | -------- | ------ |
|
||||||
|
| *italics* | **bold** | `code` |
|
||||||
|
```
|
||||||
|
|
||||||
### Code Blocks
|
### Code Blocks
|
||||||
|
|
||||||
{{< cards >}}
|
{{< cards >}}
|
||||||
@ -57,12 +77,24 @@ Tables aren't part of the core Markdown spec, but Hugo supports them out-of-the-
|
|||||||
2. Second item
|
2. Second item
|
||||||
3. Third item
|
3. Third item
|
||||||
|
|
||||||
|
```markdown {filename=Markdown}
|
||||||
|
1. First item
|
||||||
|
2. Second item
|
||||||
|
3. Third item
|
||||||
|
```
|
||||||
|
|
||||||
#### Unordered List
|
#### Unordered List
|
||||||
|
|
||||||
* List item
|
* List item
|
||||||
* Another item
|
* Another item
|
||||||
* And another item
|
* And another item
|
||||||
|
|
||||||
|
```markdown {filename=Markdown}
|
||||||
|
* List item
|
||||||
|
* Another item
|
||||||
|
* And another item
|
||||||
|
```
|
||||||
|
|
||||||
#### Nested list
|
#### Nested list
|
||||||
|
|
||||||
* Fruit
|
* Fruit
|
||||||
@ -73,13 +105,31 @@ Tables aren't part of the core Markdown spec, but Hugo supports them out-of-the-
|
|||||||
* Milk
|
* Milk
|
||||||
* Cheese
|
* Cheese
|
||||||
|
|
||||||
|
```markdown {filename=Markdown}
|
||||||
|
* Fruit
|
||||||
|
* Apple
|
||||||
|
* Orange
|
||||||
|
* Banana
|
||||||
|
* Dairy
|
||||||
|
* Milk
|
||||||
|
* Cheese
|
||||||
|
```
|
||||||
|
|
||||||
### Images
|
### Images
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
```markdown {filename=Markdown}
|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
With caption:
|
With caption:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
```markdown {filename=Markdown}
|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
|
@ -28,14 +28,28 @@ Hugo 支持 [Markdown](https://en.wikipedia.org/wiki/Markdown) 来书写内容
|
|||||||
|
|
||||||
[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
|
[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
|
||||||
|
|
||||||
|
```markdown {filename=Markdown}
|
||||||
|
> Don't communicate by sharing memory, share memory by communicating.<br>
|
||||||
|
> — <cite>Rob Pike[^1]</cite>
|
||||||
|
|
||||||
|
[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
|
||||||
|
```
|
||||||
|
|
||||||
### 表格
|
### 表格
|
||||||
|
|
||||||
表格并非核心 Markdown 规范,但 Hugo 支持开箱即用的表格:
|
表格并非核心 Markdown 规范,但 Hugo 支持开箱即用的表格:
|
||||||
|
|
||||||
Name | Age
|
| Name | Age |
|
||||||
--------|------
|
|--------|------|
|
||||||
Bob | 27
|
| Bob | 27 |
|
||||||
Alice | 23
|
| Alice | 23 |
|
||||||
|
|
||||||
|
```markdown {filename=Markdown}
|
||||||
|
| Name | Age |
|
||||||
|
|--------|------|
|
||||||
|
| Bob | 27 |
|
||||||
|
| Alice | 23 |
|
||||||
|
```
|
||||||
|
|
||||||
#### Markdown 表格中的内联
|
#### Markdown 表格中的内联
|
||||||
|
|
||||||
@ -43,6 +57,12 @@ Hugo 支持 [Markdown](https://en.wikipedia.org/wiki/Markdown) 来书写内容
|
|||||||
| -------- | -------- | ------ |
|
| -------- | -------- | ------ |
|
||||||
| *italics* | **bold** | `code` |
|
| *italics* | **bold** | `code` |
|
||||||
|
|
||||||
|
```markdown {filename=Markdown}
|
||||||
|
| Italics | Bold | Code |
|
||||||
|
| -------- | -------- | ------ |
|
||||||
|
| *italics* | **bold** | `code` |
|
||||||
|
```
|
||||||
|
|
||||||
### 代码块
|
### 代码块
|
||||||
|
|
||||||
{{< cards >}}
|
{{< cards >}}
|
||||||
@ -57,12 +77,24 @@ Hugo 支持 [Markdown](https://en.wikipedia.org/wiki/Markdown) 来书写内容
|
|||||||
2. Second item
|
2. Second item
|
||||||
3. Third item
|
3. Third item
|
||||||
|
|
||||||
|
```markdown {filename=Markdown}
|
||||||
|
1. First item
|
||||||
|
2. Second item
|
||||||
|
3. Third item
|
||||||
|
```
|
||||||
|
|
||||||
#### 无序列表
|
#### 无序列表
|
||||||
|
|
||||||
* List item
|
* List item
|
||||||
* Another item
|
* Another item
|
||||||
* And another item
|
* And another item
|
||||||
|
|
||||||
|
```markdown {filename=Markdown}
|
||||||
|
* List item
|
||||||
|
* Another item
|
||||||
|
* And another item
|
||||||
|
```
|
||||||
|
|
||||||
#### 嵌套列表
|
#### 嵌套列表
|
||||||
|
|
||||||
* Fruit
|
* Fruit
|
||||||
@ -73,13 +105,31 @@ Hugo 支持 [Markdown](https://en.wikipedia.org/wiki/Markdown) 来书写内容
|
|||||||
* Milk
|
* Milk
|
||||||
* Cheese
|
* Cheese
|
||||||
|
|
||||||
|
```markdown {filename=Markdown}
|
||||||
|
* Fruit
|
||||||
|
* Apple
|
||||||
|
* Orange
|
||||||
|
* Banana
|
||||||
|
* Dairy
|
||||||
|
* Milk
|
||||||
|
* Cheese
|
||||||
|
```
|
||||||
|
|
||||||
### 图片
|
### 图片
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
```markdown {filename=Markdown}
|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
带有标题:
|
带有标题:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
```markdown {filename=Markdown}
|
||||||
|

|
||||||
|
```
|
||||||
|
|
||||||
## 配置
|
## 配置
|
||||||
|
|
||||||
|
@ -78,11 +78,18 @@ def main():
|
|||||||
say_hello()
|
say_hello()
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### Copy Button
|
### Copy Button
|
||||||
|
|
||||||
By default, copy button is enabled for code blocks.
|
By default, copy button is enabled for code blocks. Its behavior can changed by modifying the site configuration file:
|
||||||
|
|
||||||
|
```yaml {linenos=table,linenostart=42,filename="hugo.yaml"}
|
||||||
|
params:
|
||||||
|
highlight:
|
||||||
|
copy:
|
||||||
|
enable: true
|
||||||
|
# hover | always
|
||||||
|
display: hover
|
||||||
|
```
|
||||||
|
|
||||||
## Supported Languages
|
## Supported Languages
|
||||||
|
|
||||||
|
@ -151,6 +151,12 @@ params:
|
|||||||
sortBy: date
|
sortBy: date
|
||||||
sortOrder: desc # or "asc"
|
sortOrder: desc # or "asc"
|
||||||
|
|
||||||
|
highlight:
|
||||||
|
copy:
|
||||||
|
enable: true
|
||||||
|
# hover | always
|
||||||
|
display: hover
|
||||||
|
|
||||||
comments:
|
comments:
|
||||||
enable: false
|
enable: false
|
||||||
type: giscus
|
type: giscus
|
||||||
|
@ -222,6 +222,8 @@
|
|||||||
"hextra-footer",
|
"hextra-footer",
|
||||||
"hextra-scrollbar",
|
"hextra-scrollbar",
|
||||||
"hextra-sidebar-collapsible-button",
|
"hextra-sidebar-collapsible-button",
|
||||||
|
"hextra-tabs-panel",
|
||||||
|
"hextra-tabs-toggle",
|
||||||
"hextra-toc",
|
"hextra-toc",
|
||||||
"highlight",
|
"highlight",
|
||||||
"hover:dark:hx-bg-primary-500/10",
|
"hover:dark:hx-bg-primary-500/10",
|
||||||
@ -392,7 +394,9 @@
|
|||||||
"hx-overflow-x-auto",
|
"hx-overflow-x-auto",
|
||||||
"hx-overflow-x-hidden",
|
"hx-overflow-x-hidden",
|
||||||
"hx-overflow-y-auto",
|
"hx-overflow-y-auto",
|
||||||
|
"hx-overflow-y-hidden",
|
||||||
"hx-overscroll-contain",
|
"hx-overscroll-contain",
|
||||||
|
"hx-overscroll-x-contain",
|
||||||
"hx-p-0.5",
|
"hx-p-0.5",
|
||||||
"hx-p-1",
|
"hx-p-1",
|
||||||
"hx-p-1.5",
|
"hx-p-1.5",
|
||||||
@ -603,8 +607,6 @@
|
|||||||
"steps",
|
"steps",
|
||||||
"subheading-anchor",
|
"subheading-anchor",
|
||||||
"success-icon",
|
"success-icon",
|
||||||
"tabs-panel",
|
|
||||||
"tabs-toggle",
|
|
||||||
"theme-toggle",
|
"theme-toggle",
|
||||||
"xl:hx-block"
|
"xl:hx-block"
|
||||||
],
|
],
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{{- $defaultIndex := int ((.Parent.Get "defaultIndex") | default "0") -}}
|
{{- $defaultIndex := int ((.Parent.Get "defaultIndex") | default "0") -}}
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="tabs-panel hx-rounded hx-pt-6 hx-hidden data-[state=selected]:hx-block"
|
class="hextra-tabs-panel hx-rounded hx-pt-6 hx-hidden data-[state=selected]:hx-block"
|
||||||
id="tabs-panel-{{ .Ordinal }}"
|
id="tabs-panel-{{ .Ordinal }}"
|
||||||
role="tabpanel"
|
role="tabpanel"
|
||||||
{{ if eq .Ordinal $defaultIndex }}tabindex="0"{{ end }}
|
{{ if eq .Ordinal $defaultIndex }}tabindex="0"{{ end }}
|
||||||
|
@ -5,11 +5,11 @@
|
|||||||
{{ errorf "no items provided" }}
|
{{ errorf "no items provided" }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
<div class="hextra-scrollbar hx-overflow-x-auto hx-overflow-y-hidden hx-overscroll-x-contain">
|
||||||
<div class="hx-mt-4 hx-flex hx-w-max hx-min-w-full hx-border-b hx-border-gray-200 hx-pb-px dark:hx-border-neutral-800">
|
<div class="hx-mt-4 hx-flex hx-w-max hx-min-w-full hx-border-b hx-border-gray-200 hx-pb-px dark:hx-border-neutral-800">
|
||||||
{{- range $i, $item := $items -}}
|
{{- range $i, $item := $items -}}
|
||||||
<button
|
<button
|
||||||
class="tabs-toggle data-[state=selected]:hx-border-primary-500 data-[state=selected]:hx-text-primary-600 hx-mr-2 hx-rounded-t hx-p-2 hx-font-medium hx-leading-5 hx-transition-colors -hx-mb-0.5 hx-select-none hx-border-b-2 hx-border-transparent hx-text-gray-600 hover:hx-border-gray-200 hover:hx-text-black dark:hx-text-gray-200 dark:hover:hx-border-neutral-800 dark:hover:hx-text-white"
|
class="hextra-tabs-toggle data-[state=selected]:hx-border-primary-500 data-[state=selected]:hx-text-primary-600 hx-mr-2 hx-rounded-t hx-p-2 hx-font-medium hx-leading-5 hx-transition-colors -hx-mb-0.5 hx-select-none hx-border-b-2 hx-border-transparent hx-text-gray-600 hover:hx-border-gray-200 hover:hx-text-black dark:hx-text-gray-200 dark:hover:hx-border-neutral-800 dark:hover:hx-text-white"
|
||||||
role="tab"
|
role="tab"
|
||||||
type="button"
|
type="button"
|
||||||
aria-controls="tabs-panel-{{ $i }}"
|
aria-controls="tabs-panel-{{ $i }}"
|
||||||
@ -20,6 +20,7 @@
|
|||||||
{{- $item -}}
|
{{- $item -}}
|
||||||
</button>
|
</button>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{{ .Inner }}
|
{{ .Inner }}
|
||||||
|
Reference in New Issue
Block a user