Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Guardian Frontend – Source for the Guardian's responsive site (github.com/guardian)
237 points by danso on Dec 9, 2013 | hide | past | favorite | 49 comments


This is wonderful.

LICENSE = Apache 2.0 https://github.com/guardian/frontend/blob/master/LICENSE

And then...

https://github.com/guardian/frontend/tree/master/resources/f...

They have put under Apache license their commissioned fonts which are normally available for a decent fee: https://commercialtype.com/typefaces/guardian https://commercialtype.com/typeface_images/guardian/Guardian...

This is extremely generous of the Guardian.


Thanks a lot for pointing out the problem of having those fonts within the Apache license. We will find a solution soon. Next time you see something like this, we'd appreciate it greatly if you emailed us instead.


Sure thing, and I did glance through the github repo for an obvious contact point and couldn't see one. I figured you'd be reading HN and this would be dealt with far quicker by just posting here.

I haven't checked for other things but the same logic about protecting original licensed works should be borne in mind for any commissioned artwork, icon sets, widgets, third party items, fonts, etc.

An open-source version should go into the project (safe defaults that work), and the closed-source/licensed things should just be merged during deploy.

I only glanced for a few seconds, but custom icons and images are the other obvious areas of concern given it's your brand identity and you probably aren't open-sourcing that and have restrictions on how those assets are used.


Sorry a contact point was not obvious. There is a link at the bottom of the mobile site (top of the desktop site) that says "Contact us". Or we appreciate Github issues as well.


Generic advice for all HNers: if you publish things to the Internet, a single responsible party (which can be a bunch of people, as long as they can share an email address) with a PGP key is a very cheap investment in not having your dirty laundry aired on Twitter/HN/Pastebin/less savory places.

Specific advice to the Guardian: I'd encourage you to take the above generic advice.


Wouldn't this defeat the point of having this project open-sourced?


That's not so great either, since this kind of page on newspaper sites and corporate sites tend to be black holes.

When visiting the mobile site, you're initially greeted explaining it's a beta, and there's a link in the greeting to offer feedback. I dismissed it and started browsing, and intended to report a bug -- but then the feedback link was nowhere obvious, so I figured someone else would eventually look deeper.

The bug in question in case it's not reported yet: the very first article has a title that overlays the date when browsing on an iPad in portrait mode. (You should be using min-height somewhere instead of height, or worry about headline lengths.)


Thanks for sharing your experience. We are testing multiple versions of the homepage at the moment and are working on fixing these overflowing headlines.

PS: Thanks to your feedback, I reported to my colleagues the fact that we may want to give our beta/alpha readers a chance to send us feedback through the survey after dismissing it.


Try placing it at the very bottom of the page. Something like "This site is in alpha/beta/whatever. Please send us feedback by email or on github."

Re the contact link, the contact us page seems clear enough now that I actually peeked at it. (The problem here isn't so much what the Guardian is doing than it is what others are doing. All too often, it's impossible to find any useful email or phone number, and taking a step to contact a company amounts to wasting your time. I can't remember the last time I bothered to look at any large company's contact us page.)


If the fonts have been distributed under an Apache license, can you just 'take them back?' I'm pretty sure they're free now.

>Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.


It's not clear that the Guardian owns the rights to relicense the assets, especially since they apparently were included by accident. If they don't own the licensing rights then the apparent license would be invalid. So for all practical purposes for third parties that might be interested in using the assets, I think they would have to be considered them improperly licensed regarding this Apache License "release" until The Guardian shows that this is not the case. And given that it was an accident, I don't see why they would do that.

[edit: clarity]


The law is not a magic spell, where an extra eye of newt at the wrong time can magically transform somebody else's property into communal property.

The Guardian's license most likely doesn't cover those files, as they are not owned by The Guardian.


They may not have had the right to release these fonts under the Apache license in the first place.


If this turns out to be erroneous, does anyone know what happens here? I assume that if it is clear error then the licensing won't be valid and they can revoke it?


According to the Apache 2.0 license:

>Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.


It is worth pointing out that this is only relevant if 1) they have the rights to it in the first place, which is not a given, and 2) a judge finds that someone trying to take advantage of the error is in the right, which is certainly not a given depending on jurisdiction - a long list of considerations might affect whether you could safely depend on the original license.

