Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

a number of updates to styles, data and docs

  • Loading branch information...
commit 881aa082c63c025fcf2e48f018b66e70b23f9594 1 parent b63a740
@jonschlinkert jonschlinkert authored
View
4 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)
View
6 Gruntfile.js
@@ -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: {
@@ -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: {
View
2  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
View
2  README.md
@@ -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).
View
38 _config.yml
@@ -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
@@ -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
@@ -77,4 +97,4 @@ sharing:
facebook: false
gplus: false
hn: false
- google: false
+ google: false
View
8 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",
@@ -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/"
}
View
1  data/translations.yml
@@ -34,5 +34,6 @@
- language: Belarusian
url: Out of date) <http://www.designcontest.com/show/lesscss-be
+
- language: Iranian
url: http://less-css.ir
View
6 package.json
@@ -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",
@@ -54,12 +53,10 @@
"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",
@@ -67,7 +64,6 @@
"handlebars-helper-eachitems",
"handlebars-helper-feed",
"handlebars-helper-md",
- "handlebars-helper-nav",
"handlebars-helper-partial",
"handlebars-helper-rel",
"handlebars-helper-slugify",
View
24 styles/docs.css
@@ -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] {
@lukeapage Owner

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

@jonschlinkert Owner

yeah I would add this back in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
- padding-top: 80px;
- margin-top: -60px;
-}
-
-
-
-
/*
View
7 styles/site.less
@@ -38,6 +38,13 @@ body {
padding-top: 40px;
}
+// Prevent navbar from overlapping
+h1[id] {
+ padding-top: 80px;
+ margin-top: -45px;
+}
+
+
View
4 styles/variables.less
@@ -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
@lukeapage Owner

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

@jonschlinkert Owner

@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.

@lukeapage Owner

no problem it only took a moment

ff87479

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+@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;
View
47 templates/functions.hbs
@@ -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>
@lukeapage Owner

@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.

@Synchro Owner
Synchro added a note

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.

@lukeapage Owner

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)

@Synchro Owner
Synchro added a note

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?

@Synchro Owner
Synchro added a note

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.

@lukeapage Owner

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.

@jonschlinkert Owner

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

@seven-phases-max Owner

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
{{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>
+
+
View
5 templates/helpers/sidenav.js
@@ -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) {
@@ -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);
View
2  templates/includes/head.hbs
@@ -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;
View
2  templates/includes/nav-main.hbs
@@ -53,4 +53,4 @@
</ul>
</nav>
</div>
-</header>
+</header>
View
2  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>
Please sign in to comment.
Something went wrong with that request. Please try again.