@@ -14,7 +14,6 @@ import lustre/element/html
1414import lustre/event
1515
1616pub fn home ( model : Model ) {
17- let toggle_mode = event . on_click ( msg . UserToggledDarkMode )
1817 html . div ( [ class ( "bg-white dark:bg-gray-900" ) ] , [
1918 html . div (
2019 [
@@ -28,22 +27,19 @@ pub fn home(model: Model) {
2827 [
2928 html . main ( [ class ( "grow" ) ] , [
3029 html . section ( [ ] , [
31- html . div ( [ id ( "nav" ) , class ( "flex justify-between items-center" ) ] , [
32- html . a (
33- [
34- attribute . href ( "https://hex.pm/" ) ,
35- class ( "text-sm text-gray-600 dark:text-gray-100" ) ,
36- ] ,
37- [ html . text ( "← Go back to Hex" ) ] ,
38- ) ,
39- html . button (
40- [
41- toggle_mode ,
42- class ( "p-3 text-gray-700 dark:text-gray-100 mt-10" ) ,
43- ] ,
44- [ html . i ( [ class ( "theme-icon text-xl" ) ] , [ ] ) ] ,
45- ) ,
46- ] ) ,
30+ html . div (
31+ [ id ( "nav" ) , class ( "flex justify-between items-center mt-2" ) ] ,
32+ [
33+ html . a (
34+ [
35+ attribute . href ( "https://hex.pm/" ) ,
36+ class ( "text-sm text-gray-600 dark:text-gray-100" ) ,
37+ ] ,
38+ [ html . text ( "← Go back to Hex" ) ] ,
39+ ) ,
40+ html . div ( [ ] , [ components . dark_mode_toggle ( model ) ] ) ,
41+ ] ,
42+ ) ,
4743 html . div (
4844 [ class ( "flex flex-col justify-around mt-14 md:mt-26 lg:mt-40" ) ] ,
4945 [
0 commit comments