Commit graph

218 commits

Author SHA1 Message Date
Magnus Hovland Hoff
03227d6aa9 Remove some redundant "extern crate" statements 2022-04-03 22:21:04 +02:00
Magnus Hovland Hoff
25dcb85c24 Warning seems to have disappeared with updated diesel dependency 2022-04-03 22:10:29 +02:00
Magnus Hovland Hoff
bf34e2923b Addressed many cargo clippy complaints 2022-04-03 22:09:36 +02:00
Magnus Hovland Hoff
95a73b9471 cargo clippy --fix 2022-04-03 14:29:35 +02:00
Magnus Hovland Hoff
9320d14d89 Manually fix remaining compile warnings. 2022-04-03 14:19:56 +02:00
Magnus Hovland Hoff
9f80ced3ec cargo fmt 2022-04-03 13:47:43 +02:00
Magnus Hovland Hoff
26fe2b64da Update edition, cargo fix and cargo fix --edition 2022-04-03 13:45:50 +02:00
Magnus Hovland Hoff
a20117a42c Silence warnings caused by Diesel on Rust >=1.29.
I expect this to be fixed in a future release of Diesel
2018-10-27 11:42:09 +02:00
Magnus Hovland Hoff
ccbabb86f8 Make theme optional when updating articles.
This makes sense from an API design perspective
2018-10-05 13:07:19 +02:00
Magnus Hovland Hoff
09c68c5993 Select random theme for new articles server side.
This supports user agents with disabled javascript (noscript)
2018-10-05 11:56:53 +02:00
Magnus Hovland Hoff
7373af0417 Select random theme for new articles client side 2018-10-05 11:19:47 +02:00
Magnus Hovland Hoff
cffcc93b15 Add tests for automatically slugged links 2018-10-03 22:35:47 +02:00
Magnus Hovland Hoff
575c18f915 Support automatically slugged links 2018-10-03 18:24:55 +02:00
Magnus Hovland Hoff
6d1c9967aa Correctly mark unused variable 2018-10-03 18:12:27 +02:00
Magnus Hovland Hoff
748459483e Show author for diffs that show only one changeset 2018-10-02 08:44:06 +02:00
Magnus Hovland Hoff
01ceda8015 Use correct number for generating pagination link 2018-10-01 22:58:40 +02:00
Magnus Hoff
85014d2789 Include theme in response when creating new article.
Bug caused by duplication of code.
2018-09-30 22:29:37 +02:00
Magnus Hovland Hoff
a81a568ee2 Forward the edit-state when redirecting to renamed articles.
This improves usability with noscript
2018-09-24 23:01:01 +02:00
Magnus Hovland Hoff
e92c9695be Fix editing of new articles with noscript.
This also generalizes the code. Neat!
2018-09-24 22:55:10 +02:00
Magnus Hoff
3bbe5840ee Implement theme picker UI 2018-09-24 08:43:36 +02:00
Magnus Hovland Hoff
baaab6ebc8 Store theme explicitly in database. Propagate theme both ways between db and frontend 2018-09-23 22:38:18 +02:00
Magnus Hovland Hoff
828490df3b Update serde_urlencoded dependency for bugfix 2018-09-23 21:39:09 +02:00
Magnus Hovland Hoff
c1fcc80cf0 Minor fix for making Theme insertable with Diesel 2018-09-23 21:38:17 +02:00
Magnus Hovland Hoff
8f1e95bdde Add theme to ArticleRevisionStub, RebaseResult and related.
This paves the way for explicitly storing the theme in the database
2018-09-22 23:16:58 +02:00
Magnus Hovland Hoff
c82228f019 Propagate theme in ArticleRevisions from the state struct 2018-09-21 08:57:35 +02:00
Magnus Hovland Hoff
b777a92a48 Expose theme_from_str_hash to SQL.
To be used in a db migration for storing the previously implicit value
2018-09-20 23:17:25 +02:00
Magnus Hovland Hoff
ca1e072d9b Add more tests for using Theme with the database 2018-09-20 08:37:27 +02:00
Magnus Hovland Hoff
df066c611d Add support for using Theme with the database 2018-09-19 22:56:12 +02:00
Magnus Hovland Hoff
f961699f0f Rename function to avoid confusion 2018-09-19 08:20:43 +02:00
Magnus Hovland Hoff
6118f14bb0 Explicitly set theme for layout.
Refactoring in anticipation of letting the user choose theme
2018-09-18 23:11:25 +02:00
Magnus Hovland Hoff
c1dcb1de64 Make responsibility for converting a theme to a css class to the theme module 2018-09-18 19:43:33 +02:00
Magnus Hovland Hoff
a65e85f242 Refactor Theme handling to a new module.
Fundamentals for communicating about themes with the database and over http
2018-09-18 07:56:58 +02:00
Magnus Hoff
c201bb4bc4 Add test page for themes 2018-07-10 08:46:51 +02:00
Magnus Hoff
963d70ff7a Add dynamic-assets feature to facilitate rapid feedback when working on the assets 2018-07-09 21:27:34 +02:00
Magnus Hoff
0b5bff6356 Refactor handling of generated unique names for resources 2018-06-24 23:00:35 +02:00
Magnus Hoff
38c70f7b25 Select persistent theme per page based on title 2018-06-17 21:25:35 +02:00
Magnus Hoff
e4629d8edb Refactor rendering of pages to centralize header layout.
Convert all pages to new layout
2018-06-17 10:43:47 +02:00
Magnus Hoff
0a48ff2a54 Factor choice of theme into Layout struct 2018-06-16 14:30:18 +02:00
Magnus Hoff
7e6fe36ea0 Serve articles with a random theme 2018-06-16 11:24:34 +02:00
Magnus Hoff
67ac61ee42 Add CSS defining color schemes/themes 2018-06-16 10:51:51 +02:00
Magnus Hoff
28c8422e6b Tweak full text search representation of documents 2018-06-13 23:13:38 +02:00
Magnus Hoff
d577eabc9b Port to stable diesel API for user defined sqlite functions 2018-06-13 22:46:53 +02:00
Magnus Hoff
a582d3a627 Merge branch 'master' into process_markdown_in_sqlite 2018-06-13 22:22:08 +02:00
Magnus Hoff
75e33b2766 Update to get rid of warnings that appeared when upgrading diesel.
One warning remains: unused import: `EmbedMigrations`. This one has been fixed in diesel, but not yet released
2018-06-13 22:03:55 +02:00
Magnus Hoff
d63ccd06b7 Cleanup 2018-05-12 14:36:52 +02:00
Magnus Hoff
c72ee90929 Return Result from main (requires Rust 1.26) 2018-05-12 14:34:09 +02:00
Magnus Hoff
b1e598cb17 Experimentally transform markdown for better presentation in full text search results
For issue #37
2018-01-19 16:49:26 +01:00
Magnus Hoff
e499a095c7 Use experimental Diesel branch for application defined sqlite functions 2018-01-19 16:47:40 +01:00
kyegupov
8b838ac8c9 Fix tests after diff bump; drive-by prettify diff tests (#56) 2017-12-17 17:14:39 +01:00
Magnus Hoff
6e3f1dab07 Upgrade to Diesel 1.0.0-beta1 2017-12-15 16:43:10 +01:00