In this case it appears the copyright to the fonts is held by Commercial Type / Schartzco Inc., not The Guardian, and so they quite possibly don't have the authority to put them under the Apache license in the first place, making the license moot.


That's a circular argument, you can't appeal to clauses in that license to determine if that license is valid. If they can withdraw the license then that clause is also withdrawn.

I don't know about copyright law but in contract law just because something is written in a contract doesn't make it automatically applicable.

An analogous situation may apply here where this can be considered a misapplication and so the license does not apply.

Either way I'd not use this licence to comply with "don't be a dick". Not being an ass here may encourage future releases, being an ass over this could lead to "this is why we can't have nice things.".


Thanks again for reporting this, we added a mention to our license:

All fonts are the property of Schwartzco, Inc., t/a Commercial Type (https://commercialtype.com/), and may not be reproduced without permission.


> This is extremely generous of the Guardian.

Yes. An academic researcher I know has also received helpful cooperation from the Guardian on using some of their code for benchmarking. They're good people.


I think they need to work on their .gitignore file a little, for example: https://github.com/guardian/frontend/blob/master/nginx/front... And also, there's cache fragments in the repository.


Self-signed certificate, not a real one: http://i.imgur.com/35Szn2S.png


Yeah, I imagine that is used for testing SSL on dev boxes or similar.


I'm sure they'd appreciate a pull request.


They'd probably not accept the PR considering the comment on the key :) Looks to be intentionally included for local development

"this is a TEST key for local development - NOT an important key"


The comment was (most probably) added after the HN comment (check the history).


Yip, it's just used for internal SSH testing. No harm to be done there.


I'd like to praise the Guardian for their effort in making their site readable on a tablet.

The large font, the speed at which the page is rendered, and the ability to zoom into the article make it reasonable to not use Safari's Reader button. And keeping the functionality and usability of a normal site (e.g. instead of trying to slam a bizarre left to right pagination) is appreciated.

This is much better than the likes of OnSwipe or Slate.


Thanks! Glad you enjoy the reading experience.


The best improvement for me on this site was the ability to collapse certain sections. Personally, collapsing the flame bait comment is free section made the site immeasurably better.


Prepare for your life to get even better: http://stevenf.com/shutupcss


Exactly that. I've been using a variant of that on the Guardian site for a while and it makes it so much better: http://www.systemed.net/blog/index.php?post=18


It's been open source (on this URL) since ~May 2012...


They've likely been committing to a private repository and only recently made the source publicly available on GitHub.


Matt works at the Guardian, and what he says is right: it's been an open source project since ~ May 2012.


Am I the only one that thinks the publishers' websites are unbelievably ugly and cluttered ?


The responsive site is pretty nice imo, the link in the repo description is wrong: http://www.theguardian.com/uk?view=mobile


Responsive is awesome, but the number of extra information is increasing cognitive burden. Duplication and buttons like print (srly?).


yea, i clicked on the link from github and thought to myself, there is nothing responsive about this site. this is a bit different. Still not crazy about it.


Have you tried to resize browser window?


> "Still not crazy about it."

It worked very well from here. Went down to 100px wide and whole site fit in neatly.

edit: fixed wrong quoted sentence.


oh it worked, i'm just not crazy about it.


I think it does a pretty good job of bringing the identity of the paper edition to the web. The spacing seems a bit tight but the typography is decent.


If you think The Guardian is ugly, look at this Norwegian newspaper: http://www.dagbladet.no/ (one of the largest ones)

(The scary thing: It's cleaner than it used to be - they've toned down the most excessive advertising)


Yeah is ugly, but is more about the frontend package


I heard they wanted to use WebP, but I don't see any?


Thanks for your interest, we now use webp on the mobile site (look at your network tab in the dev tools: the mime type of most images should be image/webp).


But do you think it's wise to keep the AWS keys in the public repository?


I notice some usage of Knockout here - what is the Guardian's frontend dev team's thought about it?


We use it in some tools at the moment, but haven't found a user case to use it on the user facing site.

We're looking into Web Components and patterns there, as, personally, I think, they're the way forward.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: