mitlibraries-theme 0.7.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -1
  3. data/Rakefile +6 -8
  4. data/app/assets/config/mitlibraries_theme_manifest.js +1 -0
  5. data/app/assets/stylesheets/mitlibraries/theme/application.css +15 -0
  6. data/app/controllers/mitlibraries/theme/application_controller.rb +6 -0
  7. data/app/helpers/link_helper.rb +2 -0
  8. data/app/helpers/mitlibraries/theme/application_helper.rb +6 -0
  9. data/app/jobs/mitlibraries/theme/application_job.rb +6 -0
  10. data/app/mailers/mitlibraries/theme/application_mailer.rb +8 -0
  11. data/app/models/mitlibraries/theme/application_record.rb +7 -0
  12. data/app/views/layouts/_head.html.erb +1 -0
  13. data/app/views/layouts/_libraries_footer.html.erb +1 -1
  14. data/app/views/layouts/application.html.erb +1 -1
  15. data/config/routes.rb +2 -0
  16. data/lib/mitlibraries/theme/engine.rb +11 -0
  17. data/lib/mitlibraries/theme/version.rb +1 -1
  18. data/lib/mitlibraries/theme.rb +2 -5
  19. data/lib/tasks/mitlibraries/theme_tasks.rake +4 -0
  20. metadata +30 -45
  21. data/.gitignore +0 -10
  22. data/CODE_OF_CONDUCT.md +0 -74
  23. data/Gemfile +0 -6
  24. data/Gemfile.lock +0 -167
  25. data/Makefile +0 -56
  26. data/bin/console +0 -14
  27. data/bin/setup +0 -8
  28. data/mitlibraries-theme.gemspec +0 -28
  29. data/vendor/assets/images/favicon.ico +0 -0
  30. data/vendor/assets/images/mitlib-wordmark.svg +0 -1
  31. data/vendor/assets/images/vi-shape7-tp.svg +0 -1
  32. data/vendor/assets/stylesheets/elements/_content.scss +0 -74
  33. data/vendor/assets/stylesheets/elements/_controls.scss +0 -156
  34. data/vendor/assets/stylesheets/elements/_footer.scss +0 -132
  35. data/vendor/assets/stylesheets/elements/_forms.scss +0 -151
  36. data/vendor/assets/stylesheets/elements/_header.scss +0 -93
  37. data/vendor/assets/stylesheets/elements/_modules.scss +0 -187
  38. data/vendor/assets/stylesheets/elements/_tables.scss +0 -112
  39. data/vendor/assets/stylesheets/global/_base.scss +0 -67
  40. data/vendor/assets/stylesheets/global/_helpers.scss +0 -161
  41. data/vendor/assets/stylesheets/global/_layouts.scss +0 -452
  42. data/vendor/assets/stylesheets/global/_shame.scss +0 -4
  43. data/vendor/assets/stylesheets/global/_typography.scss +0 -81
  44. data/vendor/assets/stylesheets/global/_unsets.scss +0 -29
  45. data/vendor/assets/stylesheets/global/_variables.scss +0 -120
  46. data/vendor/assets/stylesheets/global/_vendor-overrides.scss +0 -1
  47. data/vendor/assets/stylesheets/js-elements/_expand-collapse.scss +0 -35
  48. data/vendor/assets/stylesheets/libraries-main.scss +0 -39
