-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: fp-1499, core-styles pattern demo
- Loading branch information
1 parent
da7c905
commit 8d5129c
Showing
17 changed files
with
13,075 additions
and
2,133 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,9 @@ node_modules | |
.postcssrc.yml | ||
dist | ||
|
||
# Fractal | ||
demo | ||
|
||
# IDE | ||
.vscode | ||
|
||
|
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
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
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,9 @@ | ||
#!/usr/bin/env node | ||
|
||
/** Build CSS using the Core-Styles API */ | ||
|
||
const { buildStylesheets } = require('../src/main'); | ||
|
||
buildStylesheets('src/lib/_imports/**/*!(README).css', './dist', { | ||
baseMirrorDir: 'src/lib/_imports', | ||
}); |
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,9 @@ | ||
#!/usr/bin/env node | ||
|
||
/** Test CSS plugins via the Core-Styles API */ | ||
|
||
const { buildStylesheets } = require('../src/main'); | ||
|
||
buildStylesheets('src/lib/_tests', './dist', { | ||
baseMirrorDir: 'src/lib', | ||
}); |
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,41 @@ | ||
# TACC Core Styles - Tips for Fractal Component Library | ||
|
||
## Debugging | ||
|
||
### Preview Templates | ||
|
||
To see values available in a preview template, adapt this template code: | ||
|
||
```html | ||
<dl> | ||
{{#each _target}} | ||
<dt> | ||
<strong><code>{{@key}}</code></strong> | ||
</dt> | ||
<dd><code>{{this}}</code></dd> | ||
{{/each}} | ||
</dl> | ||
``` | ||
|
||
### Console Logging | ||
|
||
To output values (like objects) in the console, adapt this config code: | ||
|
||
```js | ||
const hbs = require('@frctl/handlebars')({ | ||
helpers: { | ||
debug: function (optionalValue) { | ||
console.log('Current Context'); | ||
console.log('===================='); | ||
console.log(this); | ||
|
||
if (optionalValue) { | ||
console.log('Value'); | ||
console.log('===================='); | ||
console.log(optionalValue); | ||
} | ||
}, | ||
}, | ||
}); | ||
fractal.components.engine(hbs); | ||
``` |
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,26 @@ | ||
--- | ||
title: TACC UI Patterns | ||
--- | ||
|
||
This is the UI pattern library for TACC. | ||
|
||
The CSS for these patterns is available from [@tacc/core-styles]. | ||
|
||
--- | ||
|
||
Known Clients: | ||
|
||
- [TACC/Core-CMS] | ||
- [TACC/Core-Portal] | ||
- [@tacc/core-components] | ||
|
||
[tacc/core-cms]: https://github.com/TACC/Core-CMS | ||
[tacc/core-portal]: https://github.com/TACC/Core-Portal | ||
[@tacc/core-components]: https://www.npmjs.com/package/@tacc/core-components | ||
[@tacc/core-styles]: https://www.npmjs.com/package/@tacc/core-styles | ||
|
||
<script type="module"> | ||
Array.from(document.body.querySelectorAll('a')) | ||
.filter(link => link.hostname != window.location.hostname) | ||
.forEach(link => link.target = '_blank'); | ||
</script> |
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,53 @@ | ||
'use strict'; | ||
|
||
const mandelbrot = require('@frctl/mandelbrot'); | ||
const fractal = require('@frctl/fractal').create(); | ||
|
||
// Get base theme | ||
const themeConfig = require('./fractal.theme.js'); | ||
const theme = mandelbrot(themeConfig); | ||
|
||
// Configure UI | ||
fractal.set('project.title', 'TACC UI Patterns'); | ||
fractal.components.set('label', 'Patterns'); // default is 'Components' | ||
fractal.components.set('title', 'Patterns'); // default is 'Components' | ||
fractal.components.set('default.status', 'wip'); // default is 'ready' | ||
|
||
// Set source paths | ||
// (for components) | ||
fractal.components.set('path', __dirname + '/src/lib/_imports'); | ||
fractal.components.set('resources', { | ||
// Render assets from component folders in a panel | ||
// WARNING: Undocumented feature | ||
// https://github.com/frctl/fractal/issues/150#issuecomment-254642411 | ||
// https://github.com/frctl/fractal/issues/93#issuecomment-236429871 | ||
assets: { | ||
label: 'Assets', | ||
match: ['**/*.css', '**/*.js'], | ||
}, | ||
}); | ||
// (for stylesheets) | ||
fractal.components.set('default.context', { | ||
styles: { | ||
internal: { | ||
local: [ | ||
'/settings/border.css', | ||
'/settings/color.css', | ||
'/settings/font.css', | ||
'/settings/max-width.css', | ||
'/settings/space.css', | ||
], | ||
}, | ||
}, | ||
}); | ||
|
||
// Set website paths | ||
fractal.docs.set('path', __dirname + '/docs'); | ||
fractal.web.set('static.path', __dirname + '/dist'); | ||
fractal.web.set('builder.dest', __dirname + '/demo'); | ||
|
||
// Customize theme | ||
fractal.web.theme(theme); | ||
|
||
// Export | ||
module.exports = fractal; |
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,12 @@ | ||
'use strict'; | ||
|
||
// To let any client extend | ||
module.exports = { | ||
skin: { | ||
accent: '#000000', | ||
complement: '#ffffff', | ||
links: '#784fe8', | ||
}, | ||
panels: ['notes', 'html', 'resources', 'context', 'info'], | ||
nav: ['search', 'docs', 'components'], | ||
}; |
Oops, something went wrong.