damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit b934d66f642ec10dc9c952dde645e7706c140008
parent 20b6627799b79b7a445d9c779d61fa5ad2ebadb6
Author: ericholguin <eric.holguinsanchez@gmail.com>
Date:   Fri,  8 Sep 2023 21:06:01 -0600

components: add lighter gradient

Diffstat:
Mdamus.xcodeproj/project.pbxproj | 4++++
Adamus/Components/Gradients/DamusLightGradient.swift | 30++++++++++++++++++++++++++++++
2 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/damus.xcodeproj/project.pbxproj b/damus.xcodeproj/project.pbxproj @@ -400,6 +400,7 @@ 5C513FCC2984ACA60072348F /* QRCodeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C513FCB2984ACA60072348F /* QRCodeView.swift */; }; 5C6E1DAD2A193EC2008FC15A /* GradientButtonStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C6E1DAC2A193EC2008FC15A /* GradientButtonStyle.swift */; }; 5C6E1DAF2A194075008FC15A /* PinkGradient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C6E1DAE2A194075008FC15A /* PinkGradient.swift */; }; + 5CF2DCCE2AABE1A500984B8D /* DamusLightGradient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5CF2DCCD2AABE1A500984B8D /* DamusLightGradient.swift */; }; 5CF72FC229B9142F00124A13 /* ShareAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5CF72FC129B9142F00124A13 /* ShareAction.swift */; }; 6439E014296790CF0020672B /* ProfilePicImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6439E013296790CF0020672B /* ProfilePicImageView.swift */; }; 643EA5C8296B764E005081BB /* RelayFilterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 643EA5C7296B764E005081BB /* RelayFilterView.swift */; }; @@ -1078,6 +1079,7 @@ 5C513FCB2984ACA60072348F /* QRCodeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QRCodeView.swift; sourceTree = "<group>"; }; 5C6E1DAC2A193EC2008FC15A /* GradientButtonStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GradientButtonStyle.swift; sourceTree = "<group>"; }; 5C6E1DAE2A194075008FC15A /* PinkGradient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PinkGradient.swift; sourceTree = "<group>"; }; + 5CF2DCCD2AABE1A500984B8D /* DamusLightGradient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DamusLightGradient.swift; sourceTree = "<group>"; }; 5CF72FC129B9142F00124A13 /* ShareAction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareAction.swift; sourceTree = "<group>"; }; 6439E013296790CF0020672B /* ProfilePicImageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfilePicImageView.swift; sourceTree = "<group>"; }; 643EA5C7296B764E005081BB /* RelayFilterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RelayFilterView.swift; sourceTree = "<group>"; }; @@ -1735,6 +1737,7 @@ F71694F72A6983AF001F4053 /* GrayGradient.swift */, 5C0707D02A1ECB38004E7B51 /* DamusLogoGradient.swift */, 4C687C202A5F7ED00092C550 /* DamusBackground.swift */, + 5CF2DCCD2AABE1A500984B8D /* DamusLightGradient.swift */, ); path = Gradients; sourceTree = "<group>"; @@ -2788,6 +2791,7 @@ 4C06670E28FDEAA000038D2A /* utf8.c in Sources */, 4C3EA66D28FF782800C48A62 /* amount.c in Sources */, 4C32B9562A9AD44700DC3548 /* TableVerifier.swift in Sources */, + 5CF2DCCE2AABE1A500984B8D /* DamusLightGradient.swift in Sources */, 4C5E54062A9671F800FF6E60 /* UserStatusSheet.swift in Sources */, F71694F42A6732B7001F4053 /* GradientFollowButton.swift in Sources */, 4C3AC7A728369BA200E1F516 /* SearchHomeView.swift in Sources */, diff --git a/damus/Components/Gradients/DamusLightGradient.swift b/damus/Components/Gradients/DamusLightGradient.swift @@ -0,0 +1,30 @@ +// +// DamusLightGradient.swift +// damus +// +// Created by eric on 9/8/23. +// + +import SwiftUI + +fileprivate let damus_grad_c1 = hex_col(r: 0xd3, g: 0x2d, b: 0xc3) +fileprivate let damus_grad_c2 = hex_col(r: 0x33, g: 0xc5, b: 0xbc) +fileprivate let damus_grad = [damus_grad_c1, damus_grad_c2] + +struct DamusLightGradient: View { + var body: some View { + DamusLightGradient.gradient + .opacity(0.5) + .edgesIgnoringSafeArea([.top,.bottom]) + } + + static var gradient: LinearGradient { + LinearGradient(colors: damus_grad, startPoint: .topLeading, endPoint: .bottomTrailing) + } +} + +struct DamusLightGradient_Previews: PreviewProvider { + static var previews: some View { + DamusLightGradient() + } +}