Skip to content

Conversation

@zlatanvasovic
Copy link
Contributor

Closes #1.

Core changes:

  • Drop Jekyll and its components
  • Put all CSS files in a single file
  • Reorganize file structure
  • Remove 404 page, as it's needless (the whole site is based on one page)
  • Update normalize.css to v4.2.0 (from Update normalize.css to v4.2.0 #13)
  • Remove needless CSS
  • Add favicon
  • Add screenshot to the site

I've also updated LICENSE information. Please review all changes. 🐱

LICENSE Outdated
The MIT License (MIT)

Copyright (c) 2015 tldr pages
Copyright (c) 2015-2016 TLDR pages team
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "TLDR pages team" is not an existing legal entity that can own copyright. Maybe replace this with Copyright (c) [The project contributors](https://github.com/tldr-pages/tldr-pages.github.io/graphs/contributors)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

*/

/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
progress,sub,sup{vertical-align:baseline}button,hr,input{overflow:visible}html{font-family:sans-serif;line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0} figcaption, menu,article,aside,details,figure,footer,header,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block}audio:not([controls]){display:none;height:0} [hidden],template{display:none}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}svg:not(:root){overflow:hidden}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}button,input,optgroup,select,textarea{font:inherit;margin:0}optgroup{font-weight:700}button,input{}button,select{text-transform:none}[type=submit], [type=reset],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:ButtonText dotted 1px}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-input-placeholder{color:inherit;opacity:.54}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't do this :( I'd much rather use @import url("https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css"); instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@import is considered as the evil of CSS. If the cdnjs site goes down and their resources can't load, our CSS won't load at all. It's easy to maintain a 1-line dependency, don't worry about it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, let's use <link> instead of @import. It's still better than a long unreadable line in the CSS.

By the way, normalize is just a small part of this site's styling, and makes only minor changes in the default browser styling so even if it doesn't load for some reason (which is quite unlikely considering that CDNs are made precisely for fast and reliable serving of this kind of assets), the user will probably not even notice :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is supposed to be minified because it shouldn't be changed, so there are no problems with inserting the one-liner in the main CSS. Even the enormous projects like Bootstrap prefer doing it that way.

Copy link
Member

@waldyrious waldyrious Oct 2, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not even talking about it being minified or not. If we include it as a link, the code won't be in our repo neither expanded nor minified :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@waldyrious I hope that's fixed now. Please review all changes if you haven't already. 🌃

@waldyrious
Copy link
Member

waldyrious commented Oct 2, 2016

Is it expected that the assets (css, screenshot, favicon) aren't loaded when testing with HTMLPreview?

@zlatanvasovic
Copy link
Contributor Author

@waldyrious All assets are /-relative. You gotta clone repository and run local server (such as php -S localhost:4000 or jekyll serve) to see it properly.

@waldyrious
Copy link
Member

Huh? I thought this change was precisely so the page could be served statically, without using jekyll... am I missing something?

@waldyrious
Copy link
Member

Btw, the README needs to be updated to remove the mention of Jekyll :)

@zlatanvasovic
Copy link
Contributor Author

zlatanvasovic commented Oct 2, 2016

It's served without problems statically. You just have to run it on a server where it's placed on root, not your local file sistem, so all asset URLs are resolved correctly.

And thanks, I fixed README. 😄

@waldyrious
Copy link
Member

Why not using relative paths for the assets, then?

@zlatanvasovic
Copy link
Contributor Author

@waldyrious I've included the changes from #12, too. Merging that pull request would make this one unmergable and vice versa, so I just included it all here. 😄

*/
html {
font: 16px/1.5 Inconsolata, sans-serif;
font: 16px/1.5 monospace;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsolata and system monospace fonts have very few differences, so it's basically needless. Loading Google Fonts slows the page a lot, so I dropped all of them.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have we measured the importing of the Inconsolata font to be a bottleneck in performance? And if so, why haven't we removed Montserrat from the font-family for h* tags?

If importing is really such show-stopper, we should consider serving base64 encoded versions of it inlined.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed Montserrat font now. It isn't such a slow-slopper, I'm just saying the difference between the fonts is minimal, so we basically don't need to load another font. However, I'll restore Inconsolata if it's important for the page look 😅

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel that we don't agree there @zdroid: choosing a font, in particular a font-pairing like it was done here, is essential to the content. In a way it even defines the culture around it.

Now it's perfectly fine to say that two fonts have very few differences, but few doesn't imply small, and it is one little victory to see that from the average monospaced font which will be a system-default to the same Inconsolata typeface for everyone, that few differences will be huge.

So my vote goes for keeping the Inconsolata/Montserrat pairing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I'll revert that change tomorrow 🌃

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, got it.

@waldyrious
Copy link
Member

waldyrious commented Oct 2, 2016

Looks good to me, thanks for doing this 👍

@Ostera since you reacted during the comments: anything else to add or can we go ahead and merge (after the font change reversal)?

@zlatanvasovic
Copy link
Contributor Author

It should be alright now.

@waldyrious
Copy link
Member

@zdroid I still see some (minor) rendering differences between the live site and the preview. Care to take a look? It's not that i think they're a big deal, but they might signal some changes that weren't carried out to completion.

@zlatanvasovic
Copy link
Contributor Author

@waldyrious Oh, font weight. That should be fixed now.

@waldyrious
Copy link
Member

The "Installation" section also has some issues (of actual font family, not just weight, it seems). Please take a look.

@zlatanvasovic
Copy link
Contributor Author

Well @waldyrious, I can't notice any issues. Can you please be more specific? Maybe it was just a caching bug. Try to open the project locally.

@waldyrious
Copy link
Member

Here's what I see. Current:

screenshot 2016-10-03 13 41 09

Preview of this PR:

screenshot 2016-10-03 13 41 22

Looking at it more closely, indeed it seems like it's just the font weight. It must be a cache issue with htmlpreview (already cleared my browser cache, to no avail). So with that fixes, this seems good to merge.

@zlatanvasovic
Copy link
Contributor Author

@waldyrious It should be fixed too.

@waldyrious
Copy link
Member

Ok, it seems the existing site is using Inconsolata for the body text, and Source Code Pro for the code elements. I'd rather use a single font, but if we want to preserve the current styling, we'll need to adjust the CSS accordingly. @Ostera what do you think?

@zlatanvasovic
Copy link
Contributor Author

We already have 4 HTTP requests only for CSS. No need to use that many fonts.

@waldyrious
Copy link
Member

waldyrious commented Oct 3, 2016

I agree. Let's wait and see what @Ostera says :)

Actually, I just remembered that it's possible to combine multiple fonts into a single request for Google Fonts, so re-adding Source Code Pro shouldn't be a problem :) (I do think it looks better, so that's also a plus of re-adding it)

@zlatanvasovic
Copy link
Contributor Author

@waldyrious Please check it out now. I hope this is the final version. 😄

@waldyrious
Copy link
Member

Looks absolutely perfect @zdroid, matches the current style down to the pixel! Many thanks for doing this 🎉 😄

@waldyrious waldyrious merged commit 8ec5023 into tldr-pages:master Oct 10, 2016
@zlatanvasovic zlatanvasovic deleted the nuke-jekyll branch October 10, 2016 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants