Skip to content

Commit

Permalink
Merge pull request #117 from manav-gopal/master
Browse files Browse the repository at this point in the history
updated documentation
  • Loading branch information
s-yadav authored Aug 15, 2024
2 parents 7e1c098 + 936f0e5 commit 4bec94e
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 112 deletions.
41 changes: 0 additions & 41 deletions documentation/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,47 +64,6 @@ const config: Config = {
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: 'Tutorial',
to: '/docs/intro',
},
],
},
{
title: 'Community',
items: [
{
label: 'Stack Overflow',
href: 'https://stackoverflow.com/questions/tagged/docusaurus',
},
{
label: 'Discord',
href: 'https://discordapp.com/invite/docusaurus',
},
{
label: 'Twitter',
href: 'https://twitter.com/docusaurus',
},
],
},
{
title: 'More',
items: [
{
label: 'GitHub',
href: 'https://github.com/s-yadav/iv-viewer',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
Expand Down
110 changes: 46 additions & 64 deletions documentation/src/components/HomepageFeatures/index.tsx
Original file line number Diff line number Diff line change
@@ -1,70 +1,52 @@
import clsx from 'clsx';
import Heading from '@theme/Heading';
import styles from './styles.module.css';

type FeatureItem = {
title: string;
Svg: React.ComponentType<React.ComponentProps<'svg'>>;
description: JSX.Element;
};

const FeatureList: FeatureItem[] = [
{
title: 'Easy to Use',
Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default,
description: (
<>
Docusaurus was designed from the ground up to be easily installed and
used to get your website up and running quickly.
</>
),
},
{
title: 'Focus on What Matters',
Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default,
description: (
<>
Docusaurus lets you focus on your docs, and we&apos;ll do the chores. Go
ahead and move your docs into the <code>docs</code> directory.
</>
),
},
{
title: 'Powered by React',
Svg: require('@site/static/img/undraw_docusaurus_react.svg').default,
description: (
<>
Extend or customize your website layout by reusing React. Docusaurus can
be extended while reusing the same header and footer.
</>
),
},
];

function Feature({title, Svg, description}: FeatureItem) {
return (
<div className={clsx('col col--4')}>
<div className="text--center">
<Svg className={styles.featureSvg} role="img" />
</div>
<div className="text--center padding-horiz--md">
<Heading as="h3">{title}</Heading>
<p>{description}</p>
</div>
</div>
);
}
import Link from "@docusaurus/Link";
import styles from "./styles.module.css";

export default function HomepageFeatures(): JSX.Element {
return (
<section className={styles.features}>
<div className="container">
<div className="row">
{FeatureList.map((props, idx) => (
<Feature key={idx} {...props} />
))}
<>
<section className={styles.intro}>
<div className={styles.container}>
<div style={{ maxWidth: "70%" }}>
<p><span><strong>iv-viewer</strong></span>
{' : A zooming and panning plugin inspired by Google Photos for your web images. It comes in two different variants. First, a react-based zooming and panning component and 2nd vanilla JS-based zooming and panning library.'}
</p>
</div>
<div className={styles.box}>
<Link to="docs/iv-viewer/intro-iv">
<h1>iv-viewer</h1>
<p className="para">
A zooming and panning plugin inspired by Google Photos for your
web images ....
</p>
</Link>
</div>
<div className={styles.box}>
<Link to="docs/react-iv-viewer/intro-riv">
<h1>react-iv-viewer</h1>
<p className="para">
react-iv-viewer is a React-based library for viewing images with
advanced features like zooming ....
</p>
</Link>
</div>
<div className={styles.features}>
<h3>Features :-</h3>
<ul>
<li>Smooth dragging and panning of images</li>
<li>Support for touch devices</li>
<li>Double tap to zoom in/zoom out</li>
<li>Pinch in/out to control zoom</li>
<li>Snap view for better panning and zooming experience</li>
<li>
Quick display of loaded images with progressive loading of
high-quality images
</li>
<li>Exposed API to control zoom programmatically</li>
<li>Custom events to listen for state changes</li>
</ul>
</div>
</div>
</div>
</section>
</section>
</>
);
}
55 changes: 51 additions & 4 deletions documentation/src/components/HomepageFeatures/styles.module.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,58 @@
.features {
.intro {
display: flex;
align-items: center;
padding: 2rem 0;
width: 100%;
}

.featureSvg {
height: 200px;
width: 200px;
.container {
display: flex;
width: 100%;
flex-wrap: wrap;
justify-content: center;
gap: 1.5rem;
}

.box {
flex: 1 1 calc(50% - 1.5rem);
max-width: 600px;
border: 1px solid #333;
border-radius: 8px;
padding: 1.5rem;
margin: 0 1.5rem;
text-align: left;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.box:hover {
border-color: #1a8870;
}

.button {
text-decoration: none;
color: inherit;
display: block;
}

h1 {
font-size: 1.25rem; /* Slightly smaller font size */
margin-bottom: 0.5rem;
}

.box p {
font-size: 1rem;
color: #777;
line-height: 1.6;
margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
.box {
flex: 1 1 100%;
max-width: 100%;
}
}

.features{
width: 70%;
}
2 changes: 1 addition & 1 deletion documentation/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function HomepageHeader() {
<Link
className="button button--secondary button--lg"
to="/docs/intro">
Docusaurus Tutorial - 5min ⏱️
Tutorial - 5min ⏱️
</Link>
</div>
</div>
Expand Down
10 changes: 8 additions & 2 deletions packages/react-iv-viewer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,18 @@

### Demos

See the many DEMO sections in the documentation.
See the demo of react-iv-viewer. [Demo](https://s-yadav.github.io/iv-viewer/docs/react-iv-viewer/demo)

### Install

using `npm`

```bash
npm install react-iv-viewer
```

using `yarn`

```bash
yarn add react-iv-viewer
```
Expand All @@ -37,19 +39,23 @@ yarn add react-iv-viewer
// Import css
import 'react-iv-viewer/dist/react-iv-viewer.css';
```

You can choose to import css file inside your scss/less files.

#### ES6

Image Viewer

```jsx
import { ImageViewer } from 'react-iv-viewer';
```

Fullscreen Viewer

```jsx
import { FullScreenImageViewer } from 'react-iv-viewer';
```

### Documentation
[See full documentation of react-iv-viewer](https://s-yadav.github.io/iv-viewer/docs/category/react-iv-viewer)

[See full documentation of react-iv-viewer](https://s-yadav.github.io/iv-viewer/docs/category/react-iv-viewer)

0 comments on commit 4bec94e

Please sign in to comment.