Move <link> and etc. tags out of stylesheet() template def.

This commit is contained in:
Max Goodman
2012-02-02 11:56:51 -08:00
parent 4994c93652
commit 77b98d63ba
2 changed files with 21 additions and 18 deletions

View File

@@ -38,7 +38,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=1024" />
${self.robots()}
${self.pagemeta()}
${self.stylesheet()}
${self.javascript()}
${js_setup()}
@@ -95,6 +95,8 @@ reddit, reddit.com, vote, comment, submit
${googleanalytics('web')}
</%def>
<%def name="pagemeta()">
</%def>
<%def name="stylesheet()">
</%def>

View File

@@ -42,6 +42,24 @@
%endif
</%def>
<%def name="pagemeta()">
%if hasattr(thing, "shortlink"):
<link rel="shorturl" href="http://${thing.shortlink}"/>
%endif
<link rel='shortcut icon' href="${static('favicon.ico')}" type="image/x-icon" />
<link rel='apple-touch-icon-precomposed' href="${static('icon-touch.png')}" />
%if thing.extension_handling:
<%
rss = add_sr(join_urls(request.path,'.rss'))
if thing.extension_handling == "private":
rss = make_feedurl(c.user, rss)
%>
<link rel="alternate" type="application/rss+xml" title="RSS"
href="${rss}" />
%endif
</%def>
<%def name="stylesheet()">
%if c.lang_rtl:
<link rel="stylesheet" href="${static(g.stylesheet_rtl)}"
@@ -63,10 +81,6 @@
%endif
%endif
%if hasattr(thing, "shortlink"):
<link rel="shorturl" href="http://${thing.shortlink}"/>
%endif
%if c.can_apply_styles and c.allow_styles and c.site.stylesheet_contents:
<% inline_stylesheet = (
len(c.site.stylesheet_contents) < 1024
@@ -88,19 +102,6 @@
type="text/css" />
%endif
<link rel='shortcut icon' href="${static('favicon.ico')}" type="image/x-icon" />
<link rel='apple-touch-icon-precomposed' href="${static('icon-touch.png')}" />
%if thing.extension_handling:
<%
rss= add_sr(join_urls(request.path,'.rss'))
if thing.extension_handling == "private":
rss = make_feedurl(c.user, rss)
%>
<link rel="alternate" type="application/rss+xml" title="RSS"
href="${rss}" />
%endif
<!--[if lt IE 7]>
<link rel="stylesheet" href="${static('reddit-ie6-hax.css')}"
type="text/css" />