soulwire / WTFEngine

An HTML / CSS / JavaScript template for creating WhatTheFuckIsMyMashup.com style web sites
http://blog.soulwire.co.uk
MIT License
684 stars 130 forks source link

Using Images, Not Test. #3

Closed iamtheream closed 10 years ago

iamtheream commented 10 years ago

I've tried so many ways to get images to show up, instead of the test. Have you ever done this? Trying to get a school project done. Any help would be awesome! Thanks so much, and this is such a fun tool you have built.

soulwire commented 10 years ago

Not sure I fully understand what you're trying to do. Are you wanting to select images randomly instead of words?

iamtheream commented 10 years ago

Yes indeed. So how now it pulls in words from the arrays, I'm trying I figure out how it can pull images from the array Into the format you all have written out. Thanks so much for the quick response! It's much appriciated.

On Monday, February 10, 2014, Justin Windle notifications@github.com wrote:

Not sure I fully understand what you're trying to do. Are you wanting to select images randomly instead of words?

Reply to this email directly or view it on GitHubhttps://github.com/soulwire/WTFEngine/issues/3#issuecomment-34664631 .

Matt Reamer UX Designer IamTheREAM.com 804-426-4830

https://www.vizify.com/es/505bd75a843028000200011bSee my vizify bio! [image: Matthew Reamer's Visual Thumbprint]https://www.vizify.com/es/505bd75a843028000200011b

soulwire commented 10 years ago

The best way to do this with the existing framework is to just specify HTML in the corpus and the engine will insert it as HTML, so an <img/> tag will work fine.

For example:

WTF.init({

    heading: [
        "A cat of some size"
    ],
    response: [
        "Give me another"
    ],
    template: [
        "A cat: @cat",
        "Another cat: @cat"
    ],
    cat: [
        "<img src='http://placekitten.com/100/80'/>",
        "<img src='http://placekitten.com/200/100'/>",
        "<img src='http://placekitten.com/300/180'/>"
    ]
});
iamtheream commented 10 years ago

Thanks so much! Works like a charm.

On Wednesday, February 12, 2014, Justin Windle notifications@github.com wrote:

The best way to do this with the existing framework is to just specify HTML in the corpus and the engine will insert it as HTML, so an tag will work fine.

For example:

WTF.init({

heading: [
    "A cat of some size"
],
response: [
    "Give me another"
],
template: [
    "A cat: @cat",
    "Another cat: @cat"
],
cat: [
    "<img src='http://placekitten.com/100/80'/>",
    "<img src='http://placekitten.com/200/100'/>",
    "<img src='http://placekitten.com/300/180'/>"
]

});

Reply to this email directly or view it on GitHubhttps://github.com/soulwire/WTFEngine/issues/3#issuecomment-34889683 .

Matt Reamer UX Designer IamTheREAM.com 804-426-4830

https://www.vizify.com/es/505bd75a843028000200011bSee my vizify bio! [image: Matthew Reamer's Visual Thumbprint]https://www.vizify.com/es/505bd75a843028000200011b

soulwire commented 10 years ago

Great :)