0
0
Commit Graph

144 Commits

Author SHA1 Message Date
Gibheer
53732c24e5 cleanup of addRoute 2014-08-01 08:48:14 +02:00
Gibheer
ce036f428d add basic middleware handling
This is an initial spike on how the middleware might be included into
the system. It is inspired/copied from GIN, so I still have to work out,
how to make it nicer than it is at the moment.

What is currently missing is Aborting and the addRoute function looks
very ugly.
2014-08-01 07:58:33 +02:00
Gibheer
7a5cbc3c7a initial commit for routing 2014-07-22 21:27:39 +02:00
Gibheer
2bea1df808 prepare for rebuilding
This is in preparation of remodeling the blog in go.
2014-07-22 20:25:11 +02:00
Gibheer
5570b0b568 don't add query parameters 2014-02-18 23:36:07 +01:00
Gibheer
28dea5e4ec add hgignore to make life easier 2014-02-18 22:16:25 +01:00
Gibheer
1b02e01cf3 update Gemfile to remove rbx specific gems 2014-02-18 22:15:57 +01:00
Gibheer
45ce571448 fix pagination
This fixes the pagination not working at all. After the refactoring the
modification of the SQL query was lost which resulted in pagination not working.
2014-02-18 22:11:30 +01:00
Gibheer
dbf63f3451 remove markers from code and quote
These were nice, but didn't work as good as imagined. Best is to leave them out
for the moment.
2014-02-18 21:20:51 +01:00
Gibheer
be2ecb0945 add template for RouteNotFound 2014-02-13 22:42:24 +01:00
Gibheer
256b4da778 convert the RouteNotFound route to a controller
This way RouteNotFound can use the renderer to display a more helpful
message in the design of the rest of the page.
2014-02-13 22:41:09 +01:00
Gibheer
ea72da5259 rework post controller
To handle errors correctly the post controller needed some rework. Now
instead of single functions running all around the place, there is one
function collecting the data needed and raising errors when needed.

For that to work, the controller class can now return more classes to
keep the chain going. Unless a class is returned, it will call the
renderer.
2014-02-13 22:38:42 +01:00
Gibheer
db30448a8e do not jump out when nothing was found 2014-02-11 23:12:59 +01:00
Gibheer
60cdaf7453 update dependencies 2014-02-11 23:10:53 +01:00
Gibheer
c4eb4e3363 assign the posts only at one point
This makes it easier to find out, if posts have been found at all. The
next step is to use that information and show a hint when nothing was
found.
2014-02-11 23:09:34 +01:00
Gibheer
3cac0daa68 add initial migration file and further adjustments
The 01_setup.rb contains the old table structure to make it possible to
migrate to the new system.
02_move_to_new on the other hand adjusts the old schema to the new
format and adds the full text function.

With that, the new schema is ready and the completion of the full text
search can continue.
2014-02-03 23:43:46 +01:00
Gibheer
ee464a5c15 load render 2014-01-23 22:00:11 +01:00
Gibheer
11ac9461c2 add new helper and implement search
This adds fulltext search for blog posts. Together with the render
object this creates a new possibility to extend the blog.
2014-01-23 21:59:24 +01:00
Gibheer
4ba39351ea added symbol for code tags 2014-01-17 22:29:27 +01:00
Gibheer
297e29a3c8 add quotation mark to blockquotes
This adds a nice little hint, that a blockquote holds a quote.
2014-01-17 22:04:45 +01:00
Gibheer
4350171042 add style to blockquote
Noe the blockquotes look similar to the code tags, but instead of
switching to a monospace font, we use italics to mark it as a quote.
2014-01-16 21:52:11 +01:00
Gibheer
dded05bb52 order by id when the timestamp is equal
This can happen when multiple blog posts get inserted at once, so we
should order by id too.
2014-01-16 09:00:18 +01:00
Gibheer
f05763ae18 ignore a written config
We don't want a wild config committet.
2014-01-09 19:55:51 +01:00
Gibheer
390c02c011 change the example line to use postgres only 2014-01-02 21:42:10 +01:00
Gibheer
810a16eea8 use / for the index page in the logo 2014-01-02 21:41:28 +01:00
Gibheer
6aa8f1c2a2 new next and previous buttons
When selecting only one post buttons to select the previous and next
blog posts are added. These can then be used to read one blog post per
page.
2014-01-02 21:38:21 +01:00
Gibheer
dac1a7ec28 replace do_postgres with pg for better timestamps
do_postgres is using DateTime to fetch timestamps which results in
loosing the milliseconds. But we need the exact timestamp to fetch the
previous and next posts.
2014-01-02 21:36:10 +01:00
Gibheer
7b9576216c don't wrap lines in code and pre elements 2013-12-03 21:45:12 +01:00
Gibheer
ada397900f add utf-8 meta header 2013-11-14 16:57:48 +01:00
Gibheer
33c5439cd2 render the html in the atom feed 2013-11-08 19:55:17 +01:00
Gibheer
7ca8100d23 mark headers in section
This commit makes the headers in a section a bit smaller and underlines
them over 75% over the article width, which gives them a nicer look.
2013-11-08 19:53:44 +01:00
Gibheer
bcb992b231 adjust the pagination design and header 2013-11-04 20:19:39 +01:00
Gibheer
b47acdeb14 make the pagination look nicer 2013-10-29 20:42:25 +01:00
Gibheer
294625f251 add pagination to the page 2013-10-29 20:39:47 +01:00
Gibheer
6e412a6aa9 reduce size of background 2013-10-29 19:51:15 +01:00
Gibheer
19a3c4b238 use picture with real color 2013-10-29 19:47:52 +01:00
Gibheer
693e118a84 add basics for pagination 2013-10-29 19:47:17 +01:00
Gibheer
49ba15dbab remove the relative positioning
This fixes the background picture only shown on the body.
2013-10-29 19:04:38 +01:00
Gibheer
1a0c2b70f7 remove single scss files to include in index
The separation didn't help in this case, as the css is much too small.
Maybe I will split it up later again.
2013-10-28 06:36:13 +01:00
Gibheer
77053f05d8 add first draft of design
This adds the first couple css rules for the new design.
2013-10-27 19:50:32 +01:00
Gibheer
e488b155e4 add layout for the posts 2013-10-27 19:47:51 +01:00
Gibheer
fcb995b0f0 small controller to deliver images
This is nice for development, but should not be used in production. Most
webservers can do better.
2013-10-27 19:46:16 +01:00
Gibheer
5b54051db6 fix namespace leak 2013-10-27 19:46:02 +01:00
Gibheer
6c1cb50af0 add layouts to renderer
The renderer is now able to render templates in the context of their
layouts.
2013-10-27 19:45:12 +01:00
Gibheer
5a65a3dc40 reroute atom controller to post
This is not really good, but okay for the moment until the template is
extracted into its own namespace.
2013-10-27 13:39:44 +01:00
Gibheer
1e26faa84a extend regex for catching files 2013-10-27 13:09:44 +01:00
Gibheer
d8fe8a97bc compile markdown for each request
The problem here is, that the markdown code can't be compiled and
therefore does not get executed when the page is rendered. So this
change directly calls Kramdown to compile the code.
It should be replaced later by a mechanism which compiles the markdown
when the post is loaded.
2013-10-26 23:01:22 +02:00
Gibheer
fb3d0b51c0 add markdown support
This is to pretty print the markdown posts.
2013-10-26 22:36:17 +02:00
Gibheer
4e04cce391 add atom feed 2013-10-26 17:52:52 +02:00
Gibheer
0e547febf1 add post controller
This adds the post controller to get the posts from the database and
make apply all filters needed to make it a workable result.
2013-10-26 14:56:55 +02:00