Skip to content
This repository was archived by the owner on Jan 27, 2025. It is now read-only.

Commit 643cc17

Browse files
author
John Richard Chipps-Harding
authored
Tidy (#12)
* Tidy * misc * Simplify stack transform * Misc * Tidy * more
1 parent 0f5947f commit 643cc17

25 files changed

+280
-244
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Phantom Studios Ltd
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,39 @@
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.
211

312
## Getting Started
413

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:
621

722
```bash
823
npm run dev
9-
# or
10-
yarn dev
1124
```
1225

1326
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
1427

1528
## Configuration
1629

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`.
3931

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

Comments
 (0)