Apply standard/enforced code format with prettier.
This commit marks applying prettier to the whole of git history up to this point and prettier is used to enforce format via pre-commit hook. The command used was: `git filter-branch -f --tree-filter 'prettier --no-config --single-quote --tab-width=1 --print-width=100 --use-tabs --trailing-comma=none --prose-wrap=always --write "{.,{packages,bin}/**}/*.{js,json,md}" || echo "Error formatting, possibly invalid JS"' -- --all`
This commit is contained in:
parent
b9f33cbb64
commit
f08476e7ec
@ -5,8 +5,8 @@ myself and to share with friends and family. Along the way it became a learning
|
||||
|
||||
## Features
|
||||
|
||||
* Upload and view images
|
||||
* Save files to Backblaze B2 storage.
|
||||
- Upload and view images
|
||||
- Save files to Backblaze B2 storage.
|
||||
|
||||
## Development Philosophy
|
||||
|
||||
@ -19,9 +19,9 @@ photo gallery for anyone who wishes to escape the social media silos. However, i
|
||||
|
||||
This would not be possible without the giants who have laid the foundation:
|
||||
|
||||
* [Webpack](http://webpack.js.org/)
|
||||
* [DOMVM](http://leeoniya.github.io/domvm/)
|
||||
* [PouchDB](https://pouchdb.com/)
|
||||
- [Webpack](http://webpack.js.org/)
|
||||
- [DOMVM](http://leeoniya.github.io/domvm/)
|
||||
- [PouchDB](https://pouchdb.com/)
|
||||
|
||||
There are many more dependencies. You can find them in the [package.json](./package.json) file.
|
||||
|
||||
@ -36,12 +36,12 @@ localhost certificate exception in order to operate properly.
|
||||
|
||||
In the future, I plan to add:
|
||||
|
||||
* sharable links
|
||||
* local file storage
|
||||
* CSRF for interacting with server component
|
||||
* albums
|
||||
* client-side encryption
|
||||
* video support
|
||||
* Sandstorm support
|
||||
* CORS-based storage: - s3 - remotestorage - Google Cloud? - Dropbox?
|
||||
* tags
|
||||
- sharable links
|
||||
- local file storage
|
||||
- CSRF for interacting with server component
|
||||
- albums
|
||||
- client-side encryption
|
||||
- video support
|
||||
- Sandstorm support
|
||||
- CORS-based storage: - s3 - remotestorage - Google Cloud? - Dropbox?
|
||||
- tags
|
||||
|
||||
@ -2,7 +2,9 @@
|
||||
"name": "Gallery",
|
||||
"version": "0.0.1",
|
||||
"description": "Personal photo gallery",
|
||||
"keywords": ["javascript"],
|
||||
"keywords": [
|
||||
"javascript"
|
||||
],
|
||||
"author": "Timothy Farrell <tim@thecookiejar.me> (https://github.com/explorigin)",
|
||||
"license": "Apache-2.0",
|
||||
"scripts": {
|
||||
|
||||
@ -50,11 +50,11 @@ export function FocusView(vm, params) {
|
||||
if (windowRatio > imageRatio) {
|
||||
return {
|
||||
height: vw / windowRatio,
|
||||
width: vw / windowRatio * imageRatio
|
||||
width: (vw / windowRatio) * imageRatio
|
||||
};
|
||||
}
|
||||
return {
|
||||
height: vh * windowRatio / imageRatio,
|
||||
height: (vh * windowRatio) / imageRatio,
|
||||
width: vh * windowRatio
|
||||
};
|
||||
},
|
||||
|
||||
@ -32,7 +32,7 @@ export function SectionView(vm, params, key) {
|
||||
const availableWidth = vw - CONTENT_MARGIN_WIDTH;
|
||||
const aspectRatios = pArr.map(aspectRatio);
|
||||
const totalImageRatio = sum(aspectRatios);
|
||||
const rowCount = Math.ceil(totalImageRatio * OPTIMAL_IMAGE_HEIGHT / availableWidth);
|
||||
const rowCount = Math.ceil((totalImageRatio * OPTIMAL_IMAGE_HEIGHT) / availableWidth);
|
||||
const rowRatios = partition(aspectRatios, rowCount);
|
||||
|
||||
let index = 0;
|
||||
@ -41,7 +41,7 @@ export function SectionView(vm, params, key) {
|
||||
const rowTotal = sum(row);
|
||||
const imageRatio = row[0];
|
||||
const portion = imageRatio / rowTotal;
|
||||
let rowHeight = availableWidth * portion / aspectRatio(pArr[index]);
|
||||
let rowHeight = (availableWidth * portion) / aspectRatio(pArr[index]);
|
||||
if (rowHeight > OPTIMAL_IMAGE_HEIGHT * ROW_HEIGHT_CUTOFF_MODIFIER) {
|
||||
rowHeight = OPTIMAL_IMAGE_HEIGHT * ROW_HEIGHT_CUTOFF_MODIFIER;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user