Skip to content

Commit

Permalink
Merge pull request #88 from paulcpederson/master
Browse files Browse the repository at this point in the history
Update to 0.0.7
  • Loading branch information
nikolaswise committed Jan 12, 2015
2 parents ff956b6 + e9cfc7d commit 2b6c383
Show file tree
Hide file tree
Showing 5 changed files with 157 additions and 27 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
## v0.0.7

Javascript, documentation, and more patterns.

### Added
- sticky scroll
- sticky show
- javscript for interactive patterns
- invisible class
- carousel pattern
- `transition-prefixed()` mixin

### Modified
- Minor padding right compression on .top-nav-title
Expand All @@ -14,6 +18,10 @@
- Minor adjustments on font-size at values less than 0
- alpha counters on nested ol
- ITC Charter to Kepler
- Major rework of documentation tech stack

### Removed
- Color Map

## v0.0.6

Expand Down
61 changes: 36 additions & 25 deletions deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,43 @@ var jf = require('jsonfile');
var path = require('path');
var yaml = require('js-yaml');

var file = 'dist/content.json';
var response = [];
var file = 'docs/build/content.json';
var response = {
elements: [],
colors: []
};

function constructItem(content, meta) {

var item = {
group: meta.group,
groupOrder: meta.group_order,
page: meta.page,
page_order: meta.page_order,
page_slug: meta.page_slug,
_id: content.id,
title: content.title,
slug: content.link,
tags: ['calcite-web', 'web', content.title, meta.group, meta.page],
order: meta.order
tags: ['calcite-web', 'web', content.title, meta.group, meta.page, meta.page_slug],
sort_order: meta.order
}

var markdownPath = path.join('docs', 'source', item.page_slug, '_' + item.slug + '.md');
var markdownPath = path.join('docs', 'source', meta.page_slug, '_' + item.slug + '.md');
var markdown = fs.readFileSync(markdownPath, 'utf8');

item.description = JSON.stringify(markdown);

if (content.modifiers) {
item.modifiers = content.modifiers;
var samplePath = path.join('docs', 'source', item.page_slug, 'sample-code', '_' + item.slug + '.html');
var samplePath = path.join('docs', 'source', meta.page_slug, 'sample-code', '_' + item.slug + '.html');
var sample = fs.readFileSync(samplePath, 'utf8');
item.sample_code = JSON.stringify(sample);
}

response.push(item);
if (meta.group == 'Palette') {
response.colors.push(item);
} else {
response.elements.push(item);
}

}

var contents = yaml.safeLoad(fs.readFileSync('data/table_of_contents.yml', 'utf8'));
var contents = yaml.safeLoad(fs.readFileSync('docs/source/table_of_contents.yml', 'utf8'));
var counter = 0;

for (var key in contents) {
Expand All @@ -52,8 +56,18 @@ for (var key in contents) {
contents[key].navigation.forEach(function (group, index){
meta.group = group.group;
meta.group_order = index;

var orderArray = [];

for (var i = group.pages.length; i > 0; i--) {
orderArray.push(i);
}

group.pages.forEach(function (element, i){
meta.order = i;
meta.order = orderArray[i];
if (element.title == 'Overview') {
meta.order == 100;
}
constructItem(element, meta);
});
});
Expand All @@ -62,14 +76,11 @@ for (var key in contents) {

jf.writeFileSync(file, response);


// sort_order: higher-numbers are higher on page, overviews are 100, default 0
// sort reponse into three keys: elements, color, icons

// use this guid generator and add a guid to every item
// function guid(){
// return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
// var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);
// return v.toString(16);
// });
// }
module.exports.guid = function () {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);
var id = v.toString(16)
console.log(id);
return id;
});
};
12 changes: 11 additions & 1 deletion docs/source/sass/_utility-mixins.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ This mixin provides a shorthand syntax and supports multiple transitions.
@include transition(opacity 1.0s ease-in 0s, width 2.0s ease-in 2s);
```

To transition vendor-prefixed properties, e.g. `-webkit-transform` and `-moz-transform`, do not use the shorthand mixin. Instead, use the individual transition mixins:
Or you can use the individual transition properties:

```
@include transition-property(transform);
Expand All @@ -154,6 +154,16 @@ To transition vendor-prefixed properties, e.g. `-webkit-transform` and `-moz-tra
@include transition-delay(0.5s);
```

#### Transition Prefixed

To transition vendor-prefixed properties, e.g. `-webkit-transform` and `-moz-transform`, there is an additional convinience `transition-prefixed()` mixin:

```
@include transition-prefixed(transform3d(0,0,0) 200ms linear);
```

This will generate vendor prefixed properties *and* values.

#### Show and Hide

The show and hide mixins change the `visibility` property. This is useful for removing and adding elements at certain breakpoints or with certain class names. No arguments are passed.
Expand Down
Loading

0 comments on commit 2b6c383

Please sign in to comment.