I didn't make the fonts scale to mobile screen ratio because I know a lot of people like to have the ability to pinch in and out.
PG, if you're reading this, all you have to do is dump this at the bottom of your css file.
@media (max-width: 740px) {
body { padding: 0; margin: 0; width: 100%; }
body table{ width:100%; }
body table tr td:nth-child(1n+0) table:nth-child(1) tr:nth-child(1) td:nth-child(even) .pagetop {
position: absolute; top: 4px; left:30px; z-index:100; width: 100%; text-align: left; }
body table tr td:nth-child(1n+0) table:nth-child(1) tr:nth-child(1) td:nth-child(odd) .pagetop {
position: absolute; top: 45px; left:30px; z-index:100;text-align: left; color: #fff;}
body table tr td:nth-child(1) { height: 70px; vertical-align:top; padding: 1px;}
body table tr td:nth-child(1) td:nth-child(1) { height: auto; padding: 0;}
textarea { width: 100%; }
.pagetop { color: #ff6600; }
.pagetop b { display: block; float: left; clear: both; width: 100%; margin-bottom:4px }
.pagetop a { display: block; margin-right: 10px;float: left; }
body img {width: 20px; height: 20px; }
body img:after { display: block;color:#000; font-size: 20px;}
pre {max-width: 100%; width: 300px; word-wrap:break-word; overflow: auto; }
a {word-wrap:break-word; }
}
End result is this:
https://www.dropbox.com/s/t2893r570ef429t/hn-css.jpgThe code can be found here: https://gist.github.com/AltIvan/5243025
It looks like: http://i.imgur.com/iYrfuOf.png
I know that the login button disappeared but it ask you to login in when you try to reply, up-vote or submit.
Although Firefox seems to ignore media queries that don't have a medium type (just using `@media all and (max-...) { .. }` fixes that though), and using the prefix search of `a[id^="up_"]` is probably more efficient than the full substring search of `id*="up_"`.
Thanks for sharing, I'm taking some cues from this.
@media screen and (max-width: 800px), handheld and (max-width: 800px) {
img[src="grayarrow.gif"], img[src="graydown.gif"] {
width: 20px;
height: 20px;
}
}
(It'd be nice if the images were unicode symbols, e.g. http://www.fileformat.info/info/unicode/char/25b2/index.htm)And possibly putting the following in the <head>, so that the screen starts zoomed to a reasonable level.
<meta name="viewport" content="width=device-width, initial-scale=1"> if (/dir=down&/.test(node.href) && !confirm("Confirm downvote:")) return;When we work on the web, we focus on being semantic, conscious about the actual web in which one size does not fit all, usability and design. None of which HN has: tables, it doesn't work on mobile (and the links on the submission aren't clickable) and you can't undo your vote. I understand another hacker value is protoyping and MVP-thinking, but when you have a vibrant community a few years old, that's not the case.
Maybe the hacker thinking on HN is doing it yourself, maybe you can come up with a browser extension that fixes this stuff.
In the meanwhile, you can use ihackernews.com for when you're on the go.
What does this mean?
...spacer gifs, font tags, unquoted attributes, no doctype.
I just had a rather nice little reminisce in the html source. All it was missing was a <layer> or two and I would have been right back in 1997.
Since this is about mobile, it really would need to be an improvement to the site itself.
HN looks like it was hacked overnight which makes its design perfectly adequate for a community of hacker...
Something becomes a standard when used by the majority. In this case it would be reasonable to make HN's unpolished design the standard for communities of hackers...
edit: I just realized you are talking about not being able to vote on things easily- sadly you cant do that with hackerwebapp, but it is still a really good mobile site.
Someone above posted a link to http://m.news.ycombinator.com.moovapp.com
I think after being improved a little bit it could do exactly what you're looking for.
Haven't found anything comparable on iOS.
[1]https://play.google.com/store/apps/details?id=com.airlocksof...
Check out:
https://m.news.ycombinator.com.moovapp.com/
I took a weekend crack at it recently using moovweb's sdk:
It's far from complete, but already much more usable.
EDIT: dbaupp did something while I was writing this. Great.
And the site gets rendered in this file https://github.com/wting/hackernews/blob/master/news.arc
The main problem is HN looks like a science project to me and has proven that arc can be used to power a site like this. It works and thats probably enough for pg right now :)
edit: here's the default view for this specific comment: