Skip to content

Commit

Permalink
Merge pull request #5 from ChristianSko/main
Browse files Browse the repository at this point in the history
Feature: Add Bluesky as a social media platform option
  • Loading branch information
Jeehut authored Dec 12, 2024
2 parents 9325551 + 2c1f25e commit 8e9f169
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/LinksKit/Model/SocialPlatform.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Foundation
///
/// Use this enum to specify social media platforms when configuring social links in LinksKit.
public enum SocialPlatform: Hashable {
case bluesky
case facebook
case github
case instagram
Expand All @@ -18,6 +19,7 @@ public enum SocialPlatform: Hashable {

var systemImage: String {
switch self {
case .bluesky: "b.circle.fill"
case .facebook: "hand.thumbsup"
case .github: "cat.circle.fill"
case .instagram: "camera.circle"
Expand All @@ -34,6 +36,7 @@ public enum SocialPlatform: Hashable {

func url(handle: String) -> URL {
switch self {
case .bluesky: URL(string: "https://bsky.app/profile/\(handle)")!
case .facebook: URL(string: "https://facebook.com/\(handle)")!
case .github: URL(string: "https://github.com/\(handle)")!
case .instagram: URL(string: "https://instagram.com/\(handle)")!
Expand All @@ -60,6 +63,7 @@ extension SocialPlatform: CustomStringConvertible {
/// ```
public var description: String {
switch self {
case .bluesky: "Bluesky"
case .facebook: "Facebook"
case .github: "GitHub"
case .instagram: "Instagram"
Expand Down

0 comments on commit 8e9f169

Please sign in to comment.