Webadmin: Make this work with the browser cache

This moves all static webadmin files (images, css) to the data/ subdirectory
of the skin dir. The webadmin module is changed to redirect requests to
/<skin name>/ to that data directory. The skins are changed to use the
new URL when linking to their stuff. (I only needed to change the path to
the main.css file in each Header.tmpl. Since the .css and the images are now
in the same directory, relative URLs work just fine).

This means that we now generate different URLs after changing the webadmin
skins and the browser cache can do its thing.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1481 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2009-04-06 16:00:23 +00:00
parent 694b60d53b
commit 3b9a9c2b80
18 changed files with 19 additions and 23 deletions
@@ -4,7 +4,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<title>ZNC - Webadmin module - <?VAR Title ESC=HTML?></title>
<link rel="stylesheet" type="text/css" href="css/main.css">
<link rel="stylesheet" type="text/css" href="<?VAR Skin ESC=URL?>/main.css">
</head>
<body>

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

@@ -33,7 +33,7 @@ a:hover {
}
.header {
background-image: url('../img/clouds-header.jpg');
background-image: url('clouds-header.jpg');
padding: 10px;
border: 1px solid #000000;
height: 100px;
+1 -1
View File
@@ -3,7 +3,7 @@
<head>
<title>ZNC - <?VAR Title ESC=HTML?></title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="css/main.css" />
<link rel="stylesheet" type="text/css" href="<?VAR Skin ESC=URL?>/main.css" />
</head>
<body>

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

+1 -1
View File
@@ -4,7 +4,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<title>ZNC - Webadmin module - <?VAR Title ESC=HTML?></title>
<link rel="stylesheet" type="text/css" href="css/main.css">
<link rel="stylesheet" type="text/css" href="<?VAR Skin ESC=URL?>/main.css">
</head>
<body>

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

@@ -1,5 +1,5 @@
body {
background-image: url('../img/graphix_bg.jpg');
background-image: url('graphix_bg.jpg');
margin-top: 10px;
}
@@ -32,7 +32,7 @@ a:hover {
}
.header {
background-image: url('../img/graphix_header.jpg');
background-image: url('graphix_header.jpg');
padding: 10px;
border: 1px solid #000000;
height: 100px;
+1 -1
View File
@@ -3,7 +3,7 @@
<head>
<title>ZNC - <?VAR Title ESC=HTML?></title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="css/main.css" />
<link rel="stylesheet" type="text/css" href="<?VAR Skin ESC=URL?>/main.css" />
</head>
<body>

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Before

Width:  |  Height:  |  Size: 683 B

After

Width:  |  Height:  |  Size: 683 B

@@ -1,5 +1,5 @@
body {
background: url(../img/pagebg.gif) top repeat-x #0C1833 fixed;
background: url(pagebg.gif) top repeat-x #0C1833 fixed;
color: #fff;
margin: 0px auto;
}
@@ -41,7 +41,7 @@ table td {
table thead {
border-bottom: 2px solid #000;
background: url(../img/linkbg.jpg) 0px -30px repeat-x #369;
background: url(linkbg.jpg) 0px -30px repeat-x #369;
color: #fff;
font-weight: bold;
}
@@ -112,7 +112,7 @@ textarea {
.sectiontitle {
float: left;
white-space: nowrap;
background: url(../img/linkbg.jpg) 0px 0px repeat-x #336;
background: url(linkbg.jpg) 0px 0px repeat-x #336;
color: #eee;
font-size: 14px;
font-weight: bold;
@@ -139,7 +139,7 @@ textarea {
border-top: 1px solid #000;
border-bottom: 1px solid #000;
float: left;
background: url(../img/linkbg.jpg) repeat-x;
background: url(linkbg.jpg) repeat-x;
margin-bottom: 10px;
}
@@ -166,7 +166,7 @@ textarea {
color: #fff;
padding: 0px 10px;
text-decoration: none;
background: url(../img/linkbg.jpg) 0px 0px repeat-x;
background: url(linkbg.jpg) 0px 0px repeat-x;
}
#gnav a:hover {

Before

Width:  |  Height:  |  Size: 1001 B

After

Width:  |  Height:  |  Size: 1001 B