Skip to content

Commit b9a8276

Browse files
committed
wip
1 parent 45b887d commit b9a8276

File tree

8 files changed

+305
-19
lines changed

8 files changed

+305
-19
lines changed

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ gem "webpacker" # Transpile app-like JavaScript. Read more: https://github.com/r
4040
gem "turbolinks", "~> 5" # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
4141
gem "hamlit" # Faster haml templates
4242
gem "bootstrap" # Internet Style
43+
gem "jquery-rails" # We need jquery because bootstrap
4344

4445
gem "commonmarker" # Rendering markdown. Used to render readme on homepage
4546

README.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Updates - need to be integrated into the documentation
99
- Added views from devise into the application so they can manually be managed [devise-bootstrap-views](https://github.com/hisea/devise-bootstrap-views)
1010

1111
- re: active_model_serializers version - is what discourse uses - https://github.com/discourse/discourse/blob/master/Gemfile
12+
- remove credentials, explain what to do when setting up again
1213

1314
TODO:
1415

app/assets/javascripts/application.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// about supported directives.
1212
//
1313
//= require rails-ujs
14-
//= require activestorage
1514
//= require turbolinks
16-
//= require_tree .
15+
//= require jquery3
16+
//= require popper
17+
//= require bootstrap-sprockets

app/assets/stylesheets/application.css

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/*= require_self */
2+
3+
@import "bootstrap";
Lines changed: 295 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,295 @@
1+
/*= require_self */
2+
//= require swagger-ui
3+
4+
@import "bootstrap";
5+
6+
$gray-lightest: #f4f6f7;
7+
$gray-lighterer: #eef2f3;
8+
$gray-lighter: #ecf0f1;
9+
$gray-light: #a7a7a7;
10+
$gray: #bebebe;
11+
12+
$form-font-weight: 400;
13+
14+
#header {
15+
position: fixed;
16+
top: 0;
17+
left: 0;
18+
width: 100%;
19+
z-index: 1000;
20+
border-top: 1px solid lighten($gray-lighter, 2%);
21+
border-bottom: 1px solid darken($gray-lighter, 7%);
22+
padding: 14px;
23+
@include transition(transform 200ms linear);
24+
&.headroom--pinned {
25+
@include translate(0, 0%);
26+
}
27+
&.headroom--unpinned {
28+
@include translate(0, -100%);
29+
}
30+
}
31+
32+
body.swagger-section {
33+
// Ensure the floating header doesn't cover up important things
34+
padding-top: 60px;
35+
}
36+
37+
.swagger-section {
38+
// Ensure we override the swagger-ui styles
39+
.content-header#header {
40+
background: $gray-lighter;
41+
a#logo {
42+
font-size: 1.5em;
43+
font-weight: bold;
44+
text-decoration: none;
45+
background: transparent url("/assets/documentation_v2/logo_small.png")
46+
no-repeat left center;
47+
padding: 20px 0 20px 40px;
48+
color: black;
49+
}
50+
form#api_selector {
51+
clear: both;
52+
margin-top: 0;
53+
// @include clearfix;
54+
display: block;
55+
width: 100%;
56+
position: relative;
57+
padding-top: 0;
58+
}
59+
.api-header-group {
60+
padding: 0 10px 0.25em;
61+
label {
62+
font-weight: $form-font-weight;
63+
color: $gray;
64+
margin-bottom: 0.3em;
65+
}
66+
input {
67+
box-shadow: none;
68+
}
69+
}
70+
.api-header-url {
71+
input {
72+
background: none;
73+
border: none;
74+
}
75+
}
76+
77+
a#explore {
78+
color: white;
79+
float: right;
80+
margin: 0.25em 10px 10px 0;
81+
}
82+
}
83+
84+
.outside-info {
85+
padding: 60px 0 40px;
86+
h2 {
87+
margin: 0.5em 0;
88+
}
89+
em {
90+
font-style: italic;
91+
}
92+
}
93+
94+
.content {
95+
min-height: 10px;
96+
}
97+
.sandbox_header {
98+
padding: 5px 2px;
99+
}
100+
input.submit {
101+
@extend .btn;
102+
@extend .btn-primary;
103+
}
104+
105+
.swagger-ui-wrap {
106+
max-width: 100%;
107+
}
108+
}
109+
110+
@media (min-width: 599px) {
111+
.swagger-section #header form#api_selector {
112+
width: 91.5%;
113+
float: left;
114+
padding-top: 0.3em;
115+
.api-header-group {
116+
float: left;
117+
margin-right: 2%;
118+
position: relative;
119+
padding: 0;
120+
}
121+
.api-header-url {
122+
width: 33%;
123+
label {
124+
padding-left: 0.5em;
125+
}
126+
}
127+
.api-header-key {
128+
width: 53%;
129+
}
130+
a#explore {
131+
float: left;
132+
width: 10%;
133+
margin: 1.45em 0 0;
134+
padding-left: 0;
135+
padding-right: 0;
136+
}
137+
}
138+
}
139+
140+
.swagger-section .container {
141+
h2 {
142+
font-size: 24px;
143+
}
144+
strong {
145+
font-weight: bold;
146+
}
147+
.alert {
148+
line-height: 1.2em;
149+
}
150+
p {
151+
padding-bottom: 0.5em;
152+
}
153+
pre {
154+
margin: 0.5em 0 2em;
155+
code {
156+
background: none;
157+
}
158+
}
159+
.access-tokens {
160+
margin-left: 0.25em;
161+
li {
162+
background: white;
163+
border-radius: 4px;
164+
padding: 0.25em 0.5em;
165+
margin: 0 0 0.25em;
166+
}
167+
p {
168+
margin: 0;
169+
padding: 0.1em 0;
170+
}
171+
}
172+
ol {
173+
list-style-type: decimal;
174+
padding-left: 2em;
175+
}
176+
.less-strong {
177+
color: $gray;
178+
font-size: 0.8em;
179+
}
180+
181+
.authentication-notes {
182+
margin-top: 40px;
183+
h3 {
184+
margin-top: 1.5em;
185+
}
186+
}
187+
}
188+
189+
.applications-panel {
190+
margin: 100px 0 0;
191+
padding: 40px 0;
192+
background: $gray-lightest;
193+
border-top: 1px solid $gray-lighter;
194+
.applications-list {
195+
margin: 0;
196+
li {
197+
padding: 0.5em 1em 0.25em;
198+
background: white;
199+
margin: 1em 0 0;
200+
border-radius: 4px;
201+
}
202+
.authorize-new-explain {
203+
margin: 0;
204+
padding: 1em 0 0 0;
205+
}
206+
}
207+
.application-info {
208+
padding-bottom: 0.5em;
209+
position: relative;
210+
.tokens-table {
211+
margin-bottom: 0;
212+
pre,
213+
.btn {
214+
margin: 0;
215+
padding: 0.25em 0.5em;
216+
}
217+
}
218+
}
219+
.listed-app-name {
220+
margin: 0;
221+
display: block;
222+
width: 90%;
223+
span {
224+
@include rotate(90deg);
225+
margin-right: 0.75em;
226+
-webkit-transition: all 0.1s ease-out;
227+
-moz-transition: all 0.1s ease-out;
228+
-o-transition: all 0.1s ease-out;
229+
transition: all 0.1s ease-out;
230+
float: left;
231+
display: block;
232+
font-size: 10px;
233+
font-family: helvetica;
234+
}
235+
a:active span {
236+
-webkit-transition: all 0.1s ease-out;
237+
-moz-transition: all 0.1s ease-out;
238+
-o-transition: all 0.1s ease-out;
239+
transition: all 0.1s ease-out;
240+
}
241+
.listed-app-name:active,
242+
&.uncollapsed {
243+
span {
244+
@include rotate(0deg);
245+
}
246+
}
247+
}
248+
}
249+
250+
.swagger-section #api_info {
251+
// We're going to do a better job introducing this ourselves
252+
display: none;
253+
}
254+
255+
.api-info-header {
256+
padding: 0 0 40px;
257+
}
258+
.api-info-footer {
259+
padding: 40px 0;
260+
}
261+
262+
footer#footer {
263+
clear: both;
264+
width: 100%;
265+
height: 80px;
266+
}
267+
268+
@media (min-width: 599px) {
269+
.api-info-footer {
270+
padding: 60px 0 40px;
271+
}
272+
}
273+
274+
#resources_container {
275+
.toggleEndpointList {
276+
font-weight: 600;
277+
}
278+
// input { @extend .form-control; }
279+
}
280+
281+
.access-tokens {
282+
li {
283+
.btn {
284+
padding: 0.25em 0.5em;
285+
margin-left: 0.5em;
286+
}
287+
}
288+
}
289+
290+
.add-token-form {
291+
label {
292+
font-weight: $form-font-weight;
293+
margin-right: 0.5em;
294+
}
295+
}

app/controllers/api/v1/root_v1.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class RootV1 < API::Base
99
doc_version: "v1"
1010
hide_documentation_path: true,
1111
info: {
12-
title: "Grape Swagger base app",
12+
title: "Grape Doorkeeper base app",
1313
description: "This is the base api provided by the awesome sample app - https://github.com/sethherr/grape-doorkeeper"
1414
}
1515

db/migrate/20180902201811_devise_create_users.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def change
3333
# t.datetime :locked_at
3434

3535
# Omniauthable
36-
t.string "provider"
36+
t.string :provider
3737

3838

3939
t.timestamps null: false

0 commit comments

Comments
 (0)