jMaki Themes

View: New views
3 Messages — Rating Filter:   Alert me  

jMaki Themes

by Michael Mellinger-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm trying to create a new project from scratch.  When I change the
theme to orange, for example, the jMaki Accordian menu stays green.

I'm assuming that right-clicking and changing the theme, simply
changes the config.json file.

{"config": {
    "globalTheme": "orange",
    "theme": "/resources/css/themes/orange/theme.css",
    "glue": {"includes": [
        "/glue.js",
        "/resources/system-glue.js"
    ]},
    "version": "1.0"
}}

I have a build from late last week.

-Mike
http://thespanishsite.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: jMaki Themes

by Greg Murray-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Oh yes,

The only two new supported themes that we have are "ocean" and "kame"

In the widget.json the mapping of a global theme to the widget theme  
is described like:

  "config" : {
    "type" :
        { "id" : "jmaki",
           "themes" : [
                {"id" : "kame",
                  "default": true,
                  "style" : "../resources/styles/themes/kame/theme.css"
                },
                {"id" : "ocean",
                  "style" : "../resources/styles/themes/ocean/theme.css"
                }
            ],
            "resources" : [
                "../resources/styles"
            ]
       }
     },

Notice the two themes with the "id" s. This allows you to match a css  
theme to a widget and have the css loaded before the first widget is  
loaded. You will have problems if you have multiple widgets with the  
same selectors.

jMaki will write out the correct theme file when it sees the first  
widget with the theme matching the "globalTheme". If there is no  
"globalTheme" then the themes   property with "default" set to true  
will be rendered if there is one.

Using this mechanism you can try to mach a dojo or yahoo theme that  
more closely matches the global theme if you chose.

The css cascading is explained here:

https://ajax.dev.java.net/style.html

Basically the css cascade goes like this:

1) widget.json -> "themes" css
2) component.css -> depends on order in the page
3) config.json -> "theme" after all widgets are loaded.

This document needs to be updated to cover widget.json theme matching.

I updated the samples yesterday to use the new themes. I also took out  
the orange / chocolate theme inclusion in the samples though it is  
still in the workspace and netbeans plugin.

-Greg

On Jun 17, 2008, at 5:03 PM, Michael Mellinger wrote:

> I'm trying to create a new project from scratch.  When I change the
> theme to orange, for example, the jMaki Accordian menu stays green.
>
> I'm assuming that right-clicking and changing the theme, simply
> changes the config.json file.
>
> {"config": {
>    "globalTheme": "orange",
>    "theme": "/resources/css/themes/orange/theme.css",
>    "glue": {"includes": [
>        "/glue.js",
>        "/resources/system-glue.js"
>    ]},
>    "version": "1.0"
> }}
>
> I have a build from late last week.
>
> -Mike
> http://thespanishsite.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: jMaki Themes

by Michael Mellinger-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I guess I'll be switching from the Orange theme. :-)  You should keep
the other stuff around and maybe allow for skinnable sites.  Maybe a
jMaki community will develop and help out.  I'm artistically challenge
so I'd like it to be pluggable.

On my site (http://thespanishsite.com ) I have a jMaki.menu at the top
that only colors in dark orange up to where the words end.  It would
look better if this bar ran across the width of the page like on
http://jmaki.com.  Any project that I create with jMaki in Netbeans
has this problem.  How do I get it to fill the width of the page?

-Mike



On Tue, Jun 17, 2008 at 8:21 PM, Greg Murray <Gregory.Murray@...> wrote:

> Oh yes,
>
> The only two new supported themes that we have are "ocean" and "kame"
>
> In the widget.json the mapping of a global theme to the widget theme is
> described like:
>
>  "config" : {
>   "type" :
>       { "id" : "jmaki",
>          "themes" : [
>               {"id" : "kame",
>                 "default": true,
>                 "style" : "../resources/styles/themes/kame/theme.css"
>               },
>               {"id" : "ocean",
>                 "style" : "../resources/styles/themes/ocean/theme.css"
>               }
>           ],
>           "resources" : [
>               "../resources/styles"
>           ]
>      }
>    },
>
> Notice the two themes with the "id" s. This allows you to match a css theme
> to a widget and have the css loaded before the first widget is loaded. You
> will have problems if you have multiple widgets with the same selectors.
>
> jMaki will write out the correct theme file when it sees the first widget
> with the theme matching the "globalTheme". If there is no "globalTheme" then
> the themes   property with "default" set to true will be rendered if there
> is one.
>
> Using this mechanism you can try to mach a dojo or yahoo theme that more
> closely matches the global theme if you chose.
>
> The css cascading is explained here:
>
> https://ajax.dev.java.net/style.html
>
> Basically the css cascade goes like this:
>
> 1) widget.json -> "themes" css
> 2) component.css -> depends on order in the page
> 3) config.json -> "theme" after all widgets are loaded.
>
> This document needs to be updated to cover widget.json theme matching.
>
> I updated the samples yesterday to use the new themes. I also took out the
> orange / chocolate theme inclusion in the samples though it is still in the
> workspace and netbeans plugin.
>
> -Greg
>
> On Jun 17, 2008, at 5:03 PM, Michael Mellinger wrote:
>
>> I'm trying to create a new project from scratch.  When I change the
>> theme to orange, for example, the jMaki Accordian menu stays green.
>>
>> I'm assuming that right-clicking and changing the theme, simply
>> changes the config.json file.
>>
>> {"config": {
>>   "globalTheme": "orange",
>>   "theme": "/resources/css/themes/orange/theme.css",
>>   "glue": {"includes": [
>>       "/glue.js",
>>       "/resources/system-glue.js"
>>   ]},
>>   "version": "1.0"
>> }}
>>
>> I have a build from late last week.
>>
>> -Mike
>> http://thespanishsite.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...