Skip to content

Commit

Permalink
[optimize] update Carousel example page
Browse files Browse the repository at this point in the history
[optimize] simplify Repository model based on MobX-GitHub
  • Loading branch information
TechQuery committed Jun 15, 2024
1 parent 8f2907c commit 0ed085f
Show file tree
Hide file tree
Showing 18 changed files with 227 additions and 197 deletions.
26 changes: 13 additions & 13 deletions ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# BootCell document

Re-implemented Official **Document site** of [BootStrap][1] & [FontAwesome][2]
based on [WebCell][3], [BootCell][4] & [MDX][5]

[![CI & CD](https://github.com/EasyWebApp/WebCell/actions/workflows/main.yml/badge.svg)][6]

[1]: https://getbootstrap.com/
[2]: https://fontawesome.com/
[3]: https://web-cell.dev/
[4]: https://web-cell.dev/BootCell/
[5]: https://mdxjs.com/
[6]: https://github.com/EasyWebApp/BootCell-document/actions/workflows/main.yml
# BootCell document

Re-implemented Official **Document site** of [Bootstrap][1] & [FontAwesome][2]
based on [WebCell][3], [BootCell][4] & [MDX][5]

[![CI & CD](https://github.com/EasyWebApp/WebCell/actions/workflows/main.yml/badge.svg)][6]

[1]: https://getbootstrap.com/
[2]: https://fontawesome.com/
[3]: https://web-cell.dev/
[4]: https://web-cell.dev/BootCell/
[5]: https://mdxjs.com/
[6]: https://github.com/EasyWebApp/BootCell-document/actions/workflows/main.yml
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "bootcell-document",
"version": "1.0.0",
"description": "Re-implemented Official Document site of BootStrap & FontAwesome based on WebCell, BootCell & MarkCell",
"description": "Re-implemented Official Document site of Bootstrap & FontAwesome based on WebCell, BootCell & MarkCell",
"dependencies": {
"boot-cell": "^2.0.0-beta.26",
"cell-router": "^3.0.0-rc.7",
"classnames": "^2.5.1",
"dom-renderer": "^2.1.7",
"github-web-widget": "^4.0.0-rc.2",
"iterable-observer": "^1.0.1",
"koajax": "^1.1.2",
"mobx": "^6.12.4",
"mobx-github": "^0.3.2",
"web-cell": "^3.0.0-rc.16",
"web-utility": "^4.4.0"
},
Expand Down
50 changes: 47 additions & 3 deletions pnpm-lock.yaml

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

2 changes: 1 addition & 1 deletion source/component/PageBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const PageFrame: FC<PropsWithChildren<PageFrameProps>> = observer(
<footer className="text-center bg-light py-5">
Proudly developed with{' '}
<a target="_blank" href="https://web-cell.dev/">
WebCell v2
WebCell v3
</a>
,{' '}
<a target="_blank" href="https://web-cell.dev/BootCell/">
Expand Down
12 changes: 6 additions & 6 deletions source/document/Content/MediaObject.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Place nested `<MediaObject />` within the `defaultSlot` of a parent media object
image="https://github.com/EasyWebApp.png"
title="BootCell"
>
Web Components UI library based on WebCell v2 &amp; BootStrap v4
Web Components UI library based on WebCell v3 &amp; Bootstrap v5
</MediaObject>
</MediaObject>
</Example>
Expand All @@ -63,7 +63,7 @@ new DOMRenderer.render(
image="https://github.com/EasyWebApp.png"
title="BootCell"
>
Web Components UI library based on WebCell v2 &amp; BootStrap v4
Web Components UI library based on WebCell v3 &amp; Bootstrap v5
</MediaObject>
</MediaObject>
);
Expand Down Expand Up @@ -220,10 +220,10 @@ As always, use spacing utilities wherever needed to fine tune.
title="BootCell"
>
<p>
Web Components UI library based on WebCell v2 &amp; BootStrap v4
Web Components UI library based on WebCell v3 &amp; Bootstrap v5
</p>
<p>
Web Components UI library based on WebCell v2 &amp; BootStrap v4
Web Components UI library based on WebCell v3 &amp; Bootstrap v5
</p>
</MediaObject>
</ul>
Expand All @@ -249,10 +249,10 @@ new DOMRenderer.render(
title="BootCell"
>
<p>
Web Components UI library based on WebCell v2 &amp; BootStrap v4
Web Components UI library based on WebCell v3 &amp; Bootstrap v5
</p>
<p>
Web Components UI library based on WebCell v2 &amp; BootStrap v4
Web Components UI library based on WebCell v3 &amp; Bootstrap v5
</p>
</MediaObject>
</ul>
Expand Down
4 changes: 2 additions & 2 deletions source/document/Reminder/Icon.mdx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
layout: docs
title: Icon
description: Wrapper component for BootStrap Icon v1.2+ (Web font)
description: Wrapper component for Bootstrap Icon v1.2+ (Web font)
group: Components
---

import { Icon } from 'boot-cell';

import { Example } from '../../component/Example';

This component is built on [Web font of BootStrap Icon 1.2+][1], so make sure to include it before bundling:
This component is built on [Web font of Bootstrap Icon 1.2+][1], so make sure to include it before bundling:

```HTML
<link
Expand Down
2 changes: 1 addition & 1 deletion source/index.webmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "BootCell",
"short_name": "BootCell",
"start_url": ".",
"description": "Web Components UI library based on WebCell v2, BootStrap v4, BootStrap Icon v1 & FontAwesome v5",
"description": "Web Components UI library based on WebCell v3, Bootstrap v5, Bootstrap Icon v1 & FontAwesome v5",
"scope": "/",
"display": "standalone",
"orientation": "any",
Expand Down
30 changes: 0 additions & 30 deletions source/model/Repository.ts

This file was deleted.

3 changes: 3 additions & 0 deletions source/model/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import { RepositoryModel } from 'mobx-github';

import { MetaModel } from './Meta';

export const meta = new MetaModel();
export const repository = new RepositoryModel('EasyWebApp');
6 changes: 0 additions & 6 deletions source/model/service.ts

This file was deleted.

38 changes: 20 additions & 18 deletions source/page/Example/Carousel/Feature.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
import { WebCellElement, createCell } from 'web-cell';
import { JsxChildren } from 'dom-renderer';
import { FC } from 'web-cell';
import classNames from 'classnames';
import { Image } from 'boot-cell/source/Media/Image';
import { Image } from 'boot-cell';

import style from './index.less';
import * as style from './index.module.less';

export interface FeatureProps {
export interface FeatureProps extends Record<'title' | 'summary', JsxChildren> {
reverse?: boolean;
title: WebCellElement;
summary: WebCellElement;
logo: string;
}

export function Feature({ reverse, title, summary, logo }: FeatureProps) {
return (
<div className="row">
<div className={classNames('col-md-7', reverse && 'order-md-2')}>
<h2 className={style['featurette-heading']}>{title}</h2>
<p className="lead">{summary}</p>
</div>
<div className={classNames('col-md-5', reverse && 'order-md-1')}>
<Image fluid style={{ width: '500px' }} src={logo} />
</div>
export const Feature: FC<FeatureProps> = ({
reverse,
title,
summary,
logo
}) => (
<div className="row">
<div className={classNames('col-md-7', reverse && 'order-md-2')}>
<h2 className={style['featurette-heading']}>{title}</h2>
<p className="lead">{summary}</p>
</div>
);
}
<div className={classNames('col-md-5', reverse && 'order-md-1')}>
<Image fluid style={{ width: '500px' }} src={logo} />
</div>
</div>
);
5 changes: 2 additions & 3 deletions source/page/Example/Carousel/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ export const features = [
logo: 'https://github.com/webcomponents.png'
},
{
title: 'The syntax follows TypeScript 3, Decorator proposal and JSX',
title: 'The syntax follows TypeScript 5, Decorator proposal and JSX',
summary:
'Declarative component code, concise and elegant, enjoy one-click ECMAScript mature proposal syntax.',
logo:
'https://raw.githubusercontent.com/github/explore/80688e429a7d4ef2fca1e82350fe8e3517d3494d/topics/typescript/typescript.png'
logo: 'https://raw.githubusercontent.com/github/explore/80688e429a7d4ef2fca1e82350fe8e3517d3494d/topics/typescript/typescript.png'
},
{
title: 'Virtual DOM engine uses SnabbDOM',
Expand Down
Loading

1 comment on commit 0ed085f

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for bootcell-document ready!

✅ Preview
https://bootcell-document-gx26mn264-techquerys-projects.vercel.app

Built with commit 0ed085f.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.