Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2d338d4
- Updated `TopicScreen` to use a `Scaffold` layout with a top app bar…
YugaJ7 May 28, 2025
c7b0c33
- Implement `CodeExampleBox` for displaying code snippets with copy f…
YugaJ7 May 29, 2025
9853a8d
- Removed unnecessary empty lines from `DetailScreen.kt` and `App.kt`.
YugaJ7 May 29, 2025
13f9ef3
- Updated Compose and Material dependencies.
YugaJ7 May 29, 2025
005c05f
Merge remote-tracking branch 'origin/master' into yuga/detail-topic-ui
YugaJ7 May 29, 2025
185e881
- Upgrade Material library to Material3.
YugaJ7 May 30, 2025
0471b58
Remove obsolete drawable resources
YugaJ7 May 30, 2025
21e0a29
- Updated app theming to Material 3.
YugaJ7 May 30, 2025
9e9265d
- Update `TopicScreen` and `DetailScreen` to use Material3 components…
YugaJ7 May 30, 2025
677fd94
Add string resources for UI elements.
YugaJ7 May 30, 2025
808d8fe
- Internationalized `TopicScreen` and `DetailScreen` using string res…
YugaJ7 May 30, 2025
d80dfe6
Merge remote-tracking branch 'origin/master' into yuga/detail-topic-ui
YugaJ7 May 30, 2025
404e829
Add new string resources for error handling.
YugaJ7 May 30, 2025
a1f5312
- Migrate `UiStateHandler` and `ShowAlertDialog` to Material 3 compon…
YugaJ7 May 30, 2025
54c2b40
Integrate `UiStateHandler` into `TopicScreen` and `DetailScreen` for …
YugaJ7 May 30, 2025
3ffb031
- Refined color scheme for both light and dark themes.
YugaJ7 May 31, 2025
851fae4
- Added previews for `CodeExampleBox`, `SearchField`, and `TopicCard`…
YugaJ7 May 31, 2025
3bdede0
- Update Android Previews to use `@PreviewLightDark` for concise ligh…
YugaJ7 Jun 1, 2025
608999d
Remove trailing newlines from preview files.
YugaJ7 Jun 1, 2025
54c0dc8
- Moved search query, filtered topics, and bookmarked states logic to…
yesshreyes Jun 1, 2025
4045399
Rename preview functions
YugaJ7 Jun 1, 2025
b5cb6ae
- Refactored `TopicScreen` and `DetailScreen` to separate layout from…
YugaJ7 Jun 1, 2025
509deea
- Add preview files for Detail and Topic screens.
YugaJ7 Jun 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions composeApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,10 @@ kotlin {
val desktopMain by getting

androidMain.dependencies {
implementation(compose.preview)
implementation("androidx.compose.ui:ui:1.8.2")
implementation(libs.androidx.activity.compose)
implementation(libs.koin.android)
implementation(libs.koin.androidx.compose)
implementation(compose.components.uiToolingPreview)
}
commonMain.dependencies {
implementation(compose.runtime)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schemas.android.com/apk/res/android ">
<path
android:pathData="M200,840v-640q0,-33 23.5,-56.5T280,120h400q33,0 56.5,23.5T760,200v640L480,720 200,840ZM280,718 L480,632 680,718v-518L280,200v518ZM280,200h400,-400Z"
android:fillColor="#e3e3e3" />
</vector>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schemas.android.com/apk/res/android ">
<path
android:pathData="M17,3H7c-1.1,0 -2,0.9 -2,2v16l7,-3 7,3V5c0,-1.1 -0.9,-2 -2,-2z"
android:fillColor="#EFEFEF" />
</vector>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960">
<path
android:pathData="M382,720 L154,492l57,-57 171,171 367,-367 57,57 -424,424Z"
android:fillColor="#EFEFEF"/>
</vector>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960">
<path
android:pathData="M360,720q-33,0 -56.5,-23.5T280,640v-480q0,-33 23.5,-56.5T360,80h360q33,0 56.5,23.5T800,160v480q0,33 -23.5,56.5T720,720L360,720ZM360,640h360v-480L360,160v480ZM200,880q-33,0 -56.5,-23.5T120,800v-560h80v560h440v80L200,880ZM360,640v-480,480Z"
android:fillColor="#EFEFEF"/>
</vector>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ package com.developersbreach.kotlindictionarymultiplatform

import androidx.compose.material.MaterialTheme
import androidx.compose.runtime.Composable
import com.developersbreach.kotlindictionarymultiplatform.theme.AppTypography
import com.developersbreach.kotlindictionarymultiplatform.ui.navigation.AppNavigation

@Composable
fun App() {
MaterialTheme {
MaterialTheme(
typography = AppTypography(),
) {
AppNavigation()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.developersbreach.kotlindictionarymultiplatform.theme

import androidx.compose.ui.graphics.Color

val Brown = Color(0xFF221F1A)
val Cream = Color(0xFFFFD39A)
val Grey = Color(0xFFEFEBE8)
val White = Color(0xFFFEF9F9)
val Cream40 = Color(0xFFFDE6DA)
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package com.developersbreach.kotlindictionarymultiplatform.theme

import androidx.compose.material.Typography
import androidx.compose.runtime.Composable
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.sp
import kotlindictionarymultiplatform.composeapp.generated.resources.Res
import kotlindictionarymultiplatform.composeapp.generated.resources.noto_sans_bold
import kotlindictionarymultiplatform.composeapp.generated.resources.noto_sans_medium
import kotlindictionarymultiplatform.composeapp.generated.resources.noto_sans_regular
import org.jetbrains.compose.resources.ExperimentalResourceApi
import org.jetbrains.compose.resources.Font

@OptIn(ExperimentalResourceApi::class)
@Composable
fun AppTypography(): Typography {
val fontFamily = FontFamily(
Font(Res.font.noto_sans_regular, weight = FontWeight.Normal),
Font(Res.font.noto_sans_medium, weight = FontWeight.Medium),
Font(Res.font.noto_sans_bold, weight = FontWeight.Bold),
)

return Typography(
h1 = TextStyle(fontFamily = fontFamily, fontWeight = FontWeight.Bold, fontSize = 30.sp),
h2 = TextStyle(fontFamily = fontFamily, fontWeight = FontWeight.Bold, fontSize = 20.sp),
h3 = TextStyle(fontFamily = fontFamily, fontWeight = FontWeight.Medium, fontSize = 24.sp),
h4 = TextStyle(fontFamily = fontFamily, fontWeight = FontWeight.Medium, fontSize = 18.sp),
body1 = TextStyle(fontFamily = fontFamily, fontWeight = FontWeight.Normal, fontSize = 16.sp),
body2 = TextStyle(fontFamily = fontFamily, fontWeight = FontWeight.Normal, fontSize = 14.sp),
subtitle1 = TextStyle(fontFamily = fontFamily, fontWeight = FontWeight.Medium, fontSize = 16.sp),
subtitle2 = TextStyle(fontFamily = fontFamily, fontWeight = FontWeight.Medium, fontSize = 14.sp),
button = TextStyle(fontFamily = fontFamily, fontWeight = FontWeight.Bold, fontSize = 14.sp),
caption = TextStyle(fontFamily = fontFamily, fontWeight = FontWeight.Normal, fontSize = 12.sp),
overline = TextStyle(fontFamily = fontFamily, fontWeight = FontWeight.Normal, fontSize = 10.sp),
)
}
Loading
Loading