Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
Material
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
Material
Commits
58f7f5d2
Commit
58f7f5d2
authored
Sep 04, 2015
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added thin and bold fonts with updated interface
parent
144898ad
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
98 additions
and
9 deletions
+98
-9
MaterialKit.xcodeproj/project.pbxproj
+8
-0
Source/BasicCardView.swift
+2
-2
Source/ImageCardView.swift
+2
-2
Source/Info.plist
+4
-2
Source/MaterialTheme.swift
+16
-1
Source/Roboto-Bold.ttf
+0
-0
Source/Roboto-Thin.ttf
+0
-0
Source/Roboto.swift
+66
-2
No files found.
MaterialKit.xcodeproj/project.pbxproj
View file @
58f7f5d2
...
@@ -13,6 +13,8 @@
...
@@ -13,6 +13,8 @@
657CD02F1B8EE0D3008C0029
/* ImageCardView.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9A94D10A1B8A485C00F586A5
/* ImageCardView.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
657CD02F1B8EE0D3008C0029
/* ImageCardView.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9A94D10A1B8A485C00F586A5
/* ImageCardView.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
65B9657E1B8A7C330055B139
/* MaterialButton.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
65B9657D1B8A7C330055B139
/* MaterialButton.swift */
;
};
65B9657E1B8A7C330055B139
/* MaterialButton.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
65B9657D1B8A7C330055B139
/* MaterialButton.swift */
;
};
65B965871B8BEEC60055B139
/* SideNavController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
65B965861B8BEEC60055B139
/* SideNavController.swift */
;
};
65B965871B8BEEC60055B139
/* SideNavController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
65B965861B8BEEC60055B139
/* SideNavController.swift */
;
};
65DBE4201B9A9244000C804F
/* Roboto-Bold.ttf in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
65DBE41E1B9A9244000C804F
/* Roboto-Bold.ttf */
;
};
65DBE4211B9A9244000C804F
/* Roboto-Thin.ttf in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
65DBE41F1B9A9244000C804F
/* Roboto-Thin.ttf */
;
};
963832421B88DFD80015F710
/* MaterialKit.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
963832361B88DFD80015F710
/* MaterialKit.framework */
;
};
963832421B88DFD80015F710
/* MaterialKit.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
963832361B88DFD80015F710
/* MaterialKit.framework */
;
};
9638325A1B88E31A0015F710
/* MaterialKitTests.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
963832581B88E31A0015F710
/* MaterialKitTests.swift */
;
};
9638325A1B88E31A0015F710
/* MaterialKitTests.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
963832581B88E31A0015F710
/* MaterialKitTests.swift */
;
};
963832691B88E5BF0015F710
/* Capture.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9638325E1B88E5BF0015F710
/* Capture.swift */
;
};
963832691B88E5BF0015F710
/* Capture.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9638325E1B88E5BF0015F710
/* Capture.swift */
;
};
...
@@ -60,6 +62,8 @@
...
@@ -60,6 +62,8 @@
/* Begin PBXFileReference section */
/* Begin PBXFileReference section */
65B9657D1B8A7C330055B139
/* MaterialButton.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialButton.swift
;
sourceTree
=
"<group>"
;
};
65B9657D1B8A7C330055B139
/* MaterialButton.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialButton.swift
;
sourceTree
=
"<group>"
;
};
65B965861B8BEEC60055B139
/* SideNavController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
SideNavController.swift
;
sourceTree
=
"<group>"
;
};
65B965861B8BEEC60055B139
/* SideNavController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
SideNavController.swift
;
sourceTree
=
"<group>"
;
};
65DBE41E1B9A9244000C804F
/* Roboto-Bold.ttf */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file
;
path
=
"Roboto-Bold.ttf"
;
sourceTree
=
"<group>"
;
};
65DBE41F1B9A9244000C804F
/* Roboto-Thin.ttf */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file
;
path
=
"Roboto-Thin.ttf"
;
sourceTree
=
"<group>"
;
};
963832361B88DFD80015F710
/* MaterialKit.framework */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.framework
;
includeInIndex
=
0
;
path
=
MaterialKit.framework
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
963832361B88DFD80015F710
/* MaterialKit.framework */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.framework
;
includeInIndex
=
0
;
path
=
MaterialKit.framework
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
963832411B88DFD80015F710
/* MaterialKitTests.xctest */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.cfbundle
;
includeInIndex
=
0
;
path
=
MaterialKitTests.xctest
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
963832411B88DFD80015F710
/* MaterialKitTests.xctest */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.cfbundle
;
includeInIndex
=
0
;
path
=
MaterialKitTests.xctest
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
963832541B88E30F0015F710
/* Info.plist */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text.plist.xml
;
path
=
Info.plist
;
sourceTree
=
"<group>"
;
};
963832541B88E30F0015F710
/* Info.plist */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text.plist.xml
;
path
=
Info.plist
;
sourceTree
=
"<group>"
;
};
...
@@ -239,6 +243,8 @@
...
@@ -239,6 +243,8 @@
9AAC38521B89553800FE6B2D
/* Font */
=
{
9AAC38521B89553800FE6B2D
/* Font */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
65DBE41E1B9A9244000C804F
/* Roboto-Bold.ttf */
,
65DBE41F1B9A9244000C804F
/* Roboto-Thin.ttf */
,
9AAC38591B8956E300FE6B2D
/* Roboto-Regular.ttf */
,
9AAC38591B8956E300FE6B2D
/* Roboto-Regular.ttf */
,
9AAC38571B8956CF00FE6B2D
/* Roboto-Medium.ttf */
,
9AAC38571B8956CF00FE6B2D
/* Roboto-Medium.ttf */
,
9AAC38551B8956C500FE6B2D
/* Roboto-Light.ttf */
,
9AAC38551B8956C500FE6B2D
/* Roboto-Light.ttf */
,
...
@@ -354,6 +360,8 @@
...
@@ -354,6 +360,8 @@
files
=
(
files
=
(
9A94D0FA1B895EA500F586A5
/* LICENSE in Resources */
,
9A94D0FA1B895EA500F586A5
/* LICENSE in Resources */
,
9A94D0FB1B895EA500F586A5
/* Roboto-Regular.ttf in Resources */
,
9A94D0FB1B895EA500F586A5
/* Roboto-Regular.ttf in Resources */
,
65DBE4211B9A9244000C804F
/* Roboto-Thin.ttf in Resources */
,
65DBE4201B9A9244000C804F
/* Roboto-Bold.ttf in Resources */
,
9A94D0FC1B895EA500F586A5
/* Roboto-Medium.ttf in Resources */
,
9A94D0FC1B895EA500F586A5
/* Roboto-Medium.ttf in Resources */
,
9A94D0FD1B895EA500F586A5
/* Roboto-Light.ttf in Resources */
,
9A94D0FD1B895EA500F586A5
/* Roboto-Light.ttf in Resources */
,
);
);
...
...
Source/BasicCardView.swift
View file @
58f7f5d2
...
@@ -32,12 +32,12 @@ public class BasicCardView : MaterialCardView, Comparable, Equatable {
...
@@ -32,12 +32,12 @@ public class BasicCardView : MaterialCardView, Comparable, Equatable {
/**
/**
:name: verticalSpace
:name: verticalSpace
*/
*/
public
var
verticalSpace
:
CGFloat
=
8
public
var
verticalSpace
:
CGFloat
=
MaterialTheme
.
verticalSpace
/**
/**
:name: horizontalSpace
:name: horizontalSpace
*/
*/
public
var
horizontalSpace
:
CGFloat
=
8
public
var
horizontalSpace
:
CGFloat
=
MaterialTheme
.
horizontalSpace
/**
/**
:name: titleLabelContainer
:name: titleLabelContainer
...
...
Source/ImageCardView.swift
View file @
58f7f5d2
...
@@ -32,12 +32,12 @@ public class ImageCardView : MaterialCardView, Comparable, Equatable {
...
@@ -32,12 +32,12 @@ public class ImageCardView : MaterialCardView, Comparable, Equatable {
/**
/**
:name: verticalSpace
:name: verticalSpace
*/
*/
public
var
verticalSpace
:
CGFloat
=
8
public
var
verticalSpace
:
CGFloat
=
MaterialTheme
.
verticalSpace
/**
/**
:name: horizontalSpace
:name: horizontalSpace
*/
*/
public
var
horizontalSpace
:
CGFloat
=
8
public
var
horizontalSpace
:
CGFloat
=
MaterialTheme
.
horizontalSpace
/**
/**
:name: shadow
:name: shadow
...
...
Source/Info.plist
View file @
58f7f5d2
...
@@ -24,9 +24,11 @@
...
@@ -24,9 +24,11 @@
<
string
><
/string
>
<
string
><
/string
>
<
k
e
y
>
UIAppFonts
<
/k
e
y
>
<
k
e
y
>
UIAppFonts
<
/k
e
y
>
<
a
rr
a
y
>
<
a
rr
a
y
>
<
string
>
Roboto-Medium.ttf
<
/string
>
<
string
>
Roboto-Thin
<
/string
>
<
string
>
Roboto-Regular.ttf
<
/string
>
<
string
>
Roboto-Light.ttf
<
/string
>
<
string
>
Roboto-Light.ttf
<
/string
>
<
string
>
Roboto-Regular.ttf
<
/string
>
<
string
>
Roboto-Medium.ttf
<
/string
>
<
string
>
Roboto-Bold
<
/string
>
<
/
a
rr
a
y
>
<
/
a
rr
a
y
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/plist
>
<
/plist
>
Source/MaterialTheme.swift
View file @
58f7f5d2
...
@@ -18,7 +18,10 @@
...
@@ -18,7 +18,10 @@
import
UIKit
import
UIKit
public
struct
MaterialTheme
{
public
struct
MaterialTheme
{}
// colors
extension
MaterialTheme
{
// clear
// clear
public
struct
clear
{
public
struct
clear
{
public
static
let
color
:
UIColor
=
UIColor
.
clearColor
()
public
static
let
color
:
UIColor
=
UIColor
.
clearColor
()
...
@@ -366,3 +369,14 @@ public struct MaterialTheme {
...
@@ -366,3 +369,14 @@ public struct MaterialTheme {
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
38
/
255
,
green
:
50
/
255
,
blue
:
56
/
255
,
alpha
:
1
)
public
static
let
darken4
:
UIColor
=
UIColor
(
red
:
38
/
255
,
green
:
50
/
255
,
blue
:
56
/
255
,
alpha
:
1
)
}
}
}
}
// spacing
extension
MaterialTheme
{
public
static
var
verticalSpace
:
CGFloat
=
16
public
static
var
horizontalSpace
:
CGFloat
=
16
}
// fonts
extension
MaterialTheme
{
public
static
var
textFontSize
:
CGFloat
=
16
}
\ No newline at end of file
Source/Roboto-Bold.ttf
0 → 100644
View file @
58f7f5d2
File added
Source/Roboto-Thin.ttf
0 → 100644
View file @
58f7f5d2
File added
Source/Roboto.swift
View file @
58f7f5d2
...
@@ -19,24 +19,88 @@
...
@@ -19,24 +19,88 @@
import
UIKit
import
UIKit
public
struct
Roboto
{
public
struct
Roboto
{
/**
:name: thin
*/
public
static
var
thin
:
UIFont
{
return
thinWithSize
(
MaterialTheme
.
textFontSize
)
}
/**
:name: thinWithSize
*/
public
static
func
thinWithSize
(
size
:
CGFloat
)
->
UIFont
{
if
let
f
=
UIFont
(
name
:
"Roboto-Thin"
,
size
:
size
)
{
return
f
}
return
UIFont
.
systemFontOfSize
(
size
)
}
/**
:name: light
*/
public
static
var
light
:
UIFont
{
return
lightWithSize
(
MaterialTheme
.
textFontSize
)
}
/**
:name: lightWithSize
*/
public
static
func
lightWithSize
(
size
:
CGFloat
)
->
UIFont
{
public
static
func
lightWithSize
(
size
:
CGFloat
)
->
UIFont
{
if
let
f
=
UIFont
(
name
:
"Roboto-Light"
,
size
:
size
)
{
if
let
f
=
UIFont
(
name
:
"Roboto-Light"
,
size
:
size
)
{
return
f
return
f
}
}
return
UIFont
.
systemFontOfSize
(
size
)
return
UIFont
.
systemFontOfSize
(
size
)
}
}
/**
:name: regular
*/
public
static
var
regular
:
UIFont
{
return
regularWithSize
(
MaterialTheme
.
textFontSize
)
}
/**
:name: mediumWithSize
*/
public
static
func
mediumWithSize
(
size
:
CGFloat
)
->
UIFont
{
public
static
func
mediumWithSize
(
size
:
CGFloat
)
->
UIFont
{
if
let
f
=
UIFont
(
name
:
"Roboto-Medium"
,
size
:
size
)
{
if
let
f
=
UIFont
(
name
:
"Roboto-Medium"
,
size
:
size
)
{
return
f
return
f
}
}
return
UIFont
.
systemFontOfSize
(
size
)
return
UIFont
.
systemFontOfSize
(
size
)
}
}
/**
:name: medium
*/
public
static
var
medium
:
UIFont
{
return
mediumWithSize
(
MaterialTheme
.
textFontSize
)
}
/**
:name: regularWithSize
*/
public
static
func
regularWithSize
(
size
:
CGFloat
)
->
UIFont
{
public
static
func
regularWithSize
(
size
:
CGFloat
)
->
UIFont
{
if
let
f
=
UIFont
(
name
:
"Roboto-Regular"
,
size
:
size
)
{
if
let
f
=
UIFont
(
name
:
"Roboto-Regular"
,
size
:
size
)
{
return
f
return
f
}
}
return
UIFont
.
systemFontOfSize
(
size
)
return
UIFont
.
systemFontOfSize
(
size
)
}
}
/**
:name: bold
*/
public
static
var
bold
:
UIFont
{
return
boldWithSize
(
MaterialTheme
.
textFontSize
)
}
/**
:name: boldWithSize
*/
public
static
func
boldWithSize
(
size
:
CGFloat
)
->
UIFont
{
if
let
f
=
UIFont
(
name
:
"Roboto-Regular"
,
size
:
size
)
{
return
f
}
return
UIFont
.
systemFontOfSize
(
size
)
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment