ajlkn / skel

A lightweight responsive framework for the www
http://skel.io
Other
2.21k stars 314 forks source link

Define base path for css? #8

Closed JPG-Consulting closed 11 years ago

JPG-Consulting commented 11 years ago

Can I define a base path for the CSS files?

On the main path it works... for example: http://example.com/index.html

But breaks if I get further up, for example: http://example.com/products/software.html

Looking in chrome it now tries to load: http://example.com/products/css/style.css

Can I tell it to stick to: http://example.com/css/style.css ?

ajlkn commented 11 years ago

Use 'prefix':

http://skeljs.org/docs#config

On 9/30/2013 8:32 PM, JPG-Consulting wrote:

Can I define a base path for the CSS files?

On the main path it works... for example: http://example.com/index.html

But breaks if I get further up, for example: http://example.com/products/software.html

Looking in chrome it now tries to load: http://example.com/products/css/style.css

Can I tell it to stick to: http://example.com/css/style.css ?


Reply to this email directly or view it on GitHub: https://github.com/n33/skelJS/issues/8

JPG-Consulting commented 11 years ago

Thanks! That worked out fine

tresortshishi commented 10 years ago

Hello n33 , i'm building a joomla template with skeljs . I need to reach mywebste.com/templates/mytemplates/css/style.css . Here is my code :

{ prefix :"templates/mytemplates"; // I just need to set a new prefix }

Made i mistakes ? Cause this won't work . Thanks for your answer.

ajlkn commented 10 years ago

Two things: 1. that particular configuration (with the prefix) should be used for skel.min.js, not skel-panels.min.js, and 2. your prefix should be "/templates/mytemplates/css/style"

On 5/20/2014 8:54 PM, Tshishi wrote:

Hello n33 , i'm building a joomla template with skeljs . I need to reach mywebste.com/templates/mytemplates/css/style.css . Here is my code :+1:

Made i mistakes ? Cause this won't work . Thanks for your answer.


Reply to this email directly or view it on GitHub: https://github.com/n33/skelJS/issues/8#issuecomment-43704340

tresortshishi commented 10 years ago

Hello n33, Thanks for your answer . I have another bug on javascript side .

[code] Uncaught SyntaxError: Unexpected token ; skel.min.js:28 a.initConfig skel.min.js:28 a.init skel.min.js:34 a.preInit skel.min.js:35 (anonymous function) skel.min.js:35 (anonymous function) skel.min.js:35 Uncaught TypeError: Cannot read property 'registerPlugin' of undefined skel-panels.min.js:2 (anonymous function) skel-panels.min.js:2 Uncaught TypeError: Cannot read property 'init' of undefined init.js:70 (anonymous function) init.js:70 [/code]

I think it should be a loading problem

best regards

ajlkn commented 10 years ago

What does the surrounding code look like (ie. other scripts you might be loading)?

tresortshishi commented 9 years ago

Hi n33 ,

I forgot to tell you i use skeljs v0.4 . Did you have doc for this version ? Where can i have the full js version ?

Best regards

ajlkn commented 9 years ago

Docs here:

http://n33.co/files/skelJS.pdf http://n33.co/files/skelJS-panels.pdf

Unminified code should be floating around somewhere, but if you can't find it, drop me an email and I'll send it over.

gandre82 commented 9 years ago

Hello folks,

i have the same problem, my stylesheet and js linkings in the head work well, but my inspector in chrome say: 404 kategorie not found -> the initiator is skel.min.js:2

i read above: that a prefix can fix this, but i don´t know, how and where i should insert this(prefix thing) in the init.js.

i hope someone can help me

Steve-Parker commented 9 years ago

look at init.js - use either the prefix command as n33 suggested or alter the href in Global - see an example below...

global: { href: '/css/style.css', containers: 1400, grid: { gutters: ['2em', 0] } }, xlarge: { media: '(max-width: 1680px)', href: '/css/style-xlarge.css', containers: 1200 }, large: { media: '(max-width: 1280px)', href: '/css/style-large.css', containers: 960, grid: { gutters: ['1.5em', 0] }, viewport: { scalable: false } },

juedan commented 7 years ago

Hello, how to add custom css-files? Thanks for the answers.

PS: "prefix" does not work.

vishwajeetsonkar commented 7 years ago

@JPG-Consulting Can you tell me in detail how you solved it because i also have set the prefix but it is not working for me. it only works for the home page. I am using it with codeigniter so now the path it is looking for is like http://localhost/sitename/index.php/home/templated/css/style.css

but i want to make it like http://localhost/sitename/templated/css/style.css how do i do this??

vishwajeetsonkar commented 7 years ago

@JPG-Consulting also this link http://skeljs.org/docs#config is not working