Skip to content

Commit

Permalink
Update groupd and deprecated functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Ellet committed Dec 9, 2023
1 parent f00d4f6 commit b2b153c
Show file tree
Hide file tree
Showing 114 changed files with 476 additions and 497 deletions.
2 changes: 1 addition & 1 deletion .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
jetbrains-compose = "1.5.10"
kobweb = "0.15.0"
kotlin = "1.9.20"
jetbrains-compose = "1.5.11"
kobweb = "0.15.2"
kotlin = "1.9.21"

[libraries]
kobweb-api = { module = "com.varabyte.kobweb:kobweb-api", version.ref = "kobweb" }
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ pluginManagement {
}
}

rootProject.name = "alrayada_landing_page"
rootProject.name = "AlrayadaLandingPage"

include(":site")
4 changes: 3 additions & 1 deletion site/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
alias(libs.plugins.kobweb.application)
}

group = "com.ahmedhnewa.alrayada_landing_page"
group = "net.freshplatform.alrayada_landing_page"
version = "1.0-SNAPSHOT"

val webDesc =
Expand Down Expand Up @@ -158,3 +158,5 @@ kotlin {
}
}
}


This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package com.ahmedhnewa.alrayada_landing_page
package net.freshplatform.alrayada_landing_page

import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import com.ahmedhnewa.alrayada_landing_page.core.data.StringRes
import com.ahmedhnewa.alrayada_landing_page.core.services.localization.getStringResource
import com.ahmedhnewa.alrayada_landing_page.utils.updateDocument
import com.varabyte.kobweb.compose.css.Overflow
import com.varabyte.kobweb.compose.ui.Modifier
import com.varabyte.kobweb.compose.ui.modifiers.*
Expand All @@ -17,7 +14,10 @@ import com.varabyte.kobweb.silk.components.style.common.SmoothColorStyle
import com.varabyte.kobweb.silk.components.style.toModifier
import com.varabyte.kobweb.silk.init.InitSilk
import com.varabyte.kobweb.silk.init.InitSilkContext
import com.varabyte.kobweb.silk.init.registerBaseStyle
import com.varabyte.kobweb.silk.init.registerStyleBase
import net.freshplatform.alrayada_landing_page.core.data.StringRes
import net.freshplatform.alrayada_landing_page.core.services.localization.getStringResource
import net.freshplatform.alrayada_landing_page.utils.updateDocument
import org.jetbrains.compose.web.css.deg
import org.jetbrains.compose.web.css.px
import org.jetbrains.compose.web.css.rgba
Expand All @@ -36,19 +36,19 @@ fun initSilk(ctx: InitSilkContext) {
to { Modifier.rotate(360.deg) }
}
)
registerBaseStyle("body") {
registerStyleBase("body") {
Modifier.fontFamily(
"-apple-system", "BlinkMacSystemFont", "Segoe UI", "Roboto", "Oxygen", "Ubuntu",
"Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "sans-serif"
)
}
registerBaseStyle(".visible") {
registerStyleBase(".visible") {
Modifier
.height(300.px)
.fillMaxWidth()
.backgroundColor(rgba(128, 128, 128, 0.5))
}
registerBaseStyle(".hidden") {
registerStyleBase(".hidden") {
Modifier
.height(0.px)
.width(0.px)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.ahmedhnewa.alrayada_landing_page.components
package net.freshplatform.alrayada_landing_page.components

import androidx.compose.runtime.Composable
import com.ahmedhnewa.alrayada_landing_page.components.core.MyImage
import com.ahmedhnewa.alrayada_landing_page.core.data.StringRes
import com.ahmedhnewa.alrayada_landing_page.core.services.localization.stringResource
import com.ahmedhnewa.alrayada_landing_page.utils.constants.PublicRes
import net.freshplatform.alrayada_landing_page.components.core.MyImage
import net.freshplatform.alrayada_landing_page.core.data.StringRes
import net.freshplatform.alrayada_landing_page.core.services.localization.stringResource
import net.freshplatform.alrayada_landing_page.utils.constants.PublicRes
import com.varabyte.kobweb.compose.ui.Modifier
import com.varabyte.kobweb.compose.ui.modifiers.maxSize
import org.jetbrains.compose.web.css.px
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.ahmedhnewa.alrayada_landing_page.components
package net.freshplatform.alrayada_landing_page.components

import androidx.compose.runtime.*
import com.ahmedhnewa.alrayada_landing_page.components.fa.FaArrowUp
import com.ahmedhnewa.alrayada_landing_page.components.fa.IconSize
import com.ahmedhnewa.alrayada_landing_page.models.ThemeColors
import net.freshplatform.alrayada_landing_page.components.fa.FaArrowUp
import net.freshplatform.alrayada_landing_page.components.fa.IconSize
import net.freshplatform.alrayada_landing_page.models.ThemeColors
import com.varabyte.kobweb.compose.css.CSSTransition
import com.varabyte.kobweb.compose.css.Cursor
import com.varabyte.kobweb.compose.css.FontWeight
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.ahmedhnewa.alrayada_landing_page.components
package net.freshplatform.alrayada_landing_page.components

import androidx.compose.runtime.Composable
import com.ahmedhnewa.alrayada_landing_page.components.fa.FaCheck
import com.ahmedhnewa.alrayada_landing_page.components.fa.IconSize
import com.ahmedhnewa.alrayada_landing_page.models.ThemeColors
import net.freshplatform.alrayada_landing_page.components.fa.FaCheck
import net.freshplatform.alrayada_landing_page.components.fa.IconSize
import net.freshplatform.alrayada_landing_page.models.ThemeColors
import com.varabyte.kobweb.compose.css.CSSTransition
import com.varabyte.kobweb.compose.foundation.layout.Box
import com.varabyte.kobweb.compose.ui.Modifier
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.ahmedhnewa.alrayada_landing_page.components
package net.freshplatform.alrayada_landing_page.components

import androidx.compose.runtime.Composable
import com.ahmedhnewa.alrayada_landing_page.models.ThemeColors
import net.freshplatform.alrayada_landing_page.models.ThemeColors
import com.varabyte.kobweb.compose.css.AnimationIterationCount
import com.varabyte.kobweb.compose.css.CSSAnimation
import com.varabyte.kobweb.compose.ui.Modifier
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.ahmedhnewa.alrayada_landing_page.components
package net.freshplatform.alrayada_landing_page.components

import androidx.compose.runtime.Composable
import com.ahmedhnewa.alrayada_landing_page.models.ThemeColors
import net.freshplatform.alrayada_landing_page.models.ThemeColors
import com.varabyte.kobweb.compose.foundation.layout.Box
import com.varabyte.kobweb.compose.ui.Modifier
import com.varabyte.kobweb.compose.ui.modifiers.backgroundColor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.ahmedhnewa.alrayada_landing_page.components
package net.freshplatform.alrayada_landing_page.components

import androidx.compose.runtime.Composable
import com.ahmedhnewa.alrayada_landing_page.components.fa.FaCircle
import com.ahmedhnewa.alrayada_landing_page.components.fa.IconSize
import com.ahmedhnewa.alrayada_landing_page.components.fa.IconStyle
import com.ahmedhnewa.alrayada_landing_page.models.ThemeColors
import net.freshplatform.alrayada_landing_page.components.fa.FaCircle
import net.freshplatform.alrayada_landing_page.components.fa.IconSize
import net.freshplatform.alrayada_landing_page.components.fa.IconStyle
import net.freshplatform.alrayada_landing_page.models.ThemeColors
import com.varabyte.kobweb.compose.css.CSSTransition
import com.varabyte.kobweb.compose.css.Cursor
import com.varabyte.kobweb.compose.ui.Modifier
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.ahmedhnewa.alrayada_landing_page.components
package net.freshplatform.alrayada_landing_page.components

import androidx.compose.runtime.*
import com.ahmedhnewa.alrayada_landing_page.core.services.localization.stringResource
import com.ahmedhnewa.alrayada_landing_page.models.HomePageSections
import com.ahmedhnewa.alrayada_landing_page.models.ThemeColors
import com.ahmedhnewa.alrayada_landing_page.utils.ObserveViewportEntered
import com.ahmedhnewa.alrayada_landing_page.utils.constants.Constants
import net.freshplatform.alrayada_landing_page.core.services.localization.stringResource
import net.freshplatform.alrayada_landing_page.models.HomePageSections
import net.freshplatform.alrayada_landing_page.models.ThemeColors
import net.freshplatform.alrayada_landing_page.utils.ObserveViewportEntered
import net.freshplatform.alrayada_landing_page.utils.constants.Constants
import com.varabyte.kobweb.compose.css.CSSTransition
import com.varabyte.kobweb.compose.css.FontWeight
import com.varabyte.kobweb.compose.css.TextAlign
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.ahmedhnewa.alrayada_landing_page.components.core
package net.freshplatform.alrayada_landing_page.components.core

import androidx.compose.runtime.Composable
import com.ahmedhnewa.alrayada_landing_page.styles.MainButtonStyle
import net.freshplatform.alrayada_landing_page.styles.MainButtonStyle
import com.varabyte.kobweb.compose.ui.Modifier
import com.varabyte.kobweb.compose.ui.modifiers.title
import com.varabyte.kobweb.compose.ui.toAttrs
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.ahmedhnewa.alrayada_landing_page.components.core
package net.freshplatform.alrayada_landing_page.components.core

import androidx.compose.runtime.Composable
import com.varabyte.kobweb.compose.foundation.layout.Box
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.ahmedhnewa.alrayada_landing_page.components.core
package net.freshplatform.alrayada_landing_page.components.core

import androidx.compose.runtime.Composable
import com.varabyte.kobweb.compose.ui.Modifier
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.ahmedhnewa.alrayada_landing_page.components.fa
package net.freshplatform.alrayada_landing_page.components.fa

import androidx.compose.runtime.Composable
import com.varabyte.kobweb.compose.ui.Modifier
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.ahmedhnewa.alrayada_landing_page.components.fa
package net.freshplatform.alrayada_landing_page.components.fa

import androidx.compose.runtime.Composable
import com.varabyte.kobweb.compose.ui.Modifier
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.ahmedhnewa.alrayada_landing_page.components.stars
package net.freshplatform.alrayada_landing_page.components.stars

import androidx.compose.runtime.Composable
import com.varabyte.kobweb.compose.foundation.layout.Row
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.ahmedhnewa.alrayada_landing_page.components.stars
package net.freshplatform.alrayada_landing_page.components.stars

import androidx.compose.runtime.Composable
import com.ahmedhnewa.alrayada_landing_page.components.fa.FaStar
import com.ahmedhnewa.alrayada_landing_page.components.fa.FaStarHalfStroke
import com.ahmedhnewa.alrayada_landing_page.components.fa.IconSize
import com.ahmedhnewa.alrayada_landing_page.components.fa.IconStyle
import net.freshplatform.alrayada_landing_page.components.fa.FaStar
import net.freshplatform.alrayada_landing_page.components.fa.FaStarHalfStroke
import net.freshplatform.alrayada_landing_page.components.fa.IconSize
import net.freshplatform.alrayada_landing_page.components.fa.IconStyle
import com.varabyte.kobweb.compose.ui.Modifier
import com.varabyte.kobweb.compose.ui.modifiers.color
import org.jetbrains.compose.web.css.Color
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.ahmedhnewa.alrayada_landing_page.core.data
package net.freshplatform.alrayada_landing_page.core.data

enum class StringRes(
val en: String = "",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.ahmedhnewa.alrayada_landing_page.core.router
package net.freshplatform.alrayada_landing_page.core.router

object AppRouter {
// Unfortunately we can't use those in the pages routeOverride, even though it's a constant in compile time
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.ahmedhnewa.alrayada_landing_page.core.services.localization
package net.freshplatform.alrayada_landing_page.core.services.localization

import androidx.compose.runtime.Composable
import com.ahmedhnewa.alrayada_landing_page.core.data.StringRes
import com.ahmedhnewa.alrayada_landing_page.core.services.localization.Local.Arabic
import com.ahmedhnewa.alrayada_landing_page.core.services.localization.Local.English
import net.freshplatform.alrayada_landing_page.core.data.StringRes
import net.freshplatform.alrayada_landing_page.core.services.localization.Local.Arabic
import net.freshplatform.alrayada_landing_page.core.services.localization.Local.English
import kotlinx.browser.document
import kotlinx.browser.window
import org.w3c.dom.HTMLElement
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.ahmedhnewa.alrayada_landing_page.core.services.localization
package net.freshplatform.alrayada_landing_page.core.services.localization

import org.jetbrains.compose.web.attributes.DirType

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package net.freshplatform.alrayada_landing_page.core.services.localization

import net.freshplatform.alrayada_landing_page.core.data.StringRes

interface Localization {
fun getLocalizedString(resValue: StringRes, locale: Local): String
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package net.freshplatform.alrayada_landing_page.core.services.localization

import net.freshplatform.alrayada_landing_page.core.data.StringRes
import net.freshplatform.alrayada_landing_page.core.services.localization.Local.Arabic
import net.freshplatform.alrayada_landing_page.core.services.localization.Local.English

class LocalizationImpl : Localization {
override fun getLocalizedString(resValue: StringRes, locale: Local): String {
return when (locale) {
English -> resValue.en
Arabic -> resValue.ar
else -> resValue.en
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.ahmedhnewa.alrayada_landing_page.core.services.localization
package net.freshplatform.alrayada_landing_page.core.services.localization

import com.ahmedhnewa.alrayada_landing_page.core.data.StringRes
import net.freshplatform.alrayada_landing_page.core.data.StringRes

class LocalizationService : Localization {
private val service = LocalizationImpl()
Expand Down
Loading

0 comments on commit b2b153c

Please sign in to comment.