mirror of
https://github.com/imfing/hextra.git
synced 2025-07-17 10:11:30 -04:00
Compare commits
3 Commits
v0.8.3
...
b94b566171
Author | SHA1 | Date | |
---|---|---|---|
b94b566171 | |||
de9f9b312e | |||
69585eeb14 |
@ -2577,6 +2577,23 @@ nav .search-wrapper {
|
|||||||
grid-template-columns: repeat(var(--hextra-feature-grid-cols), minmax(0, 1fr))
|
grid-template-columns: repeat(var(--hextra-feature-grid-cols), minmax(0, 1fr))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.hextra-jupyter-code-cell {
|
||||||
|
scrollbar-gutter: auto;
|
||||||
|
margin-top: 1.5rem;
|
||||||
|
}
|
||||||
|
.hextra-jupyter-code-cell .hextra-jupyter-code-cell-outputs-container {
|
||||||
|
overflow: hidden;
|
||||||
|
font-size: .75rem;
|
||||||
|
}
|
||||||
|
.hextra-jupyter-code-cell .hextra-jupyter-code-cell-outputs-container .hextra-jupyter-code-cell-outputs {
|
||||||
|
max-height: 50vh;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
.hextra-jupyter-code-cell .hextra-jupyter-code-cell-outputs-container .hextra-jupyter-code-cell-outputs pre {
|
||||||
|
max-width: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
font-size: .75rem;
|
||||||
|
}
|
||||||
html {
|
html {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
|
@ -3,27 +3,15 @@
|
|||||||
|
|
||||||
@apply hx-mt-6;
|
@apply hx-mt-6;
|
||||||
|
|
||||||
.hextra-jupyter-code-cell-source {
|
|
||||||
@apply hx-text-sm;
|
|
||||||
.chroma,
|
|
||||||
pre {
|
|
||||||
@apply hx-m-0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.hextra-jupyter-code-cell-outputs-container {
|
.hextra-jupyter-code-cell-outputs-container {
|
||||||
@apply hx-text-xs hx-overflow-hidden hx-border hx-border-t-0 hx-rounded-b-xl dark:hx-border-neutral-800;
|
@apply hx-text-xs hx-overflow-hidden;
|
||||||
|
|
||||||
.hextra-jupyter-code-cell-outputs {
|
.hextra-jupyter-code-cell-outputs {
|
||||||
@apply hx-overflow-auto hx-max-h-[50vh];
|
@apply hx-overflow-auto hx-max-h-[50vh];
|
||||||
|
|
||||||
pre {
|
pre {
|
||||||
@apply hx-p-4;
|
@apply hx-text-xs hx-overflow-auto hx-max-w-full;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.hextra-jupyter-code-cell:has(.hextra-jupyter-code-cell-outputs) .hextra-jupyter-code-cell-source .chroma {
|
|
||||||
@apply hx-rounded-b-none;
|
|
||||||
}
|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
@import "components/scrollbar.css";
|
@import "components/scrollbar.css";
|
||||||
@import "components/code-copy.css";
|
@import "components/code-copy.css";
|
||||||
@import "components/hextra/feature-grid.css";
|
@import "components/hextra/feature-grid.css";
|
||||||
|
@import "components/jupyter.css";
|
||||||
|
|
||||||
html {
|
html {
|
||||||
@apply hx-text-base hx-antialiased;
|
@apply hx-text-base hx-antialiased;
|
||||||
|
@ -7,8 +7,8 @@ linkTitle: Cards
|
|||||||
|
|
||||||
{{< cards >}}
|
{{< cards >}}
|
||||||
{{< card link="../callout" title="Callout" icon="warning" >}}
|
{{< card link="../callout" title="Callout" icon="warning" >}}
|
||||||
{{< card link="../callout" title="Card with tag" icon="tag" tag="custom tag">}}
|
{{< card link="../callout" title="Card with tag" icon="tag" tag="A custom tag with Tooltip" tagtooltip="Tooltip for Tag">}}
|
||||||
{{< card link="/" title="No Icon" >}}
|
{{< card link="/" title="No Icon, but with Tooltip" linktooltip="Tooltip for Link" >}}
|
||||||
{{< /cards >}}
|
{{< /cards >}}
|
||||||
|
|
||||||
{{< cards >}}
|
{{< cards >}}
|
||||||
@ -22,8 +22,8 @@ linkTitle: Cards
|
|||||||
```
|
```
|
||||||
{{</* cards */>}}
|
{{</* cards */>}}
|
||||||
{{</* card link="../callout" title="Callout" icon="warning" */>}}
|
{{</* card link="../callout" title="Callout" icon="warning" */>}}
|
||||||
{{</* card link="../callout" title="Card with tag" icon="warning" tag= "A custom tag" */>}}
|
{{</* card link="../callout" title="Card with tag" tag="A custom tag with Tooltip" tagtooltip="Tooltip for Tag" */>}}
|
||||||
{{</* card link="/" title="No Icon" */>}}
|
{{</* card link="/" title="No Icon, but with Tooltip" linktooltip="Tooltip for Link" */>}}
|
||||||
{{</* /cards */>}}
|
{{</* /cards */>}}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -37,14 +37,16 @@ linkTitle: Cards
|
|||||||
|
|
||||||
## Card Parameters
|
## Card Parameters
|
||||||
|
|
||||||
| Parameter | Description |
|
| Parameter | Description |
|
||||||
|----------- |-----------------------------------------------------------------|
|
|---------------|-----------------------------------------------------------------------|
|
||||||
| `link` | URL (internal or external). |
|
| `link` | URL (internal or external). |
|
||||||
| `title` | Title heading for the card. |
|
| `title` | Title heading for the card. |
|
||||||
| `subtitle` | Subtitle heading (supports Markdown). |
|
| `linktooltip` | Tooltip (title-attribut) for the link. |
|
||||||
| `icon` | Name of the icon. |
|
| `subtitle` | Subtitle heading (supports Markdown). |
|
||||||
| `tag` | Text in tag. |
|
| `icon` | Name of the icon. |
|
||||||
| `tagColor` | Color of the tag: `gray` (default), `yellow`, `red` and `blue`. |
|
| `tag` | Text in tag. |
|
||||||
|
| `tagType` | Type of the tag: `info` (blue), `warning` (yellow) and `error` (red). |
|
||||||
|
| `tagtooltip` | Tooltip (title-attribut) for the Tag. |
|
||||||
|
|
||||||
## Image Card
|
## Image Card
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{{- $page := .page -}}
|
{{- $page := .page -}}
|
||||||
{{- $link := .link -}}
|
{{- $link := .link -}}
|
||||||
{{- $title := .title -}}
|
{{- $title := .title -}}
|
||||||
|
{{- $linktooltip := .linktooltip -}}
|
||||||
{{- $icon := .icon -}}
|
{{- $icon := .icon -}}
|
||||||
{{- $subtitle := .subtitle -}}
|
{{- $subtitle := .subtitle -}}
|
||||||
{{- $image := .image -}}
|
{{- $image := .image -}}
|
||||||
@ -9,6 +10,7 @@
|
|||||||
{{- $imageStyle := .imageStyle -}}
|
{{- $imageStyle := .imageStyle -}}
|
||||||
{{- $tag := .tag -}}
|
{{- $tag := .tag -}}
|
||||||
{{- $tagType := .tagType -}}
|
{{- $tagType := .tagType -}}
|
||||||
|
{{- $tagtooltip := .tagtooltip -}}
|
||||||
|
|
||||||
{{ $linkClass := "hover:hx-border-gray-300 hx-bg-transparent hx-shadow-sm dark:hx-border-neutral-800 hover:hx-bg-slate-50 hover:hx-shadow-md dark:hover:hx-border-neutral-700 dark:hover:hx-bg-neutral-900" }}
|
{{ $linkClass := "hover:hx-border-gray-300 hx-bg-transparent hx-shadow-sm dark:hx-border-neutral-800 hover:hx-bg-slate-50 hover:hx-shadow-md dark:hover:hx-border-neutral-700 dark:hover:hx-bg-neutral-900" }}
|
||||||
{{- with $image -}}
|
{{- with $image -}}
|
||||||
@ -25,6 +27,7 @@
|
|||||||
href="{{ $href }}"
|
href="{{ $href }}"
|
||||||
{{ with $external }}target="_blank" rel="noreferrer"{{ end -}}
|
{{ with $external }}target="_blank" rel="noreferrer"{{ end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
{{- with $linktooltip }}title="{{- . -}}"{{ end -}}
|
||||||
>
|
>
|
||||||
{{- with $image -}}
|
{{- with $image -}}
|
||||||
<img
|
<img
|
||||||
@ -61,7 +64,7 @@
|
|||||||
|
|
||||||
{{ $tagClass := cond (eq $tagType "info") $infoClass (cond (eq $tagType "warning") $warningClass (cond (eq $tagType "error") $errorClass $defaultClass)) }}
|
{{ $tagClass := cond (eq $tagType "info") $infoClass (cond (eq $tagType "warning") $warningClass (cond (eq $tagType "error") $errorClass $defaultClass)) }}
|
||||||
<div class="hextra-card-tag">
|
<div class="hextra-card-tag">
|
||||||
<span class="hx-inline-block hx-rounded-full hx-px-2.5 hx-leading-6 {{ $tagClass }}">{{ $tag }}</span>
|
<span class="hx-inline-block hx-rounded-full hx-px-2.5 hx-leading-6 {{ $tagClass }}" {{- with $tagtooltip }}title="{{- . -}}"{{ end -}} >{{ $tag }}</span>
|
||||||
</div>
|
</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</a>
|
</a>
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{{- $context := . -}}
|
{{- $context := . -}}
|
||||||
{{- $link := .Get "link" -}}
|
{{- $link := .Get "link" -}}
|
||||||
{{- $title := .Get "title" -}}
|
{{- $title := .Get "title" -}}
|
||||||
|
{{- $linktooltip := .Get "linktooltip" -}}
|
||||||
{{- $icon := .Get "icon" -}}
|
{{- $icon := .Get "icon" -}}
|
||||||
{{- $subtitle := .Get "subtitle" -}}
|
{{- $subtitle := .Get "subtitle" -}}
|
||||||
{{- $image := .Get "image" -}}
|
{{- $image := .Get "image" -}}
|
||||||
@ -9,6 +10,7 @@
|
|||||||
{{- $imageStyle := .Get "imageStyle" -}}
|
{{- $imageStyle := .Get "imageStyle" -}}
|
||||||
{{- $tag := .Get "tag" -}}
|
{{- $tag := .Get "tag" -}}
|
||||||
{{- $tagType := .Get "tagType" -}}
|
{{- $tagType := .Get "tagType" -}}
|
||||||
|
{{- $tagtooltip := .Get "tagtooltip" -}}
|
||||||
|
|
||||||
{{/* Image processing options */}}
|
{{/* Image processing options */}}
|
||||||
{{- $method := .Get "method" | default "Resize" | humanize -}}
|
{{- $method := .Get "method" | default "Resize" | humanize -}}
|
||||||
@ -44,6 +46,7 @@
|
|||||||
"page" .Page
|
"page" .Page
|
||||||
"link" $link
|
"link" $link
|
||||||
"title" $title
|
"title" $title
|
||||||
|
"linktooltip" $linktooltip
|
||||||
"icon" $icon
|
"icon" $icon
|
||||||
"subtitle" $subtitle
|
"subtitle" $subtitle
|
||||||
"image" $image
|
"image" $image
|
||||||
@ -52,5 +55,6 @@
|
|||||||
"imageStyle" $imageStyle
|
"imageStyle" $imageStyle
|
||||||
"tag" $tag
|
"tag" $tag
|
||||||
"tagType" $tagType
|
"tagType" $tagType
|
||||||
|
"tagtooltip" $tagtooltip
|
||||||
)
|
)
|
||||||
-}}
|
-}}
|
||||||
|
@ -53,12 +53,12 @@
|
|||||||
{{- else if eq (index $output "output_type") "stream" -}}
|
{{- else if eq (index $output "output_type") "stream" -}}
|
||||||
{{- $text := index $output "text" -}}
|
{{- $text := index $output "text" -}}
|
||||||
{{- $textContent := (cond (reflect.IsSlice $text) (delimit $text "") $text) -}}
|
{{- $textContent := (cond (reflect.IsSlice $text) (delimit $text "") $text) -}}
|
||||||
<pre class="not-prose hx-text-sm">{{- $textContent -}}</pre>
|
<pre class="not-prose">{{- $textContent -}}</pre>
|
||||||
{{- else if eq (index $output "output_type") "execute_result" -}}
|
{{- else if eq (index $output "output_type") "execute_result" -}}
|
||||||
{{- $data := index $output "data" -}}
|
{{- $data := index $output "data" -}}
|
||||||
{{- $text := index $data "text/plain" -}}
|
{{- $text := index $data "text/plain" -}}
|
||||||
{{- $textContent := (cond (reflect.IsSlice $text) (delimit $text "") $text) -}}
|
{{- $textContent := (cond (reflect.IsSlice $text) (delimit $text "") $text) -}}
|
||||||
<pre class="not-prose hx-text-sm">{{- $textContent -}}</pre>
|
<pre class="not-prose">{{- $textContent -}}</pre>
|
||||||
{{- $html := index $data "text/html" -}}
|
{{- $html := index $data "text/html" -}}
|
||||||
{{- if $html -}}
|
{{- if $html -}}
|
||||||
{{- $htmlText := delimit $html "" -}}
|
{{- $htmlText := delimit $html "" -}}
|
||||||
|
Reference in New Issue
Block a user