SPB Git forge

spb/admin-ka-ios

Public
5commits 1branches 0releases
204.0 KBsize
maindefault branch
1 mo agolast push
Swift 100%
1.4 KB · 45 lines swift
Raw Blame History
1import SwiftUI23// Identité Groupe KA (mêmes valeurs que l'app web)4enum Ka {5    static let bg = Color(hex: 0xF2F1EC)6    static let card = Color(hex: 0xFCFBF8)7    static let ink = Color(hex: 0x1A1611)8    static let orange = Color(hex: 0xF97316)9    static let muted = Color(hex: 0x6D675C)1011    static let url = URL(string: "https://www.administration-ka.com")!12}1314extension Color {15    init(hex: UInt, alpha: Double = 1) {16        self.init(17            .sRGB,18            red: Double((hex >> 16) & 0xff) / 255,19            green: Double((hex >> 8) & 0xff) / 255,20            blue: Double(hex & 0xff) / 255,21            opacity: alpha22        )23    }24}2526// Pastille « Ka » réutilisable (splash + états)27struct KaMark: View {28    var size: CGFloat = 8429    var body: some View {30        RoundedRectangle(cornerRadius: size * 0.28, style: .continuous)31            .fill(Ka.orange)32            .overlay(33                RoundedRectangle(cornerRadius: size * 0.28, style: .continuous)34                    .strokeBorder(Ka.ink, lineWidth: max(2, size * 0.035))35            )36            .overlay(37                Text("Ka")38                    .font(.system(size: size * 0.42, weight: .heavy, design: .rounded))39                    .foregroundColor(Ka.ink)40            )41            .frame(width: size, height: size)42            .shadow(color: Ka.ink.opacity(0.18), radius: 0, x: size * 0.05, y: size * 0.05)43    }44}45