Skip to content
This repository was archived by the owner on Jun 17, 2024. It is now read-only.

Commit 0dc69a4

Browse files
committed
feat: add help page
1 parent 5d6181e commit 0dc69a4

File tree

12 files changed

+78
-8
lines changed

12 files changed

+78
-8
lines changed

app/assets/views/help.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<lcui-app>
3+
<ui>
4+
<w class="container">
5+
<text class="v-help__title">About this app</text>
6+
<about />
7+
</w>
8+
</ui>
9+
</lcui-app>

app/assets/views/home.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
<icon class="v-home__card-icon text-pink" name="emoticon-cool-outline" />
77
<text class="v-home__card-title">Welcome!</text>
88
</router-link>
9+
<router-link class="v-home__card" to="/help">
10+
<icon class="v-home__card-icon text-blue" name="help-box" />
11+
<text class="v-home__card-title">About</text>
12+
</router-link>
913
</w>
1014
</ui>
1115
</lcui-app>

config/router.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ module.exports = [
1010
component: 'welcome'
1111
},
1212
{
13-
name: 'about',
14-
path: '/about',
15-
component: 'about'
13+
name: 'help',
14+
path: '/help',
15+
component: 'help'
1616
},
1717
{
1818
path: '*',

include/version.h.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#define APP_NAME L"{{name}}"
1+
#define APP_NAME L"LCUI Router App"
22
#define APP_VERSION "{{version}}"
33
#define APP_BUILD_TIME "{{build_time}}"
44
#define APP_DESCRIPTION L"{{description}}"

src/lib/router.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ static void router_add_default_config(router_t *router)
2020
router_config_destroy(config);
2121

2222
config = router_config_create();
23-
router_config_set_name(config, "about");
24-
router_config_set_path(config, "/about");
25-
router_config_set_component(config, NULL, "about");
23+
router_config_set_name(config, "help");
24+
router_config_set_path(config, "/help");
25+
router_config_set_component(config, NULL, "help");
2626
router_add_route_record(router, config, NULL);
2727
router_config_destroy(config);
2828

src/ui/stylesheets/_variables.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,5 +97,5 @@ $home-card-width: 112px;
9797
$home-card-spacing: 16px;
9898
$home-card-bg-hover: $gray-100;
9999
$home-card-icon-size: 48px;
100-
$home-card-icon-bg: $gray-300;
100+
$home-card-icon-bg: $gray-200;
101101
$home-card-title-line-height: 24px;

src/ui/stylesheets/_views.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
@import "views/browser";
33
@import "views/welcome";
44
@import "views/home";
5+
@import "views/help";

src/ui/stylesheets/app.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
color: $pink;
77
}
88

9+
.text-blue {
10+
color: $blue;
11+
}
12+
913
textview, a {
1014
color: $primary-text-color;
1115
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.v-help {
2+
background-color: #f8f9fa;
3+
4+
.v-help__title {
5+
margin-top: 24px;
6+
margin-bottom: 16px;
7+
}
8+
9+
.container {
10+
max-width: 680px;
11+
}
12+
}

src/ui/views.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
#include "views/browser.h"
66
#include "views/welcome.h"
77
#include "views/home.h"
8+
#include "views/help.h"
89

910
void UI_InitViews(void)
1011
{
12+
UI_InitHelpView();
1113
UI_InitHomeView();
1214
UI_InitWelcomeView();
1315
UI_InitBrowserView();

0 commit comments

Comments
 (0)