|
1 |
| -This is a small [Next.js](https://nextjs.org/) fullstack app that allows you to specify a local folder of images (PNGs) to watch, and an accompanying frontend application displaying these images in a simple but slick vertical list. |
| 1 | +<h1 align="center">Folder Stack</h1> |
| 2 | +<p align="center"> |
| 3 | + A slick way to watch folders on big screens. |
| 4 | +</p> |
| 5 | + |
| 6 | +<p align="center"> |
| 7 | + <img src="samples/phantom-screen.gif" /> |
| 8 | +</p> |
| 9 | + |
| 10 | +This is a small [Next.js](https://nextjs.org/) fullstack app that allows you to specify a local folder of images (PNGs) to watch, and an accompanying frontend application displaying these images in a simple yet elegant vertical list. |
2 | 11 |
|
3 | 12 | ## Getting Started
|
4 | 13 |
|
5 |
| -First, run the development server: |
| 14 | +First, clone the repository and install the dependencies: |
| 15 | + |
| 16 | +```bash |
| 17 | +npm run i |
| 18 | +``` |
| 19 | + |
| 20 | +Then, run the development server: |
6 | 21 |
|
7 | 22 | ```bash
|
8 | 23 | npm run dev
|
9 |
| -# or |
10 |
| -yarn dev |
11 | 24 | ```
|
12 | 25 |
|
13 | 26 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
14 | 27 |
|
15 | 28 | ## Configuration
|
16 | 29 |
|
17 |
| -You can configure a few things by editing the file `src/config/index.tsx`. |
18 |
| - |
19 |
| -- `DIR` - The directory to watch. |
20 |
| -- `RECURSIVE` - Should we scan recursively within folders. Default is `true`. |
21 |
| -- `MAX_IMAGES` - How many images to request. Default `10`. |
22 |
| -- `POLL_INTERVAL` - How often should the frontend look for updates. Default 5 seconds. |
23 |
| -- `RETRY_INTERVAL` - How frequently should the frontend retry polling on failure. |
24 |
| -- `FILE_EXTENSION` - The filetypes supported. Default `png`. |
25 |
| -- `FILE_MIME` - The file mime type. Default `image/png`. |
26 |
| -- `SHOW_TITLE` - If the title should be overlaid. Default `false`. |
27 |
| -- `DISABLE_SCROLL` - Should the user be able to scroll? Default `true`. |
28 |
| -- `STACK_TRANSFORM` - How the stack should be positioned on the page. Default shown below. |
29 |
| - |
30 |
| -```ts |
31 |
| -export const STACK_TRANSFORM = { |
32 |
| - x: "100%", |
33 |
| - y: 0, |
34 |
| - width: 256, |
35 |
| - height: 1265, |
36 |
| - rotation: 90, |
37 |
| -}; |
38 |
| -``` |
| 30 | +You can configure a few things by editing the file `src/config/index.ts`. |
39 | 31 |
|
40 |
| -You can also adjust the title field formatter here: `src/utils/images.ts`. |
| 32 | +- `ROOT_DIRECTORY` - The directory to watch. Can be absolute or relative to the project root. |
| 33 | +- `RECURSIVE` - Should we scan recursively within folders. |
| 34 | +- `MAX_IMAGES` - How many images to request. |
| 35 | +- `POLL_INTERVAL` - How often should the frontend look for updates. |
| 36 | +- `FILE_EXTENSIONS` - An array of filetypes supported, e.g. `["png", "jpg"]`. |
| 37 | +- `SHOW_TITLE` - If the title should be overlaid. |
| 38 | +- `DISABLE_SCROLL` - Should scrolling be blocked? |
| 39 | +- `STACK_STYLE` - How the image stack should be transformed on the page using regular `CSSProperties`. |
0 commit comments