How can I make theme or template?


(potd) #1

I am building my website with Foundry.

I have 10 pages now but it’s quiet annoying to copy and paste the header (e.g. nav-menu) and the footer.
Moreover, I found that those items are duplicated unnecessarily when I publish the project.
Redundant items occupy more storage in the server.

I could not find any documentation for theme or template.

P.S I know the “Partial” feature in Stacks 3, but what I want is just one template for all pages and not to display on each pages.


(Jannis from inStacks Software) #2

Well, the partial feature is exactly what you want.

Why doesn’t that work out for you?


(potd) #3

Hi,

Partial is a great way to copy and paste the set of stacks I made.
But adding all stacks on every pages makes my mac slower :frowning:
I am also worrying about the redundancy of duplicated items.


(Jannis from inStacks Software) #4

If you worrying about that, is then a Framework like Foundation or Foundry the right choice?


(Mathew Mitchell) #5

I’m not fully understanding things. If you are concerned about “display” on each page then create a partial and make it hidden. I also don’t want to look at extra stuff on each page and use the hide feature of stacks for most partials.

It’s hard to believe this is slowing down your computer much. Is your computer older? I also can’t imagine this leads to much extra storage space on the server.

I’m sure @Elixir can speak to these specifics better than me.


(potd) #6

“Slowing” is actually not a critical problem… It’s kind of… just my lack of patience.

If there are many stacks on one page, even though the partial is hidden, it takes 3 to 5 seconds to “open” the page in Rapidweaver. You can edit the page immediately when you select and open the stack page if there is no stack or only few stacks on.

Therefore the main problem is, in fact, not Foundry or Rapidweaver but my bad patience :slight_smile:


(Mathew Mitchell) #7

Well, I understand a lack of patience. I’m testing out several of my current web pages (and some have several partials and stack): I typically have to wait … for no seconds. Now it is possible that Foundry is slowing things up a bit. I’m using Foundry for a major project I’ll start in June, but not currently using it. But when I was fooling around with it a few months ago I did not notice a lag of 3 to 5 seconds.

One of the things that can definitely slow things down is if Foundry (or anything) needs to preview images/video in the edit mode. I always warehouse images, or use very small images in drag/drop, so maybe this is the difference in your case. Just a guess on my part.

I did notice a lag when using Foundation about a year ago and it was annoying to me. There may be less of a lag now. So I suppose I might notice a lag with Foundry also if I was using it more intensively for a full project. Others can speak to this better than me.


(Adam Shiver) #8

Hi there @dps

I have 10 pages now but it’s quiet annoying to copy and paste the header (e.g. nav-menu) and the footer.
Moreover, I found that those items are duplicated unnecessarily when I publish the project.

You can create a partials that contain these items as @instacks and @Mathew have suggested. This is the recommended way as a matter of fact. This way once you have the partial on each page you only need edit it on one page and it is update on all pages that have the partial.

For instance say you place the Navigation Bar into a partial, then put that partial on all pages. If you change something with that Navigation Bar stack on one page it gets updated on all pages. This save you a LOT of time and will help keep your patience in check, too. :wink:

Redundant items occupy more storage in the server.

That is not something to worry about. At all.


(Adam Shiver) #9

@Mathew

One of the things that can definitely slow things down is if Foundry (or anything) needs to preview images/video in the edit mode. I always warehouse images, or use very small images in drag/drop, so maybe this is the difference in your case. Just a guess on my part.

What you’re likely running into is that the page has a whole framework residing in the main stack. This is not something other page types deal with. This is why you might get a second or two of lag when loading a page for the first time.


(potd) #10

Thank you for the reply, @Elixir and @Mathew

I have a lot of images which are mostly more than 3mb.
Some pages have same images in order to show the whole list of the images I uploaded.
As @Mathew said, this might be the reason.

Anyway, thanks for your advice :slight_smile:
I’ll try to use Partial.


(Mathew Mitchell) #11

Okay, well then the images are clearly the culprit. It seemed very unlikely that Foundry was adding a lot of lag (maybe a wee bit, but only that).

Do you mean you have multiple images each over 3 Mb? Or multiple images that collectively are 3 Mb? Either way that will lead to a massive slowdown. And, even worse, it’s worse for people who visit your website. I’d suggest optimizing those images (reducing file size, reducing dimensions, etc.) as that will continue to be a big lag while working.


(Adam Shiver) #12

Whew! I too have to say that 3mb images is likely your culprit. You should be using 72 dpi images that have been sized down to the maximum size they’ll be seen on the site, and then compressed using something like TinyJPG or TinkyPNG to help reduce their file size. This goes for all images, when possible,.