Closed GoogleCodeExporter closed 8 years ago
Thank you! I'll definitely apply this fix after we've tested it.
Original comment by liza31337@gmail.com
on 21 Aug 2009 at 2:17
oops, this is not a complete patch. There are static references in the i18n
areas. Running
grep --exclude "*.svn*" -rl "\/static\/" .
picks up quite a few more. Then you have to consider what you do for the uri
references inside CSS. I know some
people get their interpreter to serve out CSS files so they can add things url
prefixes to these references...
Original comment by steven.m...@gmail.com
on 21 Aug 2009 at 2:18
CSS files are pre-processed, so that would be a good time to make any resource
links
relative.
Original comment by liza31337@gmail.com
on 21 Aug 2009 at 2:28
Oh sorry, I thought you were referring to in-book CSS, which is handled a
different
way anyway. Yes, the URL resources inside the CSS files are annoying, though
I'm not
sure whether simple relative links would work.
Since this is more complicated than I originally thought I took the current
patch and
some additional changes related to this and created:
https://threepress.googlecode.com/svn/branches/bookworm-static-resource-refactor
If you'd like to be a committer so you can work on this branch (or anything
else)
please let me know offline at liza@threepress.org. Your help would be
appreciated!
Original comment by liza31337@gmail.com
on 26 Aug 2009 at 10:43
So I guess we can either:
1. stop serving css statically; put it under python control using a bunch of direct_to_template urlpatterns
2. have static css, with dynamic, python-controlled equivalents to specify the uris, maybe using cssutils
or maybe some other idea?
the first option's the simplest, but ties up more mod_python workers. the
second is nicer to the system, but
fragments the css, introducing unnecessary complexity.
I'l give the first option a go and see what the damage is.
Original comment by steven.m...@gmail.com
on 31 Aug 2009 at 1:59
Since the resources should all be within the /static/ directory, I think just
making
them relative should work. c.f.
http://stackoverflow.com/questions/940451/using-relative-url-in-css-file-what-lo
cation-is-it-relative-to
So instead of 'url(/static/foo.image)' just 'url(foo.image)' ought to work.
Original comment by liza31337@gmail.com
on 31 Aug 2009 at 1:56
ah yep, of course - just like the css @import directive.
Pretty simple change in the end; see r873:
http://code.google.com/p/threepress/source/detail?r=873. Forgot to
put proper googlecode syntax in the commit log - oops.
Original comment by steven.m...@gmail.com
on 3 Sep 2009 at 3:57
Original issue reported on code.google.com by
steven.m...@gmail.com
on 21 Aug 2009 at 1:33Attachments: