Skip to content

Commit 4c53582

Browse files
authored
Blog layout 2 (#2231)
1 parent 1c37466 commit 4c53582

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

blog/src/Main.xmlui

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@
1010
image: "blog-scrabble.png"
1111
}
1212
]}`>
13-
<Button variant="ghost" label="toggle threshold" padding="$space-1" onClick="toggleThreshold()" />
13+
<!--
14+
<HStack verticalAlignment="center">
15+
<Button variant="ghost" label="toggle showNav" onClick="toggleThreshold()" />
16+
<Text>{showNav()}</Text>
17+
</HStack>
18+
-->
1419
<AppState
1520
id="navState"
1621
initialValue="{{
@@ -32,7 +37,7 @@
3237
</Link>
3338
</property>
3439
</AppHeader>
35-
<NavPanel when="{showNav()}" >
40+
<NavPanel when="{showNav()}">
3641
<NavGroup label="Recent posts" to="/blog">
3742
<NavLink
3843
label="Welcome to the XMLUI blog!"

blog/src/Main.xmlui.xs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
function showNav() {
2-
return posts.length > showNavPanelThreshold && mediaSize.sizeIndex > 2;
2+
return posts.length > showNavPanelThreshold;
33
}
44

55
function toggleThreshold() {

0 commit comments

Comments
 (0)