fonts

3 views
Skip to first unread message

Michael McLaughlin

unread,
Mar 25, 2014, 8:42:28 PM3/25/14
to serve...@googlegroups.com
hi, so quick question. 
Before I ask though, I do so with the  utmost gratitude that anyone even made this. If i can get this to work (hopefully soon) you will make my workflow, along with anyone I work with way faster.

and I'm not quite sure if this has to do more with compass but i'll ask it here, because both of your guys' docs are really confusing and don't cover a lot. 
4 questions really. one about fonts, 3 about global file structure.

1) I am trying to link to global fonts. can i put these in a fonts folder in the public folder? that would work well for me since my fonts are only accessed through the global css, and would almost always be right next to the fonts folder that way, but i'm not sure if compass handles this / what I have to do so that it works in serve.

2) should all of my scss be in my project-folder/scss folder? or can some be next to the pages they are being used in?
I am mostly wondering so i can keep the file structure concise and understandable. If I am simply doing this incorrectly or thinking about the problem all wrong, please let me know.

3) what in the world is this? http://get-serve.com/documentation/partials and why am i unable to get any of my partials to render? I keep getting a nil error. No fun.
I have tried a variety of things such as in the file structure

views/user1
    css/
    layouts/
        _default.html.erb
        _header.html.erb
    _layout.erb

inside the default.html.erb file, <%= render "header" %>
but I'm not really even sure i'm doing that correctly. I would think that that line would need to be insde of the _layout.erb file but I just don't know anymore. 
Please advise.
    
4) I'm currently working on a web app that I am prototyping that has 4 different layouts / themes for 4 levels of users.
I'm assuming that I have to store file names / file titles and things in global variables and things (which I have gotten to work), but should i be structuring my file system with only one page per folder? or can i have one folder with multiple pages if they all have the same layout?

Michael McLaughlin

unread,
Mar 25, 2014, 9:33:12 PM3/25/14
to serve...@googlegroups.com
Ok. so it looks like I was just on the cusp of figuring everything that I asked out. I need to preface things with a / if I want to get to the project root, and I should have my scss in a root folder so it can be compiled.
It looks like layouts folder should actually be directly underneath the views folder so it can easily be accessed. right?
I'm thinking that I should be golden if i just put the layout files in separate folders and distinguish them as in the layout.erb file inside of each of the 4 user view folders. that I talked about previously... make sense?

Michael McLaughlin

unread,
Mar 25, 2014, 10:29:40 PM3/25/14
to serve...@googlegroups.com
Here's another question though.

Say I want to have the following pattern on a web page:

user1 start head / header
custom content
user1 end header snippet
custom content 
custom content etc.
user1 start footer

should i just be using render over and over again? or is there a better way?


On Tuesday, March 25, 2014 6:42:28 PM UTC-6, Michael McLaughlin wrote:

John W. Long

unread,
Mar 25, 2014, 11:19:11 PM3/25/14
to serve...@googlegroups.com
On Mar 25, 2014, at 8:42 PM, Michael McLaughlin <michael.j.m...@gmail.com> wrote:
1) I am trying to link to global fonts. can i put these in a fonts folder in the public folder? that would work well for me since my fonts are only accessed through the global css, and would almost always be right next to the fonts folder that way, but i'm not sure if compass handles this / what I have to do so that it works in serve.

Fonts should go in the public folder. I’d recommend that you put them in `public/fonts`. Then in your compass config file add the following:

fonts_dir = "public/fonts

The only thing this does is let Compass know where your fonts are found. So things like “inline-font-files” will work. You can still reference your fonts in your stylesheets or html with a relative path (“/fonts”). There are a couple of other configuration variables related to fonts that you can setup, too. To learn more about it read:



2) should all of my scss be in my project-folder/scss folder? or can some be next to the pages they are being used in?
I am mostly wondering so i can keep the file structure concise and understandable. If I am simply doing this incorrectly or thinking about the problem all wrong, please let me know.

It’s generally best to put it there, yes.

3) what in the world is this? http://get-serve.com/documentation/partials and why am i unable to get any of my partials to render? I keep getting a nil error. No fun.

This should do the trick:

    <%= render ‘layouts/header’ %>

You just need to get the paths right.

4) I'm currently working on a web app that I am prototyping that has 4 different layouts / themes for 4 levels of users.
I'm assuming that I have to store file names / file titles and things in global variables and things (which I have gotten to work), but should i be structuring my file system with only one page per folder? or can i have one folder with multiple pages if they all have the same layout?

Either is fine.

—John

Michael McLaughlin

unread,
Mar 25, 2014, 11:23:04 PM3/25/14
to serve...@googlegroups.com
Ok, yes. Thanks for replying. I was a little worried this group was dead. But it's not!
What are some things that are going to be coming out in the next version?
It seems to do pretty much everything I need now, but I was just wondering. :)
--
--
Serve Users Group
Mailing List: http://groups.google.com/group/serve-users/
Project: http://github.com/jlong/serve/

---
You received this message because you are subscribed to a topic in the Google Groups "Serve Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/serve-users/B7v8UALWtco/unsubscribe.
To unsubscribe from this group and all its topics, send an email to serve-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

John W. Long

unread,
Mar 25, 2014, 11:24:55 PM3/25/14
to serve...@googlegroups.com

On Mar 25, 2014, at 11:23 PM, Michael McLaughlin <michael.j.m...@gmail.com> wrote:

> Ok, yes. Thanks for replying. I was a little worried this group was dead. But it's not!
> What are some things that are going to be coming out in the next version?
> It seems to do pretty much everything I need now, but I was just wondering. :)

Serve doesn’t really have a road map. I add to it when I have time which I haven’t had a lot of lately. It’s served me pretty well though as is. There are a few rough edges but it gets the job done. :)

—John

Michael McLaughlin

unread,
Mar 26, 2014, 12:14:04 AM3/26/14
to serve...@googlegroups.com
I can definitely agree with that. 
Thanks again for making this. I really like it now that I understand it a little better.
Would it be possible for me to contribute to the documentation so that coworkers of mine (more design oriented folks) can figure this out as well? How should I be going about this?

On Tuesday, March 25, 2014, John W. Long <m...@johnwlong.com> wrote:
--John

John W. Long

unread,
Mar 26, 2014, 10:51:40 AM3/26/14
to serve...@googlegroups.com
Would love to have help on the documentation! It’s part of the GitHub project here:


Fork the project and send a pull request. :)

—John

You received this message because you are subscribed to the Google Groups "Serve Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to serve-users...@googlegroups.com.

Michael McLaughlin

unread,
Mar 26, 2014, 6:13:46 PM3/26/14
to serve...@googlegroups.com
Awesome. will do :)
Reply all
Reply to author
Forward
0 new messages