RedditLogoView.swift 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import SwiftUI
  2. struct RedditLogoView: View {
  3. var size: CGFloat = 20
  4. var body: some View {
  5. ZStack {
  6. Circle()
  7. .fill(
  8. LinearGradient(
  9. colors: [Color(hex: 0xFF7B2F), Color(hex: 0xFF4500)],
  10. startPoint: .topLeading,
  11. endPoint: .bottomTrailing
  12. )
  13. )
  14. .frame(width: size, height: size)
  15. .shadow(color: Color(hex: 0xFF4500).opacity(0.4), radius: size * 0.15, y: size * 0.06)
  16. Circle()
  17. .fill(
  18. LinearGradient(
  19. colors: [.white, Color.white.opacity(0.92)],
  20. startPoint: .top,
  21. endPoint: .bottom
  22. )
  23. )
  24. .frame(width: size * 0.44, height: size * 0.44)
  25. .offset(y: -size * 0.07)
  26. Circle()
  27. .fill(Color(hex: 0xFF4500))
  28. .frame(width: size * 0.15, height: size * 0.15)
  29. .offset(x: -size * 0.095, y: -size * 0.11)
  30. Circle()
  31. .fill(Color(hex: 0xFF4500))
  32. .frame(width: size * 0.15, height: size * 0.15)
  33. .offset(x: size * 0.095, y: -size * 0.11)
  34. Capsule()
  35. .fill(
  36. LinearGradient(
  37. colors: [.white, Color.white.opacity(0.9)],
  38. startPoint: .top,
  39. endPoint: .bottom
  40. )
  41. )
  42. .frame(width: size * 0.52, height: size * 0.2)
  43. .offset(y: size * 0.17)
  44. }
  45. .frame(width: size, height: size)
  46. }
  47. }