Skip to content

Instantly share code, notes, and snippets.

View pMalvasio's full-sized avatar

Pablo Malvasio pMalvasio

View GitHub Profile
@pMalvasio
pMalvasio / iterm2-solarized.md
Created April 27, 2021 17:47 — forked from Jhyeok-lee/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

import SwiftUI
import Lottie
struct LottieView: UIViewRepresentable {
typealias UIViewType = UIView
var filename: String
func makeUIView(context: UIViewRepresentableContext<LottieView>) -> UIView {
let view = UIView(frame: .zero)
NSLayoutConstraint.activate([
animationView.widthAnchor.constraint(equalTo: view.widthAnchor),
animationView.heightAnchor.constraint(equalTo: view.heightAnchor),
animationView.centerXAnchor.constraint(equalTo: view.centerXAnchor),
animationView.centerYAnchor.constraint(equalTo: view.centerYAnchor)
])
let animationView = AnimationView()
let animation = Animation.named("YOUR_ANIMATION")
animationView.animation = animation
animationView.contentMode = .scaleAspectFit
animationView.play()
animationView.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(animationView)
struct LottieView: UIViewRepresentable {
func makeUIView(context: UIViewRepresentableContext<LottieView>) -> UIView {
let view = UIView(frame: .zero)
return view
}
func updateUIView(_ uiView: UIView, context: UIViewRepresentableContext<LottieView>) { }
}
struct SpinnerConfiguration {
var spinnerColor: Color = .white
var blurredBackground: Color = .black
var spinnerBackgroundColor: Color = .gray
var backgroundCornerRadius: CGFloat = 30
var width: CGFloat = 50
var height: CGFloat = 50
var speed: Double = 1
}
var body: some View {
ZStack {
Color.black.opacity(0.8)
.edgesIgnoringSafeArea(.all)
.blur(radius: 200)
ZStack {
Color.gray.opacity(0.5)
Circle()
.shadow(color: Color.white.opacity(0.3), radius: 5, x: 0, y: 5)
.shadow(color: Color.black.opacity(0.1), radius: 2, x: 0, y: 2)
.shadow(color: Color.black.opacity(0.1), radius: 3, x: 0, y: 3)
ZStack {
Color.black.opacity(0.8)
.edgesIgnoringSafeArea(.all)
.blur(radius: 200)
...
}