-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
6 changed files
with
61 additions
and
1 deletion.
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
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 @@ | ||
--- | ||
interface Props { | ||
title: string, | ||
fontSize: string, | ||
background: string, | ||
} | ||
const {title, fontSize, background} = Astro.props | ||
--- | ||
|
||
<div class="w-full h-full font-benderBold flex items-center justify-center select-none" | ||
style=`background: ${background}; font-size: ${fontSize};`> | ||
{title} | ||
</div> |
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,12 @@ | ||
--- | ||
title: 布局 | ||
--- | ||
|
||
# 布局 | ||
|
||
> 参考官方文档:[布局 - 基础知识](https://docs.astro.build/zh-cn/basics/layouts/) | ||
## 布局插槽(slot)关系展示 | ||
|
||
- [RootLayout](../../demo/RootLayoutSlot) | ||
+ [InfoLayout](../../demo/InfoLayoutSlot) |
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
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,25 @@ | ||
--- | ||
import InfoLayout from "../../layouts/InfoLayout.astro"; | ||
import DemoSlotBlock from "../../components/DemoSlotBlock.astro"; | ||
import {SubNavigationItem} from "../../_types/SubNavigationItem"; | ||
const subNavigationItems: SubNavigationItem[] = [...Array(100)] | ||
.map((item, index): SubNavigationItem => ({title: `子导航项 - ${index}`, href: ""})) | ||
--- | ||
|
||
<InfoLayout {...{subNavigationItems}}> | ||
<DemoSlotBlock slot="left-aside" title="LeftAsideSlot" fontSize="3rem" | ||
background="linear-gradient(to bottom right, darkblue, darksalmon)"/> | ||
|
||
<DemoSlotBlock title="Slot" fontSize="25rem" | ||
background="linear-gradient(to bottom right, darkred, darkgreen)"/> | ||
|
||
<DemoSlotBlock slot="aside-header" title="AsideHeaderSlot" fontSize="3rem" | ||
background="linear-gradient(to bottom right, DarkSlateGray, DarkOrchid)"/> | ||
|
||
<DemoSlotBlock slot="aside-footer" title="AsideFooterSlot" fontSize="3rem" | ||
background="linear-gradient(to bottom right, DarkMagenta, DarkOliveGreen )"/> | ||
|
||
<DemoSlotBlock slot="tool-panel" title="ToolPanelSlot" fontSize="3rem" | ||
background="linear-gradient(to bottom right, DarkGoldenRod, Crimson)"/> | ||
</InfoLayout> |
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,8 @@ | ||
--- | ||
import RootLayout from "../../layouts/RootLayout.astro" | ||
import DemoSlotBlock from "../../components/DemoSlotBlock.astro"; | ||
--- | ||
|
||
<RootLayout> | ||
<DemoSlotBlock title="Slot" fontSize="25rem" background="linear-gradient(to bottom right, darkred, darkgreen)"/> | ||
</RootLayout> |