TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Please add this 1 line, make HN mobile friendly

74 点作者 Hilyin大约 11 年前
<meta name="viewport" content="width=device-width, initial-scale=1">

17 条评论

kogir大约 11 年前
I tried this for a few hours some time ago. It made the site less usable on most Android and iPhone devices with normal smartphone screen sizes. Text in a number of places ran together and comments shrunk to one character per line a few replies down.<p>So it&#x27;s not that simple. Real changes to make the site truly responsive are larger and I can&#x27;t promise they&#x27;ll come soon.
评论 #7330435 未加载
nrbafna大约 11 年前
I saw a comment on HN sometime back and can&#x27;t seem to find it now, but thought it had some merit. The gist of it was that enabling posts from mobile might lead to lower content quality as typing on phones is tougher and we tend to focus on a quick reply rather than a thought out discussion.<p>I personally use <a href="http://hn.premii.com" rel="nofollow">http:&#x2F;&#x2F;hn.premii.com</a> on mobile &amp; it has a good reading experience.
评论 #7330270 未加载
评论 #7330377 未加载
russellbeattie大约 11 年前
No, you cannot just add that to the top of a web page and have it magically transform into a mobile-friendly page. It may look fine on your particular device, but it will probably be completely hosed on everything else.<p>The viewport meta tag is essentially a switch which tells mobile browsers to <i>not</i> provide a default page width of 980px, auto zoomed out, but to instead use the device&#x27;s CSS pixel dimensions, with a zoom you define with initial-scale. Note that this is not <i>physical</i> pixel dimensions. A mobile device&#x27;s CSS pixels are the physical resolution divided by the device&#x27;s devicePixelRatio, which currently can range from 1 to 3.<p>Examples:<p>On an iPhone 5s, which has a physical resolution of 1136x640 and a devicePixelRatio of 2, a viewport with &quot;width=device-width&quot; will create a page that only has 320px in portrait and 553px in landscape in CSS pixels.<p>On a HTC One, which has a physical resolution of 1920x1080 (1080p) and a devicePixelRatio of 3, the page will have only 360px in portrait and 640px in landscape.<p>On tablets, CSS pixel portrait width can range from 600px on a Nexus 7 and Kindle Fire HDX, to 768px on an iPad mini non-retina, to 800px on a Nexus 10 or Kindle Fire HDX 8.9&quot;.<p>Using a viewport meta tag <i>needs</i> to be done in combination with CSS media queries (or a very flexible design that doesn&#x27;t use px for sizes) to ensure that your web page design responds to the various screen sizes without breaking.<p>Hope that helps clarify things a bit - trust me, it&#x27;s a common misunderstanding.
DanBC大约 11 年前
I am not sure what this is meant to address. The worst thing for mobile users is the teeny tiny voting buttons. I believe that votes are important and are not used enough and part of the reason is fear of accidental downvote.<p>The other thing that could be fixed is when someone puts a very long unbroken string in a comment without putting it in a code block. This makes the page very wide, and creates an unpleasant experience.
评论 #7330437 未加载
nailer大约 11 年前
HN needs more than that - enabling it:<p><a href="http://imgur.com/9fetcE9" rel="nofollow">http:&#x2F;&#x2F;imgur.com&#x2F;9fetcE9</a><p>Throw the template and CSS, and some sample data on GitHub. HN&#x27;d have a working version in 24 hours.
评论 #7330324 未加载
mcovey大约 11 年前
I have no idea as to the status of userscripts on mobile devices but at least on the desktop they are my go-to for personalizing my internet:<p><pre><code> (&quot;news.ycombinator.com&quot; === window.location.hostname) &amp;&amp; (function () { var meta = document.createElement(&quot;META&quot;); meta.name = &quot;viewport&quot;; meta.content = &quot;width=device-width, initial-scale=1&quot;; if (document.readyState === &quot;complete&quot;) { document.head.appendChild(meta); } else { document.addEventListener(&quot;DOMContentLoaded&quot;, function () { document.head.appendChild(meta); }); } })();</code></pre>
germs12大约 11 年前
Agreed. Seems like a easy win for everyone. Are there any downsides?
mobweb大约 11 年前
I use <a href="http://ihackernews.com/" rel="nofollow">http:&#x2F;&#x2F;ihackernews.com&#x2F;</a> all the time on mobile and it&#x27;s working perfectly. Might want to give it a try!
评论 #7330233 未加载
TheBiv大约 11 年前
I think we are all looking at the amount of work that would need to go into this, and not looking at the simple fact that maybe PG doesn&#x27;t want to manage a mobile site.<p>If you don&#x27;t understand what I mean by &quot;manage&quot;, then consider yourself lucky as you have not worked in the digital agency world.
评论 #7331169 未加载
nrbafna大约 11 年前
On other note -<p>Is there an extension&#x2F;app for HN that categorizes the posts into topics (based on some text analysis) &amp; enables the user to filter them out from the feed? Feature akin to what lobste.rs provides.<p>This will basically enable me to filter out fluff stories that manage to rise up.
jchrisa大约 11 年前
I think I saw them experiment with something like this briefly.
robinhoodexe大约 11 年前
<a href="http://hckrnews.com" rel="nofollow">http:&#x2F;&#x2F;hckrnews.com</a> is rather mobile-friendly (and looks georgeous as well).
评论 #7330598 未加载
wololo_大约 11 年前
Or you know, make the front-end layer open source s owe can send in PR
评论 #7330431 未加载
zbowling大约 11 年前
why not just use an app?
评论 #7330126 未加载
评论 #7330148 未加载
评论 #7330147 未加载
评论 #7330157 未加载
raldi大约 11 年前
What will it do?<p>A pair of before-and-after screenshots would be helpful.
chaoskid大约 11 年前
or just use <a href="http://ihackernews.com" rel="nofollow">http:&#x2F;&#x2F;ihackernews.com</a>
Istof大约 11 年前
or use RSS and format it however you like?