瀏覽代碼

dynamic links to stylesheets

pull/24/head
Ben Kurtovic 12 年之前
父節點
當前提交
4a1829c0c5
共有 2 個檔案被更改,包括 7 行新增3 行删除
  1. +1
    -1
      pages/index.mako
  2. +6
    -2
      pages/support/header.mako

+ 1
- 1
pages/index.mako 查看文件

@@ -1,4 +1,4 @@
<%include file="/support/header.mako" args="title='Index Page'"/>
<%include file="/support/header.mako" args="environ=environ, title='Home'"/>
<div id="content">
% for key, value in environ.items():
<p><b>${key}</b>: ${value}</p>


+ 6
- 2
pages/support/header.mako 查看文件

@@ -1,10 +1,14 @@
<%page args="title"/>\
<%page args="environ, title"/>\
<%!
from os import path
%>\
<% root = path.dirname(environ["SCRIPT_NAME"]) %>\
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>${title} - earwig@toolserver</title>
<link rel="stylesheet" href="/~earwig/rewrite/static/main.css" type="text/css" />
<link rel="stylesheet" href="${root}/static/main.css" type="text/css" />
</head>
<body>
<div id="container">

Loading…
取消
儲存