Ok, so there's the blurred line. Jade being so tightly integrated with
NodeJS, I assumed there would be the two intermingled in the same knowledge
base/pool. My bad. The part about rendering in Node *or* Jade is OT I
suppose as well. I'll go suck on my vacuum cleaner at the electric company.
Wow...

"How would you write this in Jade? *Or, how would you do this in node
and tell it to render?*"

I guess I will go find a Jade email list to help learn best practices from.

Thanks and my apologies,
Bob

On Thu, Aug 16, 2012 at 1:56 PM, Tim Caswell <[email protected]> wrote:
> On Thu, Aug 16, 2012 at 3:22 PM, Bob Wohl <[email protected]> wrote:
>> Hi Tim,
>>
>> Thats exactly what I am doing and thats exactly what I am posting about.
>>
>> Looking at Jade's loop documentation, all it shows is "each" yet I see
>> people mentioning using for loop iterations yet it is not in the jade
>> docs. So here I am, asking the question. :)
>
> Indeed, but posting a question about jade and html on the node list is
> like calling up the power company and asking questions about how to
> use your hoover vacuum.  All vacuums need power, but not all uses of
> power are for vacuuming.  That's why I asked to clarify.
>
> Hopefully someone who's knowledgeable about jade can help.  From the
> docs, I only see how to iterate over arrays.
>
> As far as the specific html and css to use, there are a great many
> answers to that question and it depends on your front-end architecture
> and preferences. The easiest is probably to online a style tag into
> each of your divs and use absolute width and height.  But it's not
> always the best solution for many reasons.
>
>>
>> B.
>>
>> On Thu, Aug 16, 2012 at 1:18 PM, Tim Caswell <[email protected]> wrote:
>>> It depends on what you're doing.  If you're writing an http web server
>>> and want to serve generated html using jade in node, then use jade's
>>> loop constructs to generate the appropriate html.
>>>
>>> On Thu, Aug 16, 2012 at 12:13 PM, Bob Wohl <[email protected]> wrote:
>>>> Hello all,
>>>>
>>>> I'm new to Jade and NodeJs but have been able to wiggle some
>>>> interaction. So far it doesn't seem to tough but I still lack the know
>>>> how on a lot of this stuff. :)
>>>>
>>>> I'm attempting to create a grid via values set by user input using
>>>> jade. I have values of height and width (4x4 for example) which I am
>>>> attempting to draw via a for loop, something like this:
>>>>
>>>>
>>>> for (var i = 0; i < theheight; i++){
>>>>    for(var j = 0; j < thewidth; j++){
>>>>        //draw divs and possition
>>>>    }
>>>> }
>>>>
>>>> How would you write this in Jade? Or, how would you do this in node
>>>> and tell it to render? I still need to style/position/etc each one of
>>>> these. What is the best way to do this?
>>>>
>>>> It would be cool if there was some sort of OOP to it where I can
>>>> create each div as its own display object with properties but I'm
>>>> probably asking for a bit much there. ;)
>>>>
>>>> Thanks in advance and sorry if this is super noob.
>>>>
>>>> Bob
>>>>
>>>> --
>>>> Job Board: http://jobs.nodejs.org/
>>>> Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>>>> You received this message because you are subscribed to the Google
>>>> Groups "nodejs" group.
>>>> To post to this group, send email to [email protected]
>>>> To unsubscribe from this group, send email to
>>>> [email protected]
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>>
>>> --
>>> Job Board: http://jobs.nodejs.org/
>>> Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>>> You received this message because you are subscribed to the Google
>>> Groups "nodejs" group.
>>> To post to this group, send email to [email protected]
>>> To unsubscribe from this group, send email to
>>> [email protected]
>>> For more options, visit this group at
>>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>
>> --
>> Job Board: http://jobs.nodejs.org/
>> Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>> You received this message because you are subscribed to the Google
>> Groups "nodejs" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/nodejs?hl=en?hl=en
>
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to