├── DesignCode
├── Styles
│ ├── TitleModifier.swift
│ ├── Animation.swift
│ ├── TextMofifiers.swift
│ ├── TextModifier.swift
│ ├── BackgroundModifier.swift
│ ├── AnimatableFontModifier.swift
│ ├── InputStyle.swift
│ ├── Styles.swift
│ ├── AngularButtonStyle.swift
│ └── PlayShape.swift
├── Assets.xcassets
│ ├── Contents.json
│ ├── Blobs
│ │ ├── Contents.json
│ │ └── Blob 1.imageset
│ │ │ ├── Contents.json
│ │ │ ├── Blob 1 Dark.pdf
│ │ │ └── Blob 1.pdf
│ ├── Logos
│ │ ├── Contents.json
│ │ ├── Logo 1.imageset
│ │ │ ├── Logo 1.jpg
│ │ │ └── Contents.json
│ │ ├── Logo 2.imageset
│ │ │ ├── Logo 2.jpg
│ │ │ └── Contents.json
│ │ ├── Logo 3.imageset
│ │ │ ├── Logo 3.jpg
│ │ │ └── Contents.json
│ │ └── Logo 4.imageset
│ │ │ ├── Logo 4.jpg
│ │ │ └── Contents.json
│ ├── Waves
│ │ ├── Contents.json
│ │ ├── Waves 1.imageset
│ │ │ ├── Contents.json
│ │ │ ├── Waves 1.pdf
│ │ │ └── Waves 1 Dark.pdf
│ │ └── Waves 2.imageset
│ │ │ ├── Contents.json
│ │ │ ├── Waves 2.pdf
│ │ │ └── Waves 2 Dark.pdf
│ ├── Avatars
│ │ ├── Contents.json
│ │ ├── Avatar 1.imageset
│ │ │ ├── Avatar 1.jpg
│ │ │ └── Contents.json
│ │ ├── Avatar 2.imageset
│ │ │ ├── Avatar 2.jpg
│ │ │ └── Contents.json
│ │ ├── Avatar 3.imageset
│ │ │ ├── Avatar 3.jpg
│ │ │ └── Contents.json
│ │ └── Avatar Default.imageset
│ │ │ ├── Avatar Default.jpg
│ │ │ └── Contents.json
│ ├── Colors
│ │ ├── Contents.json
│ │ ├── Shadow.colorset
│ │ │ └── Contents.json
│ │ └── Background.colorset
│ │ │ └── Contents.json
│ ├── Backgrounds
│ │ ├── Contents.json
│ │ ├── Background 1.imageset
│ │ │ ├── Background 1.jpg
│ │ │ └── Contents.json
│ │ ├── Background 2.imageset
│ │ │ ├── Background 2.jpg
│ │ │ └── Contents.json
│ │ ├── Background 3.imageset
│ │ │ ├── Background 3.jpg
│ │ │ └── Contents.json
│ │ ├── Background 4.imageset
│ │ │ ├── Background 4.jpg
│ │ │ └── Contents.json
│ │ ├── Background 5.imageset
│ │ │ ├── Background 5.jpg
│ │ │ └── Contents.json
│ │ ├── Background 6.imageset
│ │ │ ├── Background 6.jpg
│ │ │ └── Contents.json
│ │ ├── Background 7.imageset
│ │ │ ├── Background 7.jpg
│ │ │ └── Contents.json
│ │ ├── Background 8.imageset
│ │ │ ├── Background 8.jpg
│ │ │ └── Contents.json
│ │ ├── Background 9.imageset
│ │ │ ├── Background 9.jpg
│ │ │ └── Contents.json
│ │ └── Background 10.imageset
│ │ │ ├── Background 10.jpg
│ │ │ └── Contents.json
│ ├── Illustrations
│ │ ├── Contents.json
│ │ ├── Illustration 1.imageset
│ │ │ ├── Illustration 1.png
│ │ │ └── Contents.json
│ │ ├── Illustration 2.imageset
│ │ │ ├── Illustration 2.png
│ │ │ └── Contents.json
│ │ ├── Illustration 3.imageset
│ │ │ ├── Illustration 3.png
│ │ │ └── Contents.json
│ │ ├── Illustration 4.imageset
│ │ │ ├── Illustration 4.png
│ │ │ └── Contents.json
│ │ ├── Illustration 5.imageset
│ │ │ ├── Illustration 5.png
│ │ │ └── Contents.json
│ │ ├── Illustration 6.imageset
│ │ │ ├── Illustration 6.png
│ │ │ └── Contents.json
│ │ ├── Illustration 7.imageset
│ │ │ ├── Illustration 7.png
│ │ │ └── Contents.json
│ │ ├── Illustration 8.imageset
│ │ │ ├── Illustration 8.png
│ │ │ └── Contents.json
│ │ ├── Illustration 9.imageset
│ │ │ ├── Illustration 9.png
│ │ │ └── Contents.json
│ │ └── Illustration 10.imageset
│ │ │ ├── Illustration 10.png
│ │ │ └── Contents.json
│ ├── AppIcon.appiconset
│ │ ├── iPad_20pt.png
│ │ ├── iPad_29pt.png
│ │ ├── iPad_40@2x.png
│ │ ├── iPad_40pt.png
│ │ ├── iPad_76@2x.png
│ │ ├── iPad_76pt.png
│ │ ├── App Icon iOS.png
│ │ ├── iPad_20pt@2x.png
│ │ ├── iPad_29pt@2x.png
│ │ ├── iPhone_20@2x.png
│ │ ├── iPhone_29pt.png
│ │ ├── iPad_83.5pt@2x.png
│ │ ├── iPhone_20pt@3x.png
│ │ ├── iPhone_29pt@2x.png
│ │ ├── iPhone_29pt@3x.png
│ │ ├── iPhone_40pt@2x.png
│ │ ├── iPhone_40pt@3x.png
│ │ ├── iPhone_60pt@2x.png
│ │ ├── iPhone_60pt@3x.png
│ │ └── Contents.json
│ └── AccentColor.colorset
│ │ └── Contents.json
├── Preview Content
│ └── Preview Assets.xcassets
│ │ └── Contents.json
├── Models
│ ├── Suggestion.swift
│ ├── Model.swift
│ ├── Topic.swift
│ ├── PreferenceKeys.swift
│ ├── Coin.swift
│ ├── Tab.swift
│ ├── Handbook.swift
│ ├── Course.swift
│ └── CourseSection.swift
├── DesignCodeApp.swift
├── LocaliztionKeys
│ ├── ar.lproj
│ │ └── Localizable.strings
│ ├── en.lproj
│ │ └── Localizable.strings
│ ├── de.lproj
│ │ └── Localizable.strings
│ └── LocalizationKeys.swift
├── Views
│ ├── MatchedView.swift
│ ├── Main
│ │ ├── NotificationsView.swift
│ │ ├── ExploreView.swift
│ │ ├── LibraryView.swift
│ │ └── HomeView.swift
│ ├── Modals
│ │ ├── ModalView.swift
│ │ ├── SignInView.swift
│ │ └── SignUpView.swift
│ ├── Sheets
│ │ ├── SearchView.swift
│ │ └── AccountView.swift
│ └── Details
│ │ ├── SectionView.swift
│ │ └── CourseView.swift
├── Components
│ ├── Items
│ │ ├── TopicListRow.swift
│ │ ├── SmallCourseItem.swift
│ │ ├── SectionRow.swift
│ │ ├── Certificate.swift
│ │ ├── HandbookItem.swift
│ │ ├── FeaturedItem.swift
│ │ └── CourseItem.swift
│ ├── Graphics
│ │ ├── HexagonView.swift
│ │ ├── CircularProgressView.swift
│ │ └── BlobView.swift
│ └── Buttons
│ │ ├── PlayView.swift
│ │ └── AvatarView.swift
└── Navigation
│ ├── ContentView.swift
│ ├── NavigationBar.swift
│ └── TabBar.swift
├── .DS_Store
├── DesignCode.xcodeproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcuserdata
│ │ ├── amajdoudeh.xcuserdatad
│ │ │ ├── UserInterfaceState.xcuserstate
│ │ │ ├── UserInterfaceState.xcuserstate.orig
│ │ │ └── WorkspaceSettings.xcsettings
│ │ └── amjadoudeh.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcshareddata
│ │ ├── WorkspaceSettings.xcsettings
│ │ └── IDEWorkspaceChecks.plist
├── xcuserdata
│ └── amjadoudeh.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
└── xcshareddata
│ └── xcschemes
│ └── DesignCode.xcscheme
├── README.md
├── DesignCodeTests
├── Models
│ └── PreferenceKeysTests.swift
└── DesignCodeTests.swift
├── DesignCodeUITests
├── DesignCodeUITestsLaunchTests.swift
└── DesignCodeUITests.swift
├── pull_request_template.md
└── DesignCode.xcdatamodeld
└── Advanced_SwiftUI.xcdatamodel
└── contents
/DesignCode/Styles/TitleModifier.swift:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/.DS_Store
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Blobs/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Logos/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Waves/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Avatars/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Colors/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Backgrounds/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Illustrations/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/DesignCode/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/AppIcon.appiconset/iPad_20pt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/AppIcon.appiconset/iPad_20pt.png
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/AppIcon.appiconset/iPad_29pt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/AppIcon.appiconset/iPad_29pt.png
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/AppIcon.appiconset/iPad_40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/AppIcon.appiconset/iPad_40@2x.png
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/AppIcon.appiconset/iPad_40pt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/AppIcon.appiconset/iPad_40pt.png
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/AppIcon.appiconset/iPad_76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/AppIcon.appiconset/iPad_76@2x.png
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/AppIcon.appiconset/iPad_76pt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/AppIcon.appiconset/iPad_76pt.png
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Logos/Logo 1.imageset/Logo 1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/Logos/Logo 1.imageset/Logo 1.jpg
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Logos/Logo 2.imageset/Logo 2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/Logos/Logo 2.imageset/Logo 2.jpg
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Logos/Logo 3.imageset/Logo 3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/Logos/Logo 3.imageset/Logo 3.jpg
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Logos/Logo 4.imageset/Logo 4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/Logos/Logo 4.imageset/Logo 4.jpg
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/AppIcon.appiconset/App Icon iOS.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/AppIcon.appiconset/App Icon iOS.png
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/AppIcon.appiconset/iPad_20pt@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/AppIcon.appiconset/iPad_20pt@2x.png
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/AppIcon.appiconset/iPad_29pt@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/AppIcon.appiconset/iPad_29pt@2x.png
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/AppIcon.appiconset/iPhone_20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/AppIcon.appiconset/iPhone_20@2x.png
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/AppIcon.appiconset/iPhone_29pt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/AppIcon.appiconset/iPhone_29pt.png
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/AppIcon.appiconset/iPad_83.5pt@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/AppIcon.appiconset/iPad_83.5pt@2x.png
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/AppIcon.appiconset/iPhone_20pt@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/AppIcon.appiconset/iPhone_20pt@3x.png
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/AppIcon.appiconset/iPhone_29pt@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/AppIcon.appiconset/iPhone_29pt@2x.png
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/AppIcon.appiconset/iPhone_29pt@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/AppIcon.appiconset/iPhone_29pt@3x.png
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/AppIcon.appiconset/iPhone_40pt@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/AppIcon.appiconset/iPhone_40pt@2x.png
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/AppIcon.appiconset/iPhone_40pt@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/AppIcon.appiconset/iPhone_40pt@3x.png
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/AppIcon.appiconset/iPhone_60pt@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/AppIcon.appiconset/iPhone_60pt@2x.png
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/AppIcon.appiconset/iPhone_60pt@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/AppIcon.appiconset/iPhone_60pt@3x.png
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Avatars/Avatar 1.imageset/Avatar 1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/Avatars/Avatar 1.imageset/Avatar 1.jpg
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Avatars/Avatar 2.imageset/Avatar 2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/Avatars/Avatar 2.imageset/Avatar 2.jpg
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Avatars/Avatar 3.imageset/Avatar 3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/Avatars/Avatar 3.imageset/Avatar 3.jpg
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Avatars/Avatar Default.imageset/Avatar Default.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/Avatars/Avatar Default.imageset/Avatar Default.jpg
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Backgrounds/Background 1.imageset/Background 1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/Backgrounds/Background 1.imageset/Background 1.jpg
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Backgrounds/Background 2.imageset/Background 2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/Backgrounds/Background 2.imageset/Background 2.jpg
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Backgrounds/Background 3.imageset/Background 3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/Backgrounds/Background 3.imageset/Background 3.jpg
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Backgrounds/Background 4.imageset/Background 4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/Backgrounds/Background 4.imageset/Background 4.jpg
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Backgrounds/Background 5.imageset/Background 5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/Backgrounds/Background 5.imageset/Background 5.jpg
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Backgrounds/Background 6.imageset/Background 6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/Backgrounds/Background 6.imageset/Background 6.jpg
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Backgrounds/Background 7.imageset/Background 7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/Backgrounds/Background 7.imageset/Background 7.jpg
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Backgrounds/Background 8.imageset/Background 8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/Backgrounds/Background 8.imageset/Background 8.jpg
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Backgrounds/Background 9.imageset/Background 9.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/Backgrounds/Background 9.imageset/Background 9.jpg
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Backgrounds/Background 10.imageset/Background 10.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/Backgrounds/Background 10.imageset/Background 10.jpg
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Illustrations/Illustration 1.imageset/Illustration 1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/Illustrations/Illustration 1.imageset/Illustration 1.png
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Illustrations/Illustration 2.imageset/Illustration 2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/Illustrations/Illustration 2.imageset/Illustration 2.png
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Illustrations/Illustration 3.imageset/Illustration 3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/Illustrations/Illustration 3.imageset/Illustration 3.png
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Illustrations/Illustration 4.imageset/Illustration 4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/Illustrations/Illustration 4.imageset/Illustration 4.png
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Illustrations/Illustration 5.imageset/Illustration 5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/Illustrations/Illustration 5.imageset/Illustration 5.png
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Illustrations/Illustration 6.imageset/Illustration 6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/Illustrations/Illustration 6.imageset/Illustration 6.png
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Illustrations/Illustration 7.imageset/Illustration 7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/Illustrations/Illustration 7.imageset/Illustration 7.png
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Illustrations/Illustration 8.imageset/Illustration 8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/Illustrations/Illustration 8.imageset/Illustration 8.png
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Illustrations/Illustration 9.imageset/Illustration 9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/Illustrations/Illustration 9.imageset/Illustration 9.png
--------------------------------------------------------------------------------
/DesignCode.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Illustrations/Illustration 10.imageset/Illustration 10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode/Assets.xcassets/Illustrations/Illustration 10.imageset/Illustration 10.png
--------------------------------------------------------------------------------
/DesignCode.xcodeproj/xcuserdata/amjadoudeh.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
--------------------------------------------------------------------------------
/DesignCode/Styles/Animation.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | extension Animation {
4 | static let openCard = Animation.spring(response: 0.5, dampingFraction: 0.7)
5 | static let closeCard = Animation.spring(response: 0.6, dampingFraction: 0.9)
6 | }
7 |
--------------------------------------------------------------------------------
/DesignCode.xcodeproj/project.xcworkspace/xcuserdata/amajdoudeh.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode.xcodeproj/project.xcworkspace/xcuserdata/amajdoudeh.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/DesignCode.xcodeproj/project.xcworkspace/xcuserdata/amjadoudeh.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode.xcodeproj/project.xcworkspace/xcuserdata/amjadoudeh.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/DesignCode.xcodeproj/project.xcworkspace/xcuserdata/amajdoudeh.xcuserdatad/UserInterfaceState.xcuserstate.orig:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Amjadoudeh/DesignCode/HEAD/DesignCode.xcodeproj/project.xcworkspace/xcuserdata/amajdoudeh.xcuserdatad/UserInterfaceState.xcuserstate.orig
--------------------------------------------------------------------------------
/DesignCode/Models/Suggestion.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct Suggestion: Identifiable {
4 | let id = UUID()
5 | var text: String
6 | }
7 | var suggestion = [
8 | Suggestion(text: "SwiftUI"),
9 | Suggestion(text: "React"),
10 | Suggestion(text: "Design")
11 | ]
12 |
--------------------------------------------------------------------------------
/DesignCode/DesignCodeApp.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | @main
4 | struct DesignCodeApp: App {
5 | @StateObject var model = Model()
6 |
7 | var body: some Scene {
8 | WindowGroup {
9 | ContentView()
10 | .environmentObject(model)
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/DesignCode.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/DesignCode.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/DesignCode/Models/Model.swift:
--------------------------------------------------------------------------------
1 | import Combine
2 | import SwiftUI
3 |
4 | class Model: ObservableObject {
5 | @Published var showDetail: Bool = false
6 | @Published var selectedCourse: Int = 0
7 | @Published var selectedModal: Modal = .signIn
8 |
9 | }
10 |
11 | enum Modal: String {
12 | case signIn
13 | case signUp
14 | }
15 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # WIP
2 | ## DesignCode
3 | DesignCode is an app for development and design courses!
4 |
5 |
6 |
7 |
8 |
9 |
10 | https://user-images.githubusercontent.com/74506206/178476880-a41fdc27-0bb2-419c-a774-75a102c259f9.mov
11 |
12 |
13 |
14 | https://user-images.githubusercontent.com/74506206/179564716-13392a07-ee74-4677-b9a1-cedc1757a2b1.mov
15 |
16 |
--------------------------------------------------------------------------------
/DesignCode/Models/Topic.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct Topic: Identifiable {
4 | let id = UUID()
5 | var title: String
6 | var icon: String
7 | }
8 |
9 | var topics = [
10 | Topic(title: "iOS Development", icon: "iphone"),
11 | Topic(title: "UI Design", icon: "eyedropper"),
12 | Topic(title: "Web development", icon: "laptopcomputer")
13 | ]
14 |
--------------------------------------------------------------------------------
/DesignCode/LocaliztionKeys/ar.lproj/Localizable.strings:
--------------------------------------------------------------------------------
1 | /*
2 | Localizable.strings
3 | DesignCode
4 |
5 | Created by Amjad Oudeh on 06.05.22.
6 |
7 | */
8 |
9 | "FeaturedItem.mainTitle" = "سوفت لنظام ١٥";
10 | "FeaturedItem.description" = "أنشئ تطبيق iOS لنظام iOS 15 بتخطيطات ورسوم متحركة و ...";
11 | "FeaturedItem.duration" = "٢٠ قسمًا - ٣ ساعات";
12 | "MainView.navTitle" = "متميز";
13 |
--------------------------------------------------------------------------------
/DesignCode/LocaliztionKeys/en.lproj/Localizable.strings:
--------------------------------------------------------------------------------
1 | /*
2 | Localizable.strings
3 | DesignCode
4 | Created by Amjad Oudeh on 06.05.22.
5 | */
6 |
7 | "FeaturedItem.mainTitle" = "SwiftUI for iOS 15";
8 | "FeaturedItem.description" = "Build an iOS app for iOS 15 with custom layouts, animations and ...";
9 | "FeaturedItem.duration" = "20 sections - 3 hours";
10 | "MainView.navTitle" = "Featured";
11 |
--------------------------------------------------------------------------------
/DesignCode/LocaliztionKeys/de.lproj/Localizable.strings:
--------------------------------------------------------------------------------
1 | /*
2 | Localizable.strings
3 | DesignCode
4 |
5 | Created by Amjad Oudeh on 06.05.22.
6 |
7 | */
8 |
9 | "FeaturedItem.mainTitle" = "SwiftUI für iOS 15";
10 | "FeaturedItem.description" = "Erstellen Sie eine iOS-App für iOS 15 mit benutzerdefinierten Layouts, Animationen und ...";
11 | "FeaturedItem.duration" = "20 Abschnitte - 3 Stunden";
12 | "MainView.navTitle" = "Hervorgehoben";
13 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Logos/Logo 1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Logo 1.jpg",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Logos/Logo 2.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Logo 2.jpg",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Logos/Logo 3.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Logo 3.jpg",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Logos/Logo 4.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Logo 4.jpg",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Avatars/Avatar 1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Avatar 1.jpg",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Avatars/Avatar 2.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Avatar 2.jpg",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Avatars/Avatar 3.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Avatar 3.jpg",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DesignCode/Views/MatchedView.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct MatchedView: View {
4 | @Namespace var namespace
5 | @State var show = false
6 |
7 | var body: some View {
8 | ZStack {
9 | if !show {
10 |
11 | } else {
12 |
13 | }
14 | }
15 |
16 | }
17 | }
18 |
19 | struct MatchedView_Previews: PreviewProvider {
20 | static var previews: some View {
21 | MatchedView()
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Avatars/Avatar Default.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Avatar Default.jpg",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Backgrounds/Background 1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Background 1.jpg",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Backgrounds/Background 10.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Background 10.jpg",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Backgrounds/Background 2.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Background 2.jpg",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Backgrounds/Background 3.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Background 3.jpg",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Backgrounds/Background 4.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Background 4.jpg",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Backgrounds/Background 5.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Background 5.jpg",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Backgrounds/Background 6.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Background 6.jpg",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Backgrounds/Background 7.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Background 7.jpg",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Backgrounds/Background 8.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Background 8.jpg",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Backgrounds/Background 9.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Background 9.jpg",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Illustrations/Illustration 1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Illustration 1.png",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Illustrations/Illustration 10.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Illustration 10.png",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Illustrations/Illustration 2.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Illustration 2.png",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Illustrations/Illustration 3.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Illustration 3.png",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Illustrations/Illustration 4.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Illustration 4.png",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Illustrations/Illustration 5.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Illustration 5.png",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Illustrations/Illustration 6.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Illustration 6.png",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Illustrations/Illustration 7.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Illustration 7.png",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Illustrations/Illustration 8.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Illustration 8.png",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Illustrations/Illustration 9.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Illustration 9.png",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "author" : "xcode",
19 | "version" : 1
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DesignCode/LocaliztionKeys/LocalizationKeys.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct LocalizationKeys {
4 | struct FeaturedItem {
5 | static let mainTitle: LocalizedStringKey = "FeaturedItem.mainTitle"
6 | static let description: LocalizedStringKey = "FeaturedItem.description"
7 | static let duration: LocalizedStringKey = "FeaturedItem.duration"
8 | }
9 |
10 | struct MainView {
11 | static let navtitle: LocalizedStringKey = "MainView.navTitle"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/DesignCode/Styles/TextMofifiers.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct SectionTitleModifier: ViewModifier {
4 | func body(content: Content) -> some View {
5 | content
6 | .font(.footnote.weight(.semibold))
7 | .foregroundColor(.secondary)
8 | .frame(maxWidth: .infinity, alignment: .leading)
9 | .padding(20)
10 | }
11 | }
12 |
13 | extension View {
14 | func sectionTitleModifier() -> some View {
15 | modifier(SectionTitleModifier())
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/DesignCodeTests/Models /PreferenceKeysTests.swift:
--------------------------------------------------------------------------------
1 | // @testable import DesignCode
2 | // import XCTest
3 | // import SwiftUI
4 | //
5 | // class PreferenceKeysTests: XCTestCase {
6 | //
7 | // func test_ScrollPreferenceKey() {
8 | // let initValue: CGFloat = 0
9 | // var nextValue: CGFloat = 1
10 | //
11 | // Color.clear.preference(key: ScrollPreferenceKey.self , value: initValue)
12 | // Color.clear.preference(key: ScrollPreferenceKey.self , value: nextValue)
13 | // XCTAssert(<#Bool#>)
14 | // }
15 | // }
16 |
--------------------------------------------------------------------------------
/DesignCode/Styles/TextModifier.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TextModifier.swift
3 | // DesignCode
4 | //
5 | // Created by Amjad Oudeh on 19.08.22.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct TitleModifier: ViewModifier {
11 | func body(content: Content) -> some View {
12 | content
13 | .font(.footnote.weight(.semibold))
14 | .foregroundColor(.secondary)
15 | .frame(maxWidth: .infinity, alignment: .leading)
16 | .padding(20)
17 | }
18 | }
19 |
20 | extension View {
21 | func titleStyle() -> some View {
22 | modifier(TitleModifier())
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/DesignCode/Components /Items/TopicListRow.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct TopicListRow: View {
4 | var topic: Topic = topics[0]
5 |
6 | var body: some View {
7 | HStack(spacing: 16) {
8 | Image(systemName: topic.icon)
9 | .frame(width:36, height: 36)
10 | .background(.ultraThinMaterial)
11 | .mask(Circle())
12 | Text(topic.title)
13 | .fontWeight(.semibold)
14 | Spacer()
15 | }
16 | }
17 | }
18 |
19 | struct TopicListRow_Previews: PreviewProvider {
20 | static var previews: some View {
21 | TopicListRow()
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/DesignCode/Styles/BackgroundModifier.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct BackgroundColor: ViewModifier {
4 | var opacity: Double = 0.6
5 | @Environment(\.colorScheme) var colorScheme
6 |
7 | func body(content: Content) -> some View {
8 | content
9 | .overlay(
10 | Color("Background")
11 | .opacity(colorScheme == .dark ? opacity : 0)
12 | .blendMode(.overlay)
13 | .allowsHitTesting(false)
14 | )
15 | }
16 | }
17 |
18 | extension View {
19 | func backgroundColor(opacity: Double = 0.6) -> some View {
20 | self.modifier(BackgroundColor(opacity: opacity))
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/DesignCode/Components /Graphics/HexagonView.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct HexagonView: View {
4 | var body: some View {
5 | Canvas { context, size in
6 | context.draw(Image("Blob 1"), in: CGRect(x: 0, y: 0, width: 200, height: 200 ))
7 | context.draw(Image(systemName: "hexagon.fill"), in: CGRect(x: 0, y: 0, width: size.width, height: size.height ))
8 | }
9 | .frame(width: 200, height: 210)
10 | .foregroundStyle(.linearGradient(colors: [.pink, .blue], startPoint: .topLeading, endPoint: .bottomTrailing))
11 | }
12 | }
13 | struct HexagonView_Previews: PreviewProvider {
14 | static var previews: some View {
15 | HexagonView()
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/DesignCode/Models/PreferenceKeys.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct ScrollPreferenceKey: PreferenceKey {
4 | static var defaultValue: CGFloat = 0
5 | static func reduce(value: inout CGFloat, nextValue: () -> CGFloat) {
6 | value = nextValue()
7 | }
8 | }
9 |
10 | struct TabPreferenceKey: PreferenceKey {
11 | static var defaultValue: CGFloat = 0
12 | static func reduce(value: inout CGFloat, nextValue: () -> CGFloat) {
13 | value = nextValue()
14 | }
15 | }
16 |
17 | struct CirculePreferenceKey: PreferenceKey {
18 | static var defaultValue: CGFloat = 0
19 | static func reduce(value: inout CGFloat, nextValue: () -> CGFloat) {
20 | value = nextValue()
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/DesignCode/Models/Coin.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct Coin: Identifiable, Codable {
4 | var id: Int
5 | var coin_name: String
6 | var acronym: String
7 | var logo: String
8 | }
9 |
10 | class CoinModel: ObservableObject {
11 | @Published var coins: [Coin] = []
12 |
13 | @MainActor
14 | func fetchCoins() async {
15 | do {
16 | let url = URL(string: "https://random-data-api.com/api/crypto_coin/random_crypto_coin?size=20")!
17 | let (data, _) = try await URLSession.shared.data(from: url)
18 | coins = try JSONDecoder().decode([Coin].self, from: data)
19 |
20 | } catch {
21 | print("error")
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/DesignCode/Styles/AnimatableFontModifier.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct AnimatableFontModifier: AnimatableModifier {
4 | var size: Double
5 | var weight: Font.Weight = .regular
6 | var design: Font.Design = .default
7 |
8 | var animatableDate: Double {
9 | get { size }
10 | set { size = newValue }
11 | }
12 |
13 | func body(content: Content) -> some View {
14 | content.font(.system(size: size, weight: weight, design: design))
15 | }
16 | }
17 |
18 | extension View {
19 | func animatableFont(size: Double, weight: Font.Weight, design: Font.Design) -> some View {
20 | self.modifier(AnimatableFontModifier(size: size, weight: weight, design: design))
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/DesignCode.xcodeproj/project.xcworkspace/xcuserdata/amajdoudeh.xcuserdatad/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BuildLocationStyle
6 | UseAppPreferences
7 | CustomBuildLocationType
8 | RelativeToDerivedData
9 | DerivedDataLocationStyle
10 | Default
11 | IssueFilterStyle
12 | ShowActiveSchemeOnly
13 | LiveSourceIssuesEnabled
14 |
15 | ShowSharedSchemesAutomaticallyEnabled
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/DesignCode/Models/Tab.swift:
--------------------------------------------------------------------------------
1 | // data Model
2 | import SwiftUI
3 |
4 | struct TabItem: Identifiable {
5 | var id = UUID()
6 | var text: String
7 | var icon: String
8 | var tab: Tab
9 | var color: Color
10 | }
11 |
12 | var tabItems = [
13 | TabItem(text: "Learn more", icon: "house", tab: .home, color: .purple),
14 | TabItem(text: "Explore", icon: "magnifyingglass", tab: .explore, color: .purple),
15 | TabItem(text: "Notifications", icon: "bell", tab: .notifications, color: .purple),
16 | TabItem(text: "Library", icon: "rectangle.stack", tab: .library, color: .purple)
17 | ]
18 |
19 | enum Tab: String {
20 | case home
21 | case explore
22 | case notifications
23 | case library
24 | }
25 |
--------------------------------------------------------------------------------
/DesignCode/Models/Handbook.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct Handbook: Identifiable {
4 | let id = UUID()
5 | var title: String
6 | var subtitle: String
7 | var text: String
8 | var logo: String
9 | var image: String
10 | var color1: Color
11 | var color2: Color
12 | }
13 |
14 | var handbooks = [
15 | Handbook(title: "SwiftUI Handbook", subtitle: "80 sections - 9 hours", text: "A comprehensive series of tutorials covering Xcode, SwiftUI and all the layout and development techniques", logo: "Logo 1", image: "Illustration 1", color1: .teal, color2: .blue),
16 | Handbook(title: "React Advanced Handbook", subtitle: "30 sections - 3 hours", text: "A comprehensive guide for an overview of the React library and all its basics", logo: "Logo 1", image: "Illustration 2", color1: .purple, color2: .pink)
17 | ]
18 |
--------------------------------------------------------------------------------
/DesignCodeUITests/DesignCodeUITestsLaunchTests.swift:
--------------------------------------------------------------------------------
1 | import XCTest
2 |
3 | class DesignCodeUITestsLaunchTests: XCTestCase {
4 |
5 | override class var runsForEachTargetApplicationUIConfiguration: Bool {
6 | true
7 | }
8 |
9 | override func setUpWithError() throws {
10 | continueAfterFailure = false
11 | }
12 |
13 | func testLaunch() throws {
14 | let app = XCUIApplication()
15 | app.launch()
16 |
17 | // Insert steps here to perform after app launch but before taking a screenshot,
18 | // such as logging into a test account or navigating somewhere in the app
19 |
20 | let attachment = XCTAttachment(screenshot: app.screenshot())
21 | attachment.name = "Launch Screen"
22 | attachment.lifetime = .keepAlways
23 | add(attachment)
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/pull_request_template.md:
--------------------------------------------------------------------------------
1 | [Ticket]()
2 |
3 |
4 | **Why is this PR necessary?**
5 |
6 | **What is it supposed to do?**
7 |
8 |
9 | **How did you implement it?**
10 |
11 | ## UI Changes
12 |
13 | [Figma specs]()
14 |
15 | ### Screenshots / Recordings
16 | | Before | After |
17 | |--------|------|
18 | | ![Before PR change]() | ![After PR change]() |
19 |
20 |
21 |
22 |
23 |
24 | ### Please check that you have tested on the following iOS versions and device types:
25 |
26 | - [ ] `iOS 15`
27 | - [ ] `iOS 14`
28 | - [ ] Smaller device (e.g. iPhone SE 1st gen)
29 | - [ ] Device with home button (e.g. iPhone 8, iPhone SE 2nd gen)
30 | - [ ] Max-size device (e.g. iPhone 12 Pro Max)
31 | - [ ] iPad Portrait
32 | - [ ] iPad Landscape
33 | - [ ] iPad _**rotation**_ 👉 Check the rotation behavior :: e.g.: _watch out for breaking constraints in console_
34 |
--------------------------------------------------------------------------------
/DesignCode.xcodeproj/xcuserdata/amjadoudeh.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | DesignCode.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 70BFA4482800EFF1002FD946
16 |
17 | primary
18 |
19 |
20 | 70BFA4582800EFF2002FD946
21 |
22 | primary
23 |
24 |
25 | 70BFA4622800EFF2002FD946
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "color" : {
5 | "color-space" : "srgb",
6 | "components" : {
7 | "alpha" : "1.000",
8 | "blue" : "0xD5",
9 | "green" : "0x34",
10 | "red" : "0x62"
11 | }
12 | },
13 | "idiom" : "universal"
14 | },
15 | {
16 | "appearances" : [
17 | {
18 | "appearance" : "luminosity",
19 | "value" : "dark"
20 | }
21 | ],
22 | "color" : {
23 | "color-space" : "srgb",
24 | "components" : {
25 | "alpha" : "1.000",
26 | "blue" : "0xFF",
27 | "green" : "0x9E",
28 | "red" : "0x5E"
29 | }
30 | },
31 | "idiom" : "universal"
32 | }
33 | ],
34 | "info" : {
35 | "author" : "xcode",
36 | "version" : 1
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Colors/Shadow.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "color" : {
5 | "color-space" : "srgb",
6 | "components" : {
7 | "alpha" : "1.000",
8 | "blue" : "0x7C",
9 | "green" : "0x2A",
10 | "red" : "0x45"
11 | }
12 | },
13 | "idiom" : "universal"
14 | },
15 | {
16 | "appearances" : [
17 | {
18 | "appearance" : "luminosity",
19 | "value" : "dark"
20 | }
21 | ],
22 | "color" : {
23 | "color-space" : "srgb",
24 | "components" : {
25 | "alpha" : "1.000",
26 | "blue" : "0x00",
27 | "green" : "0x00",
28 | "red" : "0x00"
29 | }
30 | },
31 | "idiom" : "universal"
32 | }
33 | ],
34 | "info" : {
35 | "author" : "xcode",
36 | "version" : 1
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Colors/Background.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "color" : {
5 | "color-space" : "srgb",
6 | "components" : {
7 | "alpha" : "1.000",
8 | "blue" : "0xFF",
9 | "green" : "0xF6",
10 | "red" : "0xF2"
11 | }
12 | },
13 | "idiom" : "universal"
14 | },
15 | {
16 | "appearances" : [
17 | {
18 | "appearance" : "luminosity",
19 | "value" : "dark"
20 | }
21 | ],
22 | "color" : {
23 | "color-space" : "srgb",
24 | "components" : {
25 | "alpha" : "1.000",
26 | "blue" : "0x4B",
27 | "green" : "0x25",
28 | "red" : "0x25"
29 | }
30 | },
31 | "idiom" : "universal"
32 | }
33 | ],
34 | "info" : {
35 | "author" : "xcode",
36 | "version" : 1
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/DesignCode/Styles/InputStyle.swift:
--------------------------------------------------------------------------------
1 |
2 | import SwiftUI
3 |
4 | struct InputStyle: ViewModifier {
5 | var icon: String
6 | func body(content: Content) -> some View {
7 | content
8 | .padding(15)
9 | .padding(.leading, 40)
10 | .background(.thinMaterial, in: RoundedRectangle(cornerRadius: 20, style: .continuous))
11 | .strokeStyle(cornerRadius: 20)
12 | .overlay(
13 | Image(systemName: icon)
14 | .foregroundColor(.secondary)
15 | .frame(width: 36, height: 36)
16 | .background(.thinMaterial, in: RoundedRectangle(cornerRadius: 14, style: .continuous))
17 | .frame(maxWidth: .infinity, alignment: .leading)
18 | .padding(8)
19 | )
20 | }
21 | }
22 | extension View {
23 | func inputStyle(icon: String = "mail") -> some View {
24 | modifier(InputStyle(icon: icon))
25 | }
26 | }
27 |
28 |
29 |
--------------------------------------------------------------------------------
/DesignCode/Components /Graphics/CircularProgressView.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct CircularProgressView: View {
4 | var value: CGFloat = 0.2
5 | @State var appear = false
6 | var lineWidth: Double = 4
7 |
8 | var body: some View {
9 | Circle()
10 | .trim(from: 0, to: appear ? value : 0)
11 | .stroke(style: StrokeStyle(lineWidth: lineWidth, lineCap: .round))
12 | .fill(.angularGradient(colors: [.purple, .pink, .purple], center: .center, startAngle: .degrees(0), endAngle: .degrees(360)))
13 | .rotationEffect(.degrees(270))
14 | .onAppear {
15 | withAnimation(.spring().delay(0.6)) {
16 | appear = true
17 | }
18 | }
19 | .onDisappear {
20 | appear = false
21 | }
22 | }
23 | }
24 |
25 | struct CircularProgressView_Previews: PreviewProvider {
26 | static var previews: some View {
27 | CircularProgressView()
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Blobs/Blob 1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Blob 1.pdf",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "appearances" : [
10 | {
11 | "appearance" : "luminosity",
12 | "value" : "dark"
13 | }
14 | ],
15 | "filename" : "Blob 1 Dark.pdf",
16 | "idiom" : "universal",
17 | "scale" : "1x"
18 | },
19 | {
20 | "idiom" : "universal",
21 | "scale" : "2x"
22 | },
23 | {
24 | "appearances" : [
25 | {
26 | "appearance" : "luminosity",
27 | "value" : "dark"
28 | }
29 | ],
30 | "idiom" : "universal",
31 | "scale" : "2x"
32 | },
33 | {
34 | "idiom" : "universal",
35 | "scale" : "3x"
36 | },
37 | {
38 | "appearances" : [
39 | {
40 | "appearance" : "luminosity",
41 | "value" : "dark"
42 | }
43 | ],
44 | "idiom" : "universal",
45 | "scale" : "3x"
46 | }
47 | ],
48 | "info" : {
49 | "author" : "xcode",
50 | "version" : 1
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Waves/Waves 1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Waves 1.pdf",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "appearances" : [
10 | {
11 | "appearance" : "luminosity",
12 | "value" : "dark"
13 | }
14 | ],
15 | "filename" : "Waves 1 Dark.pdf",
16 | "idiom" : "universal",
17 | "scale" : "1x"
18 | },
19 | {
20 | "idiom" : "universal",
21 | "scale" : "2x"
22 | },
23 | {
24 | "appearances" : [
25 | {
26 | "appearance" : "luminosity",
27 | "value" : "dark"
28 | }
29 | ],
30 | "idiom" : "universal",
31 | "scale" : "2x"
32 | },
33 | {
34 | "idiom" : "universal",
35 | "scale" : "3x"
36 | },
37 | {
38 | "appearances" : [
39 | {
40 | "appearance" : "luminosity",
41 | "value" : "dark"
42 | }
43 | ],
44 | "idiom" : "universal",
45 | "scale" : "3x"
46 | }
47 | ],
48 | "info" : {
49 | "author" : "xcode",
50 | "version" : 1
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Waves/Waves 2.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Waves 2.pdf",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "appearances" : [
10 | {
11 | "appearance" : "luminosity",
12 | "value" : "dark"
13 | }
14 | ],
15 | "filename" : "Waves 2 Dark.pdf",
16 | "idiom" : "universal",
17 | "scale" : "1x"
18 | },
19 | {
20 | "idiom" : "universal",
21 | "scale" : "2x"
22 | },
23 | {
24 | "appearances" : [
25 | {
26 | "appearance" : "luminosity",
27 | "value" : "dark"
28 | }
29 | ],
30 | "idiom" : "universal",
31 | "scale" : "2x"
32 | },
33 | {
34 | "idiom" : "universal",
35 | "scale" : "3x"
36 | },
37 | {
38 | "appearances" : [
39 | {
40 | "appearance" : "luminosity",
41 | "value" : "dark"
42 | }
43 | ],
44 | "idiom" : "universal",
45 | "scale" : "3x"
46 | }
47 | ],
48 | "info" : {
49 | "author" : "xcode",
50 | "version" : 1
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/DesignCode/Components /Items/SmallCourseItem.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct SmallCourseItem: View {
4 | var course: Course = courses[0]
5 |
6 | var body: some View {
7 | VStack(alignment: .leading, spacing: 2) {
8 | RoundedRectangle(cornerRadius: 20, style: .continuous)
9 | .fill(.black.opacity(0.1))
10 | .overlay(Image(course.image)
11 | .resizable()
12 | .aspectRatio(contentMode: .fit)
13 | .frame(width: 150 ,height: 110 )
14 | )
15 | Text(course.subtitle)
16 | .font(.caption)
17 | .foregroundColor(.secondary)
18 | .lineLimit(1)
19 | Text(course.title)
20 | .fontWeight(.semibold)
21 | .frame(maxWidth: .infinity, alignment: .leading)
22 |
23 | }
24 | .padding()
25 | .frame(width: 160, height: 200)
26 | .background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 30, style: .continuous))
27 | .strokeStyle(cornerRadius: 30)
28 | }
29 | }
30 |
31 | struct SmallCourseItem_Previews: PreviewProvider {
32 | static var previews: some View {
33 | SmallCourseItem()
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/DesignCodeTests/DesignCodeTests.swift:
--------------------------------------------------------------------------------
1 | import XCTest
2 | @testable import DesignCode
3 |
4 | class DesignCodeTests: XCTestCase {
5 |
6 | override func setUpWithError() throws {
7 | // Put setup code here. This method is called before the invocation of each test method in the class.
8 | }
9 |
10 | override func tearDownWithError() throws {
11 | // Put teardown code here. This method is called after the invocation of each test method in the class.
12 | }
13 |
14 | func testExample() throws {
15 | // This is an example of a functional test case.
16 | // Use XCTAssert and related functions to verify your tests produce the correct results.
17 | // Any test you write for XCTest can be annotated as throws and async.
18 | // Mark your test throws to produce an unexpected failure when your test encounters an uncaught error.
19 | // Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards.
20 | }
21 |
22 | func testPerformanceExample() throws {
23 | // This is an example of a performance test case.
24 | self.measure {
25 | // Put the code you want to measure the time of here.
26 | }
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/DesignCode/Styles/Styles.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct StrokeStyleModifier: ViewModifier {
4 | // created a variable cornerRadius to be able to pass the value of it in the modifier as Dynamic value: type CGFloat
5 | var cornerRadius: CGFloat
6 | // adopting to the darkMode
7 | @Environment(\.colorScheme) var colorScheme
8 | func body(content: Content) -> some View {
9 | content.overlay(
10 | RoundedRectangle(
11 | cornerRadius: cornerRadius,
12 | style: .continuous
13 | )
14 | .stroke(
15 | .linearGradient(
16 | colors: [
17 | .white.opacity(colorScheme == .dark ? 0.1 : 0.3 ),
18 | .black.opacity(colorScheme == .dark ? 0.3 : 0.1 )
19 | ],
20 | startPoint: .top,
21 | endPoint: .bottom
22 | )
23 | )
24 | .blendMode(.overlay)
25 | )
26 | }
27 | }
28 |
29 | extension View {
30 | // the function is receiving a cornerRaduis type CGFloat and its value is 30 so it will be the Defaul value.
31 | func strokeStyle(cornerRadius: CGFloat = 30) -> some View {
32 | modifier(StrokeStyleModifier(cornerRadius: cornerRadius))
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/DesignCode.xcdatamodeld/Advanced_SwiftUI.xcdatamodel/contents:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/DesignCode/Components /Buttons/PlayView.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct PlayView: View {
4 | var body: some View {
5 | PlayShape()
6 | .fill(Color("Shadow").opacity(0.8))
7 | .frame(width: 52, height: 52)
8 | .overlay(PlayShape().stroke(.white))
9 | .background(
10 | PlayShape()
11 | .fill(.angularGradient(colors: [.blue, .red, .blue], center: .center, startAngle: .degrees(0), endAngle: .degrees(360)))
12 | .blur(radius: 12)
13 | )
14 | .offset(x: 2)
15 | .frame(width: 120, height: 120)
16 | .background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 46, style: .continuous))
17 | .strokeStyle(cornerRadius: 46)
18 | .shadow(color: Color("Shadow").opacity(0.2), radius: 30, x: 0, y: 30)
19 | .overlay(
20 | Text("12:08")
21 | .font(.footnote.weight(.semibold))
22 | .padding(.vertical, 2)
23 | .padding(.horizontal, 4)
24 | .background(Color(UIColor.systemBackground).opacity(0.3))
25 | .cornerRadius(4)
26 | .offset(y: 44)
27 | )
28 | }
29 | }
30 |
31 | struct PlayView_Previews: PreviewProvider {
32 | static var previews: some View {
33 | PlayView()
34 | }
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/DesignCode/Components /Items/SectionRow.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct SectionRow: View {
4 | var section: CourseSection = courseSections[0]
5 |
6 | var body: some View {
7 | HStack(alignment: .top, spacing: 16) {
8 | Image(section.logo)
9 | .resizable()
10 | .frame(width: 36, height: 36)
11 | .mask(Circle())
12 | .padding(10)
13 | .background(Color(UIColor.systemBackground).opacity(0.3))
14 | .mask(Circle())
15 | .overlay(CircularProgressView(value: section.progress))
16 | VStack(alignment: .leading, spacing: 8) {
17 | Text(section.subtitle)
18 | .font(.caption.monospacedDigit())
19 | .foregroundStyle(.secondary)
20 | Text(section.title)
21 | .fontWeight(.semibold)
22 | Text(section.text)
23 | .font(.caption.weight(.medium))
24 | .foregroundStyle(.secondary)
25 | ProgressView(value: section.progress)
26 | .accentColor(.white)
27 | .frame(maxWidth: 132)
28 |
29 | }
30 | }
31 | .padding(20)
32 | }
33 | }
34 |
35 | struct SectionRow_Previews: PreviewProvider {
36 | static var previews: some View {
37 | SectionRow()
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/DesignCode/Components /Buttons/AvatarView.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct AvatarView: View {
4 | @AppStorage("isLogged") var isLogged = true
5 |
6 | var body: some View {
7 | Group {
8 | if isLogged {
9 | AsyncImage(url: URL(string: "https://picsum.photos/200"),transaction: Transaction(animation: .easeOut)){
10 | phase in
11 | switch phase {
12 | case .success(let image):
13 | image.resizable()
14 | .transition(.scale(scale: 0.5, anchor: .center))
15 | case .empty:
16 | ProgressView()
17 | case .failure(_):
18 | Color.gray
19 | @unknown default:
20 | EmptyView()
21 | }
22 | }
23 | } else {
24 | Image("Avatar Default")
25 | .resizable()
26 | }
27 |
28 | }
29 | .frame(width: 26, height: 26)
30 | .cornerRadius(10)
31 | .padding(8)
32 | .background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 18, style: .continuous))
33 | .strokeStyle(cornerRadius: 18)
34 | }
35 | }
36 |
37 | struct AvatarView_Previews: PreviewProvider {
38 | static var previews: some View {
39 | AvatarView()
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/DesignCode/Navigation/ContentView.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct ContentView: View {
4 | @AppStorage("selectedTab") var selectedTab: Tab = .home
5 | @EnvironmentObject var model: Model
6 | @AppStorage("showModel") var showModel = false
7 |
8 | var body: some View {
9 | ZStack(alignment: .bottom) {
10 | switch selectedTab {
11 | case .home:
12 | HomeView()
13 | case .explore:
14 | ExploreView()
15 | case .notifications:
16 | NotificationsView()
17 | case .library:
18 | LibraryView()
19 | }
20 | TabBar()
21 | .offset(y: model.showDetail ? 200 : 0)
22 | if showModel {
23 | ModalView()
24 | .zIndex(1)
25 | }
26 | }
27 | /// customise a safe area for the TabBar
28 | .safeAreaInset(edge: .bottom, content: {
29 | Color.clear.frame(height: 88)
30 | })
31 | .dynamicTypeSize(.large ... .xxxLarge)
32 | }
33 | }
34 | struct ContentView_Previews: PreviewProvider {
35 | static var previews: some View {
36 | ContentView()
37 | .environment(\.locale, .init(identifier: "en"))
38 | .preferredColorScheme(.light)
39 | ContentView()
40 | .preferredColorScheme(.dark)
41 | .environmentObject(Model())
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/DesignCodeUITests/DesignCodeUITests.swift:
--------------------------------------------------------------------------------
1 | import XCTest
2 |
3 | class DesignCodeUITests: XCTestCase {
4 |
5 | override func setUpWithError() throws {
6 | // Put setup code here. This method is called before the invocation of each test method in the class.
7 |
8 | // In UI tests it is usually best to stop immediately when a failure occurs.
9 | continueAfterFailure = false
10 |
11 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
12 | }
13 |
14 | override func tearDownWithError() throws {
15 | // Put teardown code here. This method is called after the invocation of each test method in the class.
16 | }
17 |
18 | func testExample() throws {
19 | // UI tests must launch the application that they test.
20 | let app = XCUIApplication()
21 | app.launch()
22 |
23 | // Use recording to get started writing UI tests.
24 | // Use XCTAssert and related functions to verify your tests produce the correct results.
25 | }
26 |
27 | func testLaunchPerformance() throws {
28 | if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) {
29 | // This measures how long it takes to launch your application.
30 | measure(metrics: [XCTApplicationLaunchMetric()]) {
31 | XCUIApplication().launch()
32 | }
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/DesignCode/Components /Items/Certificate.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct Certificate: View {
4 | var body: some View {
5 | VStack(alignment: .leading) {
6 | VStack(alignment: .leading, spacing: 8) {
7 | Text("SwiftUI for iOS 15")
8 | .font(.title3.weight(.semibold))
9 | Text("Certificate")
10 | .font(.subheadline.weight(.medium))
11 | .foregroundStyle(.secondary)
12 | }
13 | Spacer()
14 | VStack(alignment: .leading, spacing: 8) {
15 | Text("April 18th".uppercased())
16 | .font(.footnote.weight(.semibold))
17 | Text("DesignCode: Amjad Oudeh".uppercased())
18 | .font(.footnote.weight(.medium))
19 | }
20 | .foregroundStyle(.secondary)
21 | }
22 | .frame(maxWidth: .infinity, alignment: .leading)
23 | .overlay(Image("Logo 2")
24 | .resizable(resizingMode: .stretch)
25 | .aspectRatio(contentMode: .fit)
26 | .frame(width: 26.0, height: 26.0)
27 | .cornerRadius(10.0)
28 | .padding(9)
29 | .background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 16, style: .continuous))
30 | .strokeStyle(cornerRadius: 20)
31 | .frame(maxWidth: .infinity, maxHeight: .infinity , alignment: .topTrailing)
32 | )
33 | .padding(20)
34 | .background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 30, style: .continuous))
35 | .strokeStyle(cornerRadius: 30)
36 | }
37 | }
38 |
39 | struct Certificate_Previews: PreviewProvider {
40 | static var previews: some View {
41 | Certificate()
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/DesignCode/Components /Items/HandbookItem.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct HandbookItem: View {
4 | var handbook: Handbook = handbooks[0]
5 |
6 | var body: some View {
7 | VStack(alignment: .leading, spacing: 8) {
8 | RoundedRectangle(cornerRadius: 20)
9 | .fill(.black.opacity(0.2))
10 | .frame(height: 90)
11 | .overlay(
12 | Image(handbook.image)
13 | .resizable()
14 | .aspectRatio(contentMode: .fit)
15 | .frame(width: 150, height: 100)
16 | )
17 | Text(handbook.title)
18 | .fontWeight(.semibold)
19 | .layoutPriority(1)
20 | Text(handbook.subtitle)
21 | .font(.caption.weight(.medium))
22 | .foregroundStyle(.secondary)
23 | Text(handbook.text)
24 | .font(.caption)
25 | .foregroundStyle(.secondary)
26 | .lineLimit(3)
27 | Spacer()
28 | }
29 | .padding()
30 | .frame(maxWidth: 200)
31 | .frame(height: 260)
32 | .background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 30, style: .continuous))
33 | .strokeStyle(cornerRadius: 30)
34 | .background(
35 | RoundedRectangle(cornerRadius: 30, style: .continuous)
36 | .fill(.linearGradient(colors: [handbook.color1, handbook.color2], startPoint: .topLeading, endPoint: .bottomTrailing))
37 | .rotation3DEffect(.degrees(10), axis: (x: 0, y: 1, z: 0), anchor: .bottomTrailing)
38 | .rotationEffect(.degrees(180))
39 | .padding(.trailing, 40)
40 | )
41 | }
42 | }
43 |
44 | struct HandbookItem_Previews: PreviewProvider {
45 | static var previews: some View {
46 | HandbookItem(handbook: handbooks[1])
47 | }
48 | }
49 |
50 |
--------------------------------------------------------------------------------
/DesignCode/Styles/AngularButtonStyle.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ButtonStyle.swift
3 | // DesignCode
4 | //
5 | // Created by Amjad Oudeh on 21.07.22.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct AngularButtonStyle: ButtonStyle {
11 | @Environment(\.controlSize) var controlSize
12 | var extraPadding: CGFloat {
13 | switch controlSize {
14 |
15 | case .mini:
16 | return 0
17 | case .small:
18 | return 0
19 | case .regular:
20 | return 4
21 | case .large:
22 | return 12
23 | @unknown default:
24 | return 0
25 | }
26 | }
27 |
28 | var cornerRadius: CGFloat {
29 | switch controlSize {
30 | case .mini:
31 | return 12
32 | case .small:
33 | return 12
34 | case .regular:
35 | return 16
36 | case .large:
37 | return 20
38 | @unknown default:
39 | return 12
40 | }
41 | }
42 |
43 | func makeBody(configuration: Configuration) -> some View {
44 | configuration.label
45 | .padding(.horizontal, 10 + extraPadding)
46 | .padding(.vertical, 4 + extraPadding)
47 | .background(
48 | RoundedRectangle(cornerRadius: cornerRadius, style: .continuous)
49 | .fill(.linearGradient(colors: [Color(.systemBackground), Color(.systemBackground).opacity(0.6)], startPoint: .top, endPoint: .bottom))
50 | .blendMode(.softLight)
51 | )
52 | .background(
53 | RoundedRectangle(cornerRadius: cornerRadius, style: .continuous)
54 | .fill(.angularGradient(colors: [.pink, .purple, .blue, .pink], center: .center, startAngle: .degrees(-90), endAngle: .degrees( 270)))
55 | .blur(radius: cornerRadius)
56 | )
57 | .strokeStyle(cornerRadius: cornerRadius)
58 | }
59 | }
60 |
61 | extension ButtonStyle where Self == AngularButtonStyle {
62 | static var Angular: Self {
63 | return .init()
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/DesignCode/Components /Items/FeaturedItem.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct FeaturedItem: View {
4 | private typealias Localization = LocalizationKeys.FeaturedItem
5 | var course: Course = courses[0]
6 |
7 | var body: some View {
8 | VStack(alignment: .leading, spacing: 8.0) {
9 | Spacer()
10 | Image(course.logo)
11 | .resizable(resizingMode: .stretch)
12 | .aspectRatio(contentMode: .fit)
13 | .frame(width: 26.0, height: 26.0)
14 | .cornerRadius(10.0)
15 | .padding(9)
16 | .background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 16, style: .continuous))
17 | .strokeStyle(cornerRadius: 20)
18 | // Text(Localization.mainTitle)
19 | Text(course.title)
20 | .font(.title)
21 | .fontWeight(.bold)
22 | .foregroundStyle(.linearGradient(colors: [.primary, .primary.opacity(0.5)], startPoint: .topLeading, endPoint: .bottomTrailing))
23 | // Text(Localization.duration)
24 | Text(course.subtitle)
25 | .font(.footnote)
26 | .fontWeight(.semibold)
27 | .foregroundStyle(.secondary)
28 | // Text(Localization.description)
29 | Text(course.text)
30 | .font(.footnote)
31 | .multilineTextAlignment(.leading)
32 | .lineLimit(2)
33 | .frame(maxWidth: .infinity, alignment: .leading)
34 | .foregroundStyle(.secondary)
35 | }
36 | .padding(/*@START_MENU_TOKEN@*/.all, 20.0/*@END_MENU_TOKEN@*/)
37 | .padding(.vertical, 20)
38 | .frame(width: nil, height: 350.0)
39 | .background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 30, style: .continuous)) // Material is to have a glassy view
40 | .strokeStyle()// after creating the extension I can repleace it with my custom modifier .modifier(StrokeStyle())
41 | .padding(.horizontal, 20)
42 | }
43 | }
44 |
45 | struct FeaturedItem_Previews: PreviewProvider {
46 | static var previews: some View {
47 | FeaturedItem()
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/DesignCode/Views/Main/NotificationsView.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct NotificationsView: View {
4 | @State var hasScrolled: Bool = false
5 | var body: some View {
6 | ZStack {
7 | Color("Background").ignoresSafeArea()
8 |
9 | ScrollView {
10 | scrollDetection
11 |
12 | sectionSections
13 | }
14 | .safeAreaInset(edge: .top, content: {
15 | Color.clear.frame(height: 70)
16 | })
17 | .overlay(NavigationBar(title: "Notifications", hasScrolled: $hasScrolled))
18 | .background(Image("Blob 1").offset(x: -180, y: -300))
19 |
20 | }
21 |
22 | }
23 |
24 | var sectionSections: some View {
25 | VStack(alignment: .leading) {
26 | ForEach(Array(courseSections.enumerated()), id: \.offset) { index, section in
27 | if index != 0 { Divider() }
28 | SectionRow(section: section)
29 |
30 | }
31 | }
32 | .background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 30, style: .continuous))
33 | .strokeStyle(cornerRadius: 30)
34 | .padding(20)
35 | }
36 | var scrollDetection: some View {
37 | /// to target the position of the scrollView(starting form after the navBar) I had to use named( ) with coordinateSpace(name: "scroll"), since global targets the full screen and local targets a fram moves with it
38 | GeometryReader { proxy in
39 | // Text("\(proxy.frame(in: .named("scroll")).minY)")
40 | Color.clear.preference(key: ScrollPreferenceKey.self, value: proxy.frame(in: .named("scroll")).minY)
41 | }
42 | .frame(height: 0) /// adding a frame to get rid of the default hight of the Geometry
43 | .onPreferenceChange(ScrollPreferenceKey.self, perform: { value in
44 | withAnimation(.easeInOut) {
45 | if value < 0 {
46 | hasScrolled = false
47 | } else {
48 | hasScrolled = true
49 | }
50 | }
51 | })
52 | }
53 | }
54 |
55 | struct Notifications_Previews: PreviewProvider {
56 | static var previews: some View {
57 | NotificationsView()
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/DesignCode/Models/Course.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct Course: Identifiable {
4 | let id = UUID()
5 | var index: Int
6 | var title: String
7 | var subtitle: String
8 | var text: String
9 | var image: String
10 | var background: String
11 | var logo: String
12 | }
13 |
14 | var courses = [
15 | Course(index: 1, title: "SwiftUI for iOS 15", subtitle: "20 sections - 3 hours", text: "Build an iOS app for iOS 15 with custom layouts, animations and ...", image: "Illustration 9", background: "Background 5", logo: "Logo 2"),
16 | Course(index: 2, title: "UI Design for iOS 15", subtitle: "20 sections - 3 hours", text: "Design an iOS app for iOS 15 with custom layouts, animations and ...", image: "Illustration 3", background: "Background 4", logo: "Logo 4"),
17 | Course(index: 3, title: "Flutter for designers", subtitle: "20 sections - 3 hours", text: "Flutter is a relatively new toolkit that makes it easy to build cross-platform apps that look gorgeous and is easy to use.", image: "Illustration 1", background: "Background 1", logo: "Logo 1"),
18 | Course(index: 4, title: "React Hooks Advanced", subtitle: "20 sections - 3 hours", text: "Learn how to build a website with Typescript, Hooks, Contentful and Gatsby Cloud", image: "Illustration 2", background: "Background 2", logo: "Logo 3")
19 | ]
20 |
21 | var featuredCourses = [
22 | Course(index: 1, title: "SwiftUI for iOS 15", subtitle: "20 sections - 3 hours", text: "Build an iOS app for iOS 15 with custom layouts, animations and ...", image: "Illustration 5", background: "Background 5", logo: "Logo 2"),
23 | Course(index: 2, title: "React Hooks Advanced", subtitle: "20 sections - 3 hours", text: "Learn how to build a website with Typescript, Hooks, Contentful and Gatsby Cloud", image: "Illustration 2", background: "Background 3", logo: "Logo 3"),
24 | Course(index: 3, title: "UI Design for iOS 15", subtitle: "20 sections - 3 hours", text: "Design an iOS app for iOS 15 with custom layouts, animations and ...", image: "Illustration 3", background: "Background 4", logo: "Logo 4"),
25 | Course(index: 4, title: "Flutter for designers", subtitle: "20 sections - 3 hours", text: "Flutter is a relatively new toolkit that makes it easy to build cross-platform apps that look gorgeous and is easy to use.", image: "Illustration 1", background: "Background 1", logo: "Logo 1")
26 | ]
27 |
--------------------------------------------------------------------------------
/DesignCode/Components /Items/CourseItem.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct CourseItem: View {
4 | var namespace: Namespace.ID
5 | var course: Course = courses[0]
6 | @Binding var show: Bool
7 |
8 | var body: some View {
9 | VStack {
10 |
11 | Spacer()
12 |
13 | VStack(alignment: .leading, spacing: 12) {
14 | Text(course.title)
15 | .font(.largeTitle.weight(.bold))
16 | .matchedGeometryEffect(id: "title\(course.id)", in: namespace)
17 | .frame(maxWidth: .infinity, alignment: .leading)
18 | Text(course.subtitle.uppercased())
19 | .font(.footnote.weight(.semibold))
20 | .matchedGeometryEffect(id: "subtitle\(course.id)", in: namespace)
21 | Text(course.text)
22 | .font(.footnote)
23 | .matchedGeometryEffect(id: "text\(course.id)", in: namespace)
24 | }
25 | .padding(20)
26 | .background(
27 | Rectangle()
28 | .fill(.ultraThinMaterial)
29 | .mask(RoundedRectangle(cornerRadius: 30, style: .continuous))
30 | .blur(radius: 30)
31 | .matchedGeometryEffect(id: "blur\(course.id)", in: namespace)
32 | )
33 | }
34 | .foregroundStyle(.white)
35 | .background(
36 | Image(course.image)
37 | .resizable()
38 | .aspectRatio(contentMode: .fit)
39 | .padding(20)
40 | .matchedGeometryEffect(id: "image\(course.id)", in: namespace)
41 | )
42 | .background(
43 | Image(course.background)
44 | .resizable()
45 | .aspectRatio(contentMode: .fill)
46 | .matchedGeometryEffect(id: "background\(course.id)", in: namespace)
47 | )
48 | .mask(
49 | RoundedRectangle(cornerRadius: 30, style: .continuous)
50 | .matchedGeometryEffect(id: "mask\(course.id)", in: namespace)
51 | )
52 | .frame(height: 300)
53 | }
54 | }
55 |
56 | struct CourseItem_Previews: PreviewProvider {
57 | @Namespace static var namespace
58 |
59 | static var previews: some View {
60 | CourseItem(namespace: namespace, course: courses[0], show: .constant(true))
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/DesignCode/Models/CourseSection.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct CourseSection: Identifiable {
4 | let id = UUID()
5 | var title: String
6 | var subtitle: String
7 | var text: String
8 | var image: String
9 | var background: String
10 | var logo: String
11 | var progress: CGFloat
12 | }
13 |
14 | var courseSections = [
15 | CourseSection(title: "Advanced Custom Layout", subtitle: "SwiftUI for iOS 15", text: "Build an iOS app for iOS 15 with custom layouts...", image: "Illustration 1", background: "Background 5", logo: "Logo 2", progress: 0.5),
16 | CourseSection(title: "Coding the Home View", subtitle: "SwiftUI Concurrency", text: "Learn about the formatted(date:time:) method and AsyncImage", image: "Illustration 2", background: "Background 4", logo: "Logo 2", progress: 0.2),
17 | CourseSection(title: "Styled Components", subtitle: "React Advanced", text: "Reset your CSS, set up your fonts and create your first React component", image: "Illustration 3", background: "Background 3", logo: "Logo 3", progress: 0.8),
18 | CourseSection(title: "Flutter Interactions", subtitle: "Flutter for designers", text: "Use the GestureDetector Widget to create amazing user interactions", image: "Illustration 4", background: "Background 2", logo: "Logo 1", progress: 0.0),
19 | CourseSection(title: "Firebase for Android", subtitle: "Flutter for designers", text: "Create your first Firebase Project and download Firebase plugins for Android", image: "Illustration 5", background: "Background 1", logo: "Logo 1", progress: 0.1),
20 | CourseSection(title: "Advanced Custom Layout", subtitle: "SwiftUI for iOS 15", text: "Build an iOS app for iOS 15 with custom layouts...", image: "Illustration 1", background: "Background 5", logo: "Logo 2", progress: 0.5),
21 | CourseSection(title: "Coding the Home View", subtitle: "SwiftUI Concurrency", text: "Learn about the formatted(date:time:) method and AsyncImage", image: "Illustration 2", background: "Background 4", logo: "Logo 2", progress: 0.2),
22 | CourseSection(title: "Styled Components", subtitle: "React Advanced", text: "Reset your CSS, set up your fonts and create your first React component", image: "Illustration 3", background: "Background 3", logo: "Logo 3", progress: 0.8),
23 | CourseSection(title: "Flutter Interactions", subtitle: "Flutter for designers", text: "Use the GestureDetector Widget to create amazing user interactions", image: "Illustration 4", background: "Background 2", logo: "Logo 1", progress: 0.0),
24 | CourseSection(title: "Firebase for Android", subtitle: "Flutter for designers", text: "Create your first Firebase Project and download Firebase plugins for Android", image: "Illustration 5", background: "Background 1", logo: "Logo 1", progress: 0.1)
25 | ]
26 |
27 |
28 |
--------------------------------------------------------------------------------
/DesignCode/Views/Modals/ModalView.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct ModalView: View {
4 | @EnvironmentObject var model: Model
5 | @AppStorage("showModel") var showModel = true
6 | @State var viewState: CGSize = .zero
7 | @AppStorage("isLogged") var isLogged = false
8 |
9 | var body: some View {
10 | ZStack {
11 | Color.clear.background(.regularMaterial)
12 | .ignoresSafeArea()
13 |
14 | Group {
15 | switch model.selectedModal {
16 | case .signIn: SignInView()
17 | case .signUp: SignUpView()
18 | }
19 | }
20 | .mask(RoundedRectangle(cornerRadius: 30, style: .continuous))
21 | .offset(x: viewState.width, y: viewState.height)
22 | .rotationEffect(.degrees(viewState.width)/30)
23 | .hueRotation(.degrees(viewState.width)/5)
24 | .hueRotation(.degrees(viewState.height)/5)
25 | .gesture(drag)
26 | .shadow(color: Color("Shadow").opacity(0.2), radius: 30, x: 0, y: 30)
27 | .padding(20)
28 | .background(
29 | Image("Blob 1").offset(x: 200, y: -100)
30 | )
31 |
32 | Button {
33 | withAnimation {
34 | showModel = false
35 | }
36 |
37 | } label: {
38 | Image(systemName: "xmark")
39 | .font(.body.weight(.bold))
40 | .foregroundColor(.secondary)
41 | .padding(8)
42 | .background(.ultraThinMaterial, in: Circle())
43 | }
44 | .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topTrailing)
45 | .padding(20)
46 | }
47 | .onChange(of: isLogged) { newValue in
48 | if newValue {
49 | dismissModal()
50 | }
51 | }
52 | }
53 |
54 | var drag: some Gesture {
55 | DragGesture()
56 | .onChanged { value in
57 | viewState = value.translation
58 | }
59 | .onEnded { value in
60 | if value.translation.height > 200 {
61 | withAnimation {
62 | showModel = false
63 | }
64 | } else {
65 | withAnimation(.openCard) {
66 | viewState = .zero
67 | }
68 | }
69 | }
70 | }
71 |
72 | func dismissModal() {
73 | withAnimation(.linear.delay(0.3)) {
74 | showModel = false
75 | }
76 | }
77 | }
78 |
79 | struct ModalView_Previews: PreviewProvider {
80 | static var previews: some View {
81 | ModalView()
82 | .environmentObject(Model())
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/DesignCode/Navigation/NavigationBar.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct NavigationBar: View {
4 |
5 | let title: LocalizedStringKey
6 | @Binding var hasScrolled: Bool
7 | @State var showSearch: Bool = false
8 | @State var showAccount: Bool = false
9 | @AppStorage("showModel") var showModel = false
10 | @AppStorage("isLogged") var isLogged = false
11 |
12 |
13 | var body: some View {
14 | ZStack {
15 | /// adding the blur modifire just to break the edges of the container which made by background modifire using the ulteaThinMaterial ( change the color to red to try it)
16 | Color.clear
17 | .background(.ultraThinMaterial)
18 | .blur(radius: 10)
19 | .opacity(hasScrolled ? 0 : 1)
20 | Text(title)
21 | .animatableFont(size: hasScrolled ? 34 : 22, weight: .bold, design: .default)
22 | .frame(maxWidth: .infinity, alignment: .leading)
23 | .padding(.leading, 20)
24 | .padding(.top, 20)
25 | .offset(y: hasScrolled ? 0 : -4)
26 |
27 | HStack(spacing: 16) {
28 | Button {
29 | withAnimation {
30 | showSearch = true
31 | }
32 |
33 | } label: {
34 | Image(systemName: "magnifyingglass")
35 | .font(.body.weight(.bold))
36 | .foregroundColor(.secondary)
37 | .frame(width: 36, height: 36)
38 | .background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 14, style: .continuous))
39 | .strokeStyle(cornerRadius: 14)
40 | }
41 | .sheet(isPresented: $showSearch) {
42 | SearchView()
43 | }
44 |
45 | Button {
46 | if isLogged {
47 | showAccount = true
48 | } else {
49 | withAnimation {
50 | showModel = true
51 | }
52 | }
53 |
54 |
55 | } label: {
56 | AvatarView()
57 | }
58 | .sheet(isPresented: $showAccount) {
59 | AccountView()
60 | }
61 | }
62 | .frame( maxWidth: .infinity, maxHeight: .infinity, alignment: .trailing)
63 | .padding(.trailing, 20)
64 | .padding(.top, 20)
65 | .offset(y: hasScrolled ? 0 : -4)
66 | }
67 | .frame(height: hasScrolled ? 70 : 40)
68 | // to be able to push it to the top we have to use another frame
69 | .frame(maxHeight: .infinity, alignment: .top)
70 | }
71 |
72 | }
73 |
74 | struct NavigationBar_Previews: PreviewProvider {
75 | static var previews: some View {
76 | NavigationBar(title: "your title", hasScrolled: .constant(false))
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "iPhone_20@2x.png",
5 | "idiom" : "iphone",
6 | "scale" : "2x",
7 | "size" : "20x20"
8 | },
9 | {
10 | "filename" : "iPhone_20pt@3x.png",
11 | "idiom" : "iphone",
12 | "scale" : "3x",
13 | "size" : "20x20"
14 | },
15 | {
16 | "filename" : "iPhone_29pt.png",
17 | "idiom" : "iphone",
18 | "scale" : "1x",
19 | "size" : "29x29"
20 | },
21 | {
22 | "filename" : "iPhone_29pt@2x.png",
23 | "idiom" : "iphone",
24 | "scale" : "2x",
25 | "size" : "29x29"
26 | },
27 | {
28 | "filename" : "iPhone_29pt@3x.png",
29 | "idiom" : "iphone",
30 | "scale" : "3x",
31 | "size" : "29x29"
32 | },
33 | {
34 | "filename" : "iPhone_40pt@2x.png",
35 | "idiom" : "iphone",
36 | "scale" : "2x",
37 | "size" : "40x40"
38 | },
39 | {
40 | "filename" : "iPhone_40pt@3x.png",
41 | "idiom" : "iphone",
42 | "scale" : "3x",
43 | "size" : "40x40"
44 | },
45 | {
46 | "filename" : "iPhone_60pt@2x.png",
47 | "idiom" : "iphone",
48 | "scale" : "2x",
49 | "size" : "60x60"
50 | },
51 | {
52 | "filename" : "iPhone_60pt@3x.png",
53 | "idiom" : "iphone",
54 | "scale" : "3x",
55 | "size" : "60x60"
56 | },
57 | {
58 | "filename" : "iPad_20pt.png",
59 | "idiom" : "ipad",
60 | "scale" : "1x",
61 | "size" : "20x20"
62 | },
63 | {
64 | "filename" : "iPad_20pt@2x.png",
65 | "idiom" : "ipad",
66 | "scale" : "2x",
67 | "size" : "20x20"
68 | },
69 | {
70 | "filename" : "iPad_29pt.png",
71 | "idiom" : "ipad",
72 | "scale" : "1x",
73 | "size" : "29x29"
74 | },
75 | {
76 | "filename" : "iPad_29pt@2x.png",
77 | "idiom" : "ipad",
78 | "scale" : "2x",
79 | "size" : "29x29"
80 | },
81 | {
82 | "filename" : "iPad_40pt.png",
83 | "idiom" : "ipad",
84 | "scale" : "1x",
85 | "size" : "40x40"
86 | },
87 | {
88 | "filename" : "iPad_40@2x.png",
89 | "idiom" : "ipad",
90 | "scale" : "2x",
91 | "size" : "40x40"
92 | },
93 | {
94 | "filename" : "iPad_76pt.png",
95 | "idiom" : "ipad",
96 | "scale" : "1x",
97 | "size" : "76x76"
98 | },
99 | {
100 | "filename" : "iPad_76@2x.png",
101 | "idiom" : "ipad",
102 | "scale" : "2x",
103 | "size" : "76x76"
104 | },
105 | {
106 | "filename" : "iPad_83.5pt@2x.png",
107 | "idiom" : "ipad",
108 | "scale" : "2x",
109 | "size" : "83.5x83.5"
110 | },
111 | {
112 | "filename" : "App Icon iOS.png",
113 | "idiom" : "ios-marketing",
114 | "scale" : "1x",
115 | "size" : "1024x1024"
116 | }
117 | ],
118 | "info" : {
119 | "author" : "xcode",
120 | "version" : 1
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/DesignCode/Views/Main/ExploreView.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct ExploreView: View {
4 | @State var hasScrolled: Bool = false
5 | var body: some View {
6 | ZStack {
7 | Color("Background").ignoresSafeArea()
8 | ScrollView {
9 | scrollDetection
10 | coursesSection
11 |
12 | Text("Topics".uppercased())
13 | .titleStyle()
14 | topicsSection
15 |
16 | Text("popular".uppercased())
17 | .titleStyle()
18 |
19 | handbooksSection
20 | }
21 | .safeAreaInset(edge: .top) {
22 | Color.clear.frame(height: 70)
23 | }
24 | .overlay(NavigationBar(title: "Recent", hasScrolled: $hasScrolled))
25 | .background(Image("Blob 1").offset(x: -100, y: -350))
26 | }
27 | }
28 | var coursesSection: some View {
29 | ScrollView(.horizontal,showsIndicators: false) {
30 | HStack (spacing: 16){
31 | ForEach(courses) { course in
32 | SmallCourseItem(course: course)
33 | }
34 | }
35 | .padding(.horizontal, 20)
36 | Spacer()
37 |
38 | }
39 | }
40 |
41 | var handbooksSection: some View {
42 | HStack(alignment: .top, spacing: 16) {
43 | ForEach(handbooks) { handbook in
44 | HandbookItem(handbook: handbook)
45 | }
46 | }
47 | .padding(.horizontal, 20)
48 | }
49 |
50 | var topicsSection: some View {
51 | VStack {
52 | ForEach(topics) { topic in
53 | TopicListRow(topic: topic)
54 | }
55 | }
56 | .padding(20)
57 | .background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 30, style: .continuous))
58 | .strokeStyle(cornerRadius: 30)
59 | .padding(.horizontal, 20)
60 | }
61 |
62 | var scrollDetection: some View {
63 | /// to target the position of the scrollView(starting form after the navBar) I had to use named( ) with coordinateSpace(name: "scroll"), since global targets the full screen and local targets a fram moves with it
64 | GeometryReader { proxy in
65 | // Text("\(proxy.frame(in: .named("scroll")).minY)")
66 | Color.clear.preference(key: ScrollPreferenceKey.self, value: proxy.frame(in: .named("scroll")).minY)
67 | }
68 | .frame(height: 0) /// adding a frame to get rid of the default hight of the Geometry
69 | .onPreferenceChange(ScrollPreferenceKey.self, perform: { value in
70 | withAnimation(.easeInOut) {
71 | if value < 0 {
72 | hasScrolled = false
73 | } else {
74 | hasScrolled = true
75 | }
76 | }
77 | })
78 | }
79 | }
80 |
81 | struct ExploreView_Previews: PreviewProvider {
82 | static var previews: some View {
83 | ExploreView()
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/DesignCode/Views/Main/LibraryView.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct LibraryView: View {
4 | @State var hasScrolled = false
5 |
6 | var body: some View {
7 | ZStack {
8 | Color("Background").ignoresSafeArea()
9 | ScrollView {
10 | scrollDetection
11 |
12 | Text("Certificates".uppercased())
13 | .titleStyle()
14 |
15 | Certificate()
16 | .frame(height: 220)
17 | .background(
18 | RoundedRectangle(cornerRadius: 30, style: .continuous)
19 | .fill(.linearGradient(colors: [.purple, .blue], startPoint: .topLeading, endPoint: .bottomTrailing))
20 | .padding(20)
21 | .offset(y: -30)
22 | )
23 | .background(
24 | RoundedRectangle(cornerRadius: 30, style: .continuous)
25 | .fill(.linearGradient(colors: [.teal, .red], startPoint: .topLeading, endPoint: .bottomTrailing))
26 | .padding(40)
27 | .offset(y: -60)
28 | )
29 | .padding(20)
30 |
31 | Text("History".uppercased())
32 | .titleStyle()
33 | coursesSection
34 |
35 | Text("Topics".uppercased())
36 | .titleStyle()
37 | topicsSection
38 |
39 | }
40 | .safeAreaInset(edge: .top) {
41 | Color.clear.frame(height: 70)
42 | }
43 | .overlay(NavigationBar(title: "Library", hasScrolled: $hasScrolled))
44 | .background(Image("Blob 1").offset(x: -100, y: -350))
45 | }
46 | }
47 | var coursesSection: some View {
48 | ScrollView(.horizontal,showsIndicators: false) {
49 | HStack (spacing: 16){
50 | ForEach(courses) { course in
51 | SmallCourseItem(course: course)
52 | }
53 | }
54 | .padding(.horizontal, 20)
55 | Spacer()
56 |
57 | }
58 | }
59 |
60 |
61 | var topicsSection: some View {
62 | VStack {
63 | ForEach(topics) { topic in
64 | TopicListRow(topic: topic)
65 | }
66 | }
67 | .padding(20)
68 | .background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 30, style: .continuous))
69 | .strokeStyle(cornerRadius: 30)
70 | .padding(.horizontal, 20)
71 | }
72 | var scrollDetection: some View {
73 | /// to target the position of the scrollView(starting form after the navBar) I had to use named( ) with coordinateSpace(name: "scroll"), since global targets the full screen and local targets a fram moves with it
74 | GeometryReader { proxy in
75 | // Text("\(proxy.frame(in: .named("scroll")).minY)")
76 | Color.clear.preference(key: ScrollPreferenceKey.self, value: proxy.frame(in: .named("scroll")).minY)
77 | }
78 | .frame(height: 0) /// adding a frame to get rid of the default hight of the Geometry
79 | .onPreferenceChange(ScrollPreferenceKey.self, perform: { value in
80 | withAnimation(.easeInOut) {
81 | if value < 0 {
82 | hasScrolled = false
83 | } else {
84 | hasScrolled = true
85 | }
86 | }
87 | })
88 | }
89 | }
90 |
91 | struct LibraryView_Previews: PreviewProvider {
92 | static var previews: some View {
93 | LibraryView()
94 | }
95 | }
96 |
--------------------------------------------------------------------------------
/DesignCode/Components /Graphics/BlobView.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct BlobView: View {
4 | @State var appear = false
5 |
6 | var body: some View {
7 |
8 | /// Creating the same shap using Canvas
9 | /// using the timelineView to animate the blob
10 | TimelineView(.animation) { timeline in
11 | let now = timeline.date.timeIntervalSinceReferenceDate
12 | let angle = Angle.degrees(now.remainder(dividingBy: 3) * 60)
13 | let x = cos(angle.radians)
14 | let angle2 = Angle.degrees(now.remainder(dividingBy: 6) * 10)
15 | let x2 = cos(angle2.radians)
16 | Text(" \(x)")
17 |
18 | Canvas { context, size in
19 | context.fill(path(in: CGRect(x: 0, y: 0, width: size.width, height: size.height ), x: x, x2: x2), with: .linearGradient(Gradient(colors: [.pink, .blue]), startPoint: CGPoint(x: 0, y: 0), endPoint: CGPoint(x: 300, y: 310)))
20 | }
21 | .frame(width: 300, height: 310)
22 | .rotationEffect(.degrees(appear ? 360 : 0 ))
23 | }
24 | .onAppear {
25 | withAnimation(.linear(duration: 30).repeatForever(autoreverses: true)) {
26 | appear = true
27 | }
28 | }
29 | }
30 |
31 | /// using the converter from SVG to SwiftUI shap - PATH!
32 |
33 | // BlobShape()
34 | // .frame(width:300, height: 310)
35 | // .foregroundStyle(.linearGradient(colors: [.pink, .blue], startPoint: .topLeading, endPoint: .bottomTrailing))
36 | func path(in rect: CGRect, x: Double, x2: Double) -> Path {
37 | var path = Path()
38 | let width = rect.size.width
39 | let height = rect.size.height
40 | path.move(to: CGPoint(x: 0.9923*width, y: 0.42593*height))
41 | path.addCurve(to: CGPoint(x: 0.6355*width*x2, y: height), control1: CGPoint(x: 0.92554*width*x2, y: 0.77749*height*x2), control2: CGPoint(x: 0.91864*width*x2, y: height))
42 | path.addCurve(to: CGPoint(x: 0.08995*width, y: 0.60171*height), control1: CGPoint(x: 0.35237*width*x, y: height), control2: CGPoint(x: 0.2695*width, y: 0.77304*height))
43 | path.addCurve(to: CGPoint(x: 0.34086*width, y: 0.06324*height*x), control1: CGPoint(x: -0.0896*width, y: 0.43038*height), control2: CGPoint(x: 0.00248*width, y: 0.23012*height*x))
44 | path.addCurve(to: CGPoint(x: 0.9923*width, y: 0.42593*height), control1: CGPoint(x: 0.67924*width, y: -0.10364*height*x), control2: CGPoint(x: 1.05906*width, y: 0.07436*height*x2))
45 | path.closeSubpath()
46 | return path
47 | }
48 | }
49 |
50 | // struct BlobShape: Shape {
51 | // func path(in rect: CGRect) -> Path {
52 | // var path = Path()
53 | // let width = rect.size.width
54 | // let height = rect.size.height
55 | // path.move(to: CGPoint(x: 0.9923*width, y: 0.42593*height))
56 | // path.addCurve(to: CGPoint(x: 0.6355*width, y: height), control1: CGPoint(x: 0.92554*width, y: 0.77749*height), control2: CGPoint(x: 0.91864*width, y: height))
57 | // path.addCurve(to: CGPoint(x: 0.08995*width, y: 0.60171*height), control1: CGPoint(x: 0.35237*width, y: height), control2: CGPoint(x: 0.2695*width, y: 0.77304*height))
58 | // path.addCurve(to: CGPoint(x: 0.34086*width, y: 0.06324*height), control1: CGPoint(x: -0.0896*width, y: 0.43038*height), control2: CGPoint(x: 0.00248*width, y: 0.23012*height))
59 | // path.addCurve(to: CGPoint(x: 0.9923*width, y: 0.42593*height), control1: CGPoint(x: 0.67924*width, y: -0.10364*height), control2: CGPoint(x: 1.05906*width, y: 0.07436*height))
60 | // path.closeSubpath()
61 | // return path
62 | // }
63 | // }
64 |
65 | struct BlobView_Previews: PreviewProvider {
66 | static var previews: some View {
67 | BlobView()
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/DesignCode/Views/Sheets/SearchView.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct SearchView: View {
4 | @State var text = ""
5 | @State var show = false
6 | @Namespace var namespace
7 | @State var selectedIndex = 0
8 | @Environment(\.presentationMode) var presentationMode
9 |
10 | var body: some View {
11 | NavigationView {
12 | ScrollView {
13 | VStack {
14 | content
15 | }
16 | .padding(20)
17 | .background(.ultraThinMaterial, in:
18 | RoundedRectangle(cornerRadius: 30, style: .continuous))
19 | .strokeStyle(cornerRadius: 30)
20 | .padding(20)
21 | .background(
22 | Rectangle()
23 | .fill(.regularMaterial)
24 | .frame(height: 200)
25 | .frame(maxHeight: .infinity, alignment: .top)
26 | .blur(radius: 20)
27 | .offset(y: -200)
28 | )
29 | .background(
30 | Image("Blob 1").offset(x: -100, y: -200)
31 | )
32 | }
33 | .searchable(text: $text, placement: .navigationBarDrawer(displayMode: .always), prompt: Text("SwiftUI, React, UI Design, Figma")) {
34 | ForEach(suggestion) { suggestion in
35 | Button {
36 | text = suggestion.text
37 | } label: {
38 | Text(suggestion.text)
39 | .searchCompletion(suggestion.text)
40 | }
41 | }
42 | }
43 | .navigationTitle("Search")
44 | .navigationBarTitleDisplayMode(.inline)
45 | .navigationBarItems(trailing: Button {
46 | presentationMode.wrappedValue.dismiss()
47 | } label: {
48 | Text("Done").bold()
49 | })
50 | }
51 | }
52 |
53 | var content: some View {
54 | ForEach(Array(courses.enumerated()), id: \.offset) {index, item in
55 | if item.title.contains(text) || text == "" {
56 | if index != 0 { Divider()}
57 | Button {
58 | show = true
59 | selectedIndex = index
60 | } label: {
61 | HStack(alignment: .top, spacing: 12) {
62 | Image(item.image)
63 | .resizable()
64 | .aspectRatio(contentMode: .fill)
65 | .frame(width: 44, height: 44)
66 | .background(Color("Background"))
67 | .mask(Circle())
68 |
69 | VStack(alignment: .leading, spacing: 4) {
70 | Text(item.title)
71 | .bold()
72 | .foregroundColor(.primary)
73 | Text(item.text)
74 | .foregroundColor(.secondary)
75 | .font(.footnote)
76 | .frame(maxWidth: .infinity, alignment: .leading)
77 | .multilineTextAlignment(.leading)
78 | }
79 | }
80 | .padding(4)
81 | .listRowSeparator(.hidden)
82 | }
83 | .sheet(isPresented: $show) {
84 | CourseView(namespace: namespace, show: $show, course: courses[selectedIndex])
85 | }
86 | }
87 | }
88 | }
89 | }
90 |
91 | struct SearchView_Previewer: PreviewProvider {
92 | static var previews: some View {
93 | SearchView()
94 | }
95 | }
96 |
--------------------------------------------------------------------------------
/DesignCode.xcodeproj/xcshareddata/xcschemes/DesignCode.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
43 |
49 |
50 |
51 |
52 |
53 |
64 |
66 |
72 |
73 |
74 |
75 |
81 |
83 |
89 |
90 |
91 |
92 |
94 |
95 |
98 |
99 |
100 |
--------------------------------------------------------------------------------
/DesignCode/Navigation/TabBar.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct TabBar: View {
4 | @AppStorage("selectedTab") var selectedTab: Tab = .home
5 | @State var hoverColor: Color = .purple
6 | @State var tabItemWidth: CGFloat = 0
7 |
8 | var body: some View {
9 | GeometryReader { proxy in
10 | let hasHomeIndecator = proxy.safeAreaInsets.bottom > 20
11 |
12 | HStack {
13 | buttons
14 | }
15 | .padding(.horizontal, 8)
16 | .padding(.top, 14)
17 | .frame(height: hasHomeIndecator ? 88 : 62, alignment: .top)
18 | .background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: hasHomeIndecator ? 34 : 0, style: .continuous))
19 | /// using the background to creat a circle and make the hover effect by moving it
20 | .background(
21 | background
22 | )
23 | /// drawing the line above the circle
24 | .overlay(
25 | overlay
26 | )
27 | .strokeStyle(cornerRadius: hasHomeIndecator ? 34 : 0)
28 | .frame(maxHeight: .infinity, alignment: .bottom)
29 | .ignoresSafeArea()
30 | }
31 | }
32 |
33 | var buttons: some View {
34 | ForEach(tabItems) { item in
35 | Button {
36 | withAnimation {
37 | selectedTab = item.tab
38 | hoverColor = item.color
39 | }
40 |
41 | } label: {
42 | VStack(spacing: 0) {
43 | Image(systemName: item.icon)
44 | .symbolVariant(.fill)
45 | .font(.body.bold())
46 | .frame(width: 44, height: 30)
47 | Text(item.text)
48 | .font(.caption2)
49 | .lineLimit(1)
50 | }
51 | // just to fix the size of each
52 | .frame(maxWidth: .infinity)
53 | }
54 | .foregroundStyle(selectedTab == item.tab ? .primary : .secondary)
55 | .blendMode(selectedTab == item.tab ? .overlay : .normal)
56 | /// using the GeometryReader & PreferenceKey to position the overlay on landspace view
57 | .overlay(
58 | // need to be checked again
59 | GeometryReader { proxy in
60 | // Text("\(proxy.size.width)")
61 | Color.clear.preference(key: TabPreferenceKey.self, value: proxy.size.width)
62 | // tabItemWidth = proxy.size.width - no working because it needs to conform to a View
63 | }
64 | )
65 | .onPreferenceChange(TabPreferenceKey.self) {
66 | value in
67 | tabItemWidth = value
68 | }
69 | }
70 | }
71 |
72 | var background: some View {
73 | HStack {
74 | if selectedTab == .library { Spacer() }
75 | if selectedTab == .explore { Spacer() }
76 | if selectedTab == .notifications {
77 | Spacer()
78 | Spacer()
79 | }
80 | Circle().fill(hoverColor).frame(width: tabItemWidth)
81 | if selectedTab == .home { Spacer() }
82 | if selectedTab == .explore {
83 | Spacer()
84 | Spacer()
85 | }
86 | if selectedTab == .notifications { Spacer() }
87 | }
88 | .padding(.horizontal, 8)
89 | }
90 |
91 | var overlay: some View {
92 | HStack {
93 | if selectedTab == .library { Spacer() }
94 | if selectedTab == .explore { Spacer() }
95 | if selectedTab == .notifications {
96 | Spacer()
97 | Spacer()
98 | }
99 | Rectangle()
100 | .fill(hoverColor)
101 | .frame(width: 29, height: 5)
102 | .cornerRadius(30)
103 | .frame(width: tabItemWidth)
104 | .frame(maxHeight: .infinity, alignment: .top)
105 | if selectedTab == .home { Spacer() }
106 | if selectedTab == .explore {
107 | Spacer()
108 | Spacer()
109 | }
110 | if selectedTab == .notifications { Spacer() }
111 | }
112 | .padding(.horizontal, 8)
113 | }
114 | }
115 |
116 | struct TabBar_Previews: PreviewProvider {
117 | static var previews: some View {
118 | TabBar()
119 | .preferredColorScheme(.light)
120 | .previewInterfaceOrientation(.portrait)
121 | TabBar()
122 | .preferredColorScheme(.dark)
123 | }
124 | }
125 |
--------------------------------------------------------------------------------
/DesignCode/Views/Modals/SignInView.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct SignInView: View {
4 | enum Field: Hashable {
5 | case email
6 | case password
7 | }
8 |
9 | @State var email: String = ""
10 | @State var password: String = ""
11 | @FocusState var focusedField: Field?
12 | @State var circuleY: CGFloat = 0
13 | @State var emailY: CGFloat = 0
14 | @State var passwordY: CGFloat = 0
15 | @EnvironmentObject var model: Model
16 | @AppStorage("isLogged") var isLogged = false
17 |
18 |
19 | var body: some View {
20 | VStack {
21 | VStack(alignment: .leading, spacing: 16) {
22 | Text("Sign In")
23 | .font(Font.largeTitle.bold())
24 | .blendMode(.overlay)
25 | Text("Access to +120 hours of courses, tutorials and livestreams")
26 | .font(.subheadline)
27 | .foregroundColor(.secondary)
28 |
29 | TextField("Email", text: $email)
30 | .inputStyle(icon: "mail")
31 | .textContentType(.emailAddress)
32 | .keyboardType(.emailAddress)
33 | .autocapitalization(.none)
34 | .disableAutocorrection(true)
35 | .focused($focusedField, equals: .email)
36 | .shadow(color: focusedField == .email ? .primary.opacity(0.3) : .clear, radius: 10, x: 0, y: 3)
37 | .overlay(geometry)
38 | .onPreferenceChange(CirculePreferenceKey.self) { value in
39 | emailY = value - 60
40 | circuleY = value
41 | }
42 | SecureField("Password", text: $password)
43 | .inputStyle(icon: "key")
44 | .textContentType(.password)
45 | .focused($focusedField, equals: .password)
46 | .shadow(color: focusedField == .password ? .primary.opacity(0.3) : .clear, radius: 10, x: 0, y: 3)
47 | .overlay(geometry)
48 | .onPreferenceChange(CirculePreferenceKey.self) { value in
49 | passwordY = value - 60
50 |
51 | }
52 | Button {
53 | isLogged = true
54 |
55 | } label: {
56 | Text("Sign in")
57 | .bold()
58 | .frame(maxWidth: .infinity)
59 | }
60 | .buttonStyle(.Angular)
61 | .controlSize(.large)
62 |
63 | Group {
64 | Divider()
65 |
66 | HStack {
67 | Text("No account yet?")
68 | .foregroundColor(.secondary)
69 | Button {
70 | model.selectedModal = .signUp
71 | } label: {
72 | Text("**Sign Up**")
73 | // UITableViewController -> keybord
74 | // delegate method -> keybord
75 |
76 | }
77 | }
78 | }
79 | .font(.footnote)
80 | .foregroundColor(.secondary)
81 | }
82 | .padding(20)
83 | .background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 30, style: .continuous))
84 | .background(
85 | Circle().fill(.blue)
86 | .frame(width: 68 ,height: 68)
87 | .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
88 | .offset(y: circuleY)
89 | )
90 | .coordinateSpace(name: "container")
91 | .strokeStyle(cornerRadius: 30)
92 | .onChange(of: focusedField) { value in
93 | withAnimation {
94 | if value == .email {
95 | circuleY = emailY
96 | } else {
97 | circuleY = passwordY
98 | }
99 | }
100 | }
101 | }
102 | }
103 |
104 | var geometry: some View {
105 | GeometryReader { proxy in
106 | Color.clear.preference(key: CirculePreferenceKey.self, value: proxy.frame(in: .named("container")).maxY)
107 | }
108 | }
109 | }
110 |
111 | struct SignInView_Previews: PreviewProvider {
112 | static var previews: some View {
113 | SignInView()
114 | .environmentObject(Model())
115 | }
116 | }
117 |
--------------------------------------------------------------------------------
/DesignCode/Views/Modals/SignUpView.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct SignUpView: View {
4 | enum Field: Hashable {
5 | case email
6 | case password
7 | }
8 |
9 | @State var email: String = ""
10 | @State var password: String = ""
11 | @FocusState var focusedField: Field?
12 | @State var circuleY: CGFloat = 0
13 | @State var emailY: CGFloat = 0
14 | @State var passwordY: CGFloat = 0
15 | @EnvironmentObject var model: Model
16 |
17 | var body: some View {
18 | VStack {
19 | VStack(alignment: .leading, spacing: 16) {
20 | Text("Sign up")
21 | .font(Font.largeTitle.bold())
22 | .blendMode(.overlay)
23 | Text("Access to +120 hours of courses, tutorials and livestreams")
24 | .font(.subheadline)
25 | .foregroundColor(.secondary)
26 |
27 | TextField("Email", text: $email)
28 | .inputStyle(icon: "mail")
29 | .textContentType(.emailAddress)
30 | .keyboardType(.emailAddress)
31 | .autocapitalization(.none)
32 | .disableAutocorrection(true)
33 | .focused($focusedField, equals: .email)
34 | .shadow(color: focusedField == .email ? .primary.opacity(0.3) : .clear, radius: 10, x: 0, y: 3)
35 | .overlay(geometry)
36 | .onPreferenceChange(CirculePreferenceKey.self) { value in
37 | emailY = value - 60
38 | circuleY = value
39 | }
40 | SecureField("Password", text: $password)
41 | .inputStyle(icon: "key")
42 | .textContentType(.password)
43 | .focused($focusedField, equals: .password)
44 | .shadow(color: focusedField == .password ? .primary.opacity(0.3) : .clear, radius: 10, x: 0, y: 3)
45 | .overlay(geometry)
46 | .onPreferenceChange(CirculePreferenceKey.self) { value in
47 | passwordY = value - 60
48 |
49 | }
50 | Button {
51 |
52 | } label: {
53 | Text("Create an account")
54 | .bold()
55 | .frame(maxWidth: .infinity)
56 | }
57 | .buttonStyle(.Angular)
58 | .controlSize(.large)
59 |
60 | Group {
61 | Text("By clicking on ")
62 | + Text("_Create an account_").foregroundColor(.primary.opacity(0.7))
63 | + Text(", you agree to our **Terms of service** and **[Privacy Policy](https://amjadoudeh.com/)**")
64 | Divider()
65 |
66 | HStack {
67 | Text("Already have an account?")
68 | .foregroundColor(.secondary)
69 | Button {
70 | model.selectedModal = .signIn
71 | } label: {
72 | Text("**Sign in**")
73 | // UITableViewController -> keybord
74 | // delegate method -> keybord
75 |
76 | }
77 | }
78 | }
79 | .font(.footnote)
80 | .foregroundColor(.secondary)
81 | }
82 | .padding(20)
83 | .background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 30, style: .continuous))
84 | .background(
85 | Circle().fill(.blue)
86 | .frame(width: 68 ,height: 68)
87 | .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
88 | .offset(y: circuleY)
89 | )
90 | .coordinateSpace(name: "container")
91 | .strokeStyle(cornerRadius: 30)
92 | .onChange(of: focusedField) { value in
93 | withAnimation {
94 | if value == .email {
95 | circuleY = emailY
96 | } else {
97 | circuleY = passwordY
98 | }
99 | }
100 | }
101 | }
102 | }
103 |
104 | var geometry: some View {
105 | GeometryReader { proxy in
106 | Color.clear.preference(key: CirculePreferenceKey.self, value: proxy.frame(in: .named("container")).maxY)
107 | }
108 | }
109 | }
110 | struct SwiftUIView_Previews: PreviewProvider {
111 | static var previews: some View {
112 | ZStack {
113 | SignUpView()
114 | .environmentObject(Model())
115 | }
116 | // .preferredColorScheme(.dark)
117 | }
118 | }
119 |
--------------------------------------------------------------------------------
/DesignCode/Views/Details/SectionView.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct SectionView: View {
4 | var section: CourseSection = courseSections[0]
5 | @EnvironmentObject var model: Model
6 | @Environment(\.dismiss) var dismiss
7 |
8 | var body: some View {
9 | ZStack {
10 | ScrollView {
11 | cover
12 | .overlay(PlayView().overlay(CircularProgressView(value: section.progress,lineWidth: 5).padding(24)))
13 | content
14 | .offset(y: 120)
15 | .padding(.bottom, 200)
16 | }
17 | .background(Color("Background"))
18 | .ignoresSafeArea()
19 |
20 | button
21 | }
22 | }
23 |
24 | var cover: some View {
25 | VStack {
26 | Spacer()
27 | }
28 | .frame(maxWidth: .infinity)
29 | .frame(height: 500)
30 | .foregroundStyle(.black)
31 | .background(
32 | Image(section.image)
33 | .resizable()
34 | .aspectRatio(contentMode: .fit)
35 | .padding(20)
36 | .frame(maxWidth: 500)
37 | )
38 | .background(
39 | Image(section.background)
40 | .resizable()
41 | .aspectRatio(contentMode: .fill)
42 | )
43 | .mask(
44 | RoundedRectangle(cornerRadius: 0, style: .continuous)
45 | )
46 | .overlay(
47 | overlayContent
48 | )
49 | .frame(height: 500)
50 | }
51 |
52 | var content: some View {
53 | VStack(alignment: .leading, spacing: 30) {
54 | Text("SwiftUI is hands-down the best way for designers to take a first step into code. ")
55 | .font(.title3).fontWeight(.medium)
56 | Text("This course")
57 | .font(.title).bold()
58 | Text("This course is unlike any other. We care about design and want to make sure that you get better at it in the process. It was written for designers and developers who are passionate about collaborating and building real apps for iOS and macOS. While it's not one codebase for all apps, you learn once and can apply the techniques and controls to all platforms with incredible quality, consistency and performance. It's beginner-friendly, but it's also packed with design tricks and efficient workflows for building great user interfaces and interactions.")
59 | Text("This year, SwiftUI got major upgrades from the WWDC 2020. The big news is that thanks to Apple Silicon, Macs will be able to run iOS and iPad apps soon. SwiftUI is the only framework that allows you to build apps for all of Apple's five platforms: iOS, iPadOS, macOS, tvOS and watchOS with the same codebase. New features like the Sidebar, Lazy Grid, Matched Geometry Effect and Xcode 12's visual editing tools will make it easier than ever to build for multiple platforms.")
60 | Text("Multiplatform app")
61 | .font(.title).bold()
62 | Text("For the first time, you can build entire apps using SwiftUI only. In Xcode 12, you can now create multi-platform apps with minimal code changes. SwiftUI will automatically translate the navigation, fonts, forms and controls to its respective platform. For example, a sidebar will look differently on the Mac versus the iPad, while using exactly the same code. Dynamic type will adjust for the appropriate platform language, readability and information density. ")
63 | }
64 | .padding(20)
65 | }
66 |
67 | var button: some View {
68 | Button {
69 | dismiss()
70 | } label: {
71 | Image(systemName: "xmark")
72 | .font(.body.weight(.bold))
73 | .foregroundColor(.secondary)
74 | .padding(8)
75 | .background(.ultraThinMaterial, in: Circle())
76 | }
77 | .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topTrailing)
78 | .padding(20)
79 | .ignoresSafeArea()
80 | }
81 |
82 | var overlayContent: some View {
83 | VStack(alignment: .leading, spacing: 12) {
84 | Text(section.title)
85 | .font(.largeTitle.weight(.bold))
86 | .frame(maxWidth: .infinity, alignment: .leading)
87 |
88 | Text(section.subtitle.uppercased())
89 | .font(.footnote.weight(.semibold))
90 | Text(section.text)
91 | .font(.footnote)
92 | Divider()
93 | .opacity(0)
94 | HStack {
95 | Image("Avatar Default")
96 | .resizable()
97 | .frame(width: 26, height: 26)
98 | .cornerRadius(10)
99 | .padding(8)
100 | .background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 18, style: .continuous))
101 | .strokeStyle(cornerRadius: 18)
102 | Text("Taught by Meng To")
103 | .font(.footnote)
104 | }
105 | .opacity(0)
106 | }
107 | .padding(20)
108 | .background(
109 | Rectangle()
110 | .fill(.ultraThinMaterial)
111 | .mask(RoundedRectangle(cornerRadius: 30, style: .continuous))
112 | )
113 | .offset(y: 250)
114 | .padding(20)
115 | }
116 | }
117 |
118 | struct SectionView_Previews: PreviewProvider {
119 | static var previews: some View {
120 | SectionView()
121 | }
122 | }
123 |
124 |
--------------------------------------------------------------------------------
/DesignCode/Views/Sheets/AccountView.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct AccountView: View {
4 | /// sitting a state for deleting
5 | @State var isDeleted = false
6 | @State var isPinned = false
7 | @Environment(\.presentationMode) var presentationMode
8 | @AppStorage("isLogged") var isLogged = true
9 | @Environment(\.dismiss) var dismiss
10 | @ObservedObject var coinModel = CoinModel()
11 |
12 | var body: some View {
13 | NavigationView {
14 | List {
15 | profile
16 | menu
17 | links
18 | coins
19 |
20 | Button {
21 | isLogged = false
22 | dismiss()
23 | } label: {
24 | Text("Sign out")
25 | }
26 | .tint(.red)
27 | }
28 | .task {
29 | await coinModel.fetchCoins()
30 | }
31 | .refreshable {
32 | await coinModel.fetchCoins()
33 | }
34 | .listStyle(.insetGrouped)
35 | .navigationTitle("Account")
36 | .navigationBarItems(trailing: Button {
37 | dismiss()
38 | } label: {
39 | Text("Done").bold()
40 | })
41 | }
42 | }
43 |
44 | var profile: some View {
45 | VStack(spacing: 8) {
46 | Image(systemName:
47 | "person.crop.circle.fill.badge.checkmark")
48 | .symbolVariant(.circle.fill)
49 | .font(.system(size: 32))
50 | .symbolRenderingMode(.palette)
51 | .foregroundStyle(.blue, .blue.opacity(0.3))
52 | .padding()
53 | .background(Circle().fill(.ultraThinMaterial))
54 | /// will make an intersting shape using modifiers
55 | .background(
56 | HexagonView()
57 | .offset(x: -50, y: -100)
58 | )
59 | .background(
60 | BlobView()
61 | .offset(x: 190, y: 80)
62 | .scaleEffect(0.4)
63 | )
64 | Text("Amjad Oudeh")
65 | .font(.title.weight(.semibold))
66 | HStack {
67 | Image(systemName: "location")
68 | .imageScale(.small)
69 | Text("Berlin")
70 | .foregroundColor(.secondary)
71 | }
72 | }
73 | .frame(maxWidth: .infinity)
74 | .padding()
75 | }
76 |
77 | var menu: some View {
78 | Section {
79 | NavigationLink(destination: HomeView()) {
80 | Label("Settings", systemImage: "gear")
81 | }
82 | // just using different way to navigate!
83 | NavigationLink {
84 | Text("Billing") }
85 | label: {
86 | Label("Billing", systemImage: "creditcard")
87 | }
88 | NavigationLink { Text("Help") } label: {
89 | Label("Help", systemImage: "questionmark")
90 | }
91 | }
92 | .accentColor(.primary)
93 | .listRowSeparatorTint(.blue) /// Changing the color of the separator
94 | .listRowSeparator(.hidden)
95 | }
96 |
97 | var links: some View {
98 | Section {
99 |
100 | if !isDeleted {
101 | Link(destination: URL(string: "https://amjadoudeh.com")!) {
102 | HStack {
103 | Label("Website", systemImage: "house")
104 | Spacer()
105 | Image(systemName: "link")
106 | }
107 | }
108 | .swipeActions(edge: .trailing, allowsFullSwipe: true) {
109 | Button(action: { isDeleted = true }) {
110 | Label("Delete", systemImage: "trash")
111 | }
112 | .tint(.red)
113 | pinButton
114 | }
115 | }
116 | Link(destination: URL(string: "https://www.youtube.com/watch?v=QHk8N1Xaj8I")!) {
117 | HStack {
118 | Label("Youtube", systemImage: "tv")
119 | Spacer()
120 | Image(systemName: "link")
121 | }
122 | }
123 | .swipeActions {
124 | pinButton
125 | }
126 | }
127 | .accentColor(.primary)
128 | .listRowSeparator(.hidden)
129 | }
130 |
131 | var coins: some View {
132 | Section(header: Text("Coins")) {
133 | ForEach(coinModel.coins) { coin in
134 | HStack {
135 | AsyncImage(url: URL(string: coin.logo)) { image in
136 | image.resizable()
137 | .aspectRatio(contentMode: .fit)
138 | } placeholder: {
139 | ProgressView()
140 | }
141 | .frame(width: 32, height: 32)
142 | VStack(alignment: .leading, spacing: 4) {
143 | Text(coin.coin_name)
144 | Text(coin.acronym)
145 | .font(.caption)
146 | .foregroundColor(.secondary)
147 |
148 | }
149 | }
150 | }
151 | }
152 | }
153 |
154 | var pinButton: some View {
155 | Button(action: { isPinned.toggle() }) {
156 | if isPinned {
157 | Label("Pin", systemImage: "pin")
158 | } else {
159 | Label("Unpin", systemImage: "pin.slash")
160 | }
161 | }
162 | .tint(isPinned ? .yellow : .gray)
163 | }
164 | }
165 |
166 | struct AccountView_Previews: PreviewProvider {
167 | static var previews: some View {
168 | AccountView()
169 | }
170 | }
171 |
--------------------------------------------------------------------------------
/DesignCode/Views/Main/HomeView.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct HomeView: View {
4 | @State var hasScrolled = false
5 | @State var show = false
6 | @State var showStatusBar = true
7 | @State var selectedId = UUID()
8 | @EnvironmentObject var model: Model
9 | @State var selectedCourse: Course = courses[0]
10 | @State var showCourse = false
11 | @State var selectedIndex = 0
12 |
13 | @Namespace var namespace
14 |
15 | var body: some View {
16 | ZStack {
17 | Color("Background").ignoresSafeArea()
18 |
19 | ScrollView {
20 | scrollDetection
21 |
22 | featured
23 |
24 | Text("Courses".uppercased())
25 | .sectionTitleModifier()
26 |
27 | LazyVGrid(columns: [GridItem(.adaptive(minimum: 300), spacing: 20)], spacing: 20) {
28 | if !show {
29 | cards
30 | } else {
31 | ForEach(courses) { _ in
32 | Rectangle()
33 | .fill(.white)
34 | .frame(height: 300)
35 | .cornerRadius(30)
36 | .shadow(color: Color("Shadow"), radius: 20, x: 0, y: 10)
37 | .opacity(0.3)
38 | .padding(.horizontal, 20)
39 | }
40 | }
41 | }
42 | .padding(20)
43 | }
44 | .coordinateSpace(name: "scroll")
45 | /// customising a safe area on the top to make a better display for the content
46 | .safeAreaInset(edge: .top, content: {
47 | Color.clear.frame(height: 70)
48 | })
49 | .overlay(
50 | NavigationBar(title: LocalizationKeys.MainView.navtitle, hasScrolled: $hasScrolled)
51 | )
52 | if show {
53 | detail
54 | }
55 |
56 | }
57 | .statusBar(hidden: !showStatusBar)
58 | .onChange(of: show) { newValue in
59 | withAnimation(.closeCard) {
60 | if newValue {
61 | showStatusBar = false
62 | } else {
63 | showStatusBar = true
64 | }
65 | }
66 | }
67 | }
68 |
69 | var scrollDetection: some View {
70 | /// to target the position of the scrollView(starting form after the navBar) I had to use named( ) with coordinateSpace(name: "scroll"), since global targets the full screen and local targets a fram moves with it
71 | GeometryReader { proxy in
72 | // Text("\(proxy.frame(in: .named("scroll")).minY)")
73 | Color.clear.preference(key: ScrollPreferenceKey.self, value: proxy.frame(in: .named("scroll")).minY)
74 | }
75 | .frame(height: 0) /// adding a frame to get rid of the default hight of the Geometry
76 | .onPreferenceChange(ScrollPreferenceKey.self, perform: { value in
77 | withAnimation(.easeInOut) {
78 | if value < 0 {
79 | hasScrolled = false
80 | } else {
81 | hasScrolled = true
82 | }
83 | }
84 | })
85 | }
86 |
87 | var featured: some View {
88 | TabView {
89 | ForEach(Array(featuredCourses.enumerated()), id: \.offset) { index, course in
90 | GeometryReader { proxy in
91 | let minX = proxy.frame(in: .global).minX
92 |
93 | FeaturedItem(course: course)
94 | .frame(maxWidth: 500)
95 | .frame(maxWidth: .infinity)
96 | .padding(.vertical, 40)
97 | .rotation3DEffect(.degrees(minX / -15), axis: (x: 0, y: 2, z: 10))
98 | .shadow(color: Color("Shadow").opacity(0.3), radius: 10, x: 0, y: 10)
99 | .blur(radius: abs(minX / 50))
100 | // Text("\(proxy.frame(in: .global).minX)")
101 | .overlay( // so now we 3 layers of background
102 | Image(course.image)
103 | .resizable()
104 | .aspectRatio(contentMode: .fit)
105 | .padding(20)
106 | .frame(maxWidth: 500)
107 | .frame(height: 230)
108 | .shadow(color: Color("Shadow").opacity(0.3), radius: 10, x: 0, y: 10)
109 | .offset(x: 35, y: -80)
110 | .offset(x: minX / 2)
111 | )
112 | .onTapGesture {
113 | showCourse = true
114 | selectedIndex = index
115 | }
116 | }
117 | }
118 | }
119 | .tabViewStyle(.page(indexDisplayMode: .never))
120 | .frame(height: 430)
121 | .background(
122 | Image("Blob 1")
123 | .offset(x: 250, y: -100)
124 | ) // transform the image
125 | .sheet(isPresented: $showCourse) {
126 | CourseView(namespace: namespace, show: $showCourse, course: featuredCourses[selectedIndex])
127 | }
128 | }
129 |
130 | var cards: some View {
131 | ForEach(courses) { course in
132 | CourseItem(namespace: namespace, course: course, show: $show)
133 | .onTapGesture {
134 | withAnimation(.openCard) {
135 | show.toggle()
136 | model.showDetail.toggle()
137 | showStatusBar = false
138 | selectedId = course.id
139 | }
140 |
141 | }
142 | }
143 | }
144 | var detail: some View {
145 | ForEach(courses) { course in
146 | if course.id == selectedId {
147 | CourseView(namespace: namespace, show: $show, course: course)
148 | .zIndex(1)
149 | .transition(.asymmetric(
150 | insertion: .opacity.animation(.easeInOut(duration: 0.1)),
151 | removal: .opacity.animation(.easeInOut(duration: 0.1))
152 | )
153 | )
154 | }
155 | }
156 | }
157 | }
158 |
159 | struct HomeView_Previews: PreviewProvider {
160 | static var previews: some View {
161 | HomeView()
162 | .environmentObject(Model())
163 | }
164 | }
165 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Blobs/Blob 1.imageset/Blob 1 Dark.pdf:
--------------------------------------------------------------------------------
1 | %PDF-1.7
2 |
3 | 1 0 obj
4 | << /Length 2 0 R
5 | /FunctionType 4
6 | /Domain [ 0.000000 1.000000 ]
7 | /Range [ 0.000000 1.000000 0.000000 1.000000 0.000000 1.000000 ]
8 | >>
9 | stream
10 | { 0.680000 exch 0.000000 exch 1.000000 exch dup 0.000000 gt { exch pop exch pop exch pop dup 0.000000 sub -0.617441 mul 0.680000 add exch dup 0.000000 sub 0.346745 mul 0.000000 add exch dup 0.000000 sub -0.117162 mul 1.000000 add exch } if dup 0.497884 gt { exch pop exch pop exch pop dup 0.497884 sub 1.249540 mul 0.372586 add exch dup 0.497884 sub 0.270245 mul 0.172639 add exch dup 0.497884 sub -0.104225 mul 0.941667 add exch } if dup 1.000000 gt { exch pop exch pop exch pop 1.000000 exch 0.308333 exch 0.889333 exch } if pop }
11 | endstream
12 | endobj
13 |
14 | 2 0 obj
15 | 533
16 | endobj
17 |
18 | 3 0 obj
19 | << /Length 4 0 R
20 | /FunctionType 4
21 | /Domain [ 0.000000 1.000000 ]
22 | /Range [ 0.000000 1.000000 0.000000 1.000000 0.000000 1.000000 ]
23 | >>
24 | stream
25 | { 0.354046 exch 0.111250 exch 0.741667 exch dup 0.000000 gt { exch pop exch pop exch pop dup 0.000000 sub -0.185418 mul 0.354046 add exch dup 0.000000 sub -0.032819 mul 0.111250 add exch dup 0.000000 sub -0.200490 mul 0.741667 add exch } if dup 1.000000 gt { exch pop exch pop exch pop 0.168627 exch 0.078431 exch 0.541176 exch } if pop }
26 | endstream
27 | endobj
28 |
29 | 4 0 obj
30 | 339
31 | endobj
32 |
33 | 5 0 obj
34 | << /BBox [ 0.000000 0.000000 738.000000 504.000000 ]
35 | /Resources << /ExtGState << /E1 << /ca 0.800000 >> >>
36 | /Pattern << /P2 << /Matrix [ -89.297676 541.385132 541.385132 89.297676 -481.977722 -133.584229 ]
37 | /Shading << /Coords [ 0.000000 0.000000 1.000000 0.000000 ]
38 | /Extend [ true true ]
39 | /Domain [ 0.000000 1.000000 ]
40 | /ShadingType 2
41 | /ColorSpace /DeviceRGB
42 | /Function 1 0 R
43 | >>
44 | /PatternType 2
45 | /Type /Pattern
46 | >>
47 | /P1 << /Matrix [ 298.970886 -350.692474 350.692474 298.970886 -285.305023 71.329773 ]
48 | /Shading << /Coords [ 0.000000 0.000000 1.000000 0.000000 ]
49 | /Extend [ true true ]
50 | /Domain [ 0.000000 1.000000 ]
51 | /ShadingType 2
52 | /ColorSpace /DeviceRGB
53 | /Function 3 0 R
54 | >>
55 | /PatternType 2
56 | /Type /Pattern
57 | >>
58 | >>
59 | >>
60 | /Subtype /Form
61 | /Length 6 0 R
62 | /Group << /Type /Group
63 | /S /Transparency
64 | >>
65 | /Type /XObject
66 | >>
67 | stream
68 | /DeviceRGB CS
69 | /DeviceRGB cs
70 | q
71 | 1.000000 0.000000 -0.000000 1.000000 0.000061 -44.392426 cm
72 | /Pattern cs
73 | /P1 scn
74 | 269.428467 138.087189 m
75 | 59.709106 37.050446 -66.856354 274.893402 37.016521 409.180908 c
76 | 81.218369 466.325256 141.662384 528.442871 233.870117 464.037445 c
77 | 309.190613 411.427429 347.637177 484.222870 411.657196 472.823273 c
78 | 466.548828 463.049133 518.117920 484.894348 580.558960 451.957031 c
79 | 643.000000 419.019714 735.000000 367.392426 707.000000 273.392426 c
80 | 679.000000 179.392426 680.257019 126.020905 587.459961 102.115662 c
81 | 476.617310 73.561737 422.856384 221.272125 269.428467 138.087189 c
82 | h
83 | f
84 | n
85 | Q
86 | q
87 | /E1 gs
88 | 1.000000 0.000000 -0.000000 -1.000000 52.000000 663.580322 cm
89 | /Pattern cs
90 | /P2 scn
91 | 419.097107 207.780243 m
92 | 126.230804 38.736938 -94.074966 361.207092 40.412846 546.306396 c
93 | 128.815689 667.977661 229.274109 701.694885 348.658661 612.919678 c
94 | 446.178711 540.403015 464.187622 638.877441 563.593811 630.728882 c
95 | 663.000000 622.580261 743.000000 382.580261 630.000000 330.580261 c
96 | 517.000000 278.580261 574.000000 297.190674 419.097107 207.780243 c
97 | h
98 | f
99 | n
100 | Q
101 |
102 | endstream
103 | endobj
104 |
105 | 6 0 obj
106 | 1074
107 | endobj
108 |
109 | 7 0 obj
110 | << /BBox [ 0.000000 0.000000 738.000000 504.000000 ]
111 | /Resources << >>
112 | /Subtype /Form
113 | /Length 8 0 R
114 | /Group << /Type /Group
115 | /S /Transparency
116 | >>
117 | /Type /XObject
118 | >>
119 | stream
120 | /DeviceRGB CS
121 | /DeviceRGB cs
122 | q
123 | 1.000000 0.000000 -0.000000 1.000000 0.000000 0.000000 cm
124 | 0.000000 0.000000 0.000000 scn
125 | 0.000000 504.000000 m
126 | 738.000000 504.000000 l
127 | 738.000000 0.000000 l
128 | 0.000000 0.000000 l
129 | 0.000000 504.000000 l
130 | h
131 | f
132 | n
133 | Q
134 |
135 | endstream
136 | endobj
137 |
138 | 8 0 obj
139 | 237
140 | endobj
141 |
142 | 9 0 obj
143 | << /XObject << /X1 5 0 R >>
144 | /ExtGState << /E1 << /SMask << /Type /Mask
145 | /G 7 0 R
146 | /S /Alpha
147 | >>
148 | /Type /ExtGState
149 | >> >>
150 | >>
151 | endobj
152 |
153 | 10 0 obj
154 | << /Length 11 0 R >>
155 | stream
156 | /DeviceRGB CS
157 | /DeviceRGB cs
158 | q
159 | /E1 gs
160 | /X1 Do
161 | Q
162 |
163 | endstream
164 | endobj
165 |
166 | 11 0 obj
167 | 46
168 | endobj
169 |
170 | 12 0 obj
171 | << /Annots []
172 | /Type /Page
173 | /MediaBox [ 0.000000 0.000000 738.000000 504.000000 ]
174 | /Resources 9 0 R
175 | /Contents 10 0 R
176 | /Parent 13 0 R
177 | >>
178 | endobj
179 |
180 | 13 0 obj
181 | << /Kids [ 12 0 R ]
182 | /Count 1
183 | /Type /Pages
184 | >>
185 | endobj
186 |
187 | 14 0 obj
188 | << /Type /Catalog
189 | /Pages 13 0 R
190 | >>
191 | endobj
192 |
193 | xref
194 | 0 15
195 | 0000000000 65535 f
196 | 0000000010 00000 n
197 | 0000000727 00000 n
198 | 0000000749 00000 n
199 | 0000001272 00000 n
200 | 0000001294 00000 n
201 | 0000004235 00000 n
202 | 0000004258 00000 n
203 | 0000004745 00000 n
204 | 0000004767 00000 n
205 | 0000005065 00000 n
206 | 0000005169 00000 n
207 | 0000005191 00000 n
208 | 0000005369 00000 n
209 | 0000005445 00000 n
210 | trailer
211 | << /ID [ (some) (id) ]
212 | /Root 14 0 R
213 | /Size 15
214 | >>
215 | startxref
216 | 5506
217 | %%EOF
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Blobs/Blob 1.imageset/Blob 1.pdf:
--------------------------------------------------------------------------------
1 | %PDF-1.7
2 |
3 | 1 0 obj
4 | << /Length 2 0 R
5 | /FunctionType 4
6 | /Domain [ 0.000000 1.000000 ]
7 | /Range [ 0.000000 1.000000 0.000000 1.000000 0.000000 1.000000 ]
8 | >>
9 | stream
10 | { 0.294118 exch 0.721569 exch 0.976471 exch dup 0.000000 gt { exch pop exch pop exch pop dup 0.000000 sub 1.192122 mul 0.294118 add exch dup 0.000000 sub -0.409564 mul 0.721569 add exch dup 0.000000 sub -0.285232 mul 0.976471 add exch } if dup 0.536200 gt { exch pop exch pop exch pop dup 0.536200 sub 0.067642 mul 0.933333 add exch dup 0.536200 sub 0.591871 mul 0.501961 add exch dup 0.536200 sub 0.219838 mul 0.823529 add exch } if dup 1.000000 gt { exch pop exch pop exch pop 0.964706 exch 0.776471 exch 0.925490 exch } if pop }
11 | endstream
12 | endobj
13 |
14 | 2 0 obj
15 | 532
16 | endobj
17 |
18 | 3 0 obj
19 | << /Length 4 0 R
20 | /FunctionType 4
21 | /Domain [ 0.000000 1.000000 ]
22 | /Range [ 0.000000 1.000000 0.000000 1.000000 0.000000 1.000000 ]
23 | >>
24 | stream
25 | { 1.000000 exch 0.000000 exch 0.622857 exch dup 0.000000 gt { exch pop exch pop exch pop dup 0.000000 sub -0.020047 mul 1.000000 add exch dup 0.000000 sub 0.938222 mul 0.000000 add exch dup 0.000000 sub 0.024744 mul 0.622857 add exch } if dup 0.978070 gt { exch pop exch pop exch pop 0.980392 exch 0.917647 exch 0.647059 exch } if pop }
26 | endstream
27 | endobj
28 |
29 | 4 0 obj
30 | 337
31 | endobj
32 |
33 | 5 0 obj
34 | << /BBox [ 0.000000 0.000000 738.000000 504.000000 ]
35 | /Resources << /ExtGState << /E1 << /ca 0.500000 >> >>
36 | /Pattern << /P2 << /Matrix [ -89.297676 541.385132 541.385132 89.297676 -481.977722 -133.584259 ]
37 | /Shading << /Coords [ 0.000000 0.000000 1.000000 0.000000 ]
38 | /Extend [ true true ]
39 | /Domain [ 0.000000 1.000000 ]
40 | /ShadingType 2
41 | /ColorSpace /DeviceRGB
42 | /Function 1 0 R
43 | >>
44 | /PatternType 2
45 | /Type /Pattern
46 | >>
47 | /P1 << /Matrix [ 229.685791 -453.308228 809.726501 128.584808 -295.864685 436.983002 ]
48 | /Shading << /Coords [ 0.500000 0.500000 0.000000 0.500000 0.500000 0.500000 ]
49 | /Extend [ true true ]
50 | /Domain [ 0.000000 1.000000 ]
51 | /ShadingType 3
52 | /ColorSpace /DeviceRGB
53 | /Function 3 0 R
54 | >>
55 | /PatternType 2
56 | /Type /Pattern
57 | >>
58 | >>
59 | >>
60 | /Subtype /Form
61 | /Length 6 0 R
62 | /Group << /Type /Group
63 | /S /Transparency
64 | >>
65 | /Type /XObject
66 | >>
67 | stream
68 | /DeviceRGB CS
69 | /DeviceRGB cs
70 | q
71 | 1.000000 0.000000 -0.000000 1.000000 0.000061 -44.392426 cm
72 | /Pattern cs
73 | /P1 scn
74 | 269.428467 138.087189 m
75 | 59.709106 37.050446 -66.856354 274.893402 37.016521 409.180908 c
76 | 81.218369 466.325256 141.662384 528.442871 233.870117 464.037445 c
77 | 309.190613 411.427429 347.637177 484.222870 411.657196 472.823273 c
78 | 466.548828 463.049133 518.117920 484.894348 580.558960 451.957031 c
79 | 643.000000 419.019714 735.000000 367.392426 707.000000 273.392426 c
80 | 679.000000 179.392426 680.257019 126.020905 587.459961 102.115662 c
81 | 476.617310 73.561737 422.856384 221.272125 269.428467 138.087189 c
82 | h
83 | f
84 | n
85 | Q
86 | q
87 | /E1 gs
88 | 1.000000 0.000000 -0.000000 -1.000000 52.000000 663.580322 cm
89 | /Pattern cs
90 | /P2 scn
91 | 419.097107 207.780243 m
92 | 126.230804 38.736938 -94.074966 361.207092 40.412846 546.306396 c
93 | 128.815689 667.977661 229.274109 701.694885 348.658661 612.919678 c
94 | 446.178711 540.403015 464.187622 638.877441 563.593811 630.728882 c
95 | 663.000000 622.580261 743.000000 382.580261 630.000000 330.580261 c
96 | 517.000000 278.580261 574.000000 297.190674 419.097107 207.780243 c
97 | h
98 | f
99 | n
100 | Q
101 |
102 | endstream
103 | endobj
104 |
105 | 6 0 obj
106 | 1074
107 | endobj
108 |
109 | 7 0 obj
110 | << /BBox [ 0.000000 0.000000 738.000000 504.000000 ]
111 | /Resources << >>
112 | /Subtype /Form
113 | /Length 8 0 R
114 | /Group << /Type /Group
115 | /S /Transparency
116 | >>
117 | /Type /XObject
118 | >>
119 | stream
120 | /DeviceRGB CS
121 | /DeviceRGB cs
122 | q
123 | 1.000000 0.000000 -0.000000 1.000000 0.000000 0.000000 cm
124 | 0.000000 0.000000 0.000000 scn
125 | 0.000000 504.000000 m
126 | 738.000000 504.000000 l
127 | 738.000000 0.000000 l
128 | 0.000000 0.000000 l
129 | 0.000000 504.000000 l
130 | h
131 | f
132 | n
133 | Q
134 |
135 | endstream
136 | endobj
137 |
138 | 8 0 obj
139 | 237
140 | endobj
141 |
142 | 9 0 obj
143 | << /XObject << /X1 5 0 R >>
144 | /ExtGState << /E1 << /SMask << /Type /Mask
145 | /G 7 0 R
146 | /S /Alpha
147 | >>
148 | /Type /ExtGState
149 | >> >>
150 | >>
151 | endobj
152 |
153 | 10 0 obj
154 | << /Length 11 0 R >>
155 | stream
156 | /DeviceRGB CS
157 | /DeviceRGB cs
158 | q
159 | /E1 gs
160 | /X1 Do
161 | Q
162 |
163 | endstream
164 | endobj
165 |
166 | 11 0 obj
167 | 46
168 | endobj
169 |
170 | 12 0 obj
171 | << /Annots []
172 | /Type /Page
173 | /MediaBox [ 0.000000 0.000000 738.000000 504.000000 ]
174 | /Resources 9 0 R
175 | /Contents 10 0 R
176 | /Parent 13 0 R
177 | >>
178 | endobj
179 |
180 | 13 0 obj
181 | << /Kids [ 12 0 R ]
182 | /Count 1
183 | /Type /Pages
184 | >>
185 | endobj
186 |
187 | 14 0 obj
188 | << /Type /Catalog
189 | /Pages 13 0 R
190 | >>
191 | endobj
192 |
193 | xref
194 | 0 15
195 | 0000000000 65535 f
196 | 0000000010 00000 n
197 | 0000000726 00000 n
198 | 0000000748 00000 n
199 | 0000001269 00000 n
200 | 0000001291 00000 n
201 | 0000004251 00000 n
202 | 0000004274 00000 n
203 | 0000004761 00000 n
204 | 0000004783 00000 n
205 | 0000005081 00000 n
206 | 0000005185 00000 n
207 | 0000005207 00000 n
208 | 0000005385 00000 n
209 | 0000005461 00000 n
210 | trailer
211 | << /ID [ (some) (id) ]
212 | /Root 14 0 R
213 | /Size 15
214 | >>
215 | startxref
216 | 5522
217 | %%EOF
--------------------------------------------------------------------------------
/DesignCode/Styles/PlayShape.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct PlayShape: Shape {
4 | func path(in rect: CGRect) -> Path {
5 | var path = Path()
6 | let width = rect.size.width
7 | let height = rect.size.height
8 | path.move(to: CGPoint(x: 0.04718*width, y: 0.08831*height))
9 | path.addCurve(to: CGPoint(x: 0.01539*width, y: 0.18464*height), control1: CGPoint(x: 0.0284*width, y: 0.11157*height), control2: CGPoint(x: 0.01969*width, y: 0.14249*height))
10 | path.addCurve(to: CGPoint(x: 0.0111*width, y: 0.35395*height), control1: CGPoint(x: 0.0111*width, y: 0.22673*height), control2: CGPoint(x: 0.0111*width, y: 0.28167*height))
11 | path.addLine(to: CGPoint(x: 0.0111*width, y: 0.35451*height))
12 | path.addLine(to: CGPoint(x: 0.0111*width, y: 0.64549*height))
13 | path.addLine(to: CGPoint(x: 0.0111*width, y: 0.64605*height))
14 | path.addCurve(to: CGPoint(x: 0.01539*width, y: 0.81536*height), control1: CGPoint(x: 0.0111*width, y: 0.71834*height), control2: CGPoint(x: 0.0111*width, y: 0.77327*height))
15 | path.addCurve(to: CGPoint(x: 0.04718*width, y: 0.91169*height), control1: CGPoint(x: 0.01969*width, y: 0.85751*height), control2: CGPoint(x: 0.0284*width, y: 0.88844*height))
16 | path.addCurve(to: CGPoint(x: 0.18025*width, y: 0.98084*height), control1: CGPoint(x: 0.07864*width, y: 0.95067*height), control2: CGPoint(x: 0.12701*width, y: 0.9758*height))
17 | path.addCurve(to: CGPoint(x: 0.28883*width, y: 0.95745*height), control1: CGPoint(x: 0.21201*width, y: 0.98384*height), control2: CGPoint(x: 0.24613*width, y: 0.97517*height))
18 | path.addCurve(to: CGPoint(x: 0.45389*width, y: 0.87614*height), control1: CGPoint(x: 0.33148*width, y: 0.93975*height), control2: CGPoint(x: 0.38434*width, y: 0.91228*height))
19 | path.addLine(to: CGPoint(x: 0.45443*width, y: 0.87586*height))
20 | path.addLine(to: CGPoint(x: 0.73443*width, y: 0.73036*height))
21 | path.addLine(to: CGPoint(x: 0.73498*width, y: 0.73008*height))
22 | path.addCurve(to: CGPoint(x: 0.89575*width, y: 0.64208*height), control1: CGPoint(x: 0.80453*width, y: 0.69394*height), control2: CGPoint(x: 0.85739*width, y: 0.66647*height))
23 | path.addCurve(to: CGPoint(x: 0.97255*width, y: 0.56915*height), control1: CGPoint(x: 0.93415*width, y: 0.61766*height), control2: CGPoint(x: 0.95956*width, y: 0.59541*height))
24 | path.addCurve(to: CGPoint(x: 0.97255*width, y: 0.43086*height), control1: CGPoint(x: 0.99432*width, y: 0.52513*height), control2: CGPoint(x: 0.99432*width, y: 0.47487*height))
25 | path.addCurve(to: CGPoint(x: 0.89575*width, y: 0.35792*height), control1: CGPoint(x: 0.95956*width, y: 0.40459*height), control2: CGPoint(x: 0.93416*width, y: 0.38234*height))
26 | path.addCurve(to: CGPoint(x: 0.73498*width, y: 0.26992*height), control1: CGPoint(x: 0.85739*width, y: 0.33353*height), control2: CGPoint(x: 0.80453*width, y: 0.30606*height))
27 | path.addLine(to: CGPoint(x: 0.73444*width, y: 0.26964*height))
28 | path.addLine(to: CGPoint(x: 0.45444*width, y: 0.12415*height))
29 | path.addLine(to: CGPoint(x: 0.4539*width, y: 0.12387*height))
30 | path.addCurve(to: CGPoint(x: 0.28883*width, y: 0.04256*height), control1: CGPoint(x: 0.38434*width, y: 0.08773*height), control2: CGPoint(x: 0.33148*width, y: 0.06026*height))
31 | path.addCurve(to: CGPoint(x: 0.18025*width, y: 0.01916*height), control1: CGPoint(x: 0.24613*width, y: 0.02483*height), control2: CGPoint(x: 0.21201*width, y: 0.01616*height))
32 | path.addCurve(to: CGPoint(x: 0.04718*width, y: 0.08831*height), control1: CGPoint(x: 0.12701*width, y: 0.0242*height), control2: CGPoint(x: 0.07864*width, y: 0.04933*height))
33 | path.closeSubpath()
34 | path.move(to: CGPoint(x: 0.04718*width, y: 0.08831*height))
35 | path.addCurve(to: CGPoint(x: 0.01539*width, y: 0.18464*height), control1: CGPoint(x: 0.0284*width, y: 0.11157*height), control2: CGPoint(x: 0.01969*width, y: 0.14249*height))
36 | path.addCurve(to: CGPoint(x: 0.0111*width, y: 0.35395*height), control1: CGPoint(x: 0.0111*width, y: 0.22673*height), control2: CGPoint(x: 0.0111*width, y: 0.28167*height))
37 | path.addLine(to: CGPoint(x: 0.0111*width, y: 0.35451*height))
38 | path.addLine(to: CGPoint(x: 0.0111*width, y: 0.64549*height))
39 | path.addLine(to: CGPoint(x: 0.0111*width, y: 0.64605*height))
40 | path.addCurve(to: CGPoint(x: 0.01539*width, y: 0.81536*height), control1: CGPoint(x: 0.0111*width, y: 0.71834*height), control2: CGPoint(x: 0.0111*width, y: 0.77327*height))
41 | path.addCurve(to: CGPoint(x: 0.04718*width, y: 0.91169*height), control1: CGPoint(x: 0.01969*width, y: 0.85751*height), control2: CGPoint(x: 0.0284*width, y: 0.88844*height))
42 | path.addCurve(to: CGPoint(x: 0.18025*width, y: 0.98084*height), control1: CGPoint(x: 0.07864*width, y: 0.95067*height), control2: CGPoint(x: 0.12701*width, y: 0.9758*height))
43 | path.addCurve(to: CGPoint(x: 0.28883*width, y: 0.95745*height), control1: CGPoint(x: 0.21201*width, y: 0.98384*height), control2: CGPoint(x: 0.24613*width, y: 0.97517*height))
44 | path.addCurve(to: CGPoint(x: 0.45389*width, y: 0.87614*height), control1: CGPoint(x: 0.33148*width, y: 0.93975*height), control2: CGPoint(x: 0.38434*width, y: 0.91228*height))
45 | path.addLine(to: CGPoint(x: 0.45443*width, y: 0.87586*height))
46 | path.addLine(to: CGPoint(x: 0.73443*width, y: 0.73036*height))
47 | path.addLine(to: CGPoint(x: 0.73498*width, y: 0.73008*height))
48 | path.addCurve(to: CGPoint(x: 0.89575*width, y: 0.64208*height), control1: CGPoint(x: 0.80453*width, y: 0.69394*height), control2: CGPoint(x: 0.85739*width, y: 0.66647*height))
49 | path.addCurve(to: CGPoint(x: 0.97255*width, y: 0.56915*height), control1: CGPoint(x: 0.93415*width, y: 0.61766*height), control2: CGPoint(x: 0.95956*width, y: 0.59541*height))
50 | path.addCurve(to: CGPoint(x: 0.97255*width, y: 0.43086*height), control1: CGPoint(x: 0.99432*width, y: 0.52513*height), control2: CGPoint(x: 0.99432*width, y: 0.47487*height))
51 | path.addCurve(to: CGPoint(x: 0.89575*width, y: 0.35792*height), control1: CGPoint(x: 0.95956*width, y: 0.40459*height), control2: CGPoint(x: 0.93416*width, y: 0.38234*height))
52 | path.addCurve(to: CGPoint(x: 0.73498*width, y: 0.26992*height), control1: CGPoint(x: 0.85739*width, y: 0.33353*height), control2: CGPoint(x: 0.80453*width, y: 0.30606*height))
53 | path.addLine(to: CGPoint(x: 0.73444*width, y: 0.26964*height))
54 | path.addLine(to: CGPoint(x: 0.45444*width, y: 0.12415*height))
55 | path.addLine(to: CGPoint(x: 0.4539*width, y: 0.12387*height))
56 | path.addCurve(to: CGPoint(x: 0.28883*width, y: 0.04256*height), control1: CGPoint(x: 0.38434*width, y: 0.08773*height), control2: CGPoint(x: 0.33148*width, y: 0.06026*height))
57 | path.addCurve(to: CGPoint(x: 0.18025*width, y: 0.01916*height), control1: CGPoint(x: 0.24613*width, y: 0.02483*height), control2: CGPoint(x: 0.21201*width, y: 0.01616*height))
58 | path.addCurve(to: CGPoint(x: 0.04718*width, y: 0.08831*height), control1: CGPoint(x: 0.12701*width, y: 0.0242*height), control2: CGPoint(x: 0.07864*width, y: 0.04933*height))
59 | path.closeSubpath()
60 | return path
61 | }
62 | }
63 |
64 |
--------------------------------------------------------------------------------
/DesignCode/Views/Details/CourseView.swift:
--------------------------------------------------------------------------------
1 | import SwiftUI
2 |
3 | struct CourseView: View {
4 | var namespace: Namespace.ID
5 | @Binding var show: Bool
6 | @State var appear = [false, false, false]
7 | var course: Course = courses[0]
8 | @EnvironmentObject var model: Model
9 | @State var viewState: CGSize = .zero
10 | @State var isDraggable = true
11 | @State var showSection = false
12 | @State var selectedIndex = 0
13 |
14 |
15 | var body: some View {
16 | ZStack {
17 | ScrollView {
18 | cover
19 | content
20 | .offset(y: 120)
21 | .padding(.bottom, 200)
22 | .opacity(appear[2] ? 1 : 0)
23 |
24 | }
25 | .coordinateSpace(name: "scroll")
26 | .onAppear { model.showDetail = true }
27 | .onDisappear { model.showDetail = false }
28 | .background(Color("Background"))
29 | .mask(RoundedRectangle(cornerRadius: (viewState.width / 3), style: .continuous))
30 | .scaleEffect(viewState.width / -500 + 1)
31 | .background(.black.opacity(viewState.width / 500))
32 | .background(.ultraThinMaterial)
33 | .gesture(isDraggable ? drag : nil)
34 | .ignoresSafeArea()
35 |
36 | button
37 | }
38 | .onAppear {
39 | fadeIn()
40 | }
41 | .onChange(of: show) { _ in
42 | fadeOut()
43 | }
44 | }
45 |
46 | func fadeIn() {
47 | withAnimation(.easeOut.delay(0.3)) {
48 | appear[0] = true
49 | }
50 | withAnimation(.easeOut.delay(0.4)) {
51 | appear[1] = true
52 | }
53 | withAnimation(.easeOut.delay(0.5)) {
54 | appear[2] = true
55 | }
56 | }
57 |
58 | func fadeOut() {
59 | appear[0] = false
60 | appear[1] = false
61 | appear[2] = false
62 | }
63 |
64 | var drag: some Gesture {
65 | DragGesture(minimumDistance: 20, coordinateSpace: .local)
66 | .onChanged { value in
67 | guard value.translation.width > 0 else { return }
68 | if value.startLocation.x < 100 {
69 | withAnimation(.closeCard) {
70 | viewState = value.translation
71 | }
72 | }
73 |
74 | if viewState.width > 120 {
75 | close()
76 | }
77 | }
78 | .onEnded { _ in
79 | if viewState.width > 80 {
80 | close()
81 | } else {
82 | withAnimation(.closeCard) {
83 | viewState = .zero
84 | }
85 | }
86 |
87 | }
88 |
89 | }
90 |
91 | var cover: some View {
92 |
93 | GeometryReader { proxy in
94 | let secrollY = proxy.frame(in: .named("scroll")).minY
95 |
96 | VStack {
97 | Spacer()
98 | }
99 | .frame(maxWidth: .infinity)
100 | .frame(height: secrollY > 0 ? 500 + secrollY : 500)
101 | .foregroundStyle(.black)
102 | .background(
103 | Image(course.image)
104 | .resizable()
105 | .aspectRatio(contentMode: .fit)
106 | .matchedGeometryEffect(id: "image\(course.id)", in: namespace)
107 | .offset(y: secrollY > 0 ? secrollY * -0.8 : 0)
108 |
109 | )
110 | .background(
111 | Image(course.background)
112 | .resizable()
113 | .aspectRatio(contentMode: .fill)
114 | .matchedGeometryEffect(id: "background\(course.id)", in: namespace)
115 | .offset(y: secrollY > 0 ? -secrollY : 0)
116 | .scaleEffect(secrollY > 0 ? secrollY / 1000 + 1 : 1)
117 | .blur(radius: secrollY > 0 ? secrollY / 30 : 0)
118 | )
119 | .mask(
120 | RoundedRectangle(cornerRadius: appear[0] ? 0 : 30, style: .continuous)
121 | .matchedGeometryEffect(id: "mask\(course.id)", in: namespace)
122 | .offset(y: secrollY > 0 ? -secrollY : 0)
123 | )
124 | .overlay(
125 | overlayContent
126 | .offset(y: secrollY > 0 ? secrollY * -0.6 : 0)
127 | )
128 | }
129 | .frame(height: 500)
130 | }
131 |
132 | var content: some View {
133 | VStack(alignment: .leading) {
134 | ForEach(Array(courseSections.enumerated()), id: \.offset) { index, section in
135 | if index != 0 { Divider() }
136 | SectionRow(section: section)
137 | .onTapGesture {
138 | selectedIndex = index
139 | showSection = true
140 | }
141 | }
142 | }
143 | .background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 30, style: .continuous))
144 | .strokeStyle(cornerRadius: 30)
145 | .padding(20)
146 | .sheet(isPresented: $showSection) {
147 | SectionView(section: courseSections[selectedIndex])
148 | }
149 | }
150 |
151 | var button : some View {
152 | Button {
153 | withAnimation(.closeCard) {
154 | show.toggle()
155 | model.showDetail.toggle()
156 | }
157 | } label: {
158 | Image(systemName: "xmark")
159 | .font(.body.weight(.bold))
160 | .foregroundColor(.secondary)
161 | .padding(8)
162 | .background(.ultraThinMaterial, in: Circle())
163 | }
164 | .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topTrailing)
165 | .padding(32)
166 | .ignoresSafeArea()
167 | }
168 |
169 | var overlayContent: some View {
170 | VStack(alignment: .leading, spacing: 12) {
171 | Text(course.title)
172 | .font(.largeTitle.weight(.bold))
173 | .matchedGeometryEffect(id: "title\(course.id)", in: namespace)
174 | .frame(maxWidth: .infinity, alignment: .leading)
175 | Text(course.subtitle.uppercased())
176 | .font(.footnote.weight(.semibold))
177 | .matchedGeometryEffect(id: "subtitle\(course.id)", in: namespace)
178 | Text(course.text)
179 | .font(.footnote)
180 | .matchedGeometryEffect(id: "text\(course.id)", in: namespace)
181 |
182 | Divider()
183 | .opacity(appear[0] ? 1 : 0)
184 | HStack {
185 | Image("Avatar Default")
186 | /// changing the order of the modifiers could change the design totally
187 | .resizable()
188 | .frame(width: 26, height: 26)
189 | .cornerRadius(10)
190 | .padding(8)
191 | .background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 18, style: .continuous))
192 | .strokeStyle(cornerRadius: 18)
193 | Text("Taught by Amjad Oudeh")
194 | }
195 | .opacity(appear[1] ? 1 : 0)
196 | }
197 | .padding(20)
198 | .background(
199 | Rectangle()
200 | .fill(.ultraThinMaterial)
201 | .mask(RoundedRectangle(cornerRadius: 30, style: .continuous))
202 | .matchedGeometryEffect(id: "blur\(course.id)", in: namespace)
203 | )
204 | .offset(y: 250)
205 | .padding(20)
206 | }
207 | func close() {
208 | withAnimation(.closeCard.delay(0.4)) {
209 | show.toggle()
210 | model.showDetail.toggle()
211 | }
212 | withAnimation {
213 | viewState = .zero
214 | }
215 | isDraggable = false
216 | }
217 | }
218 |
219 | struct CourseView_Previews: PreviewProvider {
220 | @Namespace static var namespace
221 |
222 | static var previews: some View {
223 | CourseView(namespace: namespace, show: .constant(true), course: courses[0])
224 | }
225 | }
226 |
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Waves/Waves 1.imageset/Waves 1.pdf:
--------------------------------------------------------------------------------
1 | %PDF-1.7
2 |
3 | 1 0 obj
4 | << /Length 2 0 R
5 | /FunctionType 4
6 | /Domain [ 0.000000 1.000000 ]
7 | /Range [ 0.000000 1.000000 0.000000 1.000000 0.000000 1.000000 ]
8 | >>
9 | stream
10 | { 0.902222 exch 0.902222 exch 0.933333 exch dup 0.035511 gt { exch pop exch pop exch pop dup 0.035511 sub -0.111548 mul 0.902222 add exch dup 0.035511 sub -0.111548 mul 0.902222 add exch dup 0.035511 sub -0.021600 mul 0.933333 add exch } if dup 1.000000 gt { exch pop exch pop exch pop 0.794635 exch 0.794635 exch 0.912500 exch } if pop }
11 | endstream
12 | endobj
13 |
14 | 2 0 obj
15 | 339
16 | endobj
17 |
18 | 3 0 obj
19 | << /Length 4 0 R
20 | /FunctionType 4
21 | /Domain [ 0.000000 1.000000 ]
22 | /Range [ 0.000000 1.000000 0.000000 1.000000 0.000000 1.000000 ]
23 | >>
24 | stream
25 | { 0.949020 exch 0.964706 exch 1.000000 exch dup 0.000000 gt { exch pop exch pop exch pop dup 0.000000 sub 0.000000 mul 0.949020 add exch dup 0.000000 sub 0.000000 mul 0.964706 add exch dup 0.000000 sub 0.000000 mul 1.000000 add exch } if dup 1.000000 gt { exch pop exch pop exch pop 0.949020 exch 0.964706 exch 1.000000 exch } if pop }
26 | endstream
27 | endobj
28 |
29 | 4 0 obj
30 | 336
31 | endobj
32 |
33 | 5 0 obj
34 | << /Length 6 0 R
35 | /FunctionType 4
36 | /Domain [ 0.000000 1.000000 ]
37 | /Range [ 0.000000 1.000000 ]
38 | >>
39 | stream
40 | { 0.500000 exch dup 0.035511 gt { exch pop dup 0.035511 sub 0.518409 mul 0.500000 add exch } if dup 1.000000 gt { exch pop 1.000000 exch } if pop }
41 | endstream
42 | endobj
43 |
44 | 6 0 obj
45 | 148
46 | endobj
47 |
48 | 7 0 obj
49 | << /Type /XObject
50 | /Length 8 0 R
51 | /Group << /Type /Group
52 | /S /Transparency
53 | /CS /DeviceGray
54 | >>
55 | /Subtype /Form
56 | /Resources << /Pattern << /P1 << /Matrix [ 233.942795 -165.856781 165.856781 233.942795 -86.802643 -204.442978 ]
57 | /Shading << /Coords [ 0.000000 0.000000 1.000000 0.000000 ]
58 | /Extend [ true true ]
59 | /Domain [ 0.000000 1.000000 ]
60 | /ShadingType 2
61 | /ColorSpace /DeviceGray
62 | /Function 5 0 R
63 | >>
64 | /PatternType 2
65 | /Type /Pattern
66 | >> >> >>
67 | /BBox [ 0.000000 0.000000 428.000000 100.000000 ]
68 | >>
69 | stream
70 | /DeviceGray CS
71 | /DeviceGray cs
72 | 1.000000 0.000000 -0.000000 1.000000 0.000000 -17.827332 cm
73 | 0.000000 99.453758 m
74 | 150.897446 61.327290 246.374374 125.827332 428.000031 94.453758 c
75 | 428.000031 22.453735 l
76 | 253.174408 82.309814 171.096115 50.516239 0.000000 22.453735 c
77 | 0.000000 99.453758 l
78 | h
79 | /Pattern cs
80 | /P1 scn
81 | f
82 | n
83 |
84 | endstream
85 | endobj
86 |
87 | 8 0 obj
88 | 310
89 | endobj
90 |
91 | 9 0 obj
92 | << /Length 10 0 R
93 | /FunctionType 4
94 | /Domain [ 0.000000 1.000000 ]
95 | /Range [ 0.000000 1.000000 ]
96 | >>
97 | stream
98 | { 0.400000 exch dup 0.000000 gt { exch pop dup 0.000000 sub 0.600000 mul 0.400000 add exch } if dup 1.000000 gt { exch pop 1.000000 exch } if pop }
99 | endstream
100 | endobj
101 |
102 | 10 0 obj
103 | 148
104 | endobj
105 |
106 | 11 0 obj
107 | << /Type /XObject
108 | /Length 12 0 R
109 | /Group << /Type /Group
110 | /S /Transparency
111 | /CS /DeviceGray
112 | >>
113 | /Subtype /Form
114 | /Resources << /Pattern << /P1 << /Matrix [ -0.000000 -45.000004 45.000004 -0.000000 -45.000004 100.000000 ]
115 | /Shading << /Coords [ 0.000000 0.000000 1.000000 0.000000 ]
116 | /Extend [ true true ]
117 | /Domain [ 0.000000 1.000000 ]
118 | /ShadingType 2
119 | /ColorSpace /DeviceGray
120 | /Function 9 0 R
121 | >>
122 | /PatternType 2
123 | /Type /Pattern
124 | >> >> >>
125 | /BBox [ 0.000000 0.000000 428.000000 100.000000 ]
126 | >>
127 | stream
128 | /DeviceGray CS
129 | /DeviceGray cs
130 | 1.000000 0.000000 -0.000000 1.000000 0.000000 -18.187927 cm
131 | 0.000000 114.814453 m
132 | 162.434509 44.782616 230.025238 136.375824 428.000031 114.814453 c
133 | 428.000031 18.187927 l
134 | 0.000000 18.187927 l
135 | 0.000000 114.814453 l
136 | h
137 | /Pattern cs
138 | /P1 scn
139 | f
140 | n
141 |
142 | endstream
143 | endobj
144 |
145 | 12 0 obj
146 | 271
147 | endobj
148 |
149 | 13 0 obj
150 | << /Pattern << /P2 << /Matrix [ 233.942795 -165.856781 165.856781 233.942795 -86.802643 -204.442978 ]
151 | /Shading << /Coords [ 0.000000 0.000000 1.000000 0.000000 ]
152 | /Extend [ true true ]
153 | /Domain [ 0.000000 1.000000 ]
154 | /ShadingType 2
155 | /ColorSpace /DeviceRGB
156 | /Function 1 0 R
157 | >>
158 | /PatternType 2
159 | /Type /Pattern
160 | >>
161 | /P1 << /Matrix [ -0.000000 -45.000004 45.000004 -0.000000 -45.000004 100.000000 ]
162 | /Shading << /Coords [ 0.000000 0.000000 1.000000 0.000000 ]
163 | /Extend [ true true ]
164 | /Domain [ 0.000000 1.000000 ]
165 | /ShadingType 2
166 | /ColorSpace /DeviceRGB
167 | /Function 3 0 R
168 | >>
169 | /PatternType 2
170 | /Type /Pattern
171 | >>
172 | >>
173 | /ExtGState << /E2 << /SMask << /Type /Mask
174 | /G 7 0 R
175 | /S /Luminosity
176 | >>
177 | /Type /ExtGState
178 | >>
179 | /E1 << /SMask << /Type /Mask
180 | /G 11 0 R
181 | /S /Luminosity
182 | >>
183 | /Type /ExtGState
184 | >>
185 | >>
186 | >>
187 | endobj
188 |
189 | 14 0 obj
190 | << /Length 15 0 R >>
191 | stream
192 | /DeviceRGB CS
193 | /DeviceRGB cs
194 | q
195 | /E1 gs
196 | 1.000000 0.000000 -0.000000 1.000000 0.000000 -18.187927 cm
197 | /Pattern cs
198 | /P1 scn
199 | 0.000000 114.814453 m
200 | 162.434509 44.782616 230.025238 136.375824 428.000031 114.814453 c
201 | 428.000031 18.187927 l
202 | 0.000000 18.187927 l
203 | 0.000000 114.814453 l
204 | h
205 | f
206 | n
207 | Q
208 | q
209 | /E2 gs
210 | 1.000000 0.000000 -0.000000 1.000000 0.000000 -17.827332 cm
211 | /Pattern cs
212 | /P2 scn
213 | 0.000000 99.453758 m
214 | 150.897446 61.327290 246.374374 125.827332 428.000031 94.453758 c
215 | 428.000031 22.453735 l
216 | 253.174408 82.309814 171.096115 50.516239 0.000000 22.453735 c
217 | 0.000000 99.453758 l
218 | h
219 | f
220 | n
221 | Q
222 |
223 | endstream
224 | endobj
225 |
226 | 15 0 obj
227 | 571
228 | endobj
229 |
230 | 16 0 obj
231 | << /Annots []
232 | /Type /Page
233 | /MediaBox [ 0.000000 0.000000 428.000000 100.000000 ]
234 | /Resources 13 0 R
235 | /Contents 14 0 R
236 | /Parent 17 0 R
237 | >>
238 | endobj
239 |
240 | 17 0 obj
241 | << /Kids [ 16 0 R ]
242 | /Count 1
243 | /Type /Pages
244 | >>
245 | endobj
246 |
247 | 18 0 obj
248 | << /Type /Catalog
249 | /Pages 17 0 R
250 | >>
251 | endobj
252 |
253 | xref
254 | 0 19
255 | 0000000000 65535 f
256 | 0000000010 00000 n
257 | 0000000533 00000 n
258 | 0000000555 00000 n
259 | 0000001075 00000 n
260 | 0000001097 00000 n
261 | 0000001393 00000 n
262 | 0000001415 00000 n
263 | 0000002757 00000 n
264 | 0000002779 00000 n
265 | 0000003076 00000 n
266 | 0000003099 00000 n
267 | 0000004399 00000 n
268 | 0000004422 00000 n
269 | 0000006198 00000 n
270 | 0000006827 00000 n
271 | 0000006850 00000 n
272 | 0000007029 00000 n
273 | 0000007105 00000 n
274 | trailer
275 | << /ID [ (some) (id) ]
276 | /Root 18 0 R
277 | /Size 19
278 | >>
279 | startxref
280 | 7166
281 | %%EOF
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Waves/Waves 1.imageset/Waves 1 Dark.pdf:
--------------------------------------------------------------------------------
1 | %PDF-1.7
2 |
3 | 1 0 obj
4 | << /Length 2 0 R
5 | /FunctionType 4
6 | /Domain [ 0.000000 1.000000 ]
7 | /Range [ 0.000000 1.000000 0.000000 1.000000 0.000000 1.000000 ]
8 | >>
9 | stream
10 | { 0.109080 exch 0.109080 exch 0.254167 exch dup 0.035511 gt { exch pop exch pop exch pop dup 0.035511 sub -0.037171 mul 0.109080 add exch dup 0.035511 sub -0.037171 mul 0.109080 add exch dup 0.035511 sub -0.017280 mul 0.254167 add exch } if dup 1.000000 gt { exch pop exch pop exch pop 0.073229 exch 0.073229 exch 0.237500 exch } if pop }
11 | endstream
12 | endobj
13 |
14 | 2 0 obj
15 | 339
16 | endobj
17 |
18 | 3 0 obj
19 | << /Length 4 0 R
20 | /FunctionType 4
21 | /Domain [ 0.000000 1.000000 ]
22 | /Range [ 0.000000 1.000000 0.000000 1.000000 0.000000 1.000000 ]
23 | >>
24 | stream
25 | { 0.145098 exch 0.145098 exch 0.294118 exch dup 0.000000 gt { exch pop exch pop exch pop dup 0.000000 sub 0.000000 mul 0.145098 add exch dup 0.000000 sub 0.000000 mul 0.145098 add exch dup 0.000000 sub 0.000000 mul 0.294118 add exch } if dup 1.000000 gt { exch pop exch pop exch pop 0.145098 exch 0.145098 exch 0.294118 exch } if pop }
26 | endstream
27 | endobj
28 |
29 | 4 0 obj
30 | 336
31 | endobj
32 |
33 | 5 0 obj
34 | << /Length 6 0 R
35 | /FunctionType 4
36 | /Domain [ 0.000000 1.000000 ]
37 | /Range [ 0.000000 1.000000 ]
38 | >>
39 | stream
40 | { 0.500000 exch dup 0.035511 gt { exch pop dup 0.035511 sub 0.518409 mul 0.500000 add exch } if dup 1.000000 gt { exch pop 1.000000 exch } if pop }
41 | endstream
42 | endobj
43 |
44 | 6 0 obj
45 | 148
46 | endobj
47 |
48 | 7 0 obj
49 | << /Type /XObject
50 | /Length 8 0 R
51 | /Group << /Type /Group
52 | /S /Transparency
53 | /CS /DeviceGray
54 | >>
55 | /Subtype /Form
56 | /Resources << /Pattern << /P1 << /Matrix [ 233.942795 -165.856781 165.856781 233.942795 -86.802643 -204.442978 ]
57 | /Shading << /Coords [ 0.000000 0.000000 1.000000 0.000000 ]
58 | /Extend [ true true ]
59 | /Domain [ 0.000000 1.000000 ]
60 | /ShadingType 2
61 | /ColorSpace /DeviceGray
62 | /Function 5 0 R
63 | >>
64 | /PatternType 2
65 | /Type /Pattern
66 | >> >> >>
67 | /BBox [ 0.000000 0.000000 428.000000 100.000000 ]
68 | >>
69 | stream
70 | /DeviceGray CS
71 | /DeviceGray cs
72 | 1.000000 0.000000 -0.000000 1.000000 0.000000 -17.827332 cm
73 | 0.000000 99.453758 m
74 | 150.897446 61.327290 246.374374 125.827332 428.000031 94.453758 c
75 | 428.000031 22.453735 l
76 | 253.174408 82.309814 171.096115 50.516239 0.000000 22.453735 c
77 | 0.000000 99.453758 l
78 | h
79 | /Pattern cs
80 | /P1 scn
81 | f
82 | n
83 |
84 | endstream
85 | endobj
86 |
87 | 8 0 obj
88 | 310
89 | endobj
90 |
91 | 9 0 obj
92 | << /Length 10 0 R
93 | /FunctionType 4
94 | /Domain [ 0.000000 1.000000 ]
95 | /Range [ 0.000000 1.000000 ]
96 | >>
97 | stream
98 | { 0.400000 exch dup 0.000000 gt { exch pop dup 0.000000 sub 0.600000 mul 0.400000 add exch } if dup 1.000000 gt { exch pop 1.000000 exch } if pop }
99 | endstream
100 | endobj
101 |
102 | 10 0 obj
103 | 148
104 | endobj
105 |
106 | 11 0 obj
107 | << /Type /XObject
108 | /Length 12 0 R
109 | /Group << /Type /Group
110 | /S /Transparency
111 | /CS /DeviceGray
112 | >>
113 | /Subtype /Form
114 | /Resources << /Pattern << /P1 << /Matrix [ -0.000000 -59.702690 59.702690 -0.000000 -59.702690 100.000000 ]
115 | /Shading << /Coords [ 0.000000 0.000000 1.000000 0.000000 ]
116 | /Extend [ true true ]
117 | /Domain [ 0.000000 1.000000 ]
118 | /ShadingType 2
119 | /ColorSpace /DeviceGray
120 | /Function 9 0 R
121 | >>
122 | /PatternType 2
123 | /Type /Pattern
124 | >> >> >>
125 | /BBox [ 0.000000 0.000000 428.000000 100.000000 ]
126 | >>
127 | stream
128 | /DeviceGray CS
129 | /DeviceGray cs
130 | 1.000000 0.000000 -0.000000 1.000000 0.000000 -18.187927 cm
131 | 0.000000 114.814453 m
132 | 162.434509 44.782616 230.025238 136.375824 428.000031 114.814453 c
133 | 428.000031 18.187927 l
134 | 0.000000 18.187927 l
135 | 0.000000 114.814453 l
136 | h
137 | /Pattern cs
138 | /P1 scn
139 | f
140 | n
141 |
142 | endstream
143 | endobj
144 |
145 | 12 0 obj
146 | 271
147 | endobj
148 |
149 | 13 0 obj
150 | << /Pattern << /P2 << /Matrix [ 233.942795 -165.856781 165.856781 233.942795 -86.802643 -204.442978 ]
151 | /Shading << /Coords [ 0.000000 0.000000 1.000000 0.000000 ]
152 | /Extend [ true true ]
153 | /Domain [ 0.000000 1.000000 ]
154 | /ShadingType 2
155 | /ColorSpace /DeviceRGB
156 | /Function 1 0 R
157 | >>
158 | /PatternType 2
159 | /Type /Pattern
160 | >>
161 | /P1 << /Matrix [ -0.000000 -59.702690 59.702690 -0.000000 -59.702690 100.000000 ]
162 | /Shading << /Coords [ 0.000000 0.000000 1.000000 0.000000 ]
163 | /Extend [ true true ]
164 | /Domain [ 0.000000 1.000000 ]
165 | /ShadingType 2
166 | /ColorSpace /DeviceRGB
167 | /Function 3 0 R
168 | >>
169 | /PatternType 2
170 | /Type /Pattern
171 | >>
172 | >>
173 | /ExtGState << /E2 << /SMask << /Type /Mask
174 | /G 7 0 R
175 | /S /Luminosity
176 | >>
177 | /Type /ExtGState
178 | >>
179 | /E1 << /SMask << /Type /Mask
180 | /G 11 0 R
181 | /S /Luminosity
182 | >>
183 | /Type /ExtGState
184 | >>
185 | >>
186 | >>
187 | endobj
188 |
189 | 14 0 obj
190 | << /Length 15 0 R >>
191 | stream
192 | /DeviceRGB CS
193 | /DeviceRGB cs
194 | q
195 | /E1 gs
196 | 1.000000 0.000000 -0.000000 1.000000 0.000000 -18.187927 cm
197 | /Pattern cs
198 | /P1 scn
199 | 0.000000 114.814453 m
200 | 162.434509 44.782616 230.025238 136.375824 428.000031 114.814453 c
201 | 428.000031 18.187927 l
202 | 0.000000 18.187927 l
203 | 0.000000 114.814453 l
204 | h
205 | f
206 | n
207 | Q
208 | q
209 | /E2 gs
210 | 1.000000 0.000000 -0.000000 1.000000 0.000000 -17.827332 cm
211 | /Pattern cs
212 | /P2 scn
213 | 0.000000 99.453758 m
214 | 150.897446 61.327290 246.374374 125.827332 428.000031 94.453758 c
215 | 428.000031 22.453735 l
216 | 253.174408 82.309814 171.096115 50.516239 0.000000 22.453735 c
217 | 0.000000 99.453758 l
218 | h
219 | f
220 | n
221 | Q
222 |
223 | endstream
224 | endobj
225 |
226 | 15 0 obj
227 | 571
228 | endobj
229 |
230 | 16 0 obj
231 | << /Annots []
232 | /Type /Page
233 | /MediaBox [ 0.000000 0.000000 428.000000 100.000000 ]
234 | /Resources 13 0 R
235 | /Contents 14 0 R
236 | /Parent 17 0 R
237 | >>
238 | endobj
239 |
240 | 17 0 obj
241 | << /Kids [ 16 0 R ]
242 | /Count 1
243 | /Type /Pages
244 | >>
245 | endobj
246 |
247 | 18 0 obj
248 | << /Type /Catalog
249 | /Pages 17 0 R
250 | >>
251 | endobj
252 |
253 | xref
254 | 0 19
255 | 0000000000 65535 f
256 | 0000000010 00000 n
257 | 0000000533 00000 n
258 | 0000000555 00000 n
259 | 0000001075 00000 n
260 | 0000001097 00000 n
261 | 0000001393 00000 n
262 | 0000001415 00000 n
263 | 0000002757 00000 n
264 | 0000002779 00000 n
265 | 0000003076 00000 n
266 | 0000003099 00000 n
267 | 0000004399 00000 n
268 | 0000004422 00000 n
269 | 0000006198 00000 n
270 | 0000006827 00000 n
271 | 0000006850 00000 n
272 | 0000007029 00000 n
273 | 0000007105 00000 n
274 | trailer
275 | << /ID [ (some) (id) ]
276 | /Root 18 0 R
277 | /Size 19
278 | >>
279 | startxref
280 | 7166
281 | %%EOF
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Waves/Waves 2.imageset/Waves 2.pdf:
--------------------------------------------------------------------------------
1 | %PDF-1.7
2 |
3 | 1 0 obj
4 | << /Length 2 0 R
5 | /FunctionType 4
6 | /Domain [ 0.000000 1.000000 ]
7 | /Range [ 0.000000 1.000000 0.000000 1.000000 0.000000 1.000000 ]
8 | >>
9 | stream
10 | { 0.902222 exch 0.902222 exch 0.933333 exch dup 0.035511 gt { exch pop exch pop exch pop dup 0.035511 sub -0.111548 mul 0.902222 add exch dup 0.035511 sub -0.111548 mul 0.902222 add exch dup 0.035511 sub -0.021600 mul 0.933333 add exch } if dup 1.000000 gt { exch pop exch pop exch pop 0.794635 exch 0.794635 exch 0.912500 exch } if pop }
11 | endstream
12 | endobj
13 |
14 | 2 0 obj
15 | 339
16 | endobj
17 |
18 | 3 0 obj
19 | << /Length 4 0 R
20 | /FunctionType 4
21 | /Domain [ 0.000000 1.000000 ]
22 | /Range [ 0.000000 1.000000 0.000000 1.000000 0.000000 1.000000 ]
23 | >>
24 | stream
25 | { 0.949020 exch 0.964706 exch 1.000000 exch dup 0.000000 gt { exch pop exch pop exch pop dup 0.000000 sub 0.000000 mul 0.949020 add exch dup 0.000000 sub 0.000000 mul 0.964706 add exch dup 0.000000 sub 0.000000 mul 1.000000 add exch } if dup 1.000000 gt { exch pop exch pop exch pop 0.949020 exch 0.964706 exch 1.000000 exch } if pop }
26 | endstream
27 | endobj
28 |
29 | 4 0 obj
30 | 336
31 | endobj
32 |
33 | 5 0 obj
34 | << /Length 6 0 R
35 | /FunctionType 4
36 | /Domain [ 0.000000 1.000000 ]
37 | /Range [ 0.000000 1.000000 ]
38 | >>
39 | stream
40 | { 0.500000 exch dup 0.035511 gt { exch pop dup 0.035511 sub 0.518409 mul 0.500000 add exch } if dup 1.000000 gt { exch pop 1.000000 exch } if pop }
41 | endstream
42 | endobj
43 |
44 | 6 0 obj
45 | 148
46 | endobj
47 |
48 | 7 0 obj
49 | << /Type /XObject
50 | /Length 8 0 R
51 | /Group << /Type /Group
52 | /S /Transparency
53 | /CS /DeviceGray
54 | >>
55 | /Subtype /Form
56 | /Resources << /Pattern << /P1 << /Matrix [ 191.301773 -405.610107 405.610107 191.301773 -340.965271 -242.819534 ]
57 | /Shading << /Coords [ 0.000000 0.000000 1.000000 0.000000 ]
58 | /Extend [ true true ]
59 | /Domain [ 0.000000 1.000000 ]
60 | /ShadingType 2
61 | /ColorSpace /DeviceGray
62 | /Function 5 0 R
63 | >>
64 | /PatternType 2
65 | /Type /Pattern
66 | >> >> >>
67 | /BBox [ 0.000000 0.000000 1280.000000 100.000000 ]
68 | >>
69 | stream
70 | /DeviceGray CS
71 | /DeviceGray cs
72 | 1.000000 0.000000 -0.000000 1.000000 0.000000 -17.827332 cm
73 | 0.000000 99.453758 m
74 | 451.282043 61.327290 736.820496 125.827332 1280.000000 94.453758 c
75 | 1280.000000 22.453735 l
76 | 757.157043 82.309814 511.689301 50.516239 0.000000 22.453735 c
77 | 0.000000 99.453758 l
78 | h
79 | /Pattern cs
80 | /P1 scn
81 | f
82 | n
83 |
84 | endstream
85 | endobj
86 |
87 | 8 0 obj
88 | 312
89 | endobj
90 |
91 | 9 0 obj
92 | << /Length 10 0 R
93 | /FunctionType 4
94 | /Domain [ 0.000000 1.000000 ]
95 | /Range [ 0.000000 1.000000 ]
96 | >>
97 | stream
98 | { 0.400000 exch dup 0.000000 gt { exch pop dup 0.000000 sub 0.600000 mul 0.400000 add exch } if dup 1.000000 gt { exch pop 1.000000 exch } if pop }
99 | endstream
100 | endobj
101 |
102 | 10 0 obj
103 | 148
104 | endobj
105 |
106 | 11 0 obj
107 | << /Type /XObject
108 | /Length 12 0 R
109 | /Group << /Type /Group
110 | /S /Transparency
111 | /CS /DeviceGray
112 | >>
113 | /Subtype /Form
114 | /Resources << /Pattern << /P1 << /Matrix [ -0.000000 -45.000004 45.000004 -0.000000 -45.000004 100.000000 ]
115 | /Shading << /Coords [ 0.000000 0.000000 1.000000 0.000000 ]
116 | /Extend [ true true ]
117 | /Domain [ 0.000000 1.000000 ]
118 | /ShadingType 2
119 | /ColorSpace /DeviceGray
120 | /Function 9 0 R
121 | >>
122 | /PatternType 2
123 | /Type /Pattern
124 | >> >> >>
125 | /BBox [ 0.000000 0.000000 1280.000000 100.000000 ]
126 | >>
127 | stream
128 | /DeviceGray CS
129 | /DeviceGray cs
130 | 1.000000 0.000000 -0.000000 1.000000 0.000000 -18.187927 cm
131 | 0.000000 114.814453 m
132 | 485.785400 44.782616 687.925964 136.375824 1280.000000 114.814453 c
133 | 1280.000000 18.187927 l
134 | 0.000000 18.187927 l
135 | 0.000000 114.814453 l
136 | h
137 | /Pattern cs
138 | /P1 scn
139 | f
140 | n
141 |
142 | endstream
143 | endobj
144 |
145 | 12 0 obj
146 | 273
147 | endobj
148 |
149 | 13 0 obj
150 | << /Pattern << /P2 << /Matrix [ 191.301773 -405.610107 405.610107 191.301773 -340.965271 -242.819534 ]
151 | /Shading << /Coords [ 0.000000 0.000000 1.000000 0.000000 ]
152 | /Extend [ true true ]
153 | /Domain [ 0.000000 1.000000 ]
154 | /ShadingType 2
155 | /ColorSpace /DeviceRGB
156 | /Function 1 0 R
157 | >>
158 | /PatternType 2
159 | /Type /Pattern
160 | >>
161 | /P1 << /Matrix [ -0.000000 -45.000004 45.000004 -0.000000 -45.000004 100.000000 ]
162 | /Shading << /Coords [ 0.000000 0.000000 1.000000 0.000000 ]
163 | /Extend [ true true ]
164 | /Domain [ 0.000000 1.000000 ]
165 | /ShadingType 2
166 | /ColorSpace /DeviceRGB
167 | /Function 3 0 R
168 | >>
169 | /PatternType 2
170 | /Type /Pattern
171 | >>
172 | >>
173 | /ExtGState << /E2 << /SMask << /Type /Mask
174 | /G 7 0 R
175 | /S /Luminosity
176 | >>
177 | /Type /ExtGState
178 | >>
179 | /E1 << /SMask << /Type /Mask
180 | /G 11 0 R
181 | /S /Luminosity
182 | >>
183 | /Type /ExtGState
184 | >>
185 | >>
186 | >>
187 | endobj
188 |
189 | 14 0 obj
190 | << /Length 15 0 R >>
191 | stream
192 | /DeviceRGB CS
193 | /DeviceRGB cs
194 | q
195 | /E1 gs
196 | 1.000000 0.000000 -0.000000 1.000000 0.000000 -18.187927 cm
197 | /Pattern cs
198 | /P1 scn
199 | 0.000000 114.814453 m
200 | 485.785400 44.782616 687.925964 136.375824 1280.000000 114.814453 c
201 | 1280.000000 18.187927 l
202 | 0.000000 18.187927 l
203 | 0.000000 114.814453 l
204 | h
205 | f
206 | n
207 | Q
208 | q
209 | /E2 gs
210 | 1.000000 0.000000 -0.000000 1.000000 0.000000 -17.827332 cm
211 | /Pattern cs
212 | /P2 scn
213 | 0.000000 99.453758 m
214 | 451.282043 61.327290 736.820496 125.827332 1280.000000 94.453758 c
215 | 1280.000000 22.453735 l
216 | 757.157043 82.309814 511.689301 50.516239 0.000000 22.453735 c
217 | 0.000000 99.453758 l
218 | h
219 | f
220 | n
221 | Q
222 |
223 | endstream
224 | endobj
225 |
226 | 15 0 obj
227 | 575
228 | endobj
229 |
230 | 16 0 obj
231 | << /Annots []
232 | /Type /Page
233 | /MediaBox [ 0.000000 0.000000 1280.000000 100.000000 ]
234 | /Resources 13 0 R
235 | /Contents 14 0 R
236 | /Parent 17 0 R
237 | >>
238 | endobj
239 |
240 | 17 0 obj
241 | << /Kids [ 16 0 R ]
242 | /Count 1
243 | /Type /Pages
244 | >>
245 | endobj
246 |
247 | 18 0 obj
248 | << /Type /Catalog
249 | /Pages 17 0 R
250 | >>
251 | endobj
252 |
253 | xref
254 | 0 19
255 | 0000000000 65535 f
256 | 0000000010 00000 n
257 | 0000000533 00000 n
258 | 0000000555 00000 n
259 | 0000001075 00000 n
260 | 0000001097 00000 n
261 | 0000001393 00000 n
262 | 0000001415 00000 n
263 | 0000002761 00000 n
264 | 0000002783 00000 n
265 | 0000003080 00000 n
266 | 0000003103 00000 n
267 | 0000004406 00000 n
268 | 0000004429 00000 n
269 | 0000006206 00000 n
270 | 0000006839 00000 n
271 | 0000006862 00000 n
272 | 0000007042 00000 n
273 | 0000007118 00000 n
274 | trailer
275 | << /ID [ (some) (id) ]
276 | /Root 18 0 R
277 | /Size 19
278 | >>
279 | startxref
280 | 7179
281 | %%EOF
--------------------------------------------------------------------------------
/DesignCode/Assets.xcassets/Waves/Waves 2.imageset/Waves 2 Dark.pdf:
--------------------------------------------------------------------------------
1 | %PDF-1.7
2 |
3 | 1 0 obj
4 | << /Length 2 0 R
5 | /FunctionType 4
6 | /Domain [ 0.000000 1.000000 ]
7 | /Range [ 0.000000 1.000000 0.000000 1.000000 0.000000 1.000000 ]
8 | >>
9 | stream
10 | { 0.109080 exch 0.109080 exch 0.254167 exch dup 0.035511 gt { exch pop exch pop exch pop dup 0.035511 sub -0.037171 mul 0.109080 add exch dup 0.035511 sub -0.037171 mul 0.109080 add exch dup 0.035511 sub -0.017280 mul 0.254167 add exch } if dup 1.000000 gt { exch pop exch pop exch pop 0.073229 exch 0.073229 exch 0.237500 exch } if pop }
11 | endstream
12 | endobj
13 |
14 | 2 0 obj
15 | 339
16 | endobj
17 |
18 | 3 0 obj
19 | << /Length 4 0 R
20 | /FunctionType 4
21 | /Domain [ 0.000000 1.000000 ]
22 | /Range [ 0.000000 1.000000 0.000000 1.000000 0.000000 1.000000 ]
23 | >>
24 | stream
25 | { 0.145098 exch 0.145098 exch 0.294118 exch dup 0.000000 gt { exch pop exch pop exch pop dup 0.000000 sub 0.000000 mul 0.145098 add exch dup 0.000000 sub 0.000000 mul 0.145098 add exch dup 0.000000 sub 0.000000 mul 0.294118 add exch } if dup 1.000000 gt { exch pop exch pop exch pop 0.145098 exch 0.145098 exch 0.294118 exch } if pop }
26 | endstream
27 | endobj
28 |
29 | 4 0 obj
30 | 336
31 | endobj
32 |
33 | 5 0 obj
34 | << /Length 6 0 R
35 | /FunctionType 4
36 | /Domain [ 0.000000 1.000000 ]
37 | /Range [ 0.000000 1.000000 ]
38 | >>
39 | stream
40 | { 0.500000 exch dup 0.035511 gt { exch pop dup 0.035511 sub 0.518409 mul 0.500000 add exch } if dup 1.000000 gt { exch pop 1.000000 exch } if pop }
41 | endstream
42 | endobj
43 |
44 | 6 0 obj
45 | 148
46 | endobj
47 |
48 | 7 0 obj
49 | << /Type /XObject
50 | /Length 8 0 R
51 | /Group << /Type /Group
52 | /S /Transparency
53 | /CS /DeviceGray
54 | >>
55 | /Subtype /Form
56 | /Resources << /Pattern << /P1 << /Matrix [ 191.301773 -405.610107 405.610107 191.301773 -340.965271 -242.819595 ]
57 | /Shading << /Coords [ 0.000000 0.000000 1.000000 0.000000 ]
58 | /Extend [ true true ]
59 | /Domain [ 0.000000 1.000000 ]
60 | /ShadingType 2
61 | /ColorSpace /DeviceGray
62 | /Function 5 0 R
63 | >>
64 | /PatternType 2
65 | /Type /Pattern
66 | >> >> >>
67 | /BBox [ 0.000000 0.000000 1280.000000 100.000000 ]
68 | >>
69 | stream
70 | /DeviceGray CS
71 | /DeviceGray cs
72 | 1.000000 0.000000 -0.000000 1.000000 0.000000 -17.827332 cm
73 | 0.000000 99.453758 m
74 | 451.282043 61.327290 736.820496 125.827332 1280.000000 94.453758 c
75 | 1280.000000 22.453735 l
76 | 757.157043 82.309814 511.689301 50.516239 0.000000 22.453735 c
77 | 0.000000 99.453758 l
78 | h
79 | /Pattern cs
80 | /P1 scn
81 | f
82 | n
83 |
84 | endstream
85 | endobj
86 |
87 | 8 0 obj
88 | 312
89 | endobj
90 |
91 | 9 0 obj
92 | << /Length 10 0 R
93 | /FunctionType 4
94 | /Domain [ 0.000000 1.000000 ]
95 | /Range [ 0.000000 1.000000 ]
96 | >>
97 | stream
98 | { 0.400000 exch dup 0.000000 gt { exch pop dup 0.000000 sub 0.600000 mul 0.400000 add exch } if dup 1.000000 gt { exch pop 1.000000 exch } if pop }
99 | endstream
100 | endobj
101 |
102 | 10 0 obj
103 | 148
104 | endobj
105 |
106 | 11 0 obj
107 | << /Type /XObject
108 | /Length 12 0 R
109 | /Group << /Type /Group
110 | /S /Transparency
111 | /CS /DeviceGray
112 | >>
113 | /Subtype /Form
114 | /Resources << /Pattern << /P1 << /Matrix [ -0.000000 -59.702690 59.702690 -0.000000 -59.702690 100.000000 ]
115 | /Shading << /Coords [ 0.000000 0.000000 1.000000 0.000000 ]
116 | /Extend [ true true ]
117 | /Domain [ 0.000000 1.000000 ]
118 | /ShadingType 2
119 | /ColorSpace /DeviceGray
120 | /Function 9 0 R
121 | >>
122 | /PatternType 2
123 | /Type /Pattern
124 | >> >> >>
125 | /BBox [ 0.000000 0.000000 1280.000000 100.000000 ]
126 | >>
127 | stream
128 | /DeviceGray CS
129 | /DeviceGray cs
130 | 1.000000 0.000000 -0.000000 1.000000 0.000000 -18.187927 cm
131 | 0.000000 114.814453 m
132 | 485.785400 44.782616 687.925964 136.375824 1280.000000 114.814453 c
133 | 1280.000000 18.187927 l
134 | 0.000000 18.187927 l
135 | 0.000000 114.814453 l
136 | h
137 | /Pattern cs
138 | /P1 scn
139 | f
140 | n
141 |
142 | endstream
143 | endobj
144 |
145 | 12 0 obj
146 | 273
147 | endobj
148 |
149 | 13 0 obj
150 | << /Pattern << /P2 << /Matrix [ 191.301773 -405.610107 405.610107 191.301773 -340.965271 -242.819595 ]
151 | /Shading << /Coords [ 0.000000 0.000000 1.000000 0.000000 ]
152 | /Extend [ true true ]
153 | /Domain [ 0.000000 1.000000 ]
154 | /ShadingType 2
155 | /ColorSpace /DeviceRGB
156 | /Function 1 0 R
157 | >>
158 | /PatternType 2
159 | /Type /Pattern
160 | >>
161 | /P1 << /Matrix [ -0.000000 -59.702690 59.702690 -0.000000 -59.702690 100.000000 ]
162 | /Shading << /Coords [ 0.000000 0.000000 1.000000 0.000000 ]
163 | /Extend [ true true ]
164 | /Domain [ 0.000000 1.000000 ]
165 | /ShadingType 2
166 | /ColorSpace /DeviceRGB
167 | /Function 3 0 R
168 | >>
169 | /PatternType 2
170 | /Type /Pattern
171 | >>
172 | >>
173 | /ExtGState << /E2 << /SMask << /Type /Mask
174 | /G 7 0 R
175 | /S /Luminosity
176 | >>
177 | /Type /ExtGState
178 | >>
179 | /E1 << /SMask << /Type /Mask
180 | /G 11 0 R
181 | /S /Luminosity
182 | >>
183 | /Type /ExtGState
184 | >>
185 | >>
186 | >>
187 | endobj
188 |
189 | 14 0 obj
190 | << /Length 15 0 R >>
191 | stream
192 | /DeviceRGB CS
193 | /DeviceRGB cs
194 | q
195 | /E1 gs
196 | 1.000000 0.000000 -0.000000 1.000000 0.000000 -18.187927 cm
197 | /Pattern cs
198 | /P1 scn
199 | 0.000000 114.814453 m
200 | 485.785400 44.782616 687.925964 136.375824 1280.000000 114.814453 c
201 | 1280.000000 18.187927 l
202 | 0.000000 18.187927 l
203 | 0.000000 114.814453 l
204 | h
205 | f
206 | n
207 | Q
208 | q
209 | /E2 gs
210 | 1.000000 0.000000 -0.000000 1.000000 0.000000 -17.827332 cm
211 | /Pattern cs
212 | /P2 scn
213 | 0.000000 99.453758 m
214 | 451.282043 61.327290 736.820496 125.827332 1280.000000 94.453758 c
215 | 1280.000000 22.453735 l
216 | 757.157043 82.309814 511.689301 50.516239 0.000000 22.453735 c
217 | 0.000000 99.453758 l
218 | h
219 | f
220 | n
221 | Q
222 |
223 | endstream
224 | endobj
225 |
226 | 15 0 obj
227 | 575
228 | endobj
229 |
230 | 16 0 obj
231 | << /Annots []
232 | /Type /Page
233 | /MediaBox [ 0.000000 0.000000 1280.000000 100.000000 ]
234 | /Resources 13 0 R
235 | /Contents 14 0 R
236 | /Parent 17 0 R
237 | >>
238 | endobj
239 |
240 | 17 0 obj
241 | << /Kids [ 16 0 R ]
242 | /Count 1
243 | /Type /Pages
244 | >>
245 | endobj
246 |
247 | 18 0 obj
248 | << /Type /Catalog
249 | /Pages 17 0 R
250 | >>
251 | endobj
252 |
253 | xref
254 | 0 19
255 | 0000000000 65535 f
256 | 0000000010 00000 n
257 | 0000000533 00000 n
258 | 0000000555 00000 n
259 | 0000001075 00000 n
260 | 0000001097 00000 n
261 | 0000001393 00000 n
262 | 0000001415 00000 n
263 | 0000002761 00000 n
264 | 0000002783 00000 n
265 | 0000003080 00000 n
266 | 0000003103 00000 n
267 | 0000004406 00000 n
268 | 0000004429 00000 n
269 | 0000006206 00000 n
270 | 0000006839 00000 n
271 | 0000006862 00000 n
272 | 0000007042 00000 n
273 | 0000007118 00000 n
274 | trailer
275 | << /ID [ (some) (id) ]
276 | /Root 18 0 R
277 | /Size 19
278 | >>
279 | startxref
280 | 7179
281 | %%EOF
--------------------------------------------------------------------------------