@@ -1,93 +0,0 @@
1
- // header and navigation styles
2
-
3
- #skip {
4
- position: absolute;
5
- overflow: hidden;
6
- top: 0;
7
- left: 0;
8
- height: 0;
9
- width: 0;
10
- color: $gray-l2;
11
- background-color: $black;
12
- border-bottom: 2px solid $success;
13
-
14
- &:focus {
15
- position: relative;
16
- display: block;
17
- height: auto;
18
- width: 100%;
19
- padding: 5px 2%;
20
- }
21
- }
22
-
23
- .wrap-outer-header {
24
- background-color: $black;
25
- color: $white;
26
- }
27
-
28
- .wrap-header {
29
- background: $black image-url('vi-shape7-tp.svg') no-repeat 0 65%;
30
-
31
- .logo-mit-lib {
32
- display: inline-block;
33
- fill: $white;
34
- color: $white;
35
-
36
- img {
37
- width: auto;
38
- max-height: 44px;
39
- max-width: 100%;
40
- }
41
- }
42
-
43
- .link-logo-mit {
44
- color: $white;
45
-
46
- .logo-mit {
47
- fill: $gray-l1;
48
-
49
- .color {
50
- fill: $white;
51
- }
52
- }
53
- }
54
- }
55
-
56
- // local header and nav
57
- .wrap-outer-header-local {
58
- border-bottom: 1px solid $gray-l2;
59
- background-color: $white-t;
60
- color: $gray-d1;
61
-
62
- .wrap-header-local {
63
- padding-top: 2rem;
64
- }
65
-
66
- a {
67
- color: $gray-d1;
68
- text-decoration: none;
69
- }
70
-
71
- .title-site {
72
- @extend .hd-2;
73
- margin-bottom: 0;
74
- }
75
-
76
- .action-auth {
77
- @extend .button-primary;
78
- }
79
- }
80
-
81
-
82
- // breadcrumb styles
83
- .wrap-outer-breadcrumb {
84
- background-color: $white;
85
- color: $gray;
86
- font-size: $fs-xsmall;
87
- }
88
-
89
- .wrap-breadcrumb {
90
- padding-top: 7px;
91
- padding-bottom: 5px;
92
- }
93
-
@@ -1,187 +0,0 @@
1
- // modules and other reusable bits
2
-
3
- .box-content {
4
- border: 1px solid $gray-l3;
5
- background-color: $white-t;
6
- padding: 3%;
7
- }
8
-
9
- .bit {
10
- margin: 0 0 3rem 0;
11
- border-top: 3px solid $gray-l2;
12
- padding-top: 1rem;
13
- font-size: $fs-small;
14
-
15
- .title {
16
- @extend .hd-5;
17
- }
18
-
19
- ul {
20
- @extend .list-unbulleted;
21
- }
22
- }
23
-
24
- // global app style alerts and notices
25
-
26
- .alert {
27
-
28
- p {
29
- margin-top: .2rem;
30
- margin-bottom: .2rem;
31
- }
32
-
33
- &.info {
34
- color: $black;
35
- }
36
-
37
- &.success {
38
- color: $success;
39
- }
40
-
41
- &.warning {
42
- color: $warning;
43
- }
44
-
45
- &.error {
46
- color: $error;
47
- }
48
- }
49
-
50
- .wrap-notices {
51
- background-color: $gray-d1;
52
- color: $white;
53
- font-size: $fs-xsmall;
54
-
55
- a {
56
- color: $brand-primary2;
57
- }
58
-
59
- &.info {
60
- }
61
-
62
- &.success {
63
- border-bottom: 4px solid $success;
64
- }
65
-
66
- &.warning {
67
- border-bottom: 4px solid $warning;
68
- }
69
-
70
- &.error {
71
- border-bottom: 4px solid $error;
72
- }
73
- }
74
-
75
- .alert-banner {
76
- display: block;
77
- margin-bottom: 2rem;
78
- border-radius: 2px;
79
- padding: 1.6rem 2rem;
80
- border: 1px solid $brand-primary;
81
- border-top: 5px solid $brand-primary;
82
- color: $black-t;
83
- font-weight: $fw-bold;
84
-
85
- .fa {
86
- display: inline-block;
87
- margin-right: .5em;
88
- }
89
-
90
- &.success {
91
- border: 1px solid $success;
92
- border-top: 3px solid $success;
93
- color: $black-t;
94
- }
95
-
96
- &.warning {
97
- border: 1px solid $warning;
98
- border-top: 5px solid $warning;
99
- color: $black-t;
100
- }
101
-
102
- &.error {
103
- border: 1px solid $error;
104
- border-top: 5px solid $error;
105
- color: $black-t;
106
- }
107
-
108
- &.privacy-notice {
109
- position: fixed;
110
- bottom: 40px;
111
- left: 10%;
112
- right: 10%;
113
- width: 80%;
114
- display: flex;
115
- justify-content: space-between;
116
- background-color: #eee;
117
- p {
118
- margin-right: .5em;
119
- }
120
- }
121
- }
122
-
123
- .inline-action {
124
-
125
- @media (min-width: $bp-screen-md) {
126
-
127
- .message {
128
- display: inline-block;
129
- vertical-align: middle;
130
- width: 65%
131
- }
132
-
133
- .actions {
134
- display: inline-block;
135
- vertical-align: middle;
136
- width: 34%;
137
- text-align: right;
138
- }
139
- }
140
- }
141
-
142
- .well {
143
- margin: 2rem 0;
144
- background-color: $wisp;
145
- box-shadow: inset 0 0 5px $shadow;
146
- padding: 2rem 2.5rem;
147
- }
148
-
149
- .panel {
150
- position: relative;
151
- margin: 1.5rem 0;
152
- border: 1px solid $gray-l2;
153
- background-color: $white;
154
- border-top: 4px solid $brand-primary;
155
-
156
- .panel-heading {
157
- @extend .copy-lead;
158
- margin: 1.5rem 2rem .5rem 2rem;
159
- }
160
-
161
- .panel-body {
162
- margin: .5rem 2rem 1.5rem 2rem;
163
- }
164
-
165
- .panel-footer {
166
- font-size: $fs-small;
167
- border-top: 1px solid $gray-l2;
168
- background-color: $wisp;
169
- padding: 1rem 2rem;
170
- }
171
-
172
- &.panel-info {
173
- border-top: 4px solid $brand-primary;
174
- }
175
-
176
- &.panel-success {
177
- border-top: 4px solid $success;
178
- }
179
-
180
- &.panel-warning {
181
- border-top: 4px solid $warning;
182
- }
183
-
184
- &.panel-danger {
185
- border-top: 4px solid $error;
186
- }
187
- }
@@ -1,112 +0,0 @@
1
- // tables
2
-
3
- .highlight {
4
- background-color: lighten($warning, 20%);
5
- }
6
-
7
- %table-base {
8
- margin-top: 1rem;
9
- margin-bottom: 2rem;
10
-
11
- caption {
12
- margin-bottom: .5rem;
13
- font-size: $fs-small;
14
- text-align: left;
15
- }
16
-
17
- tr:hover {
18
- background-color: $smoke;
19
- }
20
-
21
- th {
22
- font-weight: $fw-bold;
23
- text-align: left;
24
- }
25
-
26
- th,
27
- td {
28
- padding: .75rem;
29
- border: 1px solid $gray-l3;
30
- }
31
-
32
- tfoot {
33
-
34
- tr {
35
- border-top: 2px solid $gray-l3;
36
- font-weight: $fw-bold;
37
- }
38
- }
39
-
40
- // can be used on cols, rows, or cells
41
- .is-highlighted {
42
- @extend .highlight;
43
- }
44
-
45
- // can be used on rows or cells only
46
- .align-left {
47
- text-align: left;
48
- }
49
-
50
- .align-center {
51
- text-align: center;
52
- }
53
-
54
- .align-right {
55
- text-align: right;
56
- }
57
- }
58
-
59
- .table {
60
- @extend %table-base;
61
- }
62
-
63
- .table-simplified {
64
- @extend %table-base;
65
-
66
- th,
67
- td {
68
- border: none;
69
- border-bottom: 1px solid $gray-l3;
70
- }
71
- }
72
-
73
- // extra cozy
74
- .table-cozy {
75
-
76
- th,
77
- td {
78
- padding: .5rem;
79
- }
80
- }
81
-
82
- // extra comfortable
83
- .table-spacious {
84
-
85
- th,
86
- td {
87
- padding: 1.2rem;
88
- }
89
- }
90
-
91
- // wrapping div allows horizontally large tables to scroll on small screens
92
- .wrapper-table-scrollable {
93
- width: 100%;
94
- overflow-y: auto;
95
- }
96
-
97
- // responsive table enables `supplemental` columns to hide on small screens
98
- .table-responsive {
99
-
100
- th.supplemental,
101
- td.supplemental {
102
- display: none;
103
- }
104
-
105
- @media(min-width: $bp-screen-md) {
106
-
107
- th.supplemental,
108
- td.supplemental {
109
- display: table-cell;
110
- }
111
- }
112
- }
@@ -1,67 +0,0 @@
1
- // Base setup
2
-
3
- * {
4
- box-sizing: border-box;
5
- }
6
-
7
- html, body {
8
- height: 100%;
9
- font-size: 62.5%;
10
- }
11
-
12
- body {
13
- background-color: $gray;
14
- color: $white;
15
- font-size: 16px;
16
- font-size: 1.6rem;
17
- line-height: $lh-base;
18
- font-family: $base-font;
19
-
20
- }
21
-
22
- table {
23
- border-collapse: collapse;
24
- border-spacing: 0;
25
- }
26
-
27
- ol,
28
- ul {
29
- padding-left: 2.5rem;
30
- }
31
-
32
- li > ul,
33
- li > ol {
34
- margin-top: .5rem;
35
- }
36
-
37
- dt {
38
- font-weight: $fw-bold;
39
- }
40
-
41
- dd {
42
- margin-left: 0;
43
- margin-bottom: 1rem;
44
- }
45
-
46
- hr {
47
- margin: 2rem 0;
48
- border: none;
49
- border-top: 1px solid $gray-l1;
50
- }
51
-
52
- a {
53
- @extend %link;
54
- }
55
-
56
- // because
57
- .wrap-outer-header.reasons {
58
- background: #f23074; /* Old browsers */
59
- background: -moz-linear-gradient(45deg, #f23074 0%, #d6d628 36%, #207cca 66%, #544b8c 100%); /* FF3.6-15 */
60
- background: -webkit-linear-gradient(45deg, #f23074 0%,#d6d628 36%,#207cca 66%,#544b8c 100%); /* Chrome10-25,Safari5.1-6 */
61
- background: linear-gradient(45deg, #f23074 0%,#d6d628 36%,#207cca 66%,#544b8c 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
62
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f23074', endColorstr='#544b8c',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
63
-
64
- .wrap-header {
65
- background: transparent;
66
- }
67
- }
@@ -1,161 +0,0 @@
1
- // mixins and extends for simple stuff that gets reused a lot
2
-
3
- .sr {
4
- border: 0 none;
5
- clip: rect(1px, 1px, 1px, 1px);
6
- height: 1px;
7
- margin: -1px;
8
- overflow: hidden;
9
- padding: 0;
10
- position: absolute;
11
- width: 1px;
12
- word-wrap: normal;
13
- }
14
-
15
- @mixin sr-focusable {
16
- &:focus {
17
- position: static;
18
- display: block;
19
- height: auto;
20
- width: auto;
21
- }
22
- }
23
-
24
- // flexbox wrapper
25
- .wrap-bar {
26
- display: flex;
27
- justify-content: space-between;
28
- align-items: center;
29
- }
30
-
31
- @mixin clearfix {
32
- &:after {
33
- content: '';
34
- display: table;
35
- clear: both;
36
- }
37
- }
38
-
39
- %unbutton {
40
- @extend %link;
41
- -webkit-appearance: none;
42
- -moz-appearance: none;
43
- border: 0;
44
- background-color: transparent;
45
- cursor: pointer;
46
- }
47
-
48
- // remove spacing from first/last children
49
- %clear-first-child {
50
- &:first-child {
51
- margin-top: 0;
52
- padding-top: 0;
53
- border-top: none;
54
- }
55
- }
56
-
57
- %clear-last-child {
58
- &:last-child {
59
- margin-bottom: 0;
60
- padding-bottom: 0;
61
- border-bottom: none;
62
- }
63
- }
64
-
65
- %text-ellipsis {
66
- overflow: hidden;
67
- white-space: nowrap;
68
- text-overflow: ellipsis;
69
- }
70
-
71
- // lists
72
- %reset-list {
73
- margin: 0;
74
- padding: 0;
75
- list-style: none;
76
- text-indent: 0;
77
-
78
- li,
79
- dt,
80
- dd {
81
- margin: 0;
82
- padding: 0;
83
- }
84
- }
85
-
86
- .list-unbulleted {
87
- list-style: none;
88
- padding-left: 0;
89
- text-indent: 0;
90
- }
91
-
92
- .list-inline {
93
- @extend %reset-list;
94
-
95
- li,
96
- dt,
97
- dd {
98
- display: inline-block;
99
- }
100
- }
101
-
102
- .list-inline-pipe {
103
- padding-left: 0;
104
-
105
- li,
106
- .item {
107
- display: inline-block;
108
- padding-right: 1rem;
109
-
110
- &:after {
111
- content: ' | ';
112
- margin-left: 1rem;
113
- }
114
-
115
- &:last-child:after {
116
- content: '';
117
- }
118
- }
119
- }
120
-
121
- .is-hidden {
122
- display: none;
123
- }
124
-
125
-
126
- %link {
127
- transition: all .25s ease-in-out 0s;
128
- color: $brand-primary;
129
- text-decoration: underline;
130
-
131
- // STATE: hover, active, focus
132
- &:hover,
133
- &:active,
134
- &:focus {
135
- color: $brand-primary-accent;
136
- }
137
-
138
- // STATE: is disabled
139
- &:disabled,
140
- &.is-disabled {
141
- border: none;
142
- background-color: $gray-l3;
143
- color: $gray-d1;
144
-
145
- &:hover {
146
- border: none;
147
- background-color: $gray-l3;
148
- color: $gray-d1;
149
- cursor: not-allowed;
150
- }
151
- }
152
-
153
- // STATE: is pressed or active
154
- &:active,
155
- &.is-pressed,
156
- &.is-active {
157
- color: $brand-secondary;
158
- }
159
- }
160
-
161
-