Skip to content

Leftium/hckrweb

 
 

Repository files navigation

HckerWeb

Originally just a mashup of cheeaun's HackerWeb and wvl's hckr news. I've updated it so I can read Hacker News just the way I want to.

HckrWeb combines HackerWeb's elegant readability with hckerweb's chronological list of HN homepage items.

Major changes/innovations:

  • Default news feed is from hckrnews.com (all items that have made the HN homepage, sorted by date).
  • Direct "More..." links (no scrolling required) to dates as far back as June 9, 2010 (No hckernews data beyond this date!)
  • The 'show' feed combines HN's show and shownew pages. (Removes "did I already read up to here?" confusion when "Show HN" items are in both lists.)
  • The 'ask' feed shows the first two pages of Ask HN
  • Displays last time you visited.
  • Renders individual comment items. This is useful for sharing, or reading a child comment tree.
  • "Pagedown" icon to scroll past items you've already seen. Tapping an item's icon scrolls it to the very top. More precise and less finger movement!
  • [dead] items show more info and link directly to news.ycominbinator.com for viewing (if logged in).

How to build and run locally

git clone https://github.com/Leftium/hckrweb
cd hckerweb/
npm install
npx grunt server

Grunt tasks

  • grunt templates - Compile templates in templates/* to generate assets/js/templates.js

  • grunt uglify - Concat and minify JavaScript files in assets/js/* to generate js/*

  • grunt watch - Watch the templates and scripts, run templates and uglify tasks when they're changed

  • grunt embedImage - Embed images into CSS files. This will parse CSS files in assets/css/* and change this (any lines with url()):

     background-image: url(PATH); /* embedImages:url(PATH) */
    

    ... into this:

     background-image: url(data:DATAURI); /* embedImages:url(PATH) */
    
  • grunt connect - Run a local dev server. Arguments:

    • --port=XX - specify a custom port number
  • grunt server - Run both watch and connect tasks at the same time

About

Hcker News mobile web app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 49.4%
  • JavaScript 45.4%
  • HTML 3.5%
  • Mustache 1.7%