Skip to content
Open
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
4 changes: 3 additions & 1 deletion Sources/FabulaItemsProvider/Contributor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ public struct Contributor {
Contributor.soccer01,
Contributor.tgeisse,
Contributor.henry,
Contributor.regi93
Contributor.regi93,
Contributor.onaxiz
]

public static let jasu = ContributorData(name: "jasu", location: "Korea", email: "jasudev@gmail.com", link: "https://github.com/jasudev", imageName: "jasu")
public static let soccer01 = ContributorData(name: "soccer01", location: "Korea", email: "cudo0159@gmail.com", link: nil, imageName: nil)
public static let tgeisse = ContributorData(name: "tgeisse", location: "United States", email: nil, link: "https://github.com/tgeisse", imageName: nil)
public static let henry = ContributorData(name: "henry", location: "Korea", email: "wcbe9745@naver.com", link: "https://github.com/lemona-97", imageName: nil)
public static let regi93 = ContributorData(name: "regi93", location: "Korea", email: "hellgey777@naver.com", link: "https://github.com/regi93", imageName: nil)
public static let onaxiz = ContributorData(name: "onaxiz", location: nil, email: nil, link: "https://github.com/onaxiz", imageName: nil)
}
51 changes: 51 additions & 0 deletions Sources/FabulaItemsProvider/Items/P287_Marquee.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
//
// P287_Marquee.swift
// FabulaItemsProvider
//
// Infinite horizontal scrolling text ticker.
//

import SwiftUI

public struct P287_Marquee: View {

@State private var t: CGFloat = 0
private let text = " Fabula — SwiftUI examples "
private let blockWidth: CGFloat = 350

public init() {}

public var body: some View {
ZStack {
Color.fabulaBack1
.ignoresSafeArea()

GeometryReader { geo in
let w = geo.size.width
HStack(spacing: 60) {
Text(text)
.font(.system(size: 24, weight: .medium))
.foregroundColor(Color.fabulaPrimary)
Text(text)
.font(.system(size: 24, weight: .medium))
.foregroundColor(Color.fabulaPrimary)
}
.frame(width: blockWidth * 2, alignment: .leading)
.offset(x: w / 2 - blockWidth / 2 - t * blockWidth)
.onAppear {
withAnimation(.linear(duration: 10).repeatForever(autoreverses: false)) {
t = 1
}
}
}
.frame(height: 60)
.clipped()
}
}
}

struct P287_Marquee_Previews: PreviewProvider {
static var previews: some View {
P287_Marquee()
}
}
10 changes: 9 additions & 1 deletion Sources/FabulaItemsProvider/ItemsProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,15 @@ public class ItemsProvider {

public init() {}
public var items: [ItemData] {
[ ItemData(id: 286, category: .study,
[ ItemData(id: 287, category: .uiux,
section: "Animation",
createDate: "2025-02-10",
title: "Marquee",
caption: "Infinite horizontal scrolling text ticker",
creator: Contributor.onaxiz.name,
tags: "marquee, text, animation, scroll",
view: FAnyView(P287_Marquee())),
ItemData(id: 286, category: .study,
section: "Animation",
createDate: "2025-07-20",
title: "Parallax Poster",
Expand Down