auther 7.1.0 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +1 -0
- data.tar.gz.sig +1 -0
- data/README.md +64 -69
- data/app/assets/stylesheets/auther/application.scss +0 -3
- data/app/assets/stylesheets/auther/auther.scss +70 -58
- data/app/views/auther/session/new.html.slim +14 -17
- data/lib/auther/engine.rb +0 -3
- data/lib/auther/identity.rb +1 -1
- data/lib/generators/auther/templates/config/initializers/auther.rb +2 -2
- metadata +54 -53
- metadata.gz.sig +3 -0
- data/bin/rails +0 -7
- data/vendor/assets/stylesheets/bitters/_base.scss +0 -10
- data/vendor/assets/stylesheets/bitters/_buttons.scss +0 -35
- data/vendor/assets/stylesheets/bitters/_forms.scss +0 -90
- data/vendor/assets/stylesheets/bitters/_grid-settings.scss +0 -14
- data/vendor/assets/stylesheets/bitters/_typography.scss +0 -49
- data/vendor/assets/stylesheets/bitters/_variables.scss +0 -42
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9b255589ee50005b28e3d71d9af78bdea017cafd
|
|
4
|
+
data.tar.gz: 8011faaa46c102996f969a9804bee444c0b2fe96
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ca2c0e51984a53536a86208352caed9fefe5597599bf4842e6a417eca272c8ef736f14908591e737c38924ae7ac036efe1c59a3ee935390a653bede8d05aae48
|
|
7
|
+
data.tar.gz: 7239e284321dcee0a61977875b5133282d8b6a2bc47071e13d503296b1b6888915867bca0c9b3a6f72c3c420f5caf0cf664b9f25b954a83526e3f6a9ee66ee35
|
checksums.yaml.gz.sig
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
�{�Ѳ��=��V�X��~/so�f��$�<�|˂d�����ម}����������j�Ƃ&����5�#x�I>-��Ǔ�2=^��$fw��[��D�:�[Ak�p��������I��o�����<�+Mk�n�����Ag����H,t�.����'?�Yϡ�(���y�;��A�u�"E��c �zn�r^G�������^<i���}��Կ���)]��.�:&+���\��/Hj�ǖ��5�T
|
data.tar.gz.sig
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
�VTo��NN��v�.���Փ�����W'�����s�ż?���1�M�����i�iB�f�����撟0�EGSɂ� �OL�>j��p�9q�������[�X^>%���*\;ѯꆷ�v�R��e��o�G����"��(zM1�~`{l4�0�&�ŧ墸+��1�_%nek +Zn"D.0����0�(u��
|
data/README.md
CHANGED
|
@@ -4,68 +4,62 @@
|
|
|
4
4
|
[](https://codeclimate.com/github/bkuhlmann/auther)
|
|
5
5
|
[](https://codeclimate.com/github/bkuhlmann/auther)
|
|
6
6
|
[](https://gemnasium.com/bkuhlmann/auther)
|
|
7
|
-
[](https://circleci.com/gh/bkuhlmann/auther)
|
|
8
8
|
[](https://www.patreon.com/bkuhlmann)
|
|
9
9
|
|
|
10
10
|
Provides simple, form-based authentication for apps that need security but don't want to deal with
|
|
11
11
|
the clunky UI of HTTP Basic Authentication or something as heavyweight as
|
|
12
12
|
[Devise](https://github.com/plataformatec/devise). It doesn't require a database and is compatible
|
|
13
|
-
with password managers like [1Password](https://agilebits.com/onepassword) making for a
|
|
13
|
+
with password managers like [1Password](https://agilebits.com/onepassword) making for a pleasant
|
|
14
14
|
user experience.
|
|
15
15
|
|
|
16
16
|
<!-- Tocer[start]: Auto-generated, don't remove. -->
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
- [Features](#features)
|
|
21
|
-
- [Requirements](#requirements)
|
|
22
|
-
- [Setup](#setup)
|
|
23
|
-
- [Usage](#usage)
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
- [Tests](#tests)
|
|
33
|
-
- [Versioning](#versioning)
|
|
34
|
-
- [Code of Conduct](#code-of-conduct)
|
|
35
|
-
- [Contributions](#contributions)
|
|
36
|
-
- [License](#license)
|
|
37
|
-
- [History](#history)
|
|
38
|
-
- [Credits](#credits)
|
|
18
|
+
## Table of Contents
|
|
19
|
+
|
|
20
|
+
- [Features](#features)
|
|
21
|
+
- [Requirements](#requirements)
|
|
22
|
+
- [Setup](#setup)
|
|
23
|
+
- [Usage](#usage)
|
|
24
|
+
- [Initializer](#initializer)
|
|
25
|
+
- [Routes](#routes)
|
|
26
|
+
- [Model](#model)
|
|
27
|
+
- [Presenter](#presenter)
|
|
28
|
+
- [View](#view)
|
|
29
|
+
- [Controller](#controller)
|
|
30
|
+
- [Logging](#logging)
|
|
31
|
+
- [Troubleshooting](#troubleshooting)
|
|
32
|
+
- [Tests](#tests)
|
|
33
|
+
- [Versioning](#versioning)
|
|
34
|
+
- [Code of Conduct](#code-of-conduct)
|
|
35
|
+
- [Contributions](#contributions)
|
|
36
|
+
- [License](#license)
|
|
37
|
+
- [History](#history)
|
|
38
|
+
- [Credits](#credits)
|
|
39
39
|
|
|
40
40
|
<!-- Tocer[finish]: Auto-generated, don't remove. -->
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
## Features
|
|
43
43
|
|
|
44
44
|
- Supports form-based authentication compatible with password managers like
|
|
45
45
|
[1Password](https://agilebits.com/onepassword).
|
|
46
46
|
|
|
47
|
-
[](https://github.com/bkuhlmann/auther)
|
|
48
|
+
[](https://github.com/bkuhlmann/auther)
|
|
49
49
|
|
|
50
|
-
-
|
|
51
|
-
|
|
52
|
-
[](https://github.com/bkuhlmann/auther)
|
|
53
|
-
[](https://github.com/bkuhlmann/auther)
|
|
54
|
-
|
|
55
|
-
- Uses [Bourbon](http://bourbon.io), [Neat](http://neat.bourbon.io), and
|
|
56
|
-
[Bitters](http://bitters.bourbon.io) for lightweight styling.
|
|
50
|
+
- Uses CSS Flexbox for lightweight styling.
|
|
57
51
|
- Uses encrypted account credentials to keep sensitive information secure.
|
|
58
52
|
- Supports multiple accounts with account specific blacklists.
|
|
59
53
|
- Supports customizable routes, models, presenters, views, controllers, and loggers.
|
|
60
54
|
- Provides a generator for easy install and setup within an existing project.
|
|
61
55
|
- Provides auto-redirection to requested path for verified credentials.
|
|
62
56
|
|
|
63
|
-
|
|
57
|
+
## Requirements
|
|
64
58
|
|
|
65
59
|
0. [Ruby 2.4.x](https://www.ruby-lang.org).
|
|
66
60
|
0. [Ruby on Rails 5.x.x](http://rubyonrails.org).
|
|
67
61
|
|
|
68
|
-
|
|
62
|
+
## Setup
|
|
69
63
|
|
|
70
64
|
For a secure install, type the following from the command line (recommended):
|
|
71
65
|
|
|
@@ -88,14 +82,14 @@ Run the generator to configure and initialize your application:
|
|
|
88
82
|
|
|
89
83
|
rails generate auther:install
|
|
90
84
|
|
|
91
|
-
|
|
85
|
+
## Usage
|
|
92
86
|
|
|
93
|
-
Assuming you are using
|
|
94
|
-
|
|
87
|
+
Assuming you are using something like [direnv](https://direnv.net), add the following to your `.env`
|
|
88
|
+
file:
|
|
95
89
|
|
|
96
|
-
AUTHER_SECRET
|
|
97
|
-
AUTHER_ADMIN_LOGIN=
|
|
98
|
-
AUTHER_ADMIN_PASSWORD=
|
|
90
|
+
AUTHER_SECRET=281047a438dcd3f1f1401954d779025e496dc938ba79703bcf6ca0605ca350e7
|
|
91
|
+
AUTHER_ADMIN_LOGIN=V0lMaDFBK2o3SngvSHUySUZOYVJ3dC82QmlQaDRWcUhKOEFkUjFsYkF3ND0tLXpMZDBhdCtJaHVsVnpWNkFWVWUxVVE9PQ==--d8595331720f8475090763d5a3a3103b3f6a9259
|
|
92
|
+
AUTHER_ADMIN_PASSWORD=Tk05VzlWNTdoQW5sbEtzWlA5T25VVHRFb3FkS0xGbjA2ZVU5bjVqN3RHST0tLVBOaVcyWnp3ZFY5ais0eWtrNXhobXc9PQ==--a83d6d7644085a972d847181b5f486bf245fd16b
|
|
99
93
|
|
|
100
94
|
Launch your Rails application and visit the following:
|
|
101
95
|
|
|
@@ -106,7 +100,9 @@ Use these credentials to login:
|
|
|
106
100
|
- Login: test@test.com
|
|
107
101
|
- Password: nevermore
|
|
108
102
|
|
|
109
|
-
|
|
103
|
+
That's it, you'll be logged in at this point.
|
|
104
|
+
|
|
105
|
+
### Initializer
|
|
110
106
|
|
|
111
107
|
The initializer (installed during setup) can be found here:
|
|
112
108
|
|
|
@@ -115,22 +111,23 @@ The initializer (installed during setup) can be found here:
|
|
|
115
111
|
The initializer comes installed with the following settings:
|
|
116
112
|
|
|
117
113
|
Rails.application.config.auther_settings = {
|
|
118
|
-
secret: ENV["AUTHER_SECRET"],
|
|
119
114
|
accounts: [
|
|
120
115
|
name: "admin",
|
|
121
116
|
encrypted_login: ENV["AUTHER_ADMIN_LOGIN"],
|
|
122
117
|
encrypted_password: ENV["AUTHER_ADMIN_PASSWORD"],
|
|
123
118
|
paths: ["/admin"]
|
|
124
|
-
]
|
|
119
|
+
],
|
|
120
|
+
secret: [ENV["AUTHER_SECRET"]].pack("H*")
|
|
125
121
|
}
|
|
126
122
|
|
|
127
|
-
**IMPORTANT**: The encrypted secret, login, and password
|
|
128
|
-
|
|
129
|
-
a rails console and run the following:
|
|
123
|
+
**IMPORTANT**: The encrypted secret, login, and password used in the `.env` setup above must be
|
|
124
|
+
unique and re-encrypted before deploying to production (don't use the provided examples)! To
|
|
125
|
+
encrypt/decrypt account credentials, launch a rails console and run the following:
|
|
130
126
|
|
|
131
|
-
# Best
|
|
132
|
-
#
|
|
133
|
-
|
|
127
|
+
# Best if generated via `SecureRandom.hex 32`. Exactly `32` bytes is required or you'll
|
|
128
|
+
# get a `ArgumentError: key must be 32 bytes`. Must be equal to the secret as defined in
|
|
129
|
+
# `auther_settings`.
|
|
130
|
+
cipher = Auther::Cipher.new "f106a7169a5cfb90f016105b31b595282011a1090d843b7868103c770e35e38e"
|
|
134
131
|
|
|
135
132
|
# Do this to encrypt an unecrypted value.
|
|
136
133
|
cipher.encrypt "test@test.com"
|
|
@@ -162,7 +159,7 @@ The initializer can be customized as follows:
|
|
|
162
159
|
- *logger* - Optional. The logger used to log path/account authorization messages. Default:
|
|
163
160
|
`Auther::NullLogger`.
|
|
164
161
|
|
|
165
|
-
|
|
162
|
+
### Routes
|
|
166
163
|
|
|
167
164
|
The routes can be customized as follows (installed, by default, via the install generator):
|
|
168
165
|
|
|
@@ -172,31 +169,31 @@ The routes can be customized as follows (installed, by default, via the install
|
|
|
172
169
|
delete "/logout", to: "auther/session#destroy", as: "logout"
|
|
173
170
|
end
|
|
174
171
|
|
|
175
|
-
|
|
172
|
+
### Model
|
|
176
173
|
|
|
177
174
|
The [Auther::Account](app/models/auther/account.rb) is a plain old Ruby object that uses ActiveModel
|
|
178
175
|
validations to aid in attribute validation. This model could potentially be replaced with a
|
|
179
176
|
database-backed object (would require controller customization)...but you should question if you
|
|
180
177
|
have outgrown the use of this gem and need a different solution altogether if it comes to that.
|
|
181
178
|
|
|
182
|
-
|
|
179
|
+
### Presenter
|
|
183
180
|
|
|
184
181
|
The [Auther::Presenter::Account](app/presenters/auther/account.rb) is a plain old Ruby object that
|
|
185
182
|
uses ActiveModel validations to aid in form validation. This presenter makes it easy to construct
|
|
186
183
|
form data for input and validation.
|
|
187
184
|
|
|
188
|
-
|
|
185
|
+
### View
|
|
189
186
|
|
|
190
187
|
The view can be customized by creating the following file within your Rails application (assumes
|
|
191
188
|
that the default Auther::SessionController implementation is sufficient):
|
|
192
189
|
|
|
193
190
|
app/views/auther/session/new.html
|
|
194
191
|
|
|
195
|
-
The form uses `@account` instance variable which is an instance of the
|
|
196
|
-
presenter (as mentioned above). The form can be stylized by
|
|
197
|
-
|
|
192
|
+
The form uses the `@account` instance variable which is an instance of the
|
|
193
|
+
Auther::Presenter::Account presenter (as mentioned above). The form can be stylized by modifying the
|
|
194
|
+
styles found in the [auther.scss](app/assets/stylesheets/auther/auther.scss) stylesheet.
|
|
198
195
|
|
|
199
|
-
|
|
196
|
+
### Controller
|
|
200
197
|
|
|
201
198
|
The [Auther::SessionController](app/controllers/auther/session_controller.rb) inherits from the
|
|
202
199
|
[Auther::BaseController](app/controllers/auther/base_controller.rb). To customize, it is recommended
|
|
@@ -211,7 +208,7 @@ This allows customization of session controller behavior to serve any special bu
|
|
|
211
208
|
the `Auther::BaseController` for additional details or the `Auther::SessionController` for default
|
|
212
209
|
implementation.
|
|
213
210
|
|
|
214
|
-
|
|
211
|
+
### Logging
|
|
215
212
|
|
|
216
213
|
As mentioned in the setup above, the logger can be customized as follows:
|
|
217
214
|
|
|
@@ -227,10 +224,8 @@ debug custom Auther settings:
|
|
|
227
224
|
- Account authentication pass/fail.
|
|
228
225
|
- Account and path authorization pass/fail.
|
|
229
226
|
|
|
230
|
-
|
|
227
|
+
### Troubleshooting
|
|
231
228
|
|
|
232
|
-
- With Ruby 2.4.0, it's imporant that the secret is generated via `SecureRandom.random_bytes`. Use
|
|
233
|
-
`32` bytes or higher for a secure secret.
|
|
234
229
|
- If upgrading Rails, changing the cookie/session settings, generating a new secret base key, etc.
|
|
235
230
|
this might cause Auther authentication to fail. Make sure to clear your browser cookies in this
|
|
236
231
|
situation or use Google Chrome (incognito mode) to verify.
|
|
@@ -241,13 +236,13 @@ debug custom Auther settings:
|
|
|
241
236
|
you have customized this to something else, you might want to read the usage documentation
|
|
242
237
|
(mentioned above) to rebuild the authentication view/form for your specific business needs.
|
|
243
238
|
|
|
244
|
-
|
|
239
|
+
## Tests
|
|
245
240
|
|
|
246
241
|
To test, run:
|
|
247
242
|
|
|
248
243
|
bundle exec rake
|
|
249
244
|
|
|
250
|
-
|
|
245
|
+
## Versioning
|
|
251
246
|
|
|
252
247
|
Read [Semantic Versioning](http://semver.org) for details. Briefly, it means:
|
|
253
248
|
|
|
@@ -255,26 +250,26 @@ Read [Semantic Versioning](http://semver.org) for details. Briefly, it means:
|
|
|
255
250
|
- Minor (x.Y.z) - Incremented for new, backwards compatible, public API enhancements/fixes.
|
|
256
251
|
- Patch (x.y.Z) - Incremented for small, backwards compatible, bug fixes.
|
|
257
252
|
|
|
258
|
-
|
|
253
|
+
## Code of Conduct
|
|
259
254
|
|
|
260
255
|
Please note that this project is released with a [CODE OF CONDUCT](CODE_OF_CONDUCT.md). By
|
|
261
256
|
participating in this project you agree to abide by its terms.
|
|
262
257
|
|
|
263
|
-
|
|
258
|
+
## Contributions
|
|
264
259
|
|
|
265
260
|
Read [CONTRIBUTING](CONTRIBUTING.md) for details.
|
|
266
261
|
|
|
267
|
-
|
|
262
|
+
## License
|
|
268
263
|
|
|
269
264
|
Copyright (c) 2014 [Alchemists](https://www.alchemists.io).
|
|
270
265
|
Read [LICENSE](LICENSE.md) for details.
|
|
271
266
|
|
|
272
|
-
|
|
267
|
+
## History
|
|
273
268
|
|
|
274
269
|
Read [CHANGES](CHANGES.md) for details.
|
|
275
270
|
Built with [Gemsmith](https://github.com/bkuhlmann/gemsmith).
|
|
276
271
|
|
|
277
|
-
|
|
272
|
+
## Credits
|
|
278
273
|
|
|
279
274
|
Developed by [Brooke Kuhlmann](https://www.alchemists.io) at
|
|
280
275
|
[Alchemists](https://www.alchemists.io).
|
|
@@ -1,75 +1,94 @@
|
|
|
1
|
-
$auther-
|
|
2
|
-
$auther-
|
|
3
|
-
$
|
|
1
|
+
$auther-blue-light: hsla(215, 55%, 54%, 1.00);
|
|
2
|
+
$auther-blue-dark: hsla(214, 58%, 38%, 1.00);
|
|
3
|
+
$auther-red: hsla(9, 87%, 54%, 1.00);
|
|
4
|
+
$auther-white: hsla(0, 0%, 100%, 1.00);
|
|
5
|
+
$auther-grey-light: hsla(0, 0%, 65%, 1.00);
|
|
6
|
+
$auther-grey-dark: hsla(240, 1%, 30%, 1.00);
|
|
7
|
+
|
|
8
|
+
$auther-font-family: "Verdana", sans-serif;
|
|
9
|
+
|
|
10
|
+
@mixin border_radius($value: 0.3rem) {
|
|
11
|
+
border-top-left-radius: $value;
|
|
12
|
+
border-top-right-radius: $value;
|
|
13
|
+
border-bottom-right-radius: $value;
|
|
14
|
+
border-bottom-left-radius: $value;
|
|
15
|
+
}
|
|
4
16
|
|
|
5
17
|
.auther-page {
|
|
6
|
-
|
|
18
|
+
display: flex;
|
|
19
|
+
font-family: $auther-font-family;
|
|
7
20
|
}
|
|
8
21
|
|
|
9
|
-
.auther-
|
|
10
|
-
|
|
22
|
+
.auther-body {
|
|
23
|
+
align-content: center;
|
|
24
|
+
display: flex;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
height: 100%;
|
|
27
|
+
width: 100%;
|
|
11
28
|
}
|
|
12
29
|
|
|
13
|
-
.auther-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
@include media($mobile) {
|
|
17
|
-
@include shift(0);
|
|
18
|
-
@include span-columns(4);
|
|
19
|
-
}
|
|
30
|
+
.auther-content {
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
20
33
|
}
|
|
21
34
|
|
|
22
|
-
.auther-
|
|
35
|
+
.auther-label {
|
|
23
36
|
font-size: 2em;
|
|
24
37
|
font-weight: 400;
|
|
25
|
-
margin: 2em 0 1em 0;
|
|
26
38
|
text-align: center;
|
|
27
|
-
@include media($mobile) {
|
|
28
|
-
margin-top: 1em;
|
|
29
|
-
}
|
|
30
39
|
}
|
|
31
40
|
|
|
32
|
-
.auther-form
|
|
33
|
-
|
|
41
|
+
.auther-form {
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-direction: column;
|
|
34
44
|
}
|
|
35
45
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
@include media($mobile) {
|
|
41
|
-
@include span-columns(4 of 4);
|
|
42
|
-
@include omega();
|
|
43
|
-
text-align: center;
|
|
44
|
-
}
|
|
46
|
+
.auther-form-section {
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: column;
|
|
49
|
+
margin: 0 0 0.5rem 0;
|
|
45
50
|
}
|
|
46
51
|
|
|
47
|
-
.auther-form-
|
|
48
|
-
|
|
52
|
+
.auther-form-group {
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: column;
|
|
49
55
|
}
|
|
50
56
|
|
|
51
|
-
.auther-form-
|
|
52
|
-
@
|
|
53
|
-
}
|
|
57
|
+
.auther-form-input {
|
|
58
|
+
@include border_radius();
|
|
54
59
|
|
|
55
|
-
|
|
56
|
-
|
|
60
|
+
color: $auther-grey-dark;
|
|
61
|
+
border: 0.09rem solid $auther-grey-light;
|
|
62
|
+
display: flex;
|
|
63
|
+
font-size: 0.9rem;
|
|
64
|
+
padding: 0.5rem;
|
|
65
|
+
outline: none;
|
|
57
66
|
}
|
|
58
67
|
|
|
59
|
-
.auther-form-
|
|
60
|
-
@include
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
68
|
+
.auther-form-select {
|
|
69
|
+
@include border_radius();
|
|
70
|
+
|
|
71
|
+
background: transparent;
|
|
72
|
+
color: $auther-grey-dark;
|
|
73
|
+
display: flex;
|
|
74
|
+
font-size: 1rem;
|
|
75
|
+
height: 2rem;
|
|
76
|
+
outline: none;
|
|
65
77
|
}
|
|
66
78
|
|
|
67
79
|
.auther-button {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
80
|
+
color: $auther-white;
|
|
81
|
+
cursor: pointer;
|
|
82
|
+
background-color: $auther-blue-light;
|
|
83
|
+
border: none;
|
|
84
|
+
font-size: 1rem;
|
|
85
|
+
padding: 0.5rem;
|
|
86
|
+
margin: 1rem 0 0 0;
|
|
87
|
+
outline: none;
|
|
88
|
+
width: 100%;
|
|
89
|
+
|
|
90
|
+
&:active {
|
|
91
|
+
background-color: $auther-blue-dark;
|
|
73
92
|
}
|
|
74
93
|
}
|
|
75
94
|
|
|
@@ -77,24 +96,17 @@ $mobile: new-breakpoint(max-width 480px 4);
|
|
|
77
96
|
background: $auther-red;
|
|
78
97
|
color: $auther-white;
|
|
79
98
|
display: none;
|
|
80
|
-
padding: 0.3em 0.
|
|
99
|
+
padding: 0.3em 0.7em;
|
|
81
100
|
}
|
|
82
101
|
|
|
83
102
|
.auther-error {
|
|
84
|
-
.auther-form-label {
|
|
85
|
-
color: $auther-red;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.auther-form-group {
|
|
89
|
-
margin-bottom: 0.75em;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
103
|
.auther-form-input {
|
|
93
104
|
border-color: $auther-red;
|
|
94
|
-
|
|
105
|
+
border-bottom-right-radius: 0;
|
|
106
|
+
border-bottom-left-radius: 0;
|
|
95
107
|
}
|
|
96
108
|
|
|
97
109
|
.auther-error-message {
|
|
98
|
-
display:
|
|
110
|
+
display: flex;
|
|
99
111
|
}
|
|
100
112
|
}
|
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
- content_for(:title) { @title }
|
|
2
2
|
|
|
3
3
|
.auther-page
|
|
4
|
-
.auther-
|
|
5
|
-
|
|
4
|
+
.auther-body
|
|
5
|
+
.auther-content
|
|
6
|
+
h1.auther-label = "Authorization"
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
small.auther-error-message = @account.error_message(:login)
|
|
8
|
+
= form_for @account, as: :account, url: "/auther/session", html: {class: "auther-form"} do |form|
|
|
9
|
+
div class=%(auther-form-section #{"auther-error" if @account.error?(:login)})
|
|
10
|
+
.auther-form-group
|
|
11
|
+
= form.text_field :login, class: "auther-form-input", placeholder: "Login"
|
|
12
|
+
small.auther-error-message = @account.error_message(:login)
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
small.auther-error-message = @account.error_message(:password)
|
|
14
|
+
div class=%(auther-form-section #{"auther-error" if @account.error?(:password)})
|
|
15
|
+
.auther-form-group
|
|
16
|
+
= form.password_field :password, class: "auther-form-input", placeholder: "Password"
|
|
17
|
+
small.auther-error-message = @account.error_message(:password)
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
= form.label :name, "Account:", class: "auther-form-select-label"
|
|
22
|
-
.auther-form-group
|
|
19
|
+
.auther-form-section
|
|
23
20
|
= form.select :name, @account_options, {}, class: "auther-form-select"
|
|
24
21
|
|
|
25
|
-
|
|
22
|
+
= form.submit "Login", class: "auther-button"
|
data/lib/auther/engine.rb
CHANGED
data/lib/auther/identity.rb
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
Rails.application.config.auther_settings = {
|
|
4
|
-
secret: ENV["AUTHER_SECRET"],
|
|
5
4
|
accounts: [
|
|
6
5
|
name: "admin",
|
|
7
6
|
encrypted_login: ENV["AUTHER_ADMIN_LOGIN"],
|
|
8
7
|
encrypted_password: ENV["AUTHER_ADMIN_PASSWORD"],
|
|
9
8
|
paths: ["/admin"]
|
|
10
|
-
]
|
|
9
|
+
],
|
|
10
|
+
secret: [ENV["AUTHER_SECRET"]].pack("H*")
|
|
11
11
|
}
|
metadata
CHANGED
|
@@ -1,14 +1,36 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: auther
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 8.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brooke Kuhlmann
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
|
-
cert_chain:
|
|
11
|
-
|
|
10
|
+
cert_chain:
|
|
11
|
+
- |
|
|
12
|
+
-----BEGIN CERTIFICATE-----
|
|
13
|
+
MIIDeDCCAmCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBBMQ8wDQYDVQQDDAZicm9v
|
|
14
|
+
a2UxGjAYBgoJkiaJk/IsZAEZFgphbGNoZW1pc3RzMRIwEAYKCZImiZPyLGQBGRYC
|
|
15
|
+
aW8wHhcNMTYxMDE5MTY0NDEzWhcNMTcxMDE5MTY0NDEzWjBBMQ8wDQYDVQQDDAZi
|
|
16
|
+
cm9va2UxGjAYBgoJkiaJk/IsZAEZFgphbGNoZW1pc3RzMRIwEAYKCZImiZPyLGQB
|
|
17
|
+
GRYCaW8wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCgryPL4/IbWDcL
|
|
18
|
+
fnqpnoJALqj+ega7hSsvvD8sac57HPNLeKcOmSafFiQLAnTmmE132ZlFc8kyZRVn
|
|
19
|
+
zmqSESowO5jd+ggFuy1ySqQJXhwgik04KedKRUjpIDZePrjw+M5UJT1qzKCKL2xI
|
|
20
|
+
nx5cOKP1fSWJ1RRu8JhaDeSloGtYMdw2c28wnKPNIsWDood4xhbLcY9IqeISft2e
|
|
21
|
+
oTAHTHandHbvt24X3/n67ceNjLBbsVZPXCC1C8C8ccjHjA4Tm2uiFoDwThMcPggg
|
|
22
|
+
90H6fh0vLFcNAobdPEchbge8tWtfmMPz2+C4yklANn81GA+ANsBS1uwx6mxJoMQU
|
|
23
|
+
BNVp0aLvAgMBAAGjezB5MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQW
|
|
24
|
+
BBRS85Rn1BaqeIONByw4t46DMDMzHDAfBgNVHREEGDAWgRRicm9va2VAYWxjaGVt
|
|
25
|
+
aXN0cy5pbzAfBgNVHRIEGDAWgRRicm9va2VAYWxjaGVtaXN0cy5pbzANBgkqhkiG
|
|
26
|
+
9w0BAQUFAAOCAQEAZMb57Y4wdpbX8XxTukEO7VC1pndccUsxdbziGsAOiuHET3Aq
|
|
27
|
+
ygLvrfdYrN88/w+qxncW5bxbO3a6UGkuhIFUPM8zRSE/rh6bCcJljTJrExVt42eV
|
|
28
|
+
aYCb7WJNsx3eNXHn3uQodq3tD+lmNJzz2bFeT3smGSKEnALBjqorO/2mpDh4FJ3S
|
|
29
|
+
4CcDYsJ1ywep8LDJDBBGdKz9moL+axryzpeTpgTT/fFYFzRzWrURPyDvPOikh9TX
|
|
30
|
+
n/LUZ1dKhIHzfKx1B4+TEIefArObGfkLIDM8+Dq1RX7TF1k81Men7iu4MgE9bYBn
|
|
31
|
+
3dE+xI3FdB5gWcdWxdtgRCmWjtXeYYyb4z6NQQ==
|
|
32
|
+
-----END CERTIFICATE-----
|
|
33
|
+
date: 2017-08-19 00:00:00.000000000 Z
|
|
12
34
|
dependencies:
|
|
13
35
|
- !ruby/object:Gem::Dependency
|
|
14
36
|
name: rails
|
|
@@ -52,34 +74,6 @@ dependencies:
|
|
|
52
74
|
- - "~>"
|
|
53
75
|
- !ruby/object:Gem::Version
|
|
54
76
|
version: '5.0'
|
|
55
|
-
- !ruby/object:Gem::Dependency
|
|
56
|
-
name: bourbon
|
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
|
58
|
-
requirements:
|
|
59
|
-
- - "~>"
|
|
60
|
-
- !ruby/object:Gem::Version
|
|
61
|
-
version: '4.2'
|
|
62
|
-
type: :runtime
|
|
63
|
-
prerelease: false
|
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
-
requirements:
|
|
66
|
-
- - "~>"
|
|
67
|
-
- !ruby/object:Gem::Version
|
|
68
|
-
version: '4.2'
|
|
69
|
-
- !ruby/object:Gem::Dependency
|
|
70
|
-
name: neat
|
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
|
72
|
-
requirements:
|
|
73
|
-
- - "~>"
|
|
74
|
-
- !ruby/object:Gem::Version
|
|
75
|
-
version: '1.8'
|
|
76
|
-
type: :runtime
|
|
77
|
-
prerelease: false
|
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
-
requirements:
|
|
80
|
-
- - "~>"
|
|
81
|
-
- !ruby/object:Gem::Version
|
|
82
|
-
version: '1.8'
|
|
83
77
|
- !ruby/object:Gem::Dependency
|
|
84
78
|
name: rake
|
|
85
79
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -100,28 +94,28 @@ dependencies:
|
|
|
100
94
|
requirements:
|
|
101
95
|
- - "~>"
|
|
102
96
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: '
|
|
97
|
+
version: '10.2'
|
|
104
98
|
type: :development
|
|
105
99
|
prerelease: false
|
|
106
100
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
101
|
requirements:
|
|
108
102
|
- - "~>"
|
|
109
103
|
- !ruby/object:Gem::Version
|
|
110
|
-
version: '
|
|
104
|
+
version: '10.2'
|
|
111
105
|
- !ruby/object:Gem::Dependency
|
|
112
106
|
name: pg
|
|
113
107
|
requirement: !ruby/object:Gem::Requirement
|
|
114
108
|
requirements:
|
|
115
109
|
- - "~>"
|
|
116
110
|
- !ruby/object:Gem::Version
|
|
117
|
-
version: '0.
|
|
111
|
+
version: '0.21'
|
|
118
112
|
type: :development
|
|
119
113
|
prerelease: false
|
|
120
114
|
version_requirements: !ruby/object:Gem::Requirement
|
|
121
115
|
requirements:
|
|
122
116
|
- - "~>"
|
|
123
117
|
- !ruby/object:Gem::Version
|
|
124
|
-
version: '0.
|
|
118
|
+
version: '0.21'
|
|
125
119
|
- !ruby/object:Gem::Dependency
|
|
126
120
|
name: pry
|
|
127
121
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -184,14 +178,14 @@ dependencies:
|
|
|
184
178
|
requirements:
|
|
185
179
|
- - "~>"
|
|
186
180
|
- !ruby/object:Gem::Version
|
|
187
|
-
version: '2.
|
|
181
|
+
version: '2.1'
|
|
188
182
|
type: :development
|
|
189
183
|
prerelease: false
|
|
190
184
|
version_requirements: !ruby/object:Gem::Requirement
|
|
191
185
|
requirements:
|
|
192
186
|
- - "~>"
|
|
193
187
|
- !ruby/object:Gem::Version
|
|
194
|
-
version: '2.
|
|
188
|
+
version: '2.1'
|
|
195
189
|
- !ruby/object:Gem::Dependency
|
|
196
190
|
name: hirb
|
|
197
191
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -212,28 +206,28 @@ dependencies:
|
|
|
212
206
|
requirements:
|
|
213
207
|
- - "~>"
|
|
214
208
|
- !ruby/object:Gem::Version
|
|
215
|
-
version: '1.
|
|
209
|
+
version: '1.8'
|
|
216
210
|
type: :development
|
|
217
211
|
prerelease: false
|
|
218
212
|
version_requirements: !ruby/object:Gem::Requirement
|
|
219
213
|
requirements:
|
|
220
214
|
- - "~>"
|
|
221
215
|
- !ruby/object:Gem::Version
|
|
222
|
-
version: '1.
|
|
216
|
+
version: '1.8'
|
|
223
217
|
- !ruby/object:Gem::Dependency
|
|
224
218
|
name: rspec-rails
|
|
225
219
|
requirement: !ruby/object:Gem::Requirement
|
|
226
220
|
requirements:
|
|
227
221
|
- - "~>"
|
|
228
222
|
- !ruby/object:Gem::Version
|
|
229
|
-
version: '3.
|
|
223
|
+
version: '3.6'
|
|
230
224
|
type: :development
|
|
231
225
|
prerelease: false
|
|
232
226
|
version_requirements: !ruby/object:Gem::Requirement
|
|
233
227
|
requirements:
|
|
234
228
|
- - "~>"
|
|
235
229
|
- !ruby/object:Gem::Version
|
|
236
|
-
version: '3.
|
|
230
|
+
version: '3.6'
|
|
237
231
|
- !ruby/object:Gem::Dependency
|
|
238
232
|
name: ammeter
|
|
239
233
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -262,34 +256,48 @@ dependencies:
|
|
|
262
256
|
- - "~>"
|
|
263
257
|
- !ruby/object:Gem::Version
|
|
264
258
|
version: '4.7'
|
|
259
|
+
- !ruby/object:Gem::Dependency
|
|
260
|
+
name: git-cop
|
|
261
|
+
requirement: !ruby/object:Gem::Requirement
|
|
262
|
+
requirements:
|
|
263
|
+
- - "~>"
|
|
264
|
+
- !ruby/object:Gem::Version
|
|
265
|
+
version: '1.5'
|
|
266
|
+
type: :development
|
|
267
|
+
prerelease: false
|
|
268
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
269
|
+
requirements:
|
|
270
|
+
- - "~>"
|
|
271
|
+
- !ruby/object:Gem::Version
|
|
272
|
+
version: '1.5'
|
|
265
273
|
- !ruby/object:Gem::Dependency
|
|
266
274
|
name: reek
|
|
267
275
|
requirement: !ruby/object:Gem::Requirement
|
|
268
276
|
requirements:
|
|
269
277
|
- - "~>"
|
|
270
278
|
- !ruby/object:Gem::Version
|
|
271
|
-
version: '4.
|
|
279
|
+
version: '4.7'
|
|
272
280
|
type: :development
|
|
273
281
|
prerelease: false
|
|
274
282
|
version_requirements: !ruby/object:Gem::Requirement
|
|
275
283
|
requirements:
|
|
276
284
|
- - "~>"
|
|
277
285
|
- !ruby/object:Gem::Version
|
|
278
|
-
version: '4.
|
|
286
|
+
version: '4.7'
|
|
279
287
|
- !ruby/object:Gem::Dependency
|
|
280
288
|
name: rubocop
|
|
281
289
|
requirement: !ruby/object:Gem::Requirement
|
|
282
290
|
requirements:
|
|
283
291
|
- - "~>"
|
|
284
292
|
- !ruby/object:Gem::Version
|
|
285
|
-
version: '0.
|
|
293
|
+
version: '0.49'
|
|
286
294
|
type: :development
|
|
287
295
|
prerelease: false
|
|
288
296
|
version_requirements: !ruby/object:Gem::Requirement
|
|
289
297
|
requirements:
|
|
290
298
|
- - "~>"
|
|
291
299
|
- !ruby/object:Gem::Version
|
|
292
|
-
version: '0.
|
|
300
|
+
version: '0.49'
|
|
293
301
|
- !ruby/object:Gem::Dependency
|
|
294
302
|
name: codeclimate-test-reporter
|
|
295
303
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -323,7 +331,6 @@ files:
|
|
|
323
331
|
- app/presenters/auther/account.rb
|
|
324
332
|
- app/views/auther/session/new.html.slim
|
|
325
333
|
- app/views/layouts/auther/auth.html.slim
|
|
326
|
-
- bin/rails
|
|
327
334
|
- config/routes.rb
|
|
328
335
|
- lib/auther.rb
|
|
329
336
|
- lib/auther/authenticator.rb
|
|
@@ -336,12 +343,6 @@ files:
|
|
|
336
343
|
- lib/auther/settings.rb
|
|
337
344
|
- lib/generators/auther/install/install_generator.rb
|
|
338
345
|
- lib/generators/auther/templates/config/initializers/auther.rb
|
|
339
|
-
- vendor/assets/stylesheets/bitters/_base.scss
|
|
340
|
-
- vendor/assets/stylesheets/bitters/_buttons.scss
|
|
341
|
-
- vendor/assets/stylesheets/bitters/_forms.scss
|
|
342
|
-
- vendor/assets/stylesheets/bitters/_grid-settings.scss
|
|
343
|
-
- vendor/assets/stylesheets/bitters/_typography.scss
|
|
344
|
-
- vendor/assets/stylesheets/bitters/_variables.scss
|
|
345
346
|
homepage: https://github.com/bkuhlmann/auther
|
|
346
347
|
licenses:
|
|
347
348
|
- MIT
|
|
@@ -362,7 +363,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
362
363
|
version: '0'
|
|
363
364
|
requirements: []
|
|
364
365
|
rubyforge_project:
|
|
365
|
-
rubygems_version: 2.6.
|
|
366
|
+
rubygems_version: 2.6.12
|
|
366
367
|
signing_key:
|
|
367
368
|
specification_version: 4
|
|
368
369
|
summary: Enhances Rails with multi-account, form-based, database-less, application-wide
|
metadata.gz.sig
ADDED
data/bin/rails
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
#{$all-buttons} {
|
|
2
|
-
appearance: none;
|
|
3
|
-
background-color: $action-color;
|
|
4
|
-
border: 0;
|
|
5
|
-
border-radius: $base-border-radius;
|
|
6
|
-
color: #fff;
|
|
7
|
-
cursor: pointer;
|
|
8
|
-
display: inline-block;
|
|
9
|
-
font-family: $base-font-family;
|
|
10
|
-
font-size: $base-font-size;
|
|
11
|
-
-webkit-font-smoothing: antialiased;
|
|
12
|
-
font-weight: 600;
|
|
13
|
-
line-height: 1;
|
|
14
|
-
padding: $small-spacing $base-spacing;
|
|
15
|
-
text-decoration: none;
|
|
16
|
-
transition: background-color $base-duration $base-timing;
|
|
17
|
-
user-select: none;
|
|
18
|
-
vertical-align: middle;
|
|
19
|
-
white-space: nowrap;
|
|
20
|
-
|
|
21
|
-
&:hover,
|
|
22
|
-
&:focus {
|
|
23
|
-
background-color: shade($action-color, 20%);
|
|
24
|
-
color: #fff;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
&:disabled {
|
|
28
|
-
cursor: not-allowed;
|
|
29
|
-
opacity: 0.5;
|
|
30
|
-
|
|
31
|
-
&:hover {
|
|
32
|
-
background-color: $action-color;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
fieldset {
|
|
2
|
-
background-color: $secondary-background-color;
|
|
3
|
-
border: $base-border;
|
|
4
|
-
margin: 0 0 $small-spacing;
|
|
5
|
-
padding: $base-spacing;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
input,
|
|
9
|
-
label,
|
|
10
|
-
select {
|
|
11
|
-
display: block;
|
|
12
|
-
font-family: $base-font-family;
|
|
13
|
-
font-size: $base-font-size;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
label {
|
|
17
|
-
font-weight: 600;
|
|
18
|
-
margin-bottom: $small-spacing / 2;
|
|
19
|
-
|
|
20
|
-
&.required::after {
|
|
21
|
-
content: "*";
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
abbr {
|
|
25
|
-
display: none;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
#{$all-text-inputs},
|
|
30
|
-
select[multiple=multiple] {
|
|
31
|
-
background-color: $base-background-color;
|
|
32
|
-
border: $base-border;
|
|
33
|
-
border-radius: $base-border-radius;
|
|
34
|
-
box-shadow: $form-box-shadow;
|
|
35
|
-
box-sizing: border-box;
|
|
36
|
-
font-family: $base-font-family;
|
|
37
|
-
font-size: $base-font-size;
|
|
38
|
-
margin-bottom: $small-spacing;
|
|
39
|
-
padding: $base-spacing / 3;
|
|
40
|
-
transition: border-color $base-duration $base-timing;
|
|
41
|
-
width: 100%;
|
|
42
|
-
|
|
43
|
-
&:hover {
|
|
44
|
-
border-color: shade($base-border-color, 20%);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
&:focus {
|
|
48
|
-
border-color: $action-color;
|
|
49
|
-
box-shadow: $form-box-shadow-focus;
|
|
50
|
-
outline: none;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
&:disabled {
|
|
54
|
-
background-color: shade($base-background-color, 5%);
|
|
55
|
-
cursor: not-allowed;
|
|
56
|
-
|
|
57
|
-
&:hover {
|
|
58
|
-
border: $base-border;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
textarea {
|
|
64
|
-
resize: vertical;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
input[type="search"] {
|
|
68
|
-
appearance: none;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
input[type="checkbox"],
|
|
72
|
-
input[type="radio"] {
|
|
73
|
-
display: inline;
|
|
74
|
-
margin-right: $small-spacing / 2;
|
|
75
|
-
|
|
76
|
-
+ label {
|
|
77
|
-
display: inline-block;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
input[type="file"] {
|
|
82
|
-
margin-bottom: $small-spacing;
|
|
83
|
-
width: 100%;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
select {
|
|
87
|
-
margin-bottom: $base-spacing;
|
|
88
|
-
max-width: 100%;
|
|
89
|
-
width: auto;
|
|
90
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
@import "neat-helpers"; // or "../neat/neat-helpers" when not in Rails
|
|
2
|
-
|
|
3
|
-
// Neat Overrides
|
|
4
|
-
// $column: 90px;
|
|
5
|
-
// $gutter: 30px;
|
|
6
|
-
// $grid-columns: 12;
|
|
7
|
-
// $max-width: 1200px;
|
|
8
|
-
|
|
9
|
-
// Neat Breakpoints
|
|
10
|
-
$medium-screen: 600px;
|
|
11
|
-
$large-screen: 900px;
|
|
12
|
-
|
|
13
|
-
$medium-screen-up: new-breakpoint(min-width $medium-screen 4);
|
|
14
|
-
$large-screen-up: new-breakpoint(min-width $large-screen 8);
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
body {
|
|
2
|
-
color: $base-font-color;
|
|
3
|
-
font-family: $base-font-family;
|
|
4
|
-
font-feature-settings: "kern", "liga", "pnum";
|
|
5
|
-
font-size: $base-font-size;
|
|
6
|
-
line-height: $base-line-height;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
h1,
|
|
10
|
-
h2,
|
|
11
|
-
h3,
|
|
12
|
-
h4,
|
|
13
|
-
h5,
|
|
14
|
-
h6 {
|
|
15
|
-
font-family: $heading-font-family;
|
|
16
|
-
font-size: $base-font-size;
|
|
17
|
-
line-height: $heading-line-height;
|
|
18
|
-
margin: 0 0 $small-spacing;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
p {
|
|
22
|
-
margin: 0 0 $small-spacing;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
a {
|
|
26
|
-
color: $action-color;
|
|
27
|
-
text-decoration: none;
|
|
28
|
-
transition: color $base-duration $base-timing;
|
|
29
|
-
|
|
30
|
-
&:active,
|
|
31
|
-
&:focus,
|
|
32
|
-
&:hover {
|
|
33
|
-
color: shade($action-color, 25%);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
hr {
|
|
38
|
-
border-bottom: $base-border;
|
|
39
|
-
border-left: 0;
|
|
40
|
-
border-right: 0;
|
|
41
|
-
border-top: 0;
|
|
42
|
-
margin: $base-spacing 0;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
img,
|
|
46
|
-
picture {
|
|
47
|
-
margin: 0;
|
|
48
|
-
max-width: 100%;
|
|
49
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
// Typography
|
|
2
|
-
$base-font-family: $helvetica;
|
|
3
|
-
$heading-font-family: $base-font-family;
|
|
4
|
-
|
|
5
|
-
// Font Sizes
|
|
6
|
-
$base-font-size: 1em;
|
|
7
|
-
|
|
8
|
-
// Line height
|
|
9
|
-
$base-line-height: 1.5;
|
|
10
|
-
$heading-line-height: 1.2;
|
|
11
|
-
|
|
12
|
-
// Other Sizes
|
|
13
|
-
$base-border-radius: 3px;
|
|
14
|
-
$base-spacing: $base-line-height * 1em;
|
|
15
|
-
$small-spacing: $base-spacing / 2;
|
|
16
|
-
$base-z-index: 0;
|
|
17
|
-
|
|
18
|
-
// Colors
|
|
19
|
-
$blue: #477dca;
|
|
20
|
-
$dark-gray: #333;
|
|
21
|
-
$medium-gray: #999;
|
|
22
|
-
$light-gray: #ddd;
|
|
23
|
-
|
|
24
|
-
// Font Colors
|
|
25
|
-
$base-font-color: $dark-gray;
|
|
26
|
-
$action-color: $blue;
|
|
27
|
-
|
|
28
|
-
// Border
|
|
29
|
-
$base-border-color: $light-gray;
|
|
30
|
-
$base-border: 1px solid $base-border-color;
|
|
31
|
-
|
|
32
|
-
// Background Colors
|
|
33
|
-
$base-background-color: #fff;
|
|
34
|
-
$secondary-background-color: tint($base-border-color, 75%);
|
|
35
|
-
|
|
36
|
-
// Forms
|
|
37
|
-
$form-box-shadow: inset 0 1px 3px rgba(#000, 0.06);
|
|
38
|
-
$form-box-shadow-focus: $form-box-shadow, 0 0 5px adjust-color($action-color, $lightness: -5%, $alpha: -0.3);
|
|
39
|
-
|
|
40
|
-
// Animations
|
|
41
|
-
$base-duration: 150ms;
|
|
42
|
-
$base-timing: ease;
|