Commit Graph

119 Commits

Author SHA1 Message Date
Rasmus Kaj
daf64dae30 Some photos lacks datetime.
In the database, it is nullable.  In reality, it is unknown for
some of my older photos.
2016-06-05 15:55:23 +02:00
Rasmus Kaj
551e24cc69 Use DATABASE_URL consistently. 2016-06-05 00:57:38 +02:00
Rasmus Kaj
f32e634177 I keep trying ... 2016-06-04 23:46:49 +02:00
Rasmus Kaj
71fda486d1 Where to find diesel. 2016-06-04 23:28:37 +02:00
Rasmus Kaj
a4ea9b2e43 Typo. 2016-06-04 23:21:45 +02:00
Rasmus Kaj
4d970fbaa2 Try to fix diesel setup for travis. 2016-06-04 23:20:45 +02:00
Rasmus Kaj
1967c3dddf Try without default features.
Sqlite is not needed (and not provided on travis).
2016-06-04 22:50:35 +02:00
Rasmus Kaj
39b4ab79b0 Travis needs diesel_cli. 2016-06-04 21:17:22 +02:00
Rasmus Kaj
ffb5bbaf39 Reimplement all time-based views.
Also, proper database migrations and an attempt to make things
work on travis.
2016-06-04 21:08:14 +02:00
Rasmus Kaj
366b125862 Start conversion to diesel.
Use diesel instead of rustorm.  This compiles, but much of the
interestign stuff is commented out.
2016-05-29 21:51:27 +02:00
Rasmus Kaj
70f44cc153 Nicer error handling writing files. 2016-05-25 07:51:10 +02:00
Rasmus Kaj
f3f3602347 Add compressed css.
When storing the sassified css, also store copies compressed with gzip
and brotli.  That way, a good web server and client can save some
bytes of file transfer (the css in this project is very small, but as
it grows, this will become more relevant).
2016-05-23 20:50:13 +02:00
Rasmus Kaj
93c7d4fbbb Some clean-up of sassify. 2016-05-21 17:56:48 +02:00
Rasmus Kaj
94697fc35e Better linkpath in header.
Also known as breadcrumb links.
2016-05-18 18:44:50 +02:00
Rasmus Kaj
76a43e0efa Avoid trying to serve the raw images. 2016-05-15 22:05:42 +02:00
Rasmus Kaj
5490144f94 Order imports. 2016-05-11 18:15:00 +02:00
Rasmus Kaj
a3f414bd97 Use nickel form-body parsing for login. 2016-05-11 18:14:23 +02:00
Rasmus Kaj
5a57dc5e90 Add shorthand for date queries. 2016-05-04 22:11:31 +02:00
Rasmus Kaj
d1f5044466 Date links in page header. 2016-05-04 18:45:50 +02:00
Rasmus Kaj
8131e3fd01 Use &str rather than String. 2016-05-04 14:34:55 +02:00
Rasmus Kaj
3d956a106b Rustfmt. 2016-05-04 13:16:20 +02:00
Rasmus Kaj
53ca1530b9 Resassify only when needed. 2016-05-03 18:46:44 +02:00
Rasmus Kaj
88b0d8b57b Dont panic.
Handle errors in image scaling properly.
2016-05-03 18:37:35 +02:00
Rasmus Kaj
1a421537fb Get rid of some unused warnings. 2016-05-03 07:26:55 +02:00
Rasmus Kaj
a21d60a7be Show good pics only to guests.
If there is not a logged in user, show only pictures that
are graded above a certain limit.
2016-05-02 23:52:06 +02:00
Rasmus Kaj
e523d43d34 Add jwt authorization.
The username/password handling is just mocked currently.
2016-05-01 15:50:49 +02:00
Rasmus Kaj
10b5b4453c Use the "compressed" sass output.
This currently uses the sass-sys low-level interface, because the
operation is not supported in sass-rs.

The PR https://github.com/compass-rs/sass-rs/pull/3 adds high-level
support.  If / when that is fixed, the direct requirement for sass-sys
should be removed from rphotos.
2016-04-23 22:15:24 +02:00
Rasmus Kaj
510fac8db7 Improve styling. 2016-04-23 16:43:55 +02:00
Rasmus Kaj
c6a0aa25f5 Get rid of dead-code warnings. 2016-04-23 16:43:43 +02:00
Rasmus Kaj
8b3ab53976 Right hyper version for current nickel. 2016-04-23 00:06:00 +02:00
Rasmus Kaj
d4bfe0756f Use scss to prepare css.
The css file is built to a file with (short) checksum in the
file name, to be nicely cacheable.  The actual file name is
compiled into the binary and sent to the templates as a variable.
2016-04-22 23:56:13 +02:00
Rasmus Kaj
c9fe111995 Add build status to README. 2016-04-21 21:00:56 +02:00
Rasmus Kaj
3bff72ce95 Create README.md 2016-04-21 20:58:39 +02:00
Rasmus Kaj
f1552e82d7 That hyper version was for old nickel version. 2016-04-19 23:18:30 +02:00
Rasmus Kaj
e6a8c3189c Better code organisation.
Put handlers in separate functions, not just one extremely large main.
2016-04-19 18:10:26 +02:00
Rasmus Kaj
b340bb5f9d Summarize images per year and month. 2016-01-31 21:15:44 +01:00
Rasmus Kaj
84987eca40 Add a program to find image files. 2016-01-31 14:34:48 +01:00
Rasmus Kaj
f364d70b0f Changes for updated rustorm.
Disable default dependencies to handle a depency collision where
mysql required a different version of openssl than something else.
2016-01-30 19:57:53 +01:00
Rasmus Kaj
2335c5e97f Move PhotosDir to separate file. 2015-12-26 20:18:44 +01:00
Rasmus Kaj
caae44bf88 Update rustorm to version 0.4.0. 2015-12-26 17:29:28 +01:00
Rasmus Kaj
ba094853a2 Views per year/month/day. 2015-12-25 18:32:11 +01:00
Rasmus Kaj
d2adab3ecb Add original time to photos. 2015-12-22 18:22:21 +01:00
Rasmus Kaj
2c09e8d169 Dry and consistend photos_dir. 2015-12-06 23:00:16 +01:00
Rasmus Kaj
69003c561b Use environment for config.
Take base directory for photos and host:port to listen to from
environment instead of just useing hard-coded values.
2015-12-06 22:29:05 +01:00
Rasmus Kaj
9345860657 Minor cleanup. 2015-12-06 17:12:09 +01:00
Rasmus Kaj
1d57275fe8 Dryer code with a macro.
Declare and initialize the data struct for rendering
at the same time in view (controller) code.
2015-12-06 16:33:25 +01:00
Rasmus Kaj
e832e4d00f Better urls for image sizes. 2015-12-06 14:42:03 +01:00
Rasmus Kaj
eba6c2228c Remove semi-duplicate code. 2015-12-01 07:24:19 +01:00
Rasmus Kaj
66546966cc Nicer formatting of elapsed times. 2015-12-01 07:04:51 +01:00
Rasmus Kaj
36a047ddfd Add a basic page header. 2015-11-30 21:00:07 +01:00