-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #277 from guardian/jsh/add-page-layout-to-manager
Add basic page layout with EUI
- Loading branch information
Showing
23 changed files
with
3,196 additions
and
986 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3,905 changes: 3,049 additions & 856 deletions
3,905
apps/rule-manager/rule-manager-client/package-lock.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
113 changes: 0 additions & 113 deletions
113
apps/rule-manager/rule-manager-client/src/components/App.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* Use a more-intuitive box-sizing model. */ | ||
*, *::before, *::after { | ||
box-sizing: border-box; | ||
} | ||
|
||
/* Remove default margin. */ | ||
* { | ||
margin: 0; | ||
} | ||
|
||
/* Allow percentage-based heights in the application. */ | ||
html, body { | ||
height: 100%; | ||
} | ||
|
||
/* Improve text rendering. */ | ||
body { | ||
-webkit-font-smoothing: antialiased; | ||
} | ||
|
||
/* Avoid text overflows. */ | ||
p, h1, h2, h3, h4, h5, h6 { | ||
overflow-wrap: break-word; | ||
} | ||
|
||
/* Ensure headings are the correct font – EUI does not have a separate font for headings. */ | ||
h1, h2, h3, h4, h5, h6 { | ||
font-family: "Guardian Egyptian Text" !important; | ||
} |
29 changes: 29 additions & 0 deletions
29
apps/rule-manager/rule-manager-client/src/css/typography.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
@font-face { | ||
font-family: "Guardian Agate Sans"; | ||
src: url("../fonts/GuardianAgateSans1Web-Regular.woff2") format("woff2"), | ||
url("../fonts/GuardianAgateSans1Web-Regular.woff") format("woff"), | ||
url("../fonts/GuardianAgateSans1Web-Regular.ttf") format("truetype"); | ||
font-weight: 400; | ||
font-style: normal; | ||
font-stretch: normal; | ||
} | ||
|
||
@font-face { | ||
font-family: "Guardian Agate Sans"; | ||
src: url("../fonts/GuardianAgateSans1Web-Bold.woff2") format("woff2"), | ||
url("../fonts/GuardianAgateSans1Web-Bold.woff") format("woff"), | ||
url("../fonts/GuardianAgateSans1Web-Bold.ttf") format("truetype"); | ||
font-weight: 700; | ||
font-style: normal; | ||
font-stretch: normal; | ||
} | ||
|
||
@font-face { | ||
font-family: "Guardian Egyptian Text"; | ||
src: url("../fonts/GuardianTextEgyptianWeb-Regular.woff2") format("woff2"), | ||
url("../fonts/GuardianTextEgyptianWeb-Regular.woff") format("woff"), | ||
url("../fonts/GuardianTextEgyptianWeb-Regular.ttf") format("truetype"); | ||
font-weight: 400; | ||
font-style: normal; | ||
font-stretch: normal; | ||
} |
Binary file added
BIN
+76.5 KB
apps/rule-manager/rule-manager-client/src/fonts/GuardianAgateSans1Web-Bold.ttf
Binary file not shown.
Binary file added
BIN
+36.1 KB
apps/rule-manager/rule-manager-client/src/fonts/GuardianAgateSans1Web-Bold.woff
Binary file not shown.
Binary file added
BIN
+27.7 KB
apps/rule-manager/rule-manager-client/src/fonts/GuardianAgateSans1Web-Bold.woff2
Binary file not shown.
Binary file added
BIN
+76.4 KB
apps/rule-manager/rule-manager-client/src/fonts/GuardianAgateSans1Web-Regular.ttf
Binary file not shown.
Binary file added
BIN
+35.4 KB
apps/rule-manager/rule-manager-client/src/fonts/GuardianAgateSans1Web-Regular.woff
Binary file not shown.
Binary file added
BIN
+27.1 KB
apps/rule-manager/rule-manager-client/src/fonts/GuardianAgateSans1Web-Regular.woff2
Binary file not shown.
Binary file added
BIN
+79.8 KB
apps/rule-manager/rule-manager-client/src/fonts/GuardianTextEgyptianWeb-Regular.ttf
Binary file not shown.
Binary file added
BIN
+33.5 KB
apps/rule-manager/rule-manager-client/src/fonts/GuardianTextEgyptianWeb-Regular.woff
Binary file not shown.
Binary file added
BIN
+25.9 KB
apps/rule-manager/rule-manager-client/src/fonts/GuardianTextEgyptianWeb-Regular.woff2
Binary file not shown.
24 changes: 24 additions & 0 deletions
24
apps/rule-manager/rule-manager-client/src/ts/components/layout/Header.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React from "react"; | ||
import styled from "@emotion/styled" | ||
import {Logo} from "./Logo"; | ||
import {colors} from "../../constants/constants"; | ||
|
||
const HeaderContainer = styled.div` | ||
display: flex; | ||
height: 50px; | ||
background-color: white; | ||
`; | ||
|
||
const HeaderLogo = styled.div` | ||
height: 50px; | ||
width: 50px; | ||
margin-right: auto; | ||
background-color: ${colors.backgroundColorDark}; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
`; | ||
|
||
export const Header = () => <HeaderContainer> | ||
<HeaderLogo><Logo/></HeaderLogo> | ||
</HeaderContainer>; |
6 changes: 6 additions & 0 deletions
6
apps/rule-manager/rule-manager-client/src/ts/components/layout/Logo.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import React from "react"; | ||
|
||
export const Logo = () => <svg width="32" height="33" viewBox="0 0 32 33" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<path d="M14.0735 16.5351L13.4463 14.4381H9.70059L9.03957 16.5351L10.243 16.9346V17.8333H6.66669V16.9346L7.4633 16.5351L11.1752 5.83334H14.0904L17.8023 16.5351L18.6667 16.9346V17.8333H12.8701V16.9346L14.0735 16.5351ZM11.565 8.49631L10.1413 13.0234H13.0226L11.6497 8.49631H11.565Z" fill="white"/> | ||
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.34346 20.3964L8.44446 21.2954L12.9395 27.5884H13.3665L26.2222 14.2832L25.3232 13.4067L13.3665 24.2397L9.34346 20.3964Z" fill="white"/> | ||
</svg> |
15 changes: 15 additions & 0 deletions
15
apps/rule-manager/rule-manager-client/src/ts/components/layout/Page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from "react"; | ||
import { EuiPageTemplate, EuiProvider } from "@elastic/eui"; | ||
import {Header} from "./Header"; | ||
import {Rules} from "../pages/Rules"; | ||
import {euiThemeOverrides} from "../../constants/euiTheme"; | ||
|
||
export const Page = () => | ||
<EuiProvider modify={euiThemeOverrides}> | ||
<EuiPageTemplate> | ||
<Header /> | ||
<EuiPageTemplate.Section color="subdued"> | ||
<Rules /> | ||
</EuiPageTemplate.Section> | ||
</EuiPageTemplate> | ||
</EuiProvider> |
11 changes: 11 additions & 0 deletions
11
apps/rule-manager/rule-manager-client/src/ts/components/pages/Rules.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import {EuiTitle, EuiText} from "@elastic/eui"; | ||
import React from "react"; | ||
|
||
export const Rules = () => <> | ||
<EuiTitle> | ||
<h1>Manage rules</h1> | ||
</EuiTitle> | ||
<EuiText> | ||
<p>Rule management goes here.</p> | ||
</EuiText> | ||
</> |
4 changes: 4 additions & 0 deletions
4
apps/rule-manager/rule-manager-client/src/ts/constants/constants.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export const colors = { | ||
backgroundColorDark: "#2B2B29", | ||
backgroundColorLight: "#DBDBDB", | ||
} |
5 changes: 5 additions & 0 deletions
5
apps/rule-manager/rule-manager-client/src/ts/constants/euiTheme.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export const euiThemeOverrides = { | ||
"font": { | ||
"family": "'Guardian Agate Sans', BlinkMacSystemFont, Helvetica, Arial, sans-serif" | ||
} | ||
}; |
7 changes: 4 additions & 3 deletions
7
...manager/rule-manager-client/src/index.tsx → ...ager/rule-manager-client/src/ts/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import * as React from "react"; | ||
import * as ReactDOM from "react-dom"; | ||
|
||
import App from "./components/App"; | ||
import {Page} from "./components/layout/Page"; | ||
import "../css/reset.css"; | ||
import "../css/typography.css"; | ||
|
||
let rootElem: HTMLElement | null; | ||
|
||
rootElem = document.getElementById("rule-manager-app"); | ||
|
||
ReactDOM.render(<App />, rootElem); | ||
ReactDOM.render(<Page />, rootElem); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters