Commit graph

63 commits

Author SHA1 Message Date
Carl Chenet 722189b6ac add a dynamic 404 page 2017-05-23 12:26:49 +02:00
Carl Chenet 830d0e6586 home: protect against cache accesses and expirations 2017-05-18 18:54:28 +02:00
Carl Chenet dd0634ad57 i18n of about text and improve description. fixes #15 2016-11-24 14:33:09 +01:00
Carl Chenet c7f13fc9b8 fix typo. fixes #18 2016-11-24 11:57:57 +01:00
Carl Chenet fc2441dda5 fix type. fixes #19 2016-11-24 11:56:57 +01:00
Carl Chenet 49360a8c69 fix translation for license in privacy section. fixes #26 2016-11-23 17:34:57 +01:00
Carl Chenet ff43374367 add about and privacy texts 2016-11-17 15:55:58 +01:00
Carl Chenet 286f25e712 i18n of controllers/home_controllers 2016-11-15 17:05:42 +01:00
joshua stein 955c52b5bb clamp pagination
avoids a sql error when trying to offset a huge number
2016-08-19 00:00:18 -05:00
joshua stein 98ab3796b3 add simple @titles for about, chat, privacy 2016-05-02 17:56:16 -05:00
David R. MacIver 0f38779d7a Add RSS and JSON feeds for newest by user 2016-04-29 17:41:14 +01:00
Peter Bhat Harkins bfe7a67156 Don't 500 if someone hasn't added a chat template 2016-04-12 21:34:04 -05:00
joshua stein 1c789fbae0 add /chat page 2015-10-11 13:04:16 -05:00
joshua stein 0c4a88e284 export some more things through json 2015-08-04 09:58:47 -05:00
joshua stein c2442a5881 add comments rss feed
The RSS view was already here but never setup in a controller.

Closes #202
2015-04-28 09:51:50 -05:00
joshua stein 6329041ee8 tweak page title for /upvoted 2014-08-17 19:10:32 -05:00
joshua stein e3f6a4edd8 Merge pull request #163 from walle/upvoted_fix
add /upvoted page to show a logged-in user's upvoted stories
2014-08-17 19:09:04 -05:00
Fredrik Wallgren 2ffe322f64 Rename by_user to newest_by_user and sort accordingly. 2014-08-17 14:18:23 +02:00
Fredrik Wallgren ab8f8f3a72 Add upvoted route.
Upvoted route shows all stories a logged in user have upvoted
in reverse chronological order, latest upvote first.
It is not shown in the gui, but reachable at /upvoted.
2014-08-16 00:27:18 +02:00
joshua stein 8a3b133d87 style/wrapping 2014-08-03 22:07:56 -05:00
Andrey Chernih fc52db5424 Refactor HomeController 2014-07-09 22:25:39 +04:00
joshua stein 9554423d4f tag pages should be ordered by created_at, not hotness 2014-06-30 11:56:40 -05:00
joshua stein 73b8df5eb7 implement story merging
closes #137
2014-04-08 17:51:12 -05:00
joshua stein 9d2253a010 heavily downvoted stories should never be on the home page 2014-04-06 20:43:16 -05:00
joshua stein 025558f6ad add support for /top and things like /top/3m and /top/2w
not linked to from anywhere yet

closes #95
2014-04-03 13:20:24 -05:00
joshua stein 3993e10109 HomeController: sort methods 2014-04-03 10:26:10 -05:00
joshua stein 6cab668a2f simplify rss <link> generation 2014-03-12 17:50:51 -05:00
joshua stein 9535b05490 remove story downvoting, add story hiding
stories should either be reported for spam (coming later), upvoted,
or left alone rather than being downvoted for being uninteresting.
since users don't like leaving uninteresting things alone, they can
now hide stories from their view without affecting the story's
score.

hiding is implemented as a Vote with its vote set to 0 and the
reason set to "H"

add a /hidden url which shows all of a user's hidden stories

while i'm here, simplify Vote guts and add some tests to make sure
all the flip-flopping stuff works right
2014-03-03 17:20:21 -06:00
joshua stein 0d6f4ed60c fix story pagination and caching for logged-out users
use a file store so each unicorn process can share the same set of
files (using redis would probably be cleaner)

put page number into how hash when creating the cache key
2014-02-16 09:57:05 -06:00
joshua stein 2da624e592 use Rails.env.development? 2014-02-05 21:01:49 -06:00
joshua stein 9fb9a6f116 fix /recent behavior when there aren't enough stories to fill the list
keep walking back a day at a time
(might want to do this quicker though)
2014-02-01 03:39:58 -06:00
joshua stein df75c8f787 revert to previous /newest behavior, use new stuff for /recent
/recent is not yet linked to from anywhere
2014-01-25 11:14:21 -06:00
joshua stein 8dbc0e4724 simplify story finding 2014-01-25 10:38:07 -06:00
joshua stein 35f43ea10c start experiment with /newest page
on the first page of /newest, shift out stories that got enough
traction that they're probably on the front page (currently 5
points)

then take the bottom half of the list and fill it with random,
unpopular stories from the past few days (currently 3)
2014-01-24 13:55:21 -06:00
joshua stein d578482e3b move story comment counts out of keystore
it would be nice to use AR's built-in counter cache, but the
comments count has to reflect something custom so stick with what
was there
2014-01-08 22:20:56 -06:00
joshua stein 1452e1c34d rip out default filtered tags 2014-01-07 11:42:21 -06:00
Serge Paquet 9b0294c471 upgrade to rails v4.0.2 2013-12-30 17:40:52 -05:00
Serge Paquet b42189f45b replace some raw sql with database-agnostic activerecord queries 2013-12-30 16:23:59 -05:00
Serge Paquet 8fbf76b484 use activerecord query interface instead of deprecated finder methods 2013-12-25 16:43:50 -05:00
joshua stein aeb25d22b6 add a footer link bar, add /privacy and /about
if these templates (ignored by git) are not present, just show some
text rather than raise an error
2013-10-18 15:55:20 -05:00
joshua stein 249dd85ec3 allow non-logged-in users to define tag filters
when not logged in, store the filters in a long-lasting cookie and
do not cache the home page

for that one guy on hacker news that complained about lobste.rs not
having this
2013-08-05 02:19:55 -05:00
joshua stein 04218c8f6c explicitly to_s the tag description before sending to CGI.escape
fixes a problem with tags with no description, raised in issue 50
2013-03-29 16:20:52 -05:00
joshua stein d0459974cd so long whitespace 2013-02-13 18:50:51 -06:00
joshua stein 95cdd886a1 fix tag filtering
a story with tags [c, go] with a user's tag filter of [go] was just
removing the [go] tag from the story, not removing it from the list
completely
2013-02-07 17:35:20 -06:00
joshua stein 14ed917baa show rss <link> header on /comments 2013-01-13 21:39:52 -06:00
joshua stein d108158d15 add json views to /newest.json and /hottest.json for issue #42 2012-12-16 20:05:27 -06:00
joshua stein 3bba719cd9 explicitly prevent caching in development mode, triggers some kind of bug
throws "undefined class/module Story" after changing the model in
between refreshes
2012-12-16 20:03:01 -06:00
joshua stein b2315a5728 add private rss feeds for logged-out users by passing a token
create a random rss_token for each user and append it to the rss
urls.  when adding the user-specific feed url to a feed reader, the
user's tag filters will be applied before generating the rss view,
giving the same list of stories that the user sees while logged in.
2012-09-18 10:43:05 -05:00
joshua stein 1987a24a2a properly set @title/@heading everywhere 2012-09-07 09:18:15 -05:00
joshua stein c093431898 allow tags to be filtered by default for new and non-logged-in users 2012-09-06 13:44:42 -05:00