Skip to content

Commit

Permalink
Single page with local storage synchronization
Browse files Browse the repository at this point in the history
  • Loading branch information
jin committed Apr 29, 2021
0 parents commit ec7f504
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* -text
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-*
14 changes: 14 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!doctype html>
<html style=" height: 100% ">

<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1">
</head>

<body style=" width: 100%; height: 100%; margin: 0 ">
<div mol_view_root="$my_wiki"></div>
<script src="web.js"></script>
</body>

</html>
11 changes: 11 additions & 0 deletions wiki.view.css.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace $ {

$mol_style_define( $my_wiki, {

Body: {
padding: $mol_gap.block,
},

} )

}
6 changes: 6 additions & 0 deletions wiki.view.tree
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
$my_wiki $mol_page
title \My Wiki
body /
<= Text $mol_textarea
hint \What do you think?
value?val <=> text?val \
11 changes: 11 additions & 0 deletions wiki.view.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace $.$$ {

export class $my_wiki extends $.$my_wiki {

text( next?: string ) {
return this.$.$mol_state_local.value( 'text', next ) ?? ''
}

}

}

0 comments on commit ec7f504

Please sign in to comment.