diff --git a/composeApp/src/commonMain/kotlin/component/ComposeUtils.kt b/composeApp/src/commonMain/kotlin/component/ComposeUtils.kt index ee77d10..75092d5 100644 --- a/composeApp/src/commonMain/kotlin/component/ComposeUtils.kt +++ b/composeApp/src/commonMain/kotlin/component/ComposeUtils.kt @@ -7,12 +7,15 @@ import androidx.compose.ui.platform.LocalWindowInfo import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp +@Composable +fun isLargeScreen(): Boolean = screenWidth() > 600.dp + @OptIn(ExperimentalComposeUiApi::class) @Composable -fun isLargeScreen(): Boolean { +fun screenWidth(): Dp { val density = LocalDensity.current val containerSize = LocalWindowInfo.current.containerSize - return containerSize.width > with(density) { 600.dp.toPx() } + return with(density) { containerSize.width.toDp() } } @Composable diff --git a/composeApp/src/commonMain/kotlin/ui/screen/course/composable/LessonCard.kt b/composeApp/src/commonMain/kotlin/ui/screen/course/composable/LessonCard.kt index f1ed813..1be510f 100644 --- a/composeApp/src/commonMain/kotlin/ui/screen/course/composable/LessonCard.kt +++ b/composeApp/src/commonMain/kotlin/ui/screen/course/composable/LessonCard.kt @@ -12,6 +12,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp +import component.isLargeScreen import component.text.SubTitle import component.text.Title import io.kamel.image.KamelImage @@ -28,7 +29,9 @@ fun LessonCard( onLessonClick: () -> Unit ) { Card( - modifier = modifier.sizeIn(maxWidth = 600.dp), + modifier = modifier + .sizeIn(maxWidth = 600.dp) + .fillMaxWidth(), shape = RoundedCornerShape(24.dp), elevation = 4.dp, border = BorderStroke( @@ -42,25 +45,25 @@ fun LessonCard( onClick = onLessonClick ) { Row { - val height = 132.dp + val height = 148.dp LessonImage( modifier = Modifier.height(height), imageUrl = lesson.imageUrl ) Column( - modifier = Modifier.height(height), + modifier = Modifier.height(height) + .padding( + start = if (isLargeScreen()) 24.dp else 20.dp, + end = if (isLargeScreen()) 16.dp else 12.dp + ), verticalArrangement = Arrangement.Center, ) { Title( - modifier = Modifier.padding(horizontal = 16.dp), text = lesson.name, fontWeight = FontWeight.Bold ) Spacer(Modifier.height(4.dp)) - SubTitle( - modifier = Modifier.padding(horizontal = 16.dp), - text = lesson.tagline - ) + SubTitle(text = lesson.tagline) } } } @@ -73,8 +76,8 @@ private fun LessonImage( ) { KamelImage( modifier = modifier - .aspectRatio(0.8f), - contentScale = ContentScale.FillHeight, + .aspectRatio(1f), + contentScale = ContentScale.Crop, contentAlignment = Alignment.CenterStart, resource = asyncPainterResource(imageUrl), contentDescription = null diff --git a/composeApp/src/commonMain/kotlin/ui/screen/home/composable/CourseCard.kt b/composeApp/src/commonMain/kotlin/ui/screen/home/composable/CourseCard.kt index 7c284d0..bf1612b 100644 --- a/composeApp/src/commonMain/kotlin/ui/screen/home/composable/CourseCard.kt +++ b/composeApp/src/commonMain/kotlin/ui/screen/home/composable/CourseCard.kt @@ -14,6 +14,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp +import component.isLargeScreen import component.text.SubTitle import component.text.Title import io.kamel.image.KamelImage @@ -39,7 +40,8 @@ fun CourseCard( imageUrl = course.imageUrl, onClick = onCourseClick ) - Spacer(Modifier.height(16.dp)) + val isLargeScreen = isLargeScreen() + Spacer(Modifier.height(if (isLargeScreen) 24.dp else 20.dp)) Title( modifier = Modifier.padding(horizontal = 16.dp), text = course.name, @@ -50,7 +52,7 @@ fun CourseCard( modifier = Modifier.padding(horizontal = 16.dp), text = course.tagline ) - Spacer(Modifier.height(16.dp)) + Spacer(Modifier.height(if (isLargeScreen) 32.dp else 24.dp)) } } } @@ -65,8 +67,8 @@ private fun Banner( KamelImage( modifier = modifier .fillMaxWidth() - .height(148.dp), - contentScale = ContentScale.FillWidth, + .aspectRatio(4f), + contentScale = ContentScale.Crop, resource = asyncPainterResource(imageUrl), contentDescription = null ) diff --git a/composeApp/src/commonMain/kotlin/ui/screen/home/composable/HomeContent.kt b/composeApp/src/commonMain/kotlin/ui/screen/home/composable/HomeContent.kt index 38f81ae..c4ec8f9 100644 --- a/composeApp/src/commonMain/kotlin/ui/screen/home/composable/HomeContent.kt +++ b/composeApp/src/commonMain/kotlin/ui/screen/home/composable/HomeContent.kt @@ -10,10 +10,7 @@ import androidx.compose.foundation.lazy.grid.items import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp -import component.BackButton -import component.LearnScaffold -import component.isLargeScreen -import component.platformHorizontalPadding +import component.* import ivy.model.CourseId import ui.screen.home.HomeItemViewState import ui.screen.home.HomeViewEvent @@ -32,14 +29,20 @@ fun HomeContent( ), title = "Learn" ) { contentPadding -> - val columnsCount = if (isLargeScreen()) 3 else 2 + val columnsCount = when (screenWidth().value) { + in 0f..600f -> 1 + in 600f..1200f -> 2 + else -> 3 + } val horizontalPadding = platformHorizontalPadding() LazyVerticalGrid( modifier = Modifier.padding(contentPadding), columns = GridCells.Fixed( count = columnsCount ), - verticalArrangement = Arrangement.spacedBy(12.dp), + verticalArrangement = Arrangement.spacedBy( + if (isLargeScreen()) 16.dp else 12.dp + ), horizontalArrangement = Arrangement.spacedBy( if (isLargeScreen()) 24.dp else 12.dp ), diff --git a/server/src/main/kotlin/ivy/learn/data/cms/TopicsContent.kt b/server/src/main/kotlin/ivy/learn/data/cms/TopicsContent.kt index 0774522..3b3ccbc 100644 --- a/server/src/main/kotlin/ivy/learn/data/cms/TopicsContent.kt +++ b/server/src/main/kotlin/ivy/learn/data/cms/TopicsContent.kt @@ -1,5 +1,10 @@ package ivy.learn.data.cms +import ivy.learn.data.cms.course.android.AndroidArchitecture +import ivy.learn.data.cms.course.android.ScreenArchitecture +import ivy.learn.data.cms.course.kotlin.DataModeling +import ivy.learn.data.cms.course.kotlin.ErrorHandling +import ivy.learn.data.cms.course.kotlin.KotlinDSLs import ivy.learn.data.cms.course.programming.* import ivy.learn.data.cms.dsl.TopicsDsl @@ -12,9 +17,12 @@ object TopicsContent : TopicsDsl({ course(ObjectOrientedProgramming) } topic("Kotlin") { - + course(DataModeling) + course(ErrorHandling) + course(KotlinDSLs) } - topic("Compose") { - + topic("Android") { + course(AndroidArchitecture) + course(ScreenArchitecture) } }) \ No newline at end of file diff --git a/server/src/main/kotlin/ivy/learn/data/cms/course/CoursesContent.kt b/server/src/main/kotlin/ivy/learn/data/cms/course/CoursesContent.kt index 95489b4..870ffa1 100644 --- a/server/src/main/kotlin/ivy/learn/data/cms/course/CoursesContent.kt +++ b/server/src/main/kotlin/ivy/learn/data/cms/course/CoursesContent.kt @@ -1,5 +1,10 @@ package ivy.learn.data.cms.course +import ivy.learn.data.cms.course.android.AndroidArchitecture +import ivy.learn.data.cms.course.android.ScreenArchitecture +import ivy.learn.data.cms.course.kotlin.DataModeling +import ivy.learn.data.cms.course.kotlin.ErrorHandling +import ivy.learn.data.cms.course.kotlin.KotlinDSLs import ivy.learn.data.cms.course.programming.* import ivy.learn.data.cms.dsl.CoursesDsl @@ -9,4 +14,11 @@ object CoursesContent : CoursesDsl({ course(DataStructures) course(FunctionalProgramming) course(ObjectOrientedProgramming) + + course(DataModeling) + course(ErrorHandling) + course(KotlinDSLs) + + course(AndroidArchitecture) + course(ScreenArchitecture) }) \ No newline at end of file diff --git a/server/src/main/kotlin/ivy/learn/data/cms/course/android/AndroidArchitecture.kt b/server/src/main/kotlin/ivy/learn/data/cms/course/android/AndroidArchitecture.kt new file mode 100644 index 0000000..8222358 --- /dev/null +++ b/server/src/main/kotlin/ivy/learn/data/cms/course/android/AndroidArchitecture.kt @@ -0,0 +1,9 @@ +package ivy.learn.data.cms.course.android + +import ivy.learn.data.cms.dsl.CourseDsl + +object AndroidArchitecture : CourseDsl({ + name = "Android Architecture" + tagline = "Data, Domain, UI and everything in between." + imageUrl = "https://i.ibb.co/9c4YGz2/android-architecture.webp" +}) \ No newline at end of file diff --git a/server/src/main/kotlin/ivy/learn/data/cms/course/android/ScreenArchitecture.kt b/server/src/main/kotlin/ivy/learn/data/cms/course/android/ScreenArchitecture.kt new file mode 100644 index 0000000..72f7cce --- /dev/null +++ b/server/src/main/kotlin/ivy/learn/data/cms/course/android/ScreenArchitecture.kt @@ -0,0 +1,9 @@ +package ivy.learn.data.cms.course.android + +import ivy.learn.data.cms.dsl.CourseDsl + +object ScreenArchitecture : CourseDsl({ + name = "Screen Architecture" + tagline = "MVP, MVVM, MVI, Compose-MVI and more." + imageUrl = "https://i.ibb.co/hmqPVTQ/android-screen-arch.webp" +}) \ No newline at end of file diff --git a/server/src/main/kotlin/ivy/learn/data/cms/course/kotlin/DataModeling.kt b/server/src/main/kotlin/ivy/learn/data/cms/course/kotlin/DataModeling.kt new file mode 100644 index 0000000..1893cef --- /dev/null +++ b/server/src/main/kotlin/ivy/learn/data/cms/course/kotlin/DataModeling.kt @@ -0,0 +1,9 @@ +package ivy.learn.data.cms.course.kotlin + +import ivy.learn.data.cms.dsl.CourseDsl + +object DataModeling : CourseDsl({ + name = "Data Modeling" + tagline = "Data classes, sealed interfaces and more." + imageUrl = "https://i.ibb.co/17D5rP6/kotlin-data-modeling.webp" +}) \ No newline at end of file diff --git a/server/src/main/kotlin/ivy/learn/data/cms/course/kotlin/ErrorHandling.kt b/server/src/main/kotlin/ivy/learn/data/cms/course/kotlin/ErrorHandling.kt new file mode 100644 index 0000000..563476a --- /dev/null +++ b/server/src/main/kotlin/ivy/learn/data/cms/course/kotlin/ErrorHandling.kt @@ -0,0 +1,9 @@ +package ivy.learn.data.cms.course.kotlin + +import ivy.learn.data.cms.dsl.CourseDsl + +object ErrorHandling : CourseDsl({ + name = "Error Handling" + tagline = "Gracefully handle errors in FP-style." + imageUrl = "https://i.ibb.co/k9brdsZ/kotlin-error-handling.webp" +}) \ No newline at end of file diff --git a/server/src/main/kotlin/ivy/learn/data/cms/course/kotlin/KotlinDSLs.kt b/server/src/main/kotlin/ivy/learn/data/cms/course/kotlin/KotlinDSLs.kt new file mode 100644 index 0000000..5f2e4ea --- /dev/null +++ b/server/src/main/kotlin/ivy/learn/data/cms/course/kotlin/KotlinDSLs.kt @@ -0,0 +1,9 @@ +package ivy.learn.data.cms.course.kotlin + +import ivy.learn.data.cms.dsl.CourseDsl + +object KotlinDSLs : CourseDsl({ + name = "Kotlin DSLs" + tagline = "Creating Domain Specific Languages (DSLs) in Kotlin." + imageUrl = "https://i.ibb.co/TkVMbSf/kotlin-dsl.webp" +}) \ No newline at end of file diff --git a/server/src/main/kotlin/ivy/learn/data/cms/course/programming/DataStructures.kt b/server/src/main/kotlin/ivy/learn/data/cms/course/programming/DataStructures.kt index 6721287..33da919 100644 --- a/server/src/main/kotlin/ivy/learn/data/cms/course/programming/DataStructures.kt +++ b/server/src/main/kotlin/ivy/learn/data/cms/course/programming/DataStructures.kt @@ -1,71 +1,70 @@ package ivy.learn.data.cms.course.programming import ivy.learn.data.cms.dsl.CourseDsl -import ivy.learn.data.cms.dsl.CourseImageUrl -import ivy.learn.data.cms.dsl.LessonImageUrl +import ivy.learn.data.cms.dsl.LessonImage object DataStructures : CourseDsl({ name = "Data Structures" tagline = "Lists, Sets, Maps, Stacks, Trees and more." - imageUrl = CourseImageUrl + imageUrl = "https://i.ibb.co/0BRty6H/ds.webp" lesson( name = "Arrays", tagline = "The simplest data structure.", - imageUrl = LessonImageUrl + imageUrl = LessonImage ) lesson( name = "Lists", tagline = "Arrays with superpowers. Dynamic sizing.", - imageUrl = LessonImageUrl + imageUrl = LessonImage ) lesson( name = "Linked Lists", tagline = "A different take on lists. Pointers and nodes.", - imageUrl = LessonImageUrl + imageUrl = LessonImage ) lesson( name = "Sets", tagline = "Unique elements. No duplicates.", - imageUrl = LessonImageUrl + imageUrl = LessonImage ) lesson( name = "Maps", tagline = "Key-Value pairs. Associative arrays.", - imageUrl = LessonImageUrl + imageUrl = LessonImage ) lesson( name = "Stacks", tagline = "LIFO: Last In, First Out.", - imageUrl = LessonImageUrl + imageUrl = LessonImage ) lesson( name = "Queues", tagline = "FIFO: First In, First Out.", - imageUrl = LessonImageUrl + imageUrl = LessonImage ) lesson( name = "Trees", tagline = "Hierarchical data structures.", - imageUrl = LessonImageUrl + imageUrl = LessonImage ) lesson( name = "Graphs", tagline = "Networks of nodes and edges.", - imageUrl = LessonImageUrl + imageUrl = LessonImage ) lesson( name = "Heaps", tagline = "Priority Queues. Efficiently find the max or min.", - imageUrl = LessonImageUrl + imageUrl = LessonImage ) lesson( name = "Tries", tagline = "Prefix Trees. Efficient string search.", - imageUrl = LessonImageUrl + imageUrl = LessonImage ) lesson( name = "Hash Tables", tagline = "Fast lookups. Key-Value pairs.", - imageUrl = LessonImageUrl + imageUrl = LessonImage ) }) \ No newline at end of file diff --git a/server/src/main/kotlin/ivy/learn/data/cms/course/programming/FunctionalProgramming.kt b/server/src/main/kotlin/ivy/learn/data/cms/course/programming/FunctionalProgramming.kt index 6d84d34..ae35169 100644 --- a/server/src/main/kotlin/ivy/learn/data/cms/course/programming/FunctionalProgramming.kt +++ b/server/src/main/kotlin/ivy/learn/data/cms/course/programming/FunctionalProgramming.kt @@ -1,46 +1,46 @@ package ivy.learn.data.cms.course.programming import ivy.learn.data.cms.dsl.CourseDsl -import ivy.learn.data.cms.dsl.CourseImageUrl -import ivy.learn.data.cms.dsl.LessonImageUrl +import ivy.learn.data.cms.dsl.LessonImage +import ivy.learn.data.cms.dsl.LessonImage2 object FunctionalProgramming : CourseDsl({ name = "Functional Programming (FP)" tagline = "Programming with mathematical functions. Pure, declarative and powerful." - imageUrl = CourseImageUrl + imageUrl = "https://i.ibb.co/Rpfw32H/fp.webp" lesson( name = "What is a function?", tagline = "A mathematical relation between a set of inputs and a set of outputs.", - imageUrl = LessonImageUrl + imageUrl = LessonImage ) lesson( name = "Types of functions", tagline = "Partial, total, pure. Learn these important distinctions.", - imageUrl = LessonImageUrl + imageUrl = LessonImage2 ) lesson( name = "Higher order functions", tagline = "Functions that take functions as arguments or return functions.", - imageUrl = LessonImageUrl + imageUrl = LessonImage ) lesson( name = "Recursion", tagline = "Functions that call themselves. The power of self-reference.", - imageUrl = LessonImageUrl + imageUrl = LessonImage ) lesson( name = "Immutability", tagline = "Values that never change. The key to functional programming.", - imageUrl = LessonImageUrl + imageUrl = LessonImage2 ) lesson( name = "Functor", tagline = "A type that can be mapped over. A container for a value.", - imageUrl = LessonImageUrl + imageUrl = LessonImage ) lesson( name = "Monad", tagline = "A type that can be flatMapped over. The heart of FP.", - imageUrl = LessonImageUrl + imageUrl = LessonImage ) }) \ No newline at end of file diff --git a/server/src/main/kotlin/ivy/learn/data/cms/course/programming/ObjectOrientedProgramming.kt b/server/src/main/kotlin/ivy/learn/data/cms/course/programming/ObjectOrientedProgramming.kt index d5de1ea..bc0efc3 100644 --- a/server/src/main/kotlin/ivy/learn/data/cms/course/programming/ObjectOrientedProgramming.kt +++ b/server/src/main/kotlin/ivy/learn/data/cms/course/programming/ObjectOrientedProgramming.kt @@ -1,56 +1,56 @@ package ivy.learn.data.cms.course.programming import ivy.learn.data.cms.dsl.CourseDsl -import ivy.learn.data.cms.dsl.CourseImageUrl -import ivy.learn.data.cms.dsl.LessonImageUrl +import ivy.learn.data.cms.dsl.LessonImage +import ivy.learn.data.cms.dsl.LessonImage2 object ObjectOrientedProgramming : CourseDsl({ name = "Object-Oriented Programming (OOP)" tagline = "Model the world with objects and classes. The foundation of modern software." - imageUrl = CourseImageUrl + imageUrl = "https://i.ibb.co/M6t3WnY/oop.webp" lesson( name = "What is an object?", tagline = "A self-contained entity with state and behavior.", - imageUrl = LessonImageUrl - ) - lesson( - name = "What is a class?", - tagline = "A blueprint for creating objects. The definition of a type.", - imageUrl = LessonImageUrl + imageUrl = LessonImage ) lesson( name = "Encapsulation", tagline = "Hiding the internal state of an object and requiring all interaction to be performed through an object's methods.", - imageUrl = LessonImageUrl + imageUrl = LessonImage ) lesson( name = "Inheritance", tagline = "Creating new classes from existing classes. The 'is-a' relationship.", - imageUrl = LessonImageUrl + imageUrl = LessonImage ) lesson( name = "Polymorphism", tagline = "The ability of an object to take on many forms. The 'same' method name but different behavior.", - imageUrl = LessonImageUrl + imageUrl = LessonImage ) lesson( name = "Abstraction", tagline = "Hiding the implementation details of an object and showing only the necessary features.", - imageUrl = LessonImageUrl + imageUrl = LessonImage ) lesson( name = "Interfaces", tagline = "A contract that defines the behavior of an object. The 'can-do' relationship.", - imageUrl = LessonImageUrl + imageUrl = LessonImage ) lesson( name = "Design Patterns", tagline = "Solutions to common problems in software design.", - imageUrl = LessonImageUrl + imageUrl = LessonImage + ) + lesson( + name = "Dependency Injection (DI)", + tagline = "A technique in which an object receives other objects that it depends on.", + imageUrl = LessonImage2 ) lesson( name = "SOLID Principles", tagline = "Guidelines for writing clean, maintainable and scalable code.", - imageUrl = LessonImageUrl + imageUrl = LessonImage ) }) \ No newline at end of file diff --git a/server/src/main/kotlin/ivy/learn/data/cms/course/programming/ProgrammingBasics.kt b/server/src/main/kotlin/ivy/learn/data/cms/course/programming/ProgrammingBasics.kt index cc8c7ee..4aa36ae 100644 --- a/server/src/main/kotlin/ivy/learn/data/cms/course/programming/ProgrammingBasics.kt +++ b/server/src/main/kotlin/ivy/learn/data/cms/course/programming/ProgrammingBasics.kt @@ -1,46 +1,50 @@ package ivy.learn.data.cms.course.programming import ivy.learn.data.cms.dsl.CourseDsl -import ivy.learn.data.cms.dsl.LessonImageUrl +import ivy.learn.data.cms.dsl.LessonImage object ProgrammingBasics : CourseDsl({ name = "Programming Basics" tagline = "Learn the basics of programming from a different perspective." - imageUrl = - "https://i.ibb.co/nMLdcD5/DALL-E-2024-05-04-20-50-03-A-wide-banner-image-for-a-course-titled-Programming-Basics-with-the-tagli.webp" + imageUrl = "https://i.ibb.co/PgG6ZWh/programming-basics.webp" lesson( name = "What is programming?", tagline = "An introduction to programming. And why we need it?", - imageUrl = LessonImageUrl + imageUrl = "https://i.ibb.co/0CbSJNR/what-is-programming.webp" ) lesson( name = "Computations", tagline = "The purpose of computers is to compute. What does that mean?", - imageUrl = LessonImageUrl + imageUrl = "https://i.ibb.co/fp0DJ6h/computations.webp" + ) + lesson( + name = "Side-effects", + tagline = "The world is a big place. How do we interact with it?", + imageUrl = "https://i.ibb.co/PtZJmnC/side-effects.webp" ) lesson( name = "Variables", tagline = "Storing computations for later use and more.", - imageUrl = LessonImageUrl + imageUrl = "https://i.ibb.co/Rc0fLvn/variables.webp" ) lesson( name = "Branching", tagline = "This or that? If, when, else, and other choices.", - imageUrl = LessonImageUrl + imageUrl = "https://i.ibb.co/MBnY3N1/branching.webp" ) lesson( name = "Loops", tagline = "Doing things over and over again. And again. And again.", - imageUrl = LessonImageUrl + imageUrl = "https://i.ibb.co/JdxqdcR/loops.webp" ) lesson( name = "Functions", tagline = "f: A -> B. Extracting computations into reusable units.", - imageUrl = LessonImageUrl + imageUrl = "https://i.ibb.co/TKv1Cr3/functions.webp" ) lesson( name = "Classes", tagline = "Objects. Functions with shared state. And the heart of OOP.", - imageUrl = LessonImageUrl + imageUrl = LessonImage ) }) \ No newline at end of file diff --git a/server/src/main/kotlin/ivy/learn/data/cms/course/programming/ProgrammingFundamentals.kt b/server/src/main/kotlin/ivy/learn/data/cms/course/programming/ProgrammingFundamentals.kt index 28e994d..2c9b255 100644 --- a/server/src/main/kotlin/ivy/learn/data/cms/course/programming/ProgrammingFundamentals.kt +++ b/server/src/main/kotlin/ivy/learn/data/cms/course/programming/ProgrammingFundamentals.kt @@ -1,26 +1,31 @@ package ivy.learn.data.cms.course.programming import ivy.learn.data.cms.dsl.CourseDsl -import ivy.learn.data.cms.dsl.CourseImageUrl -import ivy.learn.data.cms.dsl.LessonImageUrl +import ivy.learn.data.cms.dsl.LessonImage +import ivy.learn.data.cms.dsl.LessonImage2 object ProgrammingFundamentals : CourseDsl({ name = "Programming Fundamentals" tagline = "Explore the core ideas powering today's software." - imageUrl = CourseImageUrl + imageUrl = "https://i.ibb.co/PTXn42F/fundamentals.webp" lesson( name = "Type Systems", tagline = "The foundation of modern programming languages.", - imageUrl = LessonImageUrl + imageUrl = LessonImage ) lesson( name = "Algebraic Data Types (ADTs)", tagline = "SUMs, PRODUCTs and the core of data modeling.", - imageUrl = LessonImageUrl + imageUrl = LessonImage2 ) lesson( name = "Pattern Matching", tagline = "The power of ADTs in action.", - imageUrl = LessonImageUrl + imageUrl = LessonImage + ) + lesson( + name = "Unit Testing", + tagline = "Ensuring your code works as expected.", + imageUrl = LessonImage2 ) }) \ No newline at end of file diff --git a/server/src/main/kotlin/ivy/learn/data/cms/dsl/CmsUtil.kt b/server/src/main/kotlin/ivy/learn/data/cms/dsl/CmsUtil.kt index dea4769..e3e177e 100644 --- a/server/src/main/kotlin/ivy/learn/data/cms/dsl/CmsUtil.kt +++ b/server/src/main/kotlin/ivy/learn/data/cms/dsl/CmsUtil.kt @@ -3,9 +3,10 @@ package ivy.learn.data.cms.dsl import ivy.model.LessonContent import ivy.model.LessonItemId -val CourseImageUrl = +val CourseImage = "https://i.ibb.co/nMLdcD5/DALL-E-2024-05-04-20-50-03-A-wide-banner-image-for-a-course-titled-Programming-Basics-with-the-tagli.webp" -val LessonImageUrl = "https://i.ibb.co/m9kB3cJ/Screenshot-2024-05-04-at-21-22-18.png" +val LessonImage = "https://i.ibb.co/7WY4N3R/lesson.webp" +val LessonImage2 = "https://i.ibb.co/QMzRZR3/lesson2.webp" val EmptyContent = LessonContent(