mirror of
https://github.com/Fechin/reference.git
synced 2026-11-24 23:00:23 +03:00
Added visual layout example
This commit is contained in:
1 parent
ed0e02b932
commit
1f67d1fb7f
3 files changed
+284
-24
No files matched your search
+278
-9
@@ -135,18 +135,287 @@ QuickRefs uses [markdown-it-attrs](https://github.com/arve0/markdown-it-attrs#ma
|
||||
|
||||
|
||||
|
||||
Layout Variants
|
||||
H2 Layout Variants
|
||||
--------
|
||||
|
||||
### H2 section
|
||||
### H2 Overview {.secondary}
|
||||
|
||||
|
||||
| - | - |
|
||||
|------------|------------------------|
|
||||
| `.cols-1` | one column _(default)_ |
|
||||
| `.cols-2` | |
|
||||
| `.cols-3` | three column |
|
||||
| ... | |
|
||||
| `.cols-6` | |
|
||||
| - | - |
|
||||
|-------------|---------------------------------|
|
||||
| `{.cols-1}` | one-column layout |
|
||||
| `{.cols-2}` | two-column layout |
|
||||
| `{.cols-3}` | three-column layout _(default)_ |
|
||||
| ... | |
|
||||
| `{.cols-6}` | six-column layout |
|
||||
|
||||
-------
|
||||
- `H2` section contains multiple cards (aka `H3` section)
|
||||
- Use {.cols-`n`} to specify h2 as a `n`-column layout
|
||||
- Click the preview button below to focus on the h2 section
|
||||
|
||||
[Preview](/quickref#h2-layout-variants) {.link-arrow}
|
||||
|
||||
|
||||
### .cols-1
|
||||
```text
|
||||
# One Column Example {.cols-1}
|
||||
╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈1╮
|
||||
┆ ┆
|
||||
╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯
|
||||
╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈2╮
|
||||
┆ ┆
|
||||
╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯
|
||||
```
|
||||
|
||||
#### ↓ Source Code
|
||||
|
||||
```markdown
|
||||
One Column Example {.cols-1}
|
||||
----------
|
||||
|
||||
### 1
|
||||
### 2
|
||||
```
|
||||
|
||||
[Preview](resolutions#lists-of-resolutions) {.link-arrow}
|
||||
|
||||
|
||||
### .cols-2
|
||||
```text
|
||||
# Two Columns Example
|
||||
╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈1╮ ╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈2╮
|
||||
┆ ┆ ┆ ┆
|
||||
╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯
|
||||
╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈3╮
|
||||
┆ ┆
|
||||
╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯
|
||||
```
|
||||
|
||||
#### ↓ Source Code
|
||||
|
||||
```markdown
|
||||
Two Columns Example {.cols-2}
|
||||
----------
|
||||
|
||||
### 1
|
||||
### 2
|
||||
### 3
|
||||
```
|
||||
|
||||
[Preview](resolutions#getting-started) {.link-arrow}
|
||||
|
||||
|
||||
|
||||
### .cols-3 (default)
|
||||
|
||||
```text
|
||||
# Default
|
||||
╭┈┈┈┈┈┈┈┈┈1╮ ╭┈┈┈┈┈┈┈┈┈2╮ ╭┈┈┈┈┈┈┈┈┈3╮
|
||||
┆ ┆ ┆ ┆ ┆ ┆
|
||||
╰┈┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈┈╯
|
||||
╭┈┈┈┈┈┈┈┈┈4╮
|
||||
┆ ┆
|
||||
╰┈┈┈┈┈┈┈┈┈┈╯
|
||||
```
|
||||
|
||||
#### ↓ Source Code
|
||||
|
||||
```markdown
|
||||
Default
|
||||
----------
|
||||
|
||||
### 1
|
||||
### 2
|
||||
### 3
|
||||
### 4
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
H3 Layout Variants
|
||||
--------
|
||||
|
||||
### H3 Overview {.secondary}
|
||||
|
||||
#### Specifies the number of columns the card spans
|
||||
|
||||
| - | - |
|
||||
|-----------------|---|
|
||||
| `{.col-span-1}` | |
|
||||
| `{.col-span-2}` | [Example](#col-span-2) |
|
||||
| ... | |
|
||||
| `.col-span-6}` | |
|
||||
|
||||
#### Specifies the number of rows the card spans {.text-left}
|
||||
|
||||
| - | - |
|
||||
|-----------------|---|
|
||||
| `{.row-span-1}` | |
|
||||
| `{.row-span-2}` | [Example](#row-span-2) |
|
||||
| ... | |
|
||||
| `{.row-span-6}` | |
|
||||
|
||||
#### Emphasize card (aka `H3` Section)
|
||||
|
||||
| - | - |
|
||||
|----------------|-------------------------------------------------------|
|
||||
| `{.primary}` | Red titles |
|
||||
| `{.secondary}` | Yellow titles, The current card is a `secondary` card |
|
||||
|
||||
|
||||
|
||||
|
||||
### .col-span-2 {.row-span-2}
|
||||
|
||||
#### The fifth card spans two columns
|
||||
|
||||
```markdown
|
||||
╭┈┈┈┈┈┈┈┈1╮ ╭┈┈┈┈┈┈┈┈2╮ ╭┈┈┈┈┈┈┈┈3╮
|
||||
┆ ┆ ┆ ┆ ┆ ┆
|
||||
╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯
|
||||
╭┈┈┈┈┈┈┈┈4╮ ╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈5╮
|
||||
┆ ┆ ┆ ┆
|
||||
╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯
|
||||
```
|
||||
-----------
|
||||
```markdown
|
||||
### 1
|
||||
### 2
|
||||
### 3
|
||||
### 4
|
||||
### 5 {.col-span-2}
|
||||
```
|
||||
|
||||
|
||||
#### The second card spans two columns
|
||||
|
||||
```markdown
|
||||
╭┈┈┈┈┈┈┈┈1╮ ╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈2╮
|
||||
┆ ┆ ┆ ┆
|
||||
╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯
|
||||
╭┈┈┈┈┈┈┈┈3╮ ╭┈┈┈┈┈┈┈┈4╮ ╭┈┈┈┈┈┈┈┈5╮
|
||||
┆ ┆ ┆ ┆ ┆ ┆
|
||||
╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯
|
||||
```
|
||||
-----------
|
||||
```markdown
|
||||
### 1
|
||||
### 2 {.col-span-2}
|
||||
### 3
|
||||
### 4
|
||||
### 5
|
||||
```
|
||||
|
||||
#### The fourth card spans two columns
|
||||
|
||||
```markdown
|
||||
╭┈┈┈┈┈┈┈┈1╮ ╭┈┈┈┈┈┈┈┈2╮ ╭┈┈┈┈┈┈┈┈3╮
|
||||
┆ ┆ ┆ ┆ ┆ ┆
|
||||
╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯
|
||||
╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈4╮ ╭┈┈┈┈┈┈┈┈5╮
|
||||
┆ ┆ ┆ ┆
|
||||
╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯
|
||||
```
|
||||
-----------
|
||||
```markdown
|
||||
### 1
|
||||
### 2
|
||||
### 3
|
||||
### 4 {.col-span-2}
|
||||
### 5
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### .row-span-2 {.row-span-2}
|
||||
|
||||
#### The first card spans two rows
|
||||
|
||||
```markdown
|
||||
╭┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮
|
||||
┆ 1 ┆ ┆ 2 ┆ ┆ 3 ┆
|
||||
┆ ┆ ╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯
|
||||
┆ ┆ ╭┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮
|
||||
┆ ┆ ┆ 4 ┆ ┆ 5 ┆
|
||||
╰┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯
|
||||
```
|
||||
----------
|
||||
```markdown
|
||||
### 1 {.row-span-2}
|
||||
### 2
|
||||
### 3
|
||||
### 4
|
||||
### 5
|
||||
```
|
||||
|
||||
#### The second card spans two rows
|
||||
|
||||
```markdown
|
||||
╭┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮
|
||||
┆ 1 ┆ ┆ 2 ┆ ┆ 3 ┆
|
||||
╰┈┈┈┈┈┈┈┈┈╯ ┆ ┆ ╰┈┈┈┈┈┈┈┈┈╯
|
||||
╭┈┈┈┈┈┈┈┈┈╮ ┆ ┆ ╭┈┈┈┈┈┈┈┈┈╮
|
||||
┆ 4 ┆ ┆ ┆ ┆ 5 ┆
|
||||
╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯
|
||||
```
|
||||
---------
|
||||
```markdown
|
||||
### 1
|
||||
### 2 {.row-span-2}
|
||||
### 3
|
||||
### 4
|
||||
### 5
|
||||
```
|
||||
|
||||
#### The third card spans two rows
|
||||
|
||||
```markdown
|
||||
╭┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈╮
|
||||
┆ 1 ┆ ┆ 2 ┆ ┆ 3 ┆
|
||||
╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯ ┆ ┆
|
||||
╭┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮ ┆ ┆
|
||||
┆ 4 ┆ ┆ 5 ┆ ┆ ┆
|
||||
╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈╯
|
||||
```
|
||||
-----------
|
||||
```markdown
|
||||
### 1
|
||||
### 2
|
||||
### 3 {.row-span-2}
|
||||
### 4
|
||||
### 5
|
||||
```
|
||||
|
||||
|
||||
|
||||
### .col-span-2 .row-span-2
|
||||
|
||||
```markdown
|
||||
╭┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮
|
||||
┆ 1 ┆ ┆ 2 ┆
|
||||
┆ ┆ ╰┈┈┈┈┈┈┈┈┈╯
|
||||
┆ ┆ ╭┈┈┈┈┈┈┈┈┈╮
|
||||
┆ ┆ ┆ 3 ┆
|
||||
╰┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯
|
||||
╭┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮ ╭┈┈┈┈┈┈┈┈┈╮
|
||||
┆ 4 ┆ ┆ 5 ┆ ┆ 6 ┆
|
||||
╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯ ╰┈┈┈┈┈┈┈┈┈╯
|
||||
```
|
||||
|
||||
#### ↓ Source Code
|
||||
|
||||
```markdown
|
||||
### 1 {.col-span-2 .row-span-2}
|
||||
### 2
|
||||
### 3
|
||||
### 4
|
||||
### 5
|
||||
```
|
||||
Spans rows and columns at the same time
|
||||
|
||||
|
||||
Code
|
||||
|
||||
@@ -73,6 +73,9 @@ html.scrollbar {
|
||||
}
|
||||
|
||||
/** H2 Wrap **/
|
||||
.mdLayout .h2-wrap {
|
||||
@apply rounded-lg;
|
||||
}
|
||||
|
||||
.mdLayout .h2-wrap:first-child:not(.show) > h2 {
|
||||
/* @apply invisible; */
|
||||
@@ -99,12 +102,6 @@ html.scrollbar {
|
||||
.mdLayout .h2-wrap.cols-4 > .h3-wrap-list { @apply lg:grid-cols-4; }
|
||||
.mdLayout .h2-wrap.cols-5 > .h3-wrap-list { @apply lg:grid-cols-5; }
|
||||
.mdLayout .h2-wrap.cols-6 > .h3-wrap-list { @apply lg:grid-cols-6; }
|
||||
.mdLayout .h2-wrap.cols-7 > .h3-wrap-list { @apply lg:grid-cols-7; }
|
||||
.mdLayout .h2-wrap.cols-8 > .h3-wrap-list { @apply lg:grid-cols-8; }
|
||||
.mdLayout .h2-wrap.cols-9 > .h3-wrap-list { @apply lg:grid-cols-9; }
|
||||
.mdLayout .h2-wrap.cols-10 > .h3-wrap-list { @apply lg:grid-cols-10; }
|
||||
.mdLayout .h2-wrap.cols-11 > .h3-wrap-list { @apply lg:grid-cols-11; }
|
||||
.mdLayout .h2-wrap.cols-12 > .h3-wrap-list { @apply lg:grid-cols-12; }
|
||||
|
||||
|
||||
/** H3 Wrap **/
|
||||
@@ -122,12 +119,6 @@ html.scrollbar {
|
||||
.mdLayout .h3-wrap .cols-4 { @apply grid-cols-4; }
|
||||
.mdLayout .h3-wrap .cols-5 { @apply grid-cols-5; }
|
||||
.mdLayout .h3-wrap .cols-6 { @apply grid-cols-6; }
|
||||
.mdLayout .h3-wrap .cols-7 { @apply grid-cols-7; }
|
||||
.mdLayout .h3-wrap .cols-8 { @apply grid-cols-8; }
|
||||
.mdLayout .h3-wrap .cols-9 { @apply grid-cols-9; }
|
||||
.mdLayout .h3-wrap .cols-10 { @apply grid-cols-10; }
|
||||
.mdLayout .h3-wrap .cols-11 { @apply grid-cols-11; }
|
||||
.mdLayout .h3-wrap .cols-12 { @apply grid-cols-12; }
|
||||
|
||||
|
||||
.mdLayout .h3-wrap {
|
||||
@@ -141,9 +132,9 @@ html.scrollbar {
|
||||
@apply dark:border-slate-600/50 !important;
|
||||
}
|
||||
|
||||
.mdLayout .h3-wrap.boxed {
|
||||
.mdLayout .h2-wrap.boxed, .mdLayout .h3-wrap.boxed {
|
||||
box-shadow: 0 0 0 1.6pt #10b981;
|
||||
transition: box-shadow 0.5s ease-in-out;
|
||||
transition: box-shadow 0.4s ease-in-out;
|
||||
}
|
||||
|
||||
.mdLayout .h3-wrap.primary.boxed {
|
||||
|
||||
@@ -110,7 +110,7 @@ window.addEventListener('load', () => {
|
||||
let anchor = document.querySelector(`a[class="h-anchor"][href="${hash}"]`);
|
||||
if (anchor != null) {
|
||||
let anchorSection = anchor.parentElement.parentElement;
|
||||
document.querySelectorAll(".h3-wrap.boxed").forEach((e) => {
|
||||
document.querySelectorAll(".boxed").forEach((e) => {
|
||||
e.classList.remove("boxed")
|
||||
});
|
||||
let timer = setTimeout(function () {
|
||||
|
||||
Reference in new issue
Block a user