RecursiveThinking / recursive_thinking_website

Recursive Thinking Website
5 stars 2 forks source link

Change imports to templates for easy parcelling (can have multiple templates per import) #2

Closed MynockSpit closed 6 years ago

MynockSpit commented 6 years ago

This'll allow you to do write templates like this...

// in layout.html
<link id="recursiveDirectory" href="templates/recursiveDirectory.html" type="text/html" rel="import">
// in recursiveDirectory.html
<template id="page">
    ... some html
</template>

<template id="profileList">
    ... some html
</template>

<template id="singleProfile">
    ... some html
</template>

... and access them like this ...

templates.recursiveDirectory.page
templates.recursiveDirectory.profileList
templates.recursiveDirectory.singleProfile

I'm not straight up merging it b/c it changes how pages are loaded by default. While I'm pretty sure I got all the changes, I didn't want to break everything the day before dev day.

NOTE:

We should look into the <slot> tag to see if we could use them to fill out data pieces of templates if we decide to go this route.