Skip to content

Commit 6d8e7ca

Browse files
Merge pull request #10 from hmrc/APIS-3471
APIS-3471, APIS-3472 fixes for minor issues with styles
2 parents b6c20ec + 221a9ed commit 6d8e7ca

21 files changed

+227
-216
lines changed

app/assets/css/ad-hoc.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,4 +193,8 @@ pre, code {
193193

194194
.side-nav__link {
195195
padding: 12px 15px 8px 15px;
196+
}
197+
198+
.underline {
199+
text-decoration: underline !important;
196200
}

app/assets/css/components/code.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
.code--block,
55
.code--slim {
66
font-family: Consolas,Monaco,"Andale Mono","Ubuntu Mono",monospace;
7-
color: #6f777b;
7+
color: #0b0c0c;
88
font-size: 14px;
99
}
1010

app/uk/gov/hmrc/apidocumentation/views/authorisation.scala.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ <h2 id="onThisPage" class="visually-hidden">on this page</h2>
5656
</div>
5757
</nav>
5858

59-
<hr>
59+
<hr aria-hidden="true">
6060

6161
<section id="introduction">
6262

@@ -89,11 +89,11 @@ <h2 class="heading-large">Introduction</h2>
8989
</tr>
9090
<tr>
9191
<td scope="row">Application-restricted</td>
92-
<td><span class="code">server_token</span></td>
92+
<td><span class="code--slim">server_token</span></td>
9393
</tr>
9494
<tr>
9595
<td scope="row">User-restricted</td>
96-
<td>OAuth 2.0 <span class="code">access_token</span></td>
96+
<td>OAuth 2.0 <span class="code--slim">access_token</span></td>
9797
</tr>
9898
</tbody>
9999
</table>

app/uk/gov/hmrc/apidocumentation/views/authorisation2SV.scala.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ <h2 id="onThisPage" class="visually-hidden">on this page</h2>
5656
</div>
5757
</nav>
5858

59-
<hr>
59+
<hr aria-hidden="true">
6060

6161
<section id="two-step-verification">
6262
<h2 class="heading-large" id="2sv">2-step verification</h2>
@@ -70,7 +70,7 @@ <h2 class="heading-large" id="2sv">2-step verification</h2>
7070
</ul>
7171
<p>Second and subsequent times through, the user must complete 2SV using their chosen method. Because 2SV is part of the API authorisation process, users do not need to complete it every time they use an API, only when their token expires (after 18 months) or if they are granting access to additional scopes.</p>
7272
<p>The following diagram illustrates the user journey:</p>
73-
<div class="text-center">
73+
<div class="text--center">
7474
<img src="@routes.Assets.versioned("content/images/API-2SV-journey.png")" width="300" align="middle" alt="2 step verification user journey"/>
7575
</div>
7676

app/uk/gov/hmrc/apidocumentation/views/authorisationAppRestrictedEndpoints.scala.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ <h2 id="onThisPage" class="visually-hidden">on this page</h2>
5656
</div>
5757
</nav>
5858

59-
<hr>
59+
<hr aria-hidden="true">
6060

6161
<section id="application-restricted">
6262

6363
<h2 class="heading-large">Application-restricted endpoints</h2>
6464

65-
<p>These endpoints need a server token. This must be passed as an <code class="code">Authorization</code>
66-
header with type <code class="code">Bearer</code>.</p>
65+
<p>These endpoints need a server token. This must be passed as an <code class="code--slim">Authorization</code>
66+
header with type <code class="code--slim">Bearer</code>.</p>
6767

6868
<h3 class="heading-medium">Example</h3>
6969

@@ -72,8 +72,8 @@ <h3 class="heading-medium">Example</h3>
7272
-H 'Accept: application/vnd.hmrc.1.0+json' \
7373
@{applicationConfig.apiUrl}hello/application'</pre>
7474

75-
<p>If you’ve already been issued a valid OAuth 2.0 <code class="code">access_token</code>,
76-
you can substitute this with a <code class="code">server_token</code>.</p>
75+
<p>If you’ve already been issued a valid OAuth 2.0 <code class="code--slim">access_token</code>,
76+
you can substitute this with a <code class="code--slim">server_token</code>.</p>
7777

7878
<p class="panel panel-border-wide">For a working example <a href="@controllers.routes.DocumentationController.tutorialsPage().url#app-restricted">see the application-restricted endpoint tutorial.</a></p>
7979

app/uk/gov/hmrc/apidocumentation/views/authorisationOpenAccessEndpoints.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ <h2 id="onThisPage" class="visually-hidden">on this page</h2>
5555
</div>
5656
</nav>
5757

58-
<hr>
58+
<hr aria-hidden="true">
5959

6060
<section id="open-access">
6161

app/uk/gov/hmrc/apidocumentation/views/authorisationUserRestrictedEndpoints.scala.html

Lines changed: 48 additions & 47 deletions
Large diffs are not rendered by default.

app/uk/gov/hmrc/apidocumentation/views/helpers/Helpers.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ object Markdown {
150150
.setDecorator(new ExtDecorator()
151151
.addStyleClass("list list-bullet", "ul")
152152
.addStyleClass("list list-number", "ol")
153-
.addStyleClass("code", "code")
153+
.addStyleClass("code--slim", "code")
154154
.addStyleClass("heading-large", "h1")
155155
.addStyleClass("heading-medium", "h2")
156156
.addStyleClass("heading-small", "h3")

app/uk/gov/hmrc/apidocumentation/views/include/main.scala.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157

158158
<main id="wrapper" role="main">
159159
<div class="centered-content">
160-
<div class="grid-row">@serviceInfo</div>
160+
@serviceInfo
161161
@breadcrumbs.map { breadcrumbs =>
162162
<div class="grid-row">
163163
<div class="column-three-quarters">
@@ -169,7 +169,6 @@
169169
</div>
170170
}
171171
</div>
172-
<br>
173172
<div class="centered-content">
174173
<div class="grid-row sticky-nav_wrapper">
175174
@if(leftNav.isDefined) { @contentWithLeftNav } else { @content }

app/uk/gov/hmrc/apidocumentation/views/raml/fields.scala.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919
@(fields: Seq[RequestResponseField], caption: String, fieldOptionalityKnown: Boolean)
2020

2121
@if(fields.nonEmpty) {
22-
<table>
23-
<caption>
22+
<table class="table--align-top">
23+
<caption class="table__caption--low-vis">
2424
<div class="visually-hidden">@caption</div>
2525
</caption>
2626
<col width="50%"/>
2727
<col width="50%"/>
2828
<thead>
29-
<tr>
30-
<th>Name</th>
29+
<tr class="table__row--desktop-heading">
30+
<th class="table__col--1-2">Name</th>
3131
<th>Description</th>
3232
</tr>
3333
</thead>
@@ -36,7 +36,7 @@
3636
<tr class="table__row--responsive
3737
@if(field.depth == 0 || field.`type` == "object") {table__row--parent}
3838
@if(field.depth > 0) {table__row--nested-@{field.depth}}">
39-
<td data-heading="Name" class="table__detail--responsive">
39+
<td data-heading="Name" class="table__detail--responsive table__col--1-2">
4040
<div class="table__cell-contents--responsive">
4141
<div class="parameter-name">@{field.name}</div>
4242
<div class="parameter-type">@if(field.isArray) {array} else {@{field.`type`}}</div>
@@ -54,12 +54,12 @@
5454
@if(field.description.nonEmpty) {<p>@{field.description}</p>}
5555

5656
@field.typeId match {
57-
case "full-date" => { <p>Date in the format <code class="code">YYYY-MM-DD</code></p> }
58-
case "tax-year" => { <p>Tax year in the format <code class="code">YYYY-YY</code></p> }
57+
case "full-date" => { <p>Date in the format <code class="code--slim">YYYY-MM-DD</code></p> }
58+
case "tax-year" => { <p>Tax year in the format <code class="code--slim">YYYY-YY</code></p> }
5959
case _ => {
6060
@if(field.pattern.nonEmpty) {
6161
<p>
62-
Must conform to the regular expression <code class="code">@{field.pattern}</code>
62+
Must conform to the regular expression <code class="code--slim">@{field.pattern}</code>
6363
</p>
6464
}
6565
}
@@ -72,15 +72,15 @@
7272
<div>
7373
@for(enumValue <- field.enumValues) {
7474
<div>
75-
<code class="code">@{enumValue.name}</code>
75+
<code class="code--slim">@{enumValue.name}</code>
7676
@if(enumValue.description.isDefined) { - @{enumValue.description} }
7777
</div>
7878
}
7979
</div>
8080
} else {
8181
@if(field.example.nonEmpty) {
8282
<p>
83-
For example: <code class="code">@{field.example}</code>
83+
For example: <code class="code--slim">@{field.example}</code>
8484
</p>
8585
}
8686
}

0 commit comments

Comments
 (0)