Skip to content

Commit

Permalink
Update app formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
aheze committed Jul 9, 2022
1 parent 231b027 commit 8f6f6e3
Show file tree
Hide file tree
Showing 12 changed files with 110 additions and 116 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,18 @@
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>3C08D429286A3F160068FA83</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>3C08D43F286A3F3D0068FA83</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
11 changes: 1 addition & 10 deletions Sources/Multiliner/Assets.xcassets/Banner.imageset/Contents.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,7 @@
"images" : [
{
"filename" : "Banner.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
"idiom" : "universal"
}
],
"info" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,7 @@
"images" : [
{
"filename" : "Preferences.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
"idiom" : "universal"
}
],
"info" : {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,7 @@
"images" : [
{
"filename" : "UsageCode.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
"idiom" : "universal"
}
],
"info" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,7 @@
"images" : [
{
"filename" : "UsageMenu.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
"idiom" : "universal"
}
],
"info" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,7 @@
"images" : [
{
"filename" : "UsageResult.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
"idiom" : "universal"
}
],
"info" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,7 @@
"images" : [
{
"filename" : "UsageShortcut.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
"idiom" : "universal"
}
],
"info" : {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
145 changes: 91 additions & 54 deletions Sources/Multiliner/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,80 +11,104 @@ import SwiftUI
struct ContentView: View {
var body: some View {
ScrollView {
VStack(alignment: .leading) {
VStack(alignment: .leading, spacing: 20) {
Image("Banner")
.resizable()
.aspectRatio(contentMode: .fit)

Text("Multiliner")
.font(.largeTitle)
.bold()

Text("An Xcode source extension to expand lengthy lines.")
.font(.title)
.fontWeight(.medium)
.foregroundColor(.secondary)

Divider()

Group {
Text("Installation")
.font(.title2)

VStack(alignment: .leading, spacing: 6) {
Text("Multiliner")
.font(.largeTitle)
.bold()

Text("Now that you have the app installed, just head over to System Preferences and check `MultilinerExtension`.")
.font(.title3)

Image("Preferences")
.resizable()
.aspectRatio(contentMode: .fit)

Text("An Xcode source extension to expand lengthy lines.")
.font(.title)
.fontWeight(.medium)
.foregroundColor(.secondary)
}

Group {
Group {
Text("Usage")

Divider()

VStack(alignment: .leading) {
VStack(alignment: .leading) {
Text("Installation")
.font(.title2)
.bold()

Text("1. Select some code in Xcode. Make sure to include the opening and closing braces.")
Text("Now that you have the app installed, just head over to System Preferences and check `Multiliner`.")
.font(.title3)

Image("UsageCode")
.resizable()
.aspectRatio(contentMode: .fit)
}

Spacer().frame(height: 25)
Screenshot(image: "Preferences")

Group {
Text("2. Then, go to Editor → Multiliner → Format Selected Code. Your code will get reformatted!")
.font(.title3)

HStack {
Image("UsageMenu")
.resizable()
.aspectRatio(contentMode: .fit)

Image("UsageResult")
Text("System Preferences → Extensions → Xcode Source Editor")
.font(.caption)
.textCase(.uppercase)
}

VStack(alignment: .leading, spacing: 20) {
VStack(alignment: .leading) {
Text("Usage")
.font(.title2)
.bold()

Text("1. Select some code in Xcode. Make sure to include the opening and closing braces.")
.font(.title3)

Image("UsageCode")
.resizable()
.aspectRatio(contentMode: .fit)
}
}

Spacer().frame(height: 25)
VStack(alignment: .leading) {
Text("2. Then, go to Editor → Multiliner → Format Selected Code. Your code will get reformatted!")
.font(.title3)

HStack(alignment: .top) {
Image("UsageMenu")
.resizable()
.aspectRatio(contentMode: .fit)
.cornerRadius(8)
.shadow(
color: .black.opacity(0.25),
radius: 16,
x: 0,
y: 2
)

Image("UsageResult")
.resizable()
.aspectRatio(contentMode: .fit)
.cornerRadius(8)
.shadow(
color: .black.opacity(0.25),
radius: 16,
x: 0,
y: 2
)
}
}

Group {
Text("3. To make this extension easier to reach, consider adding a shortcut in Xcode's Key Bindings.")
.font(.title3)

Image("UsageShortcut")
.resizable()
.aspectRatio(contentMode: .fit)
VStack(alignment: .leading) {
Text("3. To make this extension easier to reach, consider adding a shortcut in Xcode's Key Bindings.")
.font(.title3)

Screenshot(image: "UsageShortcut")

Text("Xcode → Preferences → Key Bindings")
.font(.caption)
.textCase(.uppercase)
}
}
}

Divider()

Text("That's it! If you have any questions or suggestions, feel free to ping me on Twitter ([@aheze0](https://twitter.com/aheze0)), join the [Discord](https://discord.gg/Pmq8fYcus2), or [open an issue](https://github.com/aheze/Multiliner/issues).")
}
.frame(maxWidth: 800)
.padding(.horizontal, 64)
.padding(.vertical, 32)
.frame(maxWidth: .infinity)
}
.frame(
minWidth: 400,
Expand Down Expand Up @@ -118,6 +142,19 @@ struct ContentView: View {
}
}

struct Screenshot: View {
var image: String
var body: some View {
Image(image)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(maxWidth: 600)
.padding(.horizontal, -42)
.padding(.top, -20)
.padding(.bottom, -40)
}
}

struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
Expand Down

0 comments on commit 8f6f6e3

Please sign in to comment.