├── gatsby-config.js
├── .prettierrc
├── src
└── pages
│ ├── index.css
│ └── index.tsx
├── gatsby-ssr.js
├── package.json
├── LICENSE
├── .gitignore
├── SECURITY.md
└── README.md
/gatsby-config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: [`gatsby-plugin-typescript`],
3 | }
4 |
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "endOfLine": "lf",
3 | "semi": false,
4 | "singleQuote": false,
5 | "tabWidth": 2,
6 | "trailingComma": "es5"
7 | }
8 |
--------------------------------------------------------------------------------
/src/pages/index.css:
--------------------------------------------------------------------------------
1 | .App {
2 | text-align: center;
3 | }
4 |
5 | .App-logo {
6 | animation: App-logo-spin infinite 20s linear;
7 | height: 40vmin;
8 | pointer-events: none;
9 | }
10 |
11 | .App-header {
12 | background-color: #282c34;
13 | min-height: 100vh;
14 | display: flex;
15 | flex-direction: column;
16 | align-items: center;
17 | justify-content: center;
18 | font-size: calc(10px + 2vmin);
19 | color: white;
20 | }
21 |
22 | .App-link {
23 | color: #61dafb;
24 | }
25 |
26 | body,
27 | html,
28 | #___gatsby {
29 | height: 100%;
30 | }
31 |
--------------------------------------------------------------------------------
/gatsby-ssr.js:
--------------------------------------------------------------------------------
1 | import { Stylesheet, InjectionMode } from "@uifabric/merge-styles"
2 | import { renderStatic } from "@uifabric/merge-styles/lib/server"
3 | import { renderToString } from "react-dom/server"
4 | import React from "react"
5 |
6 | export const replaceRenderer = ({
7 | bodyComponent,
8 | replaceBodyHTMLString,
9 | setHeadComponents,
10 | }) => {
11 | const { html, css } = renderStatic(() => {
12 | return renderToString(bodyComponent)
13 | })
14 |
15 | replaceBodyHTMLString(html)
16 |
17 | setHeadComponents([])
18 | }
19 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "gatsby-starter-uifabric",
3 | "private": true,
4 | "description": "A simplified bare-bones starter for Gatsby",
5 | "version": "0.1.0",
6 | "license": "MIT",
7 | "scripts": {
8 | "build": "gatsby build",
9 | "develop": "gatsby develop",
10 | "format": "prettier --write src/**/*.{js,jsx}",
11 | "start": "npm run develop",
12 | "serve": "gatsby serve",
13 | "test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\""
14 | },
15 | "dependencies": {
16 | "@uifabric/fluent-theme": "^0.16.7",
17 | "gatsby": "^2.4.0",
18 | "office-ui-fabric-react": "^6.176.0",
19 | "react": "^16.8.6",
20 | "react-dom": "^16.8.6"
21 | },
22 | "devDependencies": {
23 | "gatsby-plugin-typescript": "^2.0.13",
24 | "prettier": "^1.17.0"
25 | },
26 | "repository": {
27 | "type": "git",
28 | "url": "https://github.com/gatsbyjs/gatsby-starter-hello-world"
29 | },
30 | "bugs": {
31 | "url": "https://github.com/gatsbyjs/gatsby/issues"
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Microsoft
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 |
8 | # Runtime data
9 | pids
10 | *.pid
11 | *.seed
12 | *.pid.lock
13 |
14 | # Directory for instrumented libs generated by jscoverage/JSCover
15 | lib-cov
16 |
17 | # Coverage directory used by tools like istanbul
18 | coverage
19 |
20 | # nyc test coverage
21 | .nyc_output
22 |
23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24 | .grunt
25 |
26 | # Bower dependency directory (https://bower.io/)
27 | bower_components
28 |
29 | # node-waf configuration
30 | .lock-wscript
31 |
32 | # Compiled binary addons (http://nodejs.org/api/addons.html)
33 | build/Release
34 |
35 | # Dependency directories
36 | node_modules/
37 | jspm_packages/
38 |
39 | # Typescript v1 declaration files
40 | typings/
41 |
42 | # Optional npm cache directory
43 | .npm
44 |
45 | # Optional eslint cache
46 | .eslintcache
47 |
48 | # Optional REPL history
49 | .node_repl_history
50 |
51 | # Output of 'npm pack'
52 | *.tgz
53 |
54 | # dotenv environment variables file
55 | .env
56 |
57 | # gatsby files
58 | .cache/
59 | public
60 |
61 | # Mac files
62 | .DS_Store
63 |
64 | # Yarn
65 | yarn-error.log
66 | .pnp/
67 | .pnp.js
68 | # Yarn Integrity file
69 | .yarn-integrity
70 |
--------------------------------------------------------------------------------
/src/pages/index.tsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import { Stack, Text, Link, FontWeights } from "office-ui-fabric-react"
3 | import "./index.css"
4 |
5 | const boldStyle = { root: { fontWeight: FontWeights.semibold } }
6 |
7 | const App: React.FunctionComponent = () => {
8 | return (
9 |
24 |
28 |
29 | Welcome to Your UI Fabric App
30 |
31 |
32 | For a guide on how to customize this project, check out the UI Fabric
33 | documentation.
34 |
35 |
36 | Essential Links
37 |
38 |
39 | Docs
40 |
41 | Stack Overflow
42 |
43 |
44 | Github
45 |
46 | Twitter
47 |
48 |
49 | Design System
50 |
51 |
52 |
53 | Icons
54 |
55 |
56 | Typography
57 |
58 |
59 | Theme
60 |
61 |
62 |
63 | )
64 | }
65 |
66 | export default App
67 |
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## Security
4 |
5 | Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
6 |
7 | If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.
8 |
9 | ## Reporting Security Issues
10 |
11 | **Please do not report security vulnerabilities through public GitHub issues.**
12 |
13 | Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).
14 |
15 | If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).
16 |
17 | You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).
18 |
19 | Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
20 |
21 | * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
22 | * Full paths of source file(s) related to the manifestation of the issue
23 | * The location of the affected source code (tag/branch/commit or direct URL)
24 | * Any special configuration required to reproduce the issue
25 | * Step-by-step instructions to reproduce the issue
26 | * Proof-of-concept or exploit code (if possible)
27 | * Impact of the issue, including how an attacker might exploit the issue
28 |
29 | This information will help us triage your report more quickly.
30 |
31 | If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.
32 |
33 | ## Preferred Languages
34 |
35 | We prefer all communications to be in English.
36 |
37 | ## Policy
38 |
39 | Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).
40 |
41 |
42 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | UI Fabric Gatsby.js
3 |
4 |
5 | Kick off your project with this UI Fabric boilerplate. This starter ships with the main Gatsby configuration files you might need to get up and running blazing fast with the blazing fast app generator for React.
6 |
7 | ## 🚀 Quick start
8 |
9 | 1. **Create a Gatsby site.**
10 |
11 | Use the Gatsby CLI to create a new site, specifying the UI Fabric starter.
12 |
13 | ```sh
14 | # create a new Gatsby site using the UI Fabric starter
15 | gatsby new my-uifabric-starter https://github.com/microsoft/gatsby-starter-uifabric
16 | ```
17 |
18 | 1. **Start developing.**
19 |
20 | Navigate into your new site’s directory and start it up.
21 |
22 | ```sh
23 | cd my-uifabric-starter/
24 | gatsby develop
25 | ```
26 |
27 | 1. **Open the source code and start editing!**
28 |
29 | Your site is now running at `http://localhost:8000`!
30 |
31 | _Note: You'll also see a second link: _`http://localhost:8000/___graphql`_. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the [Gatsby tutorial](https://www.gatsbyjs.org/tutorial/part-five/#introducing-graphiql)._
32 |
33 | Open the `my-uifabric-starter` directory in your code editor of choice and edit `src/pages/index.js`. Save your changes and the browser will update in real time!
34 |
35 | ## 🧐 What's inside?
36 |
37 | A quick look at the top-level files and directories you'll see in a Gatsby project.
38 |
39 | .
40 | ├── node_modules
41 | ├── src
42 | ├── .gitignore
43 | ├── .prettierrc
44 | ├── gatsby-browser.js
45 | ├── gatsby-config.js
46 | ├── gatsby-node.js
47 | ├── gatsby-ssr.js
48 | ├── LICENSE
49 | ├── package-lock.json
50 | ├── package.json
51 | └── README.md
52 |
53 | 1. **`/node_modules`**: This directory contains all of the modules of code that your project depends on (npm packages) are automatically installed.
54 |
55 | 2. **`/src`**: This directory will contain all of the code related to what you will see on the front-end of your site (what you see in the browser) such as your site header or a page template. `src` is a convention for “source code”.
56 |
57 | 3. **`.gitignore`**: This file tells git which files it should not track / not maintain a version history for.
58 |
59 | 4. **`.prettierrc`**: This is a configuration file for [Prettier](https://prettier.io/). Prettier is a tool to help keep the formatting of your code consistent.
60 |
61 | 5. **`gatsby-browser.js`**: This file is where Gatsby expects to find any usage of the [Gatsby browser APIs](https://www.gatsbyjs.org/docs/browser-apis/) (if any). These allow customization/extension of default Gatsby settings affecting the browser.
62 |
63 | 6. **`gatsby-config.js`**: This is the main configuration file for a Gatsby site. This is where you can specify information about your site (metadata) like the site title and description, which Gatsby plugins you’d like to include, etc. (Check out the [config docs](https://www.gatsbyjs.org/docs/gatsby-config/) for more detail).
64 |
65 | 7. **`gatsby-node.js`**: This file is where Gatsby expects to find any usage of the [Gatsby Node APIs](https://www.gatsbyjs.org/docs/node-apis/) (if any). These allow customization/extension of default Gatsby settings affecting pieces of the site build process.
66 |
67 | 8. **`gatsby-ssr.js`**: This file is where Gatsby expects to find any usage of the [Gatsby server-side rendering APIs](https://www.gatsbyjs.org/docs/ssr-apis/) (if any). These allow customization of default Gatsby settings affecting server-side rendering.
68 |
69 | 9. **`LICENSE`**: Gatsby is licensed under the MIT license.
70 |
71 | 10. **`package-lock.json`** (See `package.json` below, first). This is an automatically generated file based on the exact versions of your npm dependencies that were installed for your project. **(You won’t change this file directly).**
72 |
73 | 11. **`package.json`**: A manifest file for Node.js projects, which includes things like metadata (the project’s name, author, etc). This manifest is how npm knows which packages to install for your project.
74 |
75 | 12. **`README.md`**: A text file containing useful reference information about your project.
76 |
77 | ## 🎓 Learning Gatsby
78 |
79 | Looking for more guidance? Full documentation for Gatsby lives [on the website](https://www.gatsbyjs.org/). Here are some places to start:
80 |
81 | - **For most developers, we recommend starting with our [in-depth tutorial for creating a site with Gatsby](https://www.gatsbyjs.org/tutorial/).** It starts with zero assumptions about your level of ability and walks through every step of the process.
82 |
83 | - **To dive straight into code samples, head [to our documentation](https://www.gatsbyjs.org/docs/).** In particular, check out the _Guides_, _API Reference_, and _Advanced Tutorials_ sections in the sidebar.
84 |
85 | ## 💫 Deploy
86 |
87 | [](https://azuredeploy.net/?repository=https://github.com/kenotron/gatsby-starter-uifabric)
88 |
89 | [](https://app.netlify.com/start/deploy?repository=https://github.com/kenotron/gatsby-starter-uifabric)
90 |
91 |
92 | # Contributing
93 |
94 | This project welcomes contributions and suggestions. Most contributions require you to agree to a
95 | Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
96 | the rights to use your contribution. For details, visit https://cla.microsoft.com.
97 |
98 | When you submit a pull request, a CLA-bot will automatically determine whether you need to provide
99 | a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
100 | provided by the bot. You will only need to do this once across all repos using our CLA.
101 |
102 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
103 | For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
104 | contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
105 |
--------------------------------------------------------------------------------