Skip to content

Commit ee4957b

Browse files
author
Chris Hart
committed
feat(ui-docs-client): Docs/homepage refresh
refs: INSTUI-2447 Test plan: - The docs should be using the Instructure theme by default. - The docs examples/playgrounds should render using the canvas theme. - The Button upgrade guide for 8.0 should render its examples using the canvas theme. - If the project is `instructure-ui`, the homepage should feature a new Hero section specific to Instructure UI. - The docs should behave responsively as detailed in the JIRA ticket. Change-Id: I670730c704e1008a5d1827c93a8a23ce1a4cede2 Reviewed-on: https://gerrit.instructure.com/c/instructure-ui/+/221248 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Product-Review: Pam Hiett <phiett@instructure.com> Reviewed-by: Ken Meleta <kmeleta@instructure.com> Reviewed-by: Pam Hiett <phiett@instructure.com> QA-Review: Daniel Sasaki <dsasaki@instructure.com> Visual-Regression-Test: Chris Hart <chart@instructure.com>
1 parent 93cd9c3 commit ee4957b

File tree

43 files changed

+2017
-705
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2017
-705
lines changed

docs/patterns/UsingIcons.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ category: Patterns
44
id: UsingIcons
55
---
66

7-
## Using Iconography
7+
## Using Icons
88

9-
### Icons and Accessibility
10-
By default the role is set to presentation. However, when the `title` prop is set, the role attribute is set to img. Include the `description` prop to further describe the icon.
9+
### Accessibility
10+
By default, the icon's `role` is set to `presentation`. However, when the `title` prop is set, the role attribute is set to `img`. Include the `description` prop to further describe the icon.
1111

1212
```js
1313
---
@@ -18,8 +18,8 @@ example: true
1818
</View>
1919
```
2020

21-
### Line vs Solid Iconography
22-
The default choice for Iconography is the `Line` version. However, when an Icon appears on a dark or colored background the `Solid` version should be used.
21+
### Line vs Solid
22+
The default choice for iconography is the `Line` version. However, when an icon appears on a dark or colored background, the `Solid` version should be used.
2323

2424
```js
2525
---
@@ -35,7 +35,7 @@ example: true
3535
```
3636

3737
### Changing the Icon Size
38-
By default the Icon is set to a size of 1em, so it will scale to match the font-size of its parent element. To change the size of the icon, use one of the predefined options for the `size` prop. If you need a size that is not offered via the size prop, adjust the font-size on the icons parent element.
38+
By default, icons are set to a size of 1em, so they will scale to match the font-size of their parent element. To change the size of the icon, use one of the predefined options for the `size` prop. If you need a size that is not offered via the size prop, adjust the font-size on the icon's parent element.
3939
```js
4040
---
4141
example: true
@@ -73,7 +73,7 @@ example: true
7373
<View as="div" margin="small" padding="medium" background="default">
7474
<Flex wrap="wrap">
7575
<Flex.Item padding="small" shouldGrow>
76-
<Text color="brand">I am inheriting my parents color <IconHeartLine /></Text>
76+
<Text color="brand">I am inheriting my parent's color <IconHeartLine /></Text>
7777
</Flex.Item>
7878
<Flex.Item padding="small" shouldGrow>
7979
<Text as="div">My icon should be primary <IconHeartLine color="primary" /></Text>

logo.png

-15.9 KB
Loading

packages/__docs__/globals.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ import avatarPortrait from './avatarPortrait.jpg'
4949
import placeholderImage from './placeholder-image'
5050
import placeholderLogo from './placeholder-logo'
5151

52-
import { theme } from '@instructure/canvas-theme'
52+
import { theme } from '@instructure/instructure-theme'
5353
theme.use()
5454

5555
const globals = {

packages/__docs__/index.ejs

Lines changed: 73 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,76 @@
77

88
<title><%= htmlWebpackPlugin.options.title %></title>
99

10-
<!-- comment out instructure-themed font until 7.0
11-
<link href='https://fonts.googleapis.com/css?family=Nunito+Sans:300,400,700' rel='stylesheet'>
12-
-->
10+
<!-- Proxima Nova fallback font for instructure theme -->
11+
<link href='https://fonts.googleapis.com/css?family=Nunito+Sans:300,400,700' rel='stylesheet'>
12+
13+
<!-- font for canvas theme -->
1314
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,400i,700,700i" rel="stylesheet">
1415

16+
<!-- homepage hero image -->
17+
<link rel="preload" href="https://instui-docs.s3.us-east-2.amazonaws.com/hero2.jpg" as="image">
18+
19+
<!-- custom headline font -->
20+
<link rel="preload" href="https://instui-docs.s3.us-east-2.amazonaws.com/tiempos-headline-web-bold.woff2" as="font" type="font/woff2" crossorigin>
21+
1522
<style type="text/css">
23+
@font-face {
24+
font-family: "TiemposHeadlineWebBold";
25+
src: url("https://instui-docs.s3.us-east-2.amazonaws.com/tiempos-headline-web-bold.woff2") format("woff2");
26+
}
1627
body {
17-
/* same as above
18-
font-family: "Proxima Nova", "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
19-
*/
20-
font-family: "Lato", Helvetica, Arial, sans-serif;
21-
background-color: #fff;
28+
font-family: "Proxima Nova", "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
29+
"Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
30+
}
31+
#app {
32+
height: 100%;
33+
}
34+
@keyframes docsLoading {
35+
to {
36+
transform: scale(1) rotate(0);
37+
}
38+
}
39+
.docsLoading {
40+
text-align: center;
41+
margin: 2rem auto;
42+
width: 6rem;
43+
height: 6rem;
44+
display: flex;
45+
align-items: center;
46+
justify-content: center;
47+
flex-direction: column;
48+
}
49+
.docsLoading__Spinner {
50+
display: inline-block;
51+
position: relative;
52+
width: 2rem;
53+
height: 2rem;
54+
}
55+
.docsLoading__Spinner::before, .docsLoading__Spinner::after {
56+
content: "";
57+
display: block;
58+
position: absolute;
59+
box-sizing: border-box;
60+
top: 0;
61+
left: 0;
62+
width: 100%;
63+
height: 100%;
64+
background: #EA2127;
65+
transform: scale(0) rotate(1turn);
66+
animation-name: docsLoading;
67+
animation-duration: 1s;
68+
animation-iteration-count: infinite;
69+
animation-direction: alternate;
70+
}
71+
.docsLoading__Spinner::after {
72+
animation-direction: alternate-reverse;
73+
background: #F68E1F;
74+
}
75+
.docsLoading__Text {
76+
padding-top: 1rem;
77+
text-transform: uppercase;
78+
font-size: small;
79+
color: #666;
2280
}
2381
</style>
2482

@@ -38,8 +96,13 @@
3896
</head>
3997

4098
<body>
41-
<div id='flash-messages' role='alert'></div>
42-
<div id="app">Loading...</div>
99+
<div id="flash-messages" role="alert"></div>
100+
<div id="app">
101+
<div class="docsLoading">
102+
<span class="docsLoading__Spinner" aria-hidden="true"></span>
103+
<span class="docsLoading__Text">Loading&hellip;</span>
104+
</div>
105+
</div>
43106
<div id="nav"></div>
44107
</body>
45108
</html>

packages/ui-docs-client/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"@babel/runtime": "^7.9.2",
3030
"@babel/standalone": "^7.9.5",
3131
"@instructure/ui-a11y-content": "^6.26.0",
32+
"@instructure/ui-alerts": "^6.26.0",
3233
"@instructure/ui-buttons": "^6.26.0",
3334
"@instructure/ui-checkbox": "^6.26.0",
3435
"@instructure/ui-code-editor": "^6.26.0",

0 commit comments

Comments
 (0)