Skip to content

Commit

Permalink
a number of updates to styles, data and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jonschlinkert committed Feb 5, 2014
1 parent b63a740 commit 881aa08
Show file tree
Hide file tree
Showing 16 changed files with 85 additions and 75 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
@@ -1,8 +1,8 @@
## Contributing to the Wiki
## Contributing to the Documentation

**Formatting Standards**

For consistency across all examples in the wiki and to ensure that our code examples are readable, we ask that you please follow these guidelines when contributing to the wiki:
For consistency across all examples in the docs and to ensure that our code examples are readable, please follow these guidelines when contributing:

* Four spaces for indentation, and always use proper indentation
* Multiple-line formatting (one property and value per line)
Expand Down
6 changes: 3 additions & 3 deletions Gruntfile.js
Expand Up @@ -14,7 +14,7 @@ module.exports = function(grunt) {
grunt.initConfig({

// Project metadata
pkg : grunt.file.readJSON('package.json'),
pkg: grunt.file.readJSON('package.json'),
site: grunt.file.readYAML('_config.yml'),

jshint: {
Expand Down Expand Up @@ -69,9 +69,9 @@ module.exports = function(grunt) {
site: {
options: {
partials: ['content/**/*.md'],
permalinks: {preset: 'pretty'}
// permalinks: {preset: 'pretty'}
},
src: '<%= site.pages %>/*.hbs',
src: '<%= site.pages %>/functions.hbs',
dest: '<%= site.dest %>/'
},
feed: {
Expand Down
2 changes: 1 addition & 1 deletion LICENSE-MIT
@@ -1,4 +1,4 @@
Copyright (c) 2013 Jon Schlinkert
Copyright (c) 2014 Alexis Sellier, LESS Core Team, Contributors.

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -94,7 +94,7 @@ node data/utils/pkg && grunt
```

## License
Copyright (c) 2013, Less.js Core Team, Contributors
Copyright (c) 2014, Alexis Sellier, LESS Core Team, Contributors
Documentation released under [Creative Commons](./LICENSE-CC).
Documentation source code released under the [MIT License](./LICENSE-MIT).
Less.js source code is released under the [Apache 2 License](https://github.com/less/less.js/blob/master/LICENSE).
38 changes: 29 additions & 9 deletions _config.yml
Expand Up @@ -19,15 +19,25 @@ layouts: <%= site.templates %>/layouts
layoutext: .hbs
layout: default

# Extensions
# Styles
styles: styles
components: <%= site.styles %>/components


# =============================================
# EXTENSIONS
# =============================================

helpers: <%= site.templates %>/helpers
plugins:
# - assemble-contrib-permalinks
# - assemble-contrib-anchors
# - assemble-contrib-toc

# Less.js metadata
current_version: <%= less.version %>

# =============================================
# PROJECT METADATA
# =============================================

# Site metadata
brand: lesscss.org
Expand All @@ -41,23 +51,33 @@ description: >
homepage: http://lesscss.org
repo: <%= pkg.repository.url %>
issues: <%= pkg.bugs.url %>?&state=open

# Download links
download:
source: <%= pkg.homepages %>/archive/master.zip
latest: https://raw.github.com/less/less.js/master/dist/less-<%= less.version %>.min.js

cdn:
cloudflare: //cdnjs.cloudflare.com/ajax/libs/less.js/1.5.0/less.min.js

# =============================================
# SEO/SEM
# =============================================

analytics:
alexa: lpTeh1awA400OE
google: false
google_site_id: false
google:
id: UA-XXXXXXXX-YY
domain: lesscss.org
siteid:
tags: FOO-012345 # Google Tags (see: https://www.google.com/tagmanager/)


# =============================================
# SOCIAL / SHARING
# =============================================

# Comments
disqus:
enabled: true
enabled: false
shortname: <%= pkg.name %>

# Social
Expand All @@ -77,4 +97,4 @@ sharing:
facebook: false
gplus: false
hn: false
google: false
google: false
8 changes: 4 additions & 4 deletions data/less.json
@@ -1,7 +1,4 @@
{
"repo": "https://github.com/less/less.js.git",
"issues": "https://github.com/less/less.js/issues",
"master": "https://github.com/less/less.js/blob/master/",
"name": "less",
"version": "1.6.1",
"description": "Leaner CSS",
Expand Down Expand Up @@ -87,5 +84,8 @@
"stylesheet",
"variables in css",
"css less"
]
],
"repo": "https://github.com/less/less.js.git",
"issues": "https://github.com/less/less.js/issues",
"master": "https://github.com/less/less.js/blob/master/"
}
1 change: 1 addition & 0 deletions data/translations.yml
Expand Up @@ -34,5 +34,6 @@

- language: Belarusian
url: Out of date) <http://www.designcontest.com/show/lesscss-be

- language: Iranian
url: http://less-css.ir
6 changes: 1 addition & 5 deletions package.json
Expand Up @@ -34,7 +34,6 @@
"devDependencies": {
"assemble": "~0.4.34",
"assemble-contrib-anchors": "~0.1.1",
"assemble-contrib-navigation": "~0.1.0",
"assemble-contrib-permalinks": "~0.2.0",
"assemble-contrib-toc": "~0.1.2",
"assemble-less": "~0.7.0",
Expand All @@ -54,20 +53,17 @@
"handlebars-helper-eachitems": "~0.1.2",
"handlebars-helper-feed": "~0.1.0",
"handlebars-helper-md": "~0.1.2",
"handlebars-helper-nav": "~0.1.0",
"handlebars-helper-partial": "~0.1.1",
"handlebars-helper-rel": "~0.1.0",
"handlebars-helper-slugify": "~0.2.0",
"lodash": "~2.4.1",
"yfm": "~0.1.0"
"lodash": "~2.4.1"
},
"keywords": [
"handlebars-helper-compose",
"handlebars-helper-datetime",
"handlebars-helper-eachitems",
"handlebars-helper-feed",
"handlebars-helper-md",
"handlebars-helper-nav",
"handlebars-helper-partial",
"handlebars-helper-rel",
"handlebars-helper-slugify",
Expand Down
24 changes: 0 additions & 24 deletions styles/docs.css
Expand Up @@ -214,30 +214,6 @@ body {



/*
* Docs sections
*
* Content blocks for each component or feature.
*/

/* Space things out */
.docs-section + .docs-section {
padding-top: 10px;
}

/* Janky fix for preventing navbar from overlapping */
h1[id] {
padding-top: 80px;
margin-top: -45px;
}
h2[id], h3[id] {

This comment has been minimized.

Copy link
@lukeapage

lukeapage Feb 5, 2014

Member

this is necessary too. I'm going to add it back in. Otherwise h2/h3 links overlap

This comment has been minimized.

Copy link
@jonschlinkert

jonschlinkert Feb 5, 2014

Author Contributor

yeah I would add this back in.

padding-top: 80px;
margin-top: -60px;
}






/*
Expand Down
7 changes: 7 additions & 0 deletions styles/site.less
Expand Up @@ -38,6 +38,13 @@ body {
padding-top: 40px;
}

// Prevent navbar from overlapping
h1[id] {
padding-top: 80px;
margin-top: -45px;
}





Expand Down
4 changes: 2 additions & 2 deletions styles/variables.less
Expand Up @@ -48,8 +48,8 @@
@font-size-large: ceil(@font-size-base * 1.25); // ~18px
@font-size-small: ceil(@font-size-base * 0.85); // ~12px

@font-size-h1: floor(@font-size-base * 2.6); // ~36px
@font-size-h2: floor(@font-size-base * 2.15); // ~30px
@font-size-h1: floor(@font-size-base * 2.75); // ~36px

This comment has been minimized.

Copy link
@lukeapage

lukeapage Feb 5, 2014

Member

the comments are now incorrect. I've adjusted to 38 and 31

This comment has been minimized.

Copy link
@jonschlinkert

jonschlinkert Feb 5, 2014

Author Contributor

@lukeapage hopefully I didn't mess these up... sorry, normally I would have taken much more time to be cautious before pushing these changes up after merge conflicts. but I had some changes already and I got it building so I just wanted to push it up as quickly as possible.

This comment has been minimized.

Copy link
@lukeapage

lukeapage Feb 5, 2014

Member

no problem it only took a moment

ff87479

@font-size-h2: floor(@font-size-base * 2.25); // ~30px
@font-size-h3: ceil(@font-size-base * 1.7); // ~24px
@font-size-h4: ceil(@font-size-base * 1.25); // ~18px
@font-size-h5: @font-size-base;
Expand Down
47 changes: 28 additions & 19 deletions templates/functions.hbs
Expand Up @@ -20,65 +20,74 @@ sidenav: nav-<%= slug %>
{{/unpublished}}
</div>


<!-- String -->
<div class="docs-section">
<h1 id="string-functions">String Functions</h1>
<div class="page-header">
<h1 id="string-functions">String Functions</h1>
</div>
{{md 'string'}}
</div>


<!-- Misc -->
<div class="docs-section">
<h1 id="misc-functions">Misc Functions</h1>
<div class="page-header">
<h1 id="misc-functions">Misc Functions</h1>
</div>
{{md 'misc'}}
{{md 'default-function'}}
</div>


<!-- List -->
<div class="docs-section">
<h1 id="list-functions">List Functions</h1>
<div class="page-header">
<h1 id="list-functions">List Functions</h1>
</div>
{{md 'list'}}
</div>


<!-- Math -->
<div class="docs-section">
<h1 id="math-functions">Math Functions</h1>
<div class="page-header">
<h1 id="math-functions">Math Functions</h1>
</div>
{{md 'math'}}
</div>


<!-- Type -->
<div class="docs-section">
<h1 id="type-functions">Type Functions</h1>
<div class="page-header">
<h1 id="type-functions">Type Functions</h1>
</div>
{{md 'type'}}
</div>


<!-- Section -->

<!-- Color -->
<div class="docs-section">
<div class="page-header">
<h1 id="color-functions">Color Functions</h1>
</div>
</div>


<div class="docs-section">
<h1 id="color-definition">Color Definition</h1>
<h2 id="color-definition">Color Definition</h2>

This comment has been minimized.

Copy link
@lukeapage

lukeapage Feb 6, 2014

Member

@jonschlinkert @Synchro what do you think of this change? It a) broke all the links (then fixed by someone) and b) I now can't see all the sub headings on the navbar in one go.
Have a look at lesscss.org right now.
I think we should revert it.

This comment has been minimized.

Copy link
@Synchro

Synchro Feb 7, 2014

Member

Either it should change back, or all the sub-elements should drop to h3. It's inconsistent at the moment - the elements in the Color definition part (e.g. rgb) are h3s, but the elements in the Color blending part are h2s (e.g. multiply), so the menu build can't tell them apart.

This comment has been minimized.

Copy link
@lukeapage

lukeapage Feb 7, 2014

Member

yes exactly. At the moment h1's are the only top level and h2/h3 are the sub menu. We could change all h2's to be 1st level and h3's to be lower level - but I think we should decide one way or the other and then stick to it (it breaks all the links for one)

This comment has been minimized.

Copy link
@Synchro

Synchro Feb 7, 2014

Member

I vote for keeping this change and pushing the lower elements down to h3 consistently in the md files, keeping h1 for page titles (as they are already). Does that need changes in the menu builder?

This comment has been minimized.

Copy link
@Synchro

Synchro Feb 7, 2014

Member

I just pushed a fix for this in color-blending.md, and now all headings in all files in the Functions folder are consistent. Features is a bit more complicated as it contains h1s, h2s and h3s so I'm not sure how best to deal with that.

This comment has been minimized.

Copy link
@lukeapage

lukeapage Feb 10, 2014

Member

I ended up reverting the change - I tried it both ways and in other pages I'd have had to convert alot of h2's to h3's - in the end I thought we may as well just try and stick to h1/h2's and maybe try and get to the point where either the menu supports 3 levels or we get rid of showing h3's on the menu and then the menu will match the document better.
Anyway, I'm open to change but it was more work to get everything perfect than to revert.

This comment has been minimized.

Copy link
@jonschlinkert

jonschlinkert Feb 10, 2014

Author Contributor

I'm sorry, I just saw this thread. I thought I saw all the message you mentioned me in on this page, but I missed this one. I'm not completely caught up, how can I help with this? let me know what needs to be fixed and I'll try to help

This comment has been minimized.

Copy link
@seven-phases-max

seven-phases-max Feb 10, 2014

Member

Alternatively we could make <h2> nav-items to be collapsible (e.g. <ul> instead of <li>) if they have any <h3> next (though I don't know how complicated it could be to implement). Features page worked that way (a sort of) in 37b896a.
E.g. the side bar would look:

Color Functions
    Color Channel (collapsed)
    Color Operations (collapsed)
    Color Blending (collapsed)
{{md 'color-definition'}}
</div>


<div class="docs-section">
<h1 id="color-channel">Color Channel</h1>
<h2 id="color-channel">Color Channel</h2>
{{md 'color-channel'}}
</div>


<div class="docs-section">
<h1 id="color-operations">Color Operations</h1>
<h2 id="color-operations">Color Operations</h2>
{{md 'color-operations'}}
</div>


<div class="docs-section">
<h1 id="color-blending">Color Blending</h1>
<h2 id="color-blending">Color Blending</h2>
{{md 'color-blending'}}
</div>


5 changes: 3 additions & 2 deletions templates/helpers/sidenav.js
Expand Up @@ -8,7 +8,8 @@
// Node.js
var path = require('path');
var _ = require('lodash');
var yfm = require('yfm');
var matter = require('gray-matter');


// Export helpers
module.exports.register = function (Handlebars, options, params) {
Expand All @@ -30,7 +31,7 @@ module.exports.register = function (Handlebars, options, params) {

// Process context, using YAML front-matter,
// grunt config and Assemble options.data
var pageObj = yfm(filepath) || {};
var pageObj = matter.read(filepath) || {};
var metadata = pageObj.context || {};

context = _.extend(this, opts.data[page.sidenav], metadata, context);
Expand Down
2 changes: 1 addition & 1 deletion templates/includes/head.hbs
Expand Up @@ -28,7 +28,7 @@
<!-- Google Analytics -->
<script>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '{{site.analytics.google}}']);
_gaq.push(['_setAccount', '{{site.analytics.google.id}}']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.async = true;
Expand Down
2 changes: 1 addition & 1 deletion templates/includes/nav-main.hbs
Expand Up @@ -53,4 +53,4 @@
</ul>
</nav>
</div>
</header>
</header>
2 changes: 1 addition & 1 deletion templates/includes/source-link.hbs
@@ -1,3 +1,3 @@
<div class="source-link">
<a href="https://github.com/less/less-docs/tree/master/{{@filepath}}">Improve this page.</a>
<a href="https://github.com/less/less-docs/tree/master/{{@filepath}}">Improve this section.</a>
</div>

0 comments on commit 881aa08

Please sign in to comment.