Switch to unified view

a/Allura/allura/controllers/static.py b/Allura/allura/controllers/static.py
...
...
10
from allura.lib import utils
10
from allura.lib import utils
11
from allura import model as M
11
from allura import model as M
12
12
13
class NewForgeController(object):
13
class NewForgeController(object):
14
14
15
    @expose('jinja:jinja_master/site_style.css', content_type='text/css')
15
    @expose(content_type='text/css')
16
    @without_trailing_slash
16
    @without_trailing_slash
17
    def site_style(self, **kw):
17
    def site_style(self, **kw):
18
        """Display the css for the default theme."""
18
        """Display the css for the default theme."""
19
        theme = M.Theme.query.find(dict(name='forge_default')).first()
19
        theme = M.Theme.query.find(dict(name='forge_default')).first()
20
        response.headers['Content-Type'] = ''
20
        response.headers['Content-Type'] = ''
21
        response.content_type = 'text/css'
21
        response.content_type = 'text/css'
22
        utils.cache_forever()
22
        utils.cache_forever()
23
        return dict(
24
            color1=theme.color1,
23
        params = dict(color1=theme.color1,
25
            color2=theme.color2,
24
                      color2=theme.color2,
26
            color3=theme.color3,
25
                      color3=theme.color3,
27
            color4=theme.color4,
26
                      color4=theme.color4,
28
            color5=theme.color5,
27
                      color5=theme.color5,
29
            color6=theme.color6,
28
                      color6=theme.color6,
30
            g=g,
29
                      g=g)
31
            extra_css='')
30
        css = g.jinja2_env.get_template(g.theme['base_css']).render(extra_css='', **params)
31
        for t in g.theme['theme_css']:
32
            css = css + '\n' + g.jinja2_env.get_template(t).render(**params)
33
        return css
32
34
33
    @expose()
35
    @expose()
34
    @without_trailing_slash
36
    @without_trailing_slash
35
    def markdown_to_html(self, markdown, project=None, app=None):
37
    def markdown_to_html(self, markdown, project=None, app=None):
36
        """Convert markdown to html."""
38
        """Convert markdown to html."""