Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New infra from clayui.com with Gatsbyjs #1040

Merged
merged 152 commits into from
Jul 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
152 commits
Select commit Hold shift + click to select a range
484479a
Remove old clayui.com
matuzalemsteles Jun 25, 2018
aba5f7f
Starter Hello World!
matuzalemsteles Jun 14, 2018
c7dda1d
Adds necessary configs to use clay-css in gatsby
diegonvs Jun 15, 2018
9d6c8ef
Adds clay dependencies
diegonvs Jun 15, 2018
e920e84
Reuse some scss files from clayui.com
diegonvs Jun 15, 2018
9ac608b
Move clay to dependencies
diegonvs Jun 15, 2018
d442057
Remove package-lock.json
matuzalemsteles Jun 15, 2018
09493cc
Regen yarn.lock
matuzalemsteles Jun 18, 2018
7098135
Move docs from clayui.com to gatsby-clayui.com
matuzalemsteles Jun 18, 2018
d96b29c
SF
matuzalemsteles Jun 18, 2018
8a6af01
Fix page form-elements-input-groups.md
matuzalemsteles Jun 18, 2018
7536449
Create page with markdown
matuzalemsteles Jun 18, 2018
f9eca06
SF
matuzalemsteles Jun 18, 2018
b52c471
Create documentation pages programmatically
matuzalemsteles Jun 18, 2018
fbd4c03
SF
matuzalemsteles Jun 18, 2018
6c4a835
Remove path from frontmatter
matuzalemsteles Jun 18, 2018
ba189be
Adds a LayoutNav component
diegonvs Jun 15, 2018
e3ea1d9
Initial scaffold of Index page with LayoutNav component
diegonvs Jun 15, 2018
0d06714
Adds a entry point for LayoutNav component
diegonvs Jun 18, 2018
958a54f
Remove unecessary return at getScrollTop
diegonvs Jun 18, 2018
be7b06c
Fixing node to be a window or a document due context
diegonvs Jun 18, 2018
5bf4894
Provide a correct way to attach and remove scroll event in react life…
diegonvs Jun 18, 2018
751a179
SF
diegonvs Jun 18, 2018
63c7700
Using ref attributes instead querySelector
diegonvs Jun 18, 2018
a051f18
SF
diegonvs Jun 18, 2018
5b7d7b7
Adds Gatsby Link to index page
diegonvs Jun 18, 2018
4d10c19
Adds WOWjs as dependency
diegonvs Jun 18, 2018
9a38243
Make Index a class of a component to initialize WOWjs appropriately
diegonvs Jun 18, 2018
d59ba1d
Update yarn.lock
diegonvs Jun 18, 2018
28f0b58
Adds a Template class to be used as layout
diegonvs Jun 18, 2018
09e1ae8
Adds Link component to LayoutNav
matuzalemsteles Jun 19, 2018
5da2370
Adds browser-monads dependency
diegonvs Jun 19, 2018
4c0d65e
Make LayoutNav component use browser-mondads library to polyfill window
diegonvs Jun 19, 2018
7b57dac
Import some sources from static resources
diegonvs Jun 19, 2018
3fe0849
Updade lockfile
diegonvs Jun 19, 2018
92fef37
Adds a pathPrefix path to gatsby config file
diegonvs Jun 19, 2018
2bd9621
Adds static images folder
diegonvs Jun 19, 2018
c1cf17e
Fix to build wowjs without window is defined
diegonvs Jun 19, 2018
78077ba
Move modifyWebpackConfig config to gatsby folder
diegonvs Jun 19, 2018
4805452
Adds missing withPrefix call with a static resource
diegonvs Jun 19, 2018
c0ac389
Remove unused image assets
diegonvs Jun 19, 2018
08e18e6
Adds missing classes
diegonvs Jun 19, 2018
32b49eb
Fix links to getting started
matuzalemsteles Jun 19, 2018
42afacb
Adds doc-links.yaml to catalog documentation contents for Sidebar
matuzalemsteles Jun 19, 2018
8974ea8
Create Sidebar component
matuzalemsteles Jun 19, 2018
d225076
Install classnames
matuzalemsteles Jun 19, 2018
324ce89
Create Navigation component
matuzalemsteles Jun 19, 2018
d0da4ec
Adds icons.svg to static folder
matuzalemsteles Jun 19, 2018
9e32d80
WIP: Create Search component
matuzalemsteles Jun 19, 2018
526d214
Add action to the menu in mobile navigation
matuzalemsteles Jun 20, 2018
90581cc
Add Sidebar in docs template
matuzalemsteles Jun 20, 2018
a020e11
Regen yarn.lock
matuzalemsteles Jun 20, 2018
85a6105
Add Helmet to docs template
matuzalemsteles Jun 20, 2018
ca02cab
Add google-analytics plugin
matuzalemsteles Jun 20, 2018
c0cff85
Regen yarn.lock
matuzalemsteles Jun 20, 2018
5474758
Add Helmet to home page
matuzalemsteles Jun 20, 2018
90c385f
Add html.js
matuzalemsteles Jun 20, 2018
cf3638d
Fix the size of the `Component Library` card on the main page
matuzalemsteles Jun 20, 2018
58d26dc
Regen yarn.lock
matuzalemsteles Jun 20, 2018
aba867e
Create CodeTabs component
matuzalemsteles Jun 20, 2018
2ffcdb2
Regen yarn.lock
matuzalemsteles Jun 20, 2018
2e728b5
Add scss to Code block
matuzalemsteles Jun 20, 2018
af40c65
Using CodeTabs to docs template
matuzalemsteles Jun 20, 2018
8787f2b
Add script of Algolia DocSearch
matuzalemsteles Jun 20, 2018
a57b996
Add Algolia DocSearch to Search component
matuzalemsteles Jun 20, 2018
c79237e
Add CSS to customize Algolia DocSearch
matuzalemsteles Jun 20, 2018
858cc1c
Adds favicon into static folder
diegonvs Jun 20, 2018
f2a10e2
Adds favicon link to head component
diegonvs Jun 20, 2018
d1b7260
Update lockfile
diegonvs Jun 20, 2018
e68b6ab
Typo imports
diegonvs Jun 20, 2018
f8bf4e9
Update icons path in markdown files
diegonvs Jun 20, 2018
7971845
Replace text/html with html
matuzalemsteles Jun 20, 2018
a7a16bf
Remove all {sp} from soy
diegonvs Jun 20, 2018
43ccc16
Update prism highlights
diegonvs Jun 20, 2018
c61ebe7
Typo
diegonvs Jun 20, 2018
b113b4a
Revert cdn links at introduction
diegonvs Jun 20, 2018
fa5dc1e
Missing quotes
diegonvs Jun 20, 2018
472138f
Adds Clay Charts documentation
matuzalemsteles Jun 22, 2018
cdb20a0
Add section of the Charts to data/sidebars
matuzalemsteles Jun 22, 2018
71cc663
Install ClayCharts, gatsby-remark-component and rehype-react
matuzalemsteles Jun 22, 2018
d6f099b
Set remark-component with component ClayChart
matuzalemsteles Jun 22, 2018
618d989
Add gatsby-plugin-react-next to use the latest version of React
matuzalemsteles Jun 22, 2018
7b90a4e
Create md files with docs template only
matuzalemsteles Jun 22, 2018
e3d47ee
Create Graph components to render ClayCharts
matuzalemsteles Jun 22, 2018
9b9d059
Add CSS of the graphics
matuzalemsteles Jun 22, 2018
8cf4b5b
Set docsTemplate to render with rehypeReact
matuzalemsteles Jun 22, 2018
df10ebd
Add world-low-res.geo.json to static folder
matuzalemsteles Jun 22, 2018
28494a4
Regen yarn.lock
matuzalemsteles Jun 22, 2018
d0cd5da
Add new section Try in LayoutNav
matuzalemsteles Jun 22, 2018
973673d
Adds fixed flag to add fixed-top class
matuzalemsteles Jun 23, 2018
3a8edad
SF
matuzalemsteles Jun 23, 2018
2a93d35
Create loadScript utility to add a script to the page
matuzalemsteles Jun 23, 2018
3b89e39
Add ClayAlert, ClayBadge, ClayButton, ClayDropdown, React live, Metal…
matuzalemsteles Jun 23, 2018
84b827b
Regen yarn.lock
matuzalemsteles Jun 23, 2018
c7cfce8
Creates the newFunction utility
matuzalemsteles Jun 23, 2018
27a6492
Create CodeEditor component
matuzalemsteles Jun 23, 2018
09e3fcf
Create the mountCodeEditor utility
matuzalemsteles Jun 23, 2018
f3cce8d
Create the `Try` page for experiments with Clay Live
matuzalemsteles Jun 23, 2018
b281c82
Adds the css to the Try page
matuzalemsteles Jun 23, 2018
df88463
Create gatsby-transformer-try-examples to create the graphql query of…
matuzalemsteles Jun 23, 2018
5e8dcdf
Update main.scss
matuzalemsteles Jun 23, 2018
6904807
Adding some examples of using Clay Components to serve the Try page
matuzalemsteles Jun 23, 2018
e9e2c1b
Adds the css in the head when the build process is done
matuzalemsteles Jun 23, 2018
e33993c
Adding a workaround to fix AST xlink:href
matuzalemsteles Jun 23, 2018
f38cf9d
Ignoring Clay components in the build process
matuzalemsteles Jun 23, 2018
2060ccc
Update README.md
matuzalemsteles Jun 23, 2018
cbc2a68
Update package.json
matuzalemsteles Jun 23, 2018
96d144d
Create gatsby-remark-use-clipboard plugin to add clipboard button in …
matuzalemsteles Jun 23, 2018
dc27d62
Fixes htmlAst at compile time
matuzalemsteles Jun 24, 2018
8f2b9c8
Replace xlinkHref with xlink:href
matuzalemsteles Jun 24, 2018
aecf7e2
Fix CodeTabs to catch by className code-container
matuzalemsteles Jun 24, 2018
31aa7c1
Replace gatsby-highlight with code-container
matuzalemsteles Jun 24, 2018
be4b871
Starts ClayCharts only in runtime
matuzalemsteles Jun 24, 2018
9c73f14
Add title to copy button
matuzalemsteles Jun 24, 2018
afc98e5
Fix the Cards link
matuzalemsteles Jun 24, 2018
4b35dff
Install metal-clipboard e clay-tooltip
matuzalemsteles Jun 24, 2018
0fc5457
Regen yarn.lock
matuzalemsteles Jun 24, 2018
b7fcb17
Ignore ClayTooltip and MetalClipboard at compile time
matuzalemsteles Jun 24, 2018
f96e11e
Create CodeClipboard component
matuzalemsteles Jun 24, 2018
102b740
Use the CodeClipboard in the docs template
matuzalemsteles Jun 24, 2018
9dc46a7
Create the gatsby-remark-foreach-icons plugin
matuzalemsteles Jun 25, 2018
51c279f
Use the foreach plugin on the icons page
matuzalemsteles Jun 25, 2018
09dc7d5
Add new icons
matuzalemsteles Jun 25, 2018
efa1a3d
Replace rss.svg.svg with rss.svg
matuzalemsteles Jun 25, 2018
e11431e
Update package.json
matuzalemsteles Jun 25, 2018
023da57
Regen yarn.lock
matuzalemsteles Jun 25, 2018
4df3cde
Create page redirect
matuzalemsteles Jun 25, 2018
17dbd2d
Removes unnecessary withPrefix from images
matuzalemsteles Jun 25, 2018
10e452b
Add JavaScript utilities
matuzalemsteles Jun 25, 2018
3e9cf17
Removes unnecessary use of favicon import and imports JavaScript util…
matuzalemsteles Jun 25, 2018
67a2e49
Removes unnecessary div in layout
matuzalemsteles Jun 25, 2018
dc0615b
Add script to deploy
matuzalemsteles Jun 25, 2018
68ded50
Fix redirect links
matuzalemsteles Jun 25, 2018
fcf508b
Manually pass component name to newFunction
matuzalemsteles Jun 25, 2018
f8a3aaf
Documentation fixes and improvements
matuzalemsteles Jun 25, 2018
0aa5418
Remove unnecessary scripts from electric
matuzalemsteles Jun 25, 2018
c93f673
Move clayui.com to the root folder
matuzalemsteles Jun 25, 2018
cfe519d
Regen yarn.lock
matuzalemsteles Jun 25, 2018
0d966c0
Update clayui.com link in README.md
matuzalemsteles Jun 25, 2018
b8e0579
Fixes the name of the code blocks
matuzalemsteles Jun 25, 2018
d885893
Removes `class` and `Component.render` and adds under the table
matuzalemsteles Jun 26, 2018
a1fb957
Updating examples with just the markups
matuzalemsteles Jun 26, 2018
f7aee9e
Fix Geomap docs
matuzalemsteles Jun 26, 2018
e02046b
Add scrollbar when it reaches maximum size
matuzalemsteles Jun 26, 2018
73ecdef
Dispose the CodeClipboard in componentWillUnmount
matuzalemsteles Jun 26, 2018
134d1ff
Add ClayCharts Components to CodeEditor
matuzalemsteles Jun 26, 2018
04f026d
Add an example of using Clay Charts
matuzalemsteles Jun 26, 2018
c7543ea
Remove the `div` wrappers from the examples and add them in runtime
matuzalemsteles Jun 26, 2018
dcc95db
Remove CDN Links page
matuzalemsteles Jun 26, 2018
d2e61f9
Add snippets of CDN links with tags in the Introduction
matuzalemsteles Jun 26, 2018
6cfd95b
Fix script deploy to clayui.com
matuzalemsteles Jun 26, 2018
79fe93e
Fix site links in README.md
matuzalemsteles Jun 26, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The pillar to give colors and structure to Clay, where is the css and examples o

All components that follow clay-css marking and Lexicon use cases, developed on [Metal.js](https://metaljs.com/) with [Soy (Closure templates)](https://developers.google.com/closure/templates/docs/commands).

### [Clayui.com](./packages/clayui.com)
### [Clayui.com](./clayui.com)

Contains the source code and documentation powering [clayui.com](https://clayui.com/).

Expand All @@ -33,7 +33,7 @@ Contains the source code and documentation powering [clayui.com](https://clayui.

You can find the Clay documentation on the [site](https://clayui.com/docs/components/alerts.html).

* [Getting Started](https://clayui.com/docs/getting_started/introduction.html)
* [Getting Started](https://clayui.com/docs/getting-started/introduction.html)
* [Layout](https://clayui.com/docs/layout/grid.html)
* [Components Library](https://clayui.com/docs/components/alerts.html)
* [News](https://clayui.com/docs/news/)
Expand Down Expand Up @@ -66,7 +66,7 @@ Each package contains a page with demos, check.

Clay is available as the `clay` package in npm for components and for css like `clay-css`. It is also available on a [CDN](https://cdn.jsdelivr.net/npm/clay/lib/js/clay.js) for components and for css, [check](https://cdn.jsdelivr.net/npm/clay/lib/css/atlas.css). But if you just want the separate components, it's also available in the npm as [clay-](https://www.npmjs.com/search?q=clay-).

See the [Getting Started](https://clayui.com/docs/getting_started/introduction.html) guide for more information.
See the [Getting Started](https://clayui.com/docs/getting-started/introduction.html) guide for more information.

Even if your application does not use the framework [Metal.js](https://metaljs.com/) Clay is flexible and can be used as WebComponents see some examples with:

Expand Down
62 changes: 62 additions & 0 deletions clayui.com/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

.cache/
public
yarn-error.log
21 changes: 21 additions & 0 deletions clayui.com/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2017 gatsbyjs

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
5 changes: 5 additions & 0 deletions clayui.com/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# clayui.com
The main Clay site at clayui.com

## Running in development
`gatsby develop`
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
title: "Using JS Components with Metal.js"
---

<article id="using-js-components-with-metal">

Clay Components are made according to Lexicon standards and built on top of the [Metal.js](https://metaljs.com/) framework, so you can use Clay Components in your JSX and SOY templates.

## Jsx

You can import your components as described in [Importing the JS Component](/docs/getting-started/importing-the-js-component.html). Consider the example below:


```javascript
import {ClayBadge} from 'clay';
```

You can call Clay components in your JSX templates just like you would call Metal.js components:

```javascript
import Component from 'metal-jsx';
import {ClayBadge} from 'clay';

class App extends Component {
render() {
return(
<div>
<h4>My Application with Clay<h4>
<hr />
<ClayBadge
id="myId"
label="badge"
style="danger"
/>
</div>
);
}
};
```

## Soy

You can call Clay components in your SOY templates the same way you would call any SOY component. Consider the example below:

<div class="alert alert-warning" role="alert">
<span class="alert-indicator">
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-warning-full">
<use xlink:href="/vendor/lexicon/icons.svg#warning-full"></use>
</svg>
</span>
<strong class="lead">Warning:</strong> Make sure you import the Clay component where you want to use it.
</div>

```javascript
import Component from 'metal-component';
import Soy from 'metal-soy';

import {ClayBadge} from 'clay';

class App extends Component {}

// more...
```
```soy
{namespace App}

{template .render}
{call ClayBadge.render}
{param id: 'myId' /}
{param label: 'badge' /}
{param style: 'danger' /}
{/call}
{/template}
```

</article>
Loading