diff --git a/.umirc.ts b/.umirc.ts index b74dcc3..eef81b8 100644 --- a/.umirc.ts +++ b/.umirc.ts @@ -1,20 +1,18 @@ import { defineConfig } from 'dumi'; const name = 'react-image-shadow'; +const shortName = 'ImageShadow'; + +const url = 'https://avatars1.githubusercontent.com/u/75532006?s=200&v=4'; export default defineConfig({ - title: 'Image Shadow', - favicon: - 'https://github.com/image-component/react-image-shadow/blob/main/logo.png?raw=true', - logo: - 'https://github.com/image-component/react-image-shadow/blob/main/logo.png?raw=true', + title: shortName, + favicon: url, + logo: url, outputPath: 'docs-dist', exportStatic: {}, base: `/${name}/`, publicPath: `/${name}/`, - theme: { - '@c-primary': '#3bacea', - }, hash: true, scripts: [ { @@ -23,7 +21,7 @@ export default defineConfig({ var timer = setInterval(function() { try { var menuList = document.getElementsByClassName('__dumi-default-menu-list'); - menuList[0].childNodes[0].childNodes[0].innerText = '🌈 ${name}'; + menuList[0].childNodes[0].childNodes[0].innerText = '🌈 ${shortName}'; clearInterval(timer); } catch (e) {} }, 200) diff --git a/docs/example/base.tsx b/docs/example/base.tsx index adcd331..b04ef3b 100644 --- a/docs/example/base.tsx +++ b/docs/example/base.tsx @@ -7,15 +7,19 @@ import ImageShadow from 'react-image-shadow'; import './demo.less'; import '../../assets/index.less'; +const url1 = + 'https://github.com/image-component/gallery/blob/main/girl/5.jpg?raw=true'; +const url2 = + 'https://github.com/image-component/gallery/blob/main/girl/1.jpg?raw=true'; +const url3 = + 'https://github.com/image-component/gallery/blob/main/girl/2.jpg?raw=true'; + const App = () => { return (
- - - + + +
); }; diff --git a/docs/example/demo.less b/docs/example/demo.less index 539a5ac..fd66db2 100644 --- a/docs/example/demo.less +++ b/docs/example/demo.less @@ -2,6 +2,7 @@ padding: 0 50px; display: grid; justify-content: space-around; + align-items: center; grid-template-columns: repeat(auto-fill, 300px); grid-gap: 40px; } diff --git a/docs/example/hover.tsx b/docs/example/hover.tsx index 03ee4cb..d85fadc 100644 --- a/docs/example/hover.tsx +++ b/docs/example/hover.tsx @@ -7,21 +7,19 @@ import ImageShadow from 'react-image-shadow'; import './demo.less'; import '../../assets/index.less'; +const url1 = + 'https://github.com/image-component/gallery/blob/main/girl/3.jpg?raw=true'; +const url2 = + 'https://github.com/image-component/gallery/blob/main/girl/6.jpg?raw=true'; +const url3 = + 'https://github.com/image-component/gallery/blob/main/girl/8.png?raw=true'; + const App = () => { return (
- - - + + +
); }; diff --git a/image/blue.jpg b/image/blue.jpg deleted file mode 100644 index ce4af30..0000000 Binary files a/image/blue.jpg and /dev/null differ diff --git a/image/red.png b/image/red.png deleted file mode 100644 index 031608f..0000000 Binary files a/image/red.png and /dev/null differ diff --git a/image/white.jpg b/image/white.jpg deleted file mode 100644 index edf9909..0000000 Binary files a/image/white.jpg and /dev/null differ diff --git a/logo.png b/logo.png deleted file mode 100644 index 97ed892..0000000 Binary files a/logo.png and /dev/null differ