Skip to content

Commit 39f4602

Browse files
ui update
1 parent 337fe99 commit 39f4602

4 files changed

Lines changed: 41 additions & 109 deletions

File tree

project-files/Portfolio/markdown/portfolio.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,42 @@
11
# My Portfolio
2-
#Date December 25, 2021
2+
#Date December 27, 2021
33

4-
This is my portfolio. It is a KMM project which runs on Web, Android, iOS. The business logic is written in Kotlin. The Web app is written in Kotlin, built using Jetpack Compose for Web. The Android app is written in Kotlin, built using Jetpack Compose. The iOS app UI is written in Swift, built using Swift UI and it uses the KMM shared module for business logic.
4+
This is my portfolio. It is a KMM project which currently supports Web, Android & iOS clients coming soon. The Web app is written in Kotlin, built using Jetpack Compose for Web and it has a KMM shared module for business logic.
55

6-
### Building the Web App
6+
### Web App
77

88
Just run the kotlin script file buildWebsite.kts, it will spit out the built website in build/ folder.
99

10-
```
10+
```shell
1111
kotlinc -script buildWebsite.kts
1212
```
1313

14-
Make sure you have Kotlin 1.6.0 CLI and Java 11 installed. Or, just run the Build Web HTML & JS Files workflow and download the artifacts.
14+
Make sure you have Kotlin 1.6.0 CLI and Java 11 installed.
1515

16-
### Building the Android App
16+
Run tests for shared module:
1717

18-
Coming soon...
18+
```shell
19+
./gradlew :shared:cleanJsBrowserTest :shared:jsBrowserTest
20+
```
1921

20-
### Building the iOS App
22+
### Android App
2123

2224
Run tests for shared module:
23-
```
25+
26+
```shell
2427
./gradlew :shared:cleanTestDebugUnitTest :shared:testDebugUnitTest
2528
```
2629

30+
### iOS App
31+
32+
Coming soon...
33+
2734
### Get the App
2835

2936
!Btn[Go to the Web App](https://amanshuraikwar.github.io)
3037

38+
!Btn[Go to the source code](https://github.com/amanshuraikwar/amanshuraikwar.github.io)
39+
3140
### Special Thanks :)
3241

3342
Special thanks to John O'Reilly's People in Space repo, which I found extremely helpful for getting started with KMM.

project-files/Portfolio/shared/src/commonTest/kotlin/io.github.amanshuraikwar.portfolio/ThemeDataTest.kt

Lines changed: 6 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ class ThemeDataTest {
9797
}
9898
//endregion
9999

100+
//region theme colors name
100101
@Test
101102
@JsName("defaultSelectedThemeColorsNameAndTheThemeExists")
102103
fun `default selected theme colors name and the theme exists`() {
@@ -249,7 +250,9 @@ class ThemeDataTest {
249250
)
250251
}
251252
}
253+
//endregion
252254

255+
//region theme colors
253256
@Test
254257
@JsName("defaultSelectedThemeColorsAndTheThemeExists")
255258
fun `default selected theme colors and the theme exists`() {
@@ -393,7 +396,9 @@ class ThemeDataTest {
393396
)
394397
}
395398
}
399+
//endregion
396400

401+
//region theme data
397402
@Test
398403
@JsName("defaultThemeData")
399404
fun `default theme data`() {
@@ -640,6 +645,7 @@ class ThemeDataTest {
640645
)
641646
}
642647
}
648+
//endregion
643649

