11package com.ucasoft.komm.website
22
3+ import com.ucasoft.komm.website.data.PathItem
34import mui.material.*
45import mui.material.styles.TypographyVariant
56import mui.system.responsive
67import mui.system.sx
78import react.FC
9+ import react.Props
810import react.create
911import react.dom.html.ReactHTML.a
1012import web.cssom.*
@@ -23,7 +25,11 @@ val footerLinks = mapOf(
2325 )
2426)
2527
26- val Footer = FC {
28+ external interface FooterProps : Props {
29+ var isMobile: Boolean
30+ }
31+
32+ val Footer = FC <FooterProps > {
2733 Box {
2834 sx {
2935 backgroundColor = Color (" text.primary" )
@@ -52,44 +58,48 @@ val Footer = FC {
5258 }
5359 Logo {}
5460 }
55- Typography {
56- variant = TypographyVariant .body2
57- sx {
58- color = rgb(255 , 255 , 255 , 0.7 )
59- }
60- + " KOMM is a powerful Kotlin Symbol Processing (KSP) based library for mapping between object models in Kotlin Multiplatform projects."
61- }
62- }
63- footerLinks.map {
64- Grid {
65- item = true
66- asDynamic().xs = responsive(12 )
67- asDynamic().sm = responsive(6 )
68- asDynamic().md = responsive(4 )
61+ if (! it.isMobile) {
6962 Typography {
70- variant = TypographyVariant .h6
63+ variant = TypographyVariant .body2
7164 sx {
72- marginBottom = 3 .px
65+ color = rgb( 255 , 255 , 255 , 0.7 )
7366 }
74- + it.key
67+ + " KOMM is a powerful Kotlin Symbol Processing (KSP) based library for mapping between object models in Kotlin Multiplatform projects. "
7568 }
76- List {
77- disablePadding = true
78- it.value.map {
79- ListItem {
80- disableGutters = true
81- disablePadding = true
82- ListItemText {
83- primary = Typography .create {
84- variant = TypographyVariant .body2
85- component = a
86- asDynamic().href = it.key
87- asDynamic().target = " _blank"
88- sx {
89- color = rgb(255 , 255 , 255 , 0.7 )
69+ }
70+ }
71+ if (! it.isMobile) {
72+ footerLinks.map {
73+ Grid {
74+ item = true
75+ asDynamic().xs = responsive(12 )
76+ asDynamic().sm = responsive(6 )
77+ asDynamic().md = responsive(4 )
78+ Typography {
79+ variant = TypographyVariant .h6
80+ sx {
81+ marginBottom = 3 .px
82+ }
83+ + it.key
84+ }
85+ List {
86+ disablePadding = true
87+ it.value.map {
88+ ListItem {
89+ disableGutters = true
90+ disablePadding = true
91+ ListItemText {
92+ primary = Typography .create {
93+ variant = TypographyVariant .body2
94+ component = a
95+ asDynamic().href = it.key
96+ asDynamic().target = " _blank"
97+ sx {
98+ color = rgb(255 , 255 , 255 , 0.7 )
9099
100+ }
101+ + it.value
91102 }
92- + it.value
93103 }
94104 }
95105 }
0 commit comments