feat: Wear OS 워치앱 — 웹 시안 B 디자인의 앱 다섯 장, 타일, 컴플리케이션
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6ee2893745
commit
3f806f9955
64 files changed
+1460
No files matched your search
@@ -0,0 +1,65 @@
|
||||
package kr.o2o.nalssigak
|
||||
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.compose.ui.graphics.Brush
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.text.font.Font
|
||||
import androidx.compose.ui.text.font.FontFamily
|
||||
|
||||
// 웹 시안 B 토큰 그대로 (frontend/src/b/b.css, index.css)
|
||||
object Tok {
|
||||
val ink = Color(0xFF28304A)
|
||||
val ink2 = Color(0xFF5A6380)
|
||||
val shade = Color(0xFFD9E5F4)
|
||||
val orange = Color(0xFFFF7A45)
|
||||
val rain = Color(0xFF4F97E3)
|
||||
val rainLight = Color(0xFF9FD3FF)
|
||||
val navy = Color(0xFF141B3D)
|
||||
val navyTop = Color(0xFF2B3577)
|
||||
val card = Color.White.copy(alpha = 0.78f)
|
||||
val stat = Color.White.copy(alpha = 0.72f)
|
||||
val statDark = Color.White.copy(alpha = 0.18f)
|
||||
|
||||
val jua = FontFamily(Font(R.font.jua))
|
||||
val bagel = FontFamily(Font(R.font.bagel_fat_one))
|
||||
}
|
||||
|
||||
private fun v(vararg stops: Pair<Float, Long>) = Brush.verticalGradient(*stops.map { it.first to Color(it.second) }.toTypedArray())
|
||||
|
||||
/** 히어로 하늘 (.b-hero[data-t]). 서버 mode 의 evening 이 웹의 sunset */
|
||||
fun skyBrush(mode: String): Brush = when (mode) {
|
||||
"morning" -> v(0f to 0xFFFFD9B8, 0.4f to 0xFFFFE9D4, 1f to 0xFFDFF0FF)
|
||||
"evening" -> v(0f to 0xFF8E7CF0, 0.48f to 0xFFF28AA0, 1f to 0xFFFFC38A)
|
||||
"night" -> v(0f to 0xFF141B3D, 0.6f to 0xFF27306A, 1f to 0xFF3D3F86)
|
||||
else -> v(0f to 0xFF9FD3FF, 0.55f to 0xFFCFE9FF, 1f to 0xFFF1F8FF)
|
||||
}
|
||||
|
||||
/** 하늘 위 글자가 흰색이어야 하는 시간대 */
|
||||
fun isDark(mode: String) = mode == "evening" || mode == "night"
|
||||
|
||||
// 카드·장 배경 (.b-bg-*)
|
||||
val bgButter = v(0f to 0xFFFFE7A0, 1f to 0xFFFFF6D8)
|
||||
val bgMint = v(0f to 0xFFBFECD6, 1f to 0xFFEFFAF4)
|
||||
val bgSky = v(0f to 0xFFBFE3FF, 1f to 0xFFEEF7FF)
|
||||
val bgDusk = v(0f to 0xFF7E6FE6, 0.6f to 0xFFF08AA2, 1f to 0xFFFFC28A)
|
||||
|
||||
// 웹 public/icons 의 Fluent 3D 아이콘. 이름은 서버 icon 값과 같다
|
||||
private val ICONS = mapOf(
|
||||
"yajang" to R.drawable.e_yajang, "picnic" to R.drawable.e_picnic, "chimaek" to R.drawable.e_chimaek, "walk" to R.drawable.e_walk,
|
||||
"vent" to R.drawable.e_vent, "hiking" to R.drawable.e_hiking, "carwash" to R.drawable.e_carwash, "camping" to R.drawable.e_camping,
|
||||
"running" to R.drawable.e_running, "stars" to R.drawable.e_stars, "jjamppong" to R.drawable.e_jjamppong, "makgeolli" to R.drawable.e_makgeolli,
|
||||
"iced_hot" to R.drawable.e_iced_hot, "laundry" to R.drawable.e_laundry, "bike" to R.drawable.e_bike, "dog" to R.drawable.e_dog,
|
||||
"glasses" to R.drawable.e_glasses, "makeup" to R.drawable.e_makeup, "naengmyeon" to R.drawable.e_naengmyeon, "taxi" to R.drawable.e_taxi,
|
||||
"delivery" to R.drawable.e_delivery, "garden" to R.drawable.e_garden, "photo" to R.drawable.e_photo, "baseball" to R.drawable.e_baseball,
|
||||
"study" to R.drawable.e_study, "netflix" to R.drawable.e_netflix, "chestnut" to R.drawable.e_chestnut,
|
||||
"sun" to R.drawable.e_sun, "sun_cloud" to R.drawable.e_sun_cloud, "cloud" to R.drawable.e_cloud, "rain" to R.drawable.e_rain,
|
||||
"snow" to R.drawable.e_snow, "sunset" to R.drawable.e_sunset, "moon" to R.drawable.e_moon,
|
||||
"gold" to R.drawable.e_gold, "silver" to R.drawable.e_silver, "bronze" to R.drawable.e_bronze,
|
||||
"rabbit" to R.drawable.e_rabbit, "bear" to R.drawable.e_bear, "umbrella" to R.drawable.e_umbrella, "thermo" to R.drawable.e_thermo,
|
||||
)
|
||||
|
||||
/** 없는 이름은 웹 iconSrc 처럼 sun_cloud */
|
||||
@DrawableRes
|
||||
fun iconRes(name: String): Int = ICONS[name] ?: R.drawable.e_sun_cloud
|
||||
|
||||
val MEDALS = listOf("gold", "silver", "bronze")
|
||||
Reference in new issue
Block a user