diff --git a/builder/patternlab.js b/builder/patternlab.js index d001df190..792e7a014 100644 --- a/builder/patternlab.js +++ b/builder/patternlab.js @@ -130,14 +130,14 @@ var patternlab_engine = function(){ var cleanSub = sub.substring(0, folderIndex); //add any templates found to an object of partials, so downstream templates may use them too - //exclude the template patterns - we don't need them as partials because pages will just swap data + //look for the full path on nested patters, else expect it to be flat + var partialname = ''; if(cleanSub !== ''){ - var partialname = cleanSub + '-' + patternName.substring(patternName.indexOf('-') + 1); - - patternlab.partials[partialname] = currentPattern.template; - - //done + partialname = cleanSub + '-' + patternName.substring(patternName.indexOf('-') + 1); + } else{ + partialname = currentPattern.patternGroup + '-' + patternName.substring(patternName.indexOf('-') + 1); } + patternlab.partials[partialname] = currentPattern.template; //add to patternlab arrays so we can look these up later. this could probably just be an object. patternlab.patternIndex.push(currentPattern.name); @@ -160,9 +160,6 @@ var patternlab_engine = function(){ //write the encoded version too fs.outputFileSync('./public/patterns/' + pattern.patternLink.replace('.html', '.escaped.html'), entity_encoder.encode(pattern.patternPartial)); - - - }); //export patterns if necessary @@ -335,19 +332,11 @@ var patternlab_engine = function(){ var viewAllPathsTemplate = fs.readFileSync('./source/_patternlab-files/partials/viewAllPaths.mustache', 'utf8'); var viewAllPathersPartialHtml = renderPattern(viewAllPathsTemplate, {'viewallpaths': JSON.stringify(patternlab.viewAllPaths)}); - //websockets - var websocketsTemplate = fs.readFileSync('./source/_patternlab-files/partials/websockets.mustache', 'utf8'); - patternlab.contentsyncport = patternlab.config.contentSyncPort; - patternlab.navsyncport = patternlab.config.navSyncPort; - - var websocketsPartialHtml = renderPattern(websocketsTemplate, patternlab); - //render the patternlab template, with all partials var patternlabSiteHtml = renderPattern(patternlabSiteTemplate, {}, { 'ishControls': ishControlsPartialHtml, 'patternNav': patternNavPartialHtml, 'patternPaths': patternPathsPartialHtml, - 'websockets': websocketsPartialHtml, 'viewAllPaths': viewAllPathersPartialHtml }); fs.outputFileSync('./public/index.html', patternlabSiteHtml); diff --git a/source/_patterns/04-pages/00-homepage.mustache b/source/_patterns/04-pages/00-homepage.mustache index 4e99ff54d..68a930daa 100644 --- a/source/_patterns/04-pages/00-homepage.mustache +++ b/source/_patterns/04-pages/00-homepage.mustache @@ -1,37 +1 @@ -
- {{> organisms-header }} -
- - {{# hero }} - {{> molecules-block-hero }} - {{/ hero}} - -
- {{# touts}} -
- {{> molecules-inset-block }} -
- {{/ touts}} -
- -
- -
-
-
-

Latest Posts

-
    - {{# latest-posts}} -
  • {{> molecules-media-block }}
  • - {{/ latest-posts}} -
- View more posts -
-
- - -
- {{> organisms-footer }} -
\ No newline at end of file +{{> templates-homepage }} \ No newline at end of file diff --git a/source/_patterns/04-pages/02-article.mustache b/source/_patterns/04-pages/02-article.mustache index 1f5101a4a..0449d165c 100644 --- a/source/_patterns/04-pages/02-article.mustache +++ b/source/_patterns/04-pages/02-article.mustache @@ -1,51 +1 @@ -
- {{> organisms-header }} -
-
-
-
-
-

Top 10 Trails You Have To Hike Before You Die

- {{> molecules-byline-author-time }} -
-

This is where a post about hiking trails would live. I'm not going to write an article about hiking trails. That would take a lot of time.

- -

This is a link, possibly to an external resource. In a post about hiking trails, there would probably be talk about how to get to featured trails, what to pack, where to camp, and so on and so forth. I don't have any expertise in this subject matter so I'm not going to attempt to write about it.

- - {{> atoms-landscape-16x9 }} - -

If I were to write about it, I'd probably do some research on the topic first. But even then, I probably Sed a orci turpis. Aliquam aliquet placerat dui, consectetur tincidunt leo tristique et. Vivamus enim nisi, blandit a venenatis quis, convallis et arcu. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris libero sapien, placerat in sodales eu, tempor quis dui. Vivamus egestas faucibus pulvinar. Maecenas eget diam nunc. Phasellus at sem eros, ac suscipit neque. Phasellus sollicitudin libero a odio dignissim scelerisque. Aliquam purus nulla, tempor eget ullamcorper quis, rhoncus non dui. -

- -
- This trail is amazing. I've never seen anything like it. -
- -

Cras at fringilla ipsum. Donec nec libero eget est blandit dignissim a eu ante. Morbi augue nulla, luctus eu sagittis vel, malesuada ut felis. Aliquam erat volutpat. Morbi malesuada augue ac massa hendrerit fermentum. Integer scelerisque lacus a dolor convallis lobortis. Curabitur mollis ante in massa ultricies dignissim. -

- - {{> atoms-unordered }} - - {{> atoms-ordered }} - -

Donec posuere fringilla nunc, vitae venenatis diam scelerisque vel. Nullam vitae mauris magna. Mauris et diam quis justo volutpat tincidunt congue nec magna. Curabitur vitae orci elit. Ut mollis massa id magna vestibulum consequat. Proin rutrum lectus justo, sit amet tincidunt est. Vivamus vitae lacinia risus. -

- - {{> molecules-pullquote }} - -

Donec venenatis imperdiet tortor, vitae blandit odio interdum ut. Integer orci metus, lobortis id lacinia eget, rutrum vitae justo. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. In pretium fermentum justo nec pharetra. Maecenas eget dapibus justo. Ut quis est risus. Nullam et eros at odio commodo venenatis quis et augue. Sed sed augue at tortor porttitor hendrerit nec ut nibh. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Proin sollicitudin enim consectetur mi commodo quis cursus ante pretium. Nunc gravida cursus nisi in gravida. Suspendisse eget tortor sed urna consequat tincidunt. Etiam eget convallis lectus. Suspendisse cursus rutrum massa ac faucibus. -

-

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Reiciendis, suscipit repellendus nulla accusantium deserunt sed explicabo voluptate sapiente ratione inventore molestiae nihil earum repellat quia odit vitae perspiciatis aliquam amet?

-
- {{> molecules-social-share }} - {{> organisms-comment-thread }} -
- - -
-
- {{> organisms-footer }} -
\ No newline at end of file +{{> templates-article }} \ No newline at end of file