Skip to content

Commit

Permalink
chore(docs): restructured Skin docs site and made it more mobile frie…
Browse files Browse the repository at this point in the history
…ndly (#2520)
  • Loading branch information
ArtBlue authored Jan 10, 2025
1 parent f794f6e commit 530308f
Show file tree
Hide file tree
Showing 178 changed files with 46,418 additions and 1,469 deletions.
1 change: 1 addition & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"selector-class-pattern": null,
"alpha-value-notation": "number",
"declaration-block-no-redundant-longhand-properties": null,
"media-feature-range-notation": null,
"value-keyword-case": [
"lower",
{
Expand Down
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"@commitlint/config-conventional": "^19.6.0",
"@ebay/browserslist-config": "^2.10.0",
"@floating-ui/dom": "^1.6.12",
"@marko/run": "^0.5.11",
"@marko/run": "^0.5.13",
"@marko/run-adapter-static": "^0.2.1",
"@percy/cli": "^1.30.5",
"@percy/storybook": "^6.0.3",
Expand Down
2 changes: 1 addition & 1 deletion src/components/about.marko
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div id="about">
<h2>About</h2>
<h2>What is Skin?</h2>
<p>Skin is the official CSS framework of eBay. Skin represents the eBay brand and adheres to the following core principals:</p>
<dl>
<dt>Accessible</dt>
Expand Down
5 changes: 5 additions & 0 deletions src/components/anchor.marko
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
static const basePath = import.meta.env.BASE_URL;

<a href=`${basePath}${input.href || ''}` class=input.class role=input.role target=input.target>
<${input.renderBody}/>
</a>
11 changes: 11 additions & 0 deletions src/components/components-list.marko
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import path from 'path';

<for|key, comp| in=input.components>
$ const componentName = path.basename(comp, '.marko');
$ const name = componentName.replace(/-([a-z])/g, function (g) { return ` ${g[1].toUpperCase()}`; });
$ const properName = name.charAt(0).toUpperCase() + name.slice(1);
<li>
<anchor href=`component/${componentName}` class="nav-link" role="menuitem">${properName}</anchor>
</li>
</for>

12 changes: 12 additions & 0 deletions src/components/components.marko
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import path from 'path';
import flags from "./data/flags.json"
import icons from "./data/icons.json"

static const componentFolders = import.meta.glob("../routes/_index/component/*/*.marko");

static const components = Object.keys(componentFolders).map((filePath) => {
const parts = filePath.split('/');
return parts.slice(0, parts.length - 1).join('/');
});

export { components, flags, icons };
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 530308f

Please sign in to comment.