Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
247 changes: 93 additions & 154 deletions FakeNFT.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion FakeNFT.xcodeproj/xcshareddata/xcschemes/FakeNFT.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1630"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
21 changes: 0 additions & 21 deletions FakeNFT/AppDelegate.swift

This file was deleted.

100 changes: 44 additions & 56 deletions FakeNFT/DesignSystem/Colors.swift
Original file line number Diff line number Diff line change
@@ -1,67 +1,55 @@
import UIKit

extension UIColor {
// Creates color from a hex string
convenience init(hexString: String) {
let hex = hexString.trimmingCharacters(in: CharacterSet.alphanumerics.inverted)
var int = UInt64()
import SwiftUI

extension Color {

// MARK: - Day/Night Theme
static let blackDay = Color("blackDay")
static let whiteDay = Color("whiteDay")
static let lightGrayDay = Color("lightGrayDay")

// MARK: - Universal Colors
static let yaGrayUniversal = Color(hex: "#625C5C")
static let yaRedUniversal = Color(hex: "#F56B6C")
static let yaBackgroundUniversal = Color(hex: "#1A1B2280")
static let yaGreenUniversal = Color(hex: "#1C9F00")
static let yaBlueUniversal = Color(hex: "#0A84FF")
static let yaBlackUniversal = Color(hex: "#1A1B22")
static let yaWhiteUniversal = Color(hex: "#FFFFFF")
static let yaYellowUniversal = Color(hex: "#FEEF0D")

// MARK: - Init with HEX
init(hex: String) {
let hex = hex.trimmingCharacters(in: CharacterSet.alphanumerics.inverted)
var int: UInt64 = 0
Scanner(string: hex).scanHexInt64(&int)
let alpha, red, green, blue: UInt64

let a, r, g, b: UInt64
switch hex.count {
case 3: // RGB (12-bit)
(alpha, red, green, blue) = (255, (int >> 8) * 17, (int >> 4 & 0xF) * 17, (int & 0xF) * 17)
(a, r, g, b) = (255,
(int >> 8) * 17,
(int >> 4 & 0xF) * 17,
(int & 0xF) * 17)
case 6: // RGB (24-bit)
(alpha, red, green, blue) = (255, int >> 16, int >> 8 & 0xFF, int & 0xFF)
(a, r, g, b) = (255,
int >> 16,
int >> 8 & 0xFF,
int & 0xFF)
case 8: // ARGB (32-bit)
(alpha, red, green, blue) = (int >> 24, int >> 16 & 0xFF, int >> 8 & 0xFF, int & 0xFF)
(a, r, g, b) = (int >> 24,
int >> 16 & 0xFF,
int >> 8 & 0xFF,
int & 0xFF)
default:
(alpha, red, green, blue) = (255, 0, 0, 0)
(a, r, g, b) = (255, 0, 0, 0)
}

self.init(
red: CGFloat(red) / 255,
green: CGFloat(green) / 255,
blue: CGFloat(blue) / 255,
alpha: CGFloat(alpha) / 255
.sRGB,
red: Double(r) / 255,
green: Double(g) / 255,
blue: Double(b) / 255,
opacity: Double(a) / 255
)
}

// Ниже приведены примеры цветов, настоящие цвета надо взять из фигмы

// Primary Colors
static let primary = UIColor(red: 0 / 255, green: 122 / 255, blue: 255 / 255, alpha: 1.0)

// Secondary Colors
static let secondary = UIColor(red: 255 / 255, green: 193 / 255, blue: 7 / 255, alpha: 1.0)

// Background Colors
static let background = UIColor.white

// Text Colors
static let textPrimary = UIColor.black
static let textSecondary = UIColor.gray
static let textOnPrimary = UIColor.white
static let textOnSecondary = UIColor.black

private static let yaBlackLight = UIColor(hexString: "1A1B22")
private static let yaBlackDark = UIColor.white
private static let yaLightGrayLight = UIColor(hexString: "#F7F7F8")
private static let yaLightGrayDark = UIColor(hexString: "#2C2C2E")

static let segmentActive = UIColor { traits in
return traits.userInterfaceStyle == .dark
? .yaBlackDark
: .yaBlackLight
}

static let segmentInactive = UIColor { traits in
return traits.userInterfaceStyle == .dark
? .yaLightGrayDark
: .yaLightGrayLight
}

static let closeButton = UIColor { traits in
return traits.userInterfaceStyle == .dark
? .yaBlackDark
: .yaBlackLight
}
}
27 changes: 9 additions & 18 deletions FakeNFT/DesignSystem/Fonts.swift
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
import UIKit

extension UIFont {
// Ниже приведены примеры шрифтов, настоящие шрифты надо взять из фигмы

// Headline Fonts
static var headline1 = UIFont.systemFont(ofSize: 34, weight: .bold)
static var headline2 = UIFont.systemFont(ofSize: 28, weight: .bold)
static var headline3 = UIFont.systemFont(ofSize: 22, weight: .bold)
static var headline4 = UIFont.systemFont(ofSize: 20, weight: .bold)

// Body Fonts
static var bodyRegular = UIFont.systemFont(ofSize: 17, weight: .regular)
static var bodyBold = UIFont.systemFont(ofSize: 17, weight: .bold)

// Caption Fonts
static var caption1 = UIFont.systemFont(ofSize: 15, weight: .regular)
static var caption2 = UIFont.systemFont(ofSize: 13, weight: .regular)
import SwiftUI

extension Font {
static let regular13 = Font.system(size: 13, weight: .regular)
static let regular15 = Font.system(size: 15, weight: .regular)
static let regular17 = Font.system(size: 17, weight: .regular)
static let medium10 = Font.system(size: 10, weight: .medium)
static let bold17 = Font.system(size: 17, weight: .bold)
static let bold22 = Font.system(size: 22, weight: .bold)
}
18 changes: 18 additions & 0 deletions FakeNFT/FakeNftApp.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// FakeNftApp.swift
// FakeNFT
//
// Created by Max on 24.05.2025.
//

import SwiftUI

@main
struct FakeNftApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}

4 changes: 0 additions & 4 deletions FakeNFT/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
<dict>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>
Expand Down
41 changes: 41 additions & 0 deletions FakeNFT/Models/Tab/Tab.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
//
// Tab.swift
// FakeNFT
//
// Created by Anastasia on 25.05.2025.
//

import Foundation

enum Tab: String, CaseIterable {
case profile
case catalog
case cart
case statistics

var title: String {
switch self {
case .profile:
return "Профиль"
case .catalog:
return "Каталог"
case .cart:
return "Корзина"
case .statistics:
return "Статистика"
}
}

var imageName: String {
switch self {
case .profile:
return "profile"
case .catalog:
return "catalog"
case .cart:
return "cart"
case .statistics:
return "statistics"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"images" : [
{
"filename" : "store.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions FakeNFT/Resources/Assets.xcassets/Colors/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x22",
"green" : "0x1B",
"red" : "0x1A"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "1.000",
"green" : "1.000",
"red" : "1.000"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xF8",
"green" : "0xF7",
"red" : "0xF7"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x2E",
"green" : "0x2C",
"red" : "0x2C"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xFF",
"green" : "0xFF",
"red" : "0xFF"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x22",
"green" : "0x1B",
"red" : "0x1A"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
6 changes: 6 additions & 0 deletions FakeNFT/Resources/Assets.xcassets/Icons/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"images" : [
{
"filename" : "backButton.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}
Loading