644650
companion object {
645651
private fun String.isAccurateColorString(): Boolean {
@@ -699,91 +705,4 @@ class ThemeDataTest {
699705
private val MOCK_THEME_DATA_API_RESPONSE =
700706
Json.encodeToString(ThemeDataResponse.serializer(), DEFAULT_THEME_DATA_RESPONSE)
701707
}
702-
703-
/*
704-
@Test
705-
@JsName("verifyLocalJsonSerializationIsWorking")
706-
fun `verify local json serialization is working`() {
707-
val mockEngine = MockEngine { request ->
708-
if (request.url.toString().endsWith("/theme.json")) {
709-
respond(
710-
content = ByteReadChannel(
711-
readBinaryResource("api/theme.json").toString()
712-
),
713-
status = HttpStatusCode.OK,
714-
headers = headersOf(HttpHeaders.ContentType, "application/json")
715-
)
716-
} else {
717-
respond(content = ByteReadChannel(""))
718-
}
719-
}
720-
721-
val portfolioApi = PortfolioApi(
722-
PortfolioApi.createHttpClient(
723-
engine = mockEngine,
724-
enableNetworkLogs = true
725-
)
726-
)
727-
728-
runTest {
729-
assertEquals(
730-
ThemeDataResponse(
731-
listOf(
732-
ThemeColorsDataResponse(
733-
name = "Dark Salmon",
734-
isDark = true,
735-
primaryColor = "#FFFFCDD2",
736-
onPrimaryColor = "#FF4E342E",
737-
surfaceColor = "#FF212121",
738-
onSurfaceColor = "#FFffffff",
739-
errorColor = "#FFE57373",
740-
onErrorColor = "#FF4E342E",
741-
),
742-
ThemeColorsDataResponse(
743-
name = "Light Blue",
744-
isDark = false,
745-
primaryColor = "#ffEA5C5A",
746-
onPrimaryColor = "#FFffffff",
747-
surfaceColor = "#ffCDECF9",
748-
onSurfaceColor = "#FF030204",
749-
errorColor = "#FFE57373",
750-
onErrorColor = "#FF212121",
751-
),
752-
ThemeColorsDataResponse(
753-
name = "Matt D'av Ella",
754-
isDark = false,
755-
primaryColor = "#ffE35638",
756-
onPrimaryColor = "#FFFADACA",
757-
surfaceColor = "#ffFBF8EC",
758-
onSurfaceColor = "#FF24242C",
759-
errorColor = "#FFE57373",
760-
onErrorColor = "#FF212121",
761-
),
762-
ThemeColorsDataResponse(
763-
name = "Google",
764-
isDark = false,
765-
primaryColor = "#ff4285F4",
766-
onPrimaryColor = "#FFffffff",
767-
surfaceColor = "#ffffffff",
768-
onSurfaceColor = "#FF212121",
769-
errorColor = "#FFE57373",
770-
onErrorColor = "#FF212121",
771-
),
772-
ThemeColorsDataResponse(
773-
name = "Spotify",
774-
isDark = true,
775-
primaryColor = "#ff1FDF64",
776-
onPrimaryColor = "#FF212121",
777-
surfaceColor = "#ff212121",
778-
onSurfaceColor = "#FFFFFFFF",
779-
errorColor = "#FFE57373",
780-
onErrorColor = "#FF212121",
781-
)
782-
)
783-
),
784-
portfolioApi.getThemeData()
785-
)
786-
}
787-
}
788-
*/
789708
}

project-files/Portfolio/web/src/jsMain/kotlin/com/sample/content/Footer.kt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,6 @@ fun Footer(
5959
classes(WtContainer.wtContainerSm)
6060
}
6161
) {
62-
GithubBuildStatus(
63-
attrs = {
64-
classes(
65-
WtOffsets.wtTopOffset96,
66-
WtOffsets.wtTopOffsetSm48,
67-
)
68-
}
69-
)
70-
7162
Div(
7263
attrs = {
7364
classes(
@@ -83,11 +74,20 @@ fun Footer(
8374
Text(madeWith)
8475
}
8576

77+
GithubBuildStatus(
78+
attrs = {
79+
classes(
80+
WtOffsets.wtTopOffset24,
81+
WtOffsets.wtTopOffsetSm12,
82+
)
83+
}
84+
)
85+
8686
Div(
8787
attrs = {
8888
classes(
89-
WtOffsets.wtTopOffset48,
90-
WtOffsets.wtTopOffsetSm24,
89+
WtOffsets.wtTopOffset96,
90+
WtOffsets.wtTopOffsetSm48,
9191
)
9292
style {
9393
display(DisplayStyle.Flex)

project-files/Portfolio/web/src/jsMain/resources/api/portfolio_data.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
{
4848
"id": "portfolio",
4949
"title": "My Portfolio",
50-
"description": "This beautiful webpage you are on right now. Built using KMM.",
50+
"description": "This beautiful webpage you are on right now. Built using KMM & Jetpack Compose.",
5151
"appLinks": [
5252
{
5353
"type": "github",
@@ -60,11 +60,15 @@
6060
{
6161
"id": "nextbus",
6262
"title": "Next Bus SG",
63-
"description": "A beautiful bus timing app for Singapore built with Jetpack Compose",
63+
"description": "A beautiful bus timing app for Singapore built with Jetpack Compose, Swift UI & KMM",
6464
"appLinks": [
6565
{
6666
"type": "playstore",
6767
"url": "https://play.google.com/store/apps/details?id=io.github.amanshuraikwar.nxtbuz.release"
68+
},
69+
{
70+
"type": "other",
71+
"url": "https://amanshuraikwar.github.io/nextbus/"
6872
}
6973
],
7074
"maintained": true,

0 commit comments

Comments
 (0)