Skip to content

Commit 901270b

Browse files
committed
finalize new layout and content
1 parent 1d2a000 commit 901270b

File tree

4 files changed

+19
-6
lines changed

4 files changed

+19
-6
lines changed

blog/src/Main.xmlui

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<App
22
layout="vertical"
3-
var.showNavPanelThreshold="{0}"
3+
var.showNavPanelThreshold="{6}"
44
var.posts=`{[
55
{
66
title: "Welcome to the XMLUI blog!",
@@ -18,14 +18,20 @@
1818
posts: posts.length
1919
}}" />
2020
<AppHeader>
21+
<property name="logoTemplate">
22+
<CHStack height="$space-6">
23+
<Logo />
24+
<Text variant="em">Tutorials, tips, best practices</Text>
25+
</CHStack>
26+
</property>
2127
<property name="profileMenuTemplate">
28+
<SpaceFiller />
2229
<Link when="{!['/', '/blog'].includes($pathname)}" to="/">
23-
<Button label="Home" />
30+
<Button height="$space-6" padding="$space-2" label="All Posts" />
2431
</Link>
25-
<Search data="{appGlobals.plainTextContent}" />
2632
</property>
2733
</AppHeader>
28-
<NavPanel when="{showNav()}">
34+
<NavPanel>
2935
<NavGroup label="Recent posts" to="/blog">
3036
<NavLink
3137
label="Welcome to the XMLUI blog!"

blog/src/Main.xmlui.xs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
function showNav() {
2+
return posts.length > showNavPanelThreshold && mediaSize.sizeIndex > 2;
3+
}

blog/src/components/BlogOverview.xmlui

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<Component name="BlogOverview">
22
<CVStack>
33
<VStack width="100%">
4-
<H1>XMLUI Blog</H1>
5-
<Text>Latest updates, tutorials, and insights for building with XMLUI</Text>
64
<List data="{
75
$props.posts.sort(function(a, b) {
86
return new Date(b.date) - new Date(a.date);

blog/src/components/Debug.xmlui

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<Component name="Debug">
2+
<AppState id="navState" />
3+
<Text>
4+
navState: {JSON.stringify(navState.value)}, sizeIndex {JSON.stringify(mediaSize.sizeIndex)}, path {$pathname}
5+
</Text>
6+
</Component>

0 commit comments

Comments
 (0)