Static data implemented

main
Inga 🏳‍🌈 14 years ago
parent 4f15c8bdd9
commit edd100fb0d
  1. 2
      Builder/IISMainHandler/build.txt
  2. 1
      Builder/IISMainHandler/postbuild.bat
  3. 1
      Builder/IISMainHandler/prebuild.bat
  4. 10
      Builder/IISMainHandler/product.wxs
  5. 53
      IISMainHandler/handlers/StaticHandler.cs
  6. 1
      build-all.bat
  7. 215
      static/css/coffeehaus.css
  8. 165
      static/css/decoration.css
  9. 52
      static/css/global.css
  10. BIN
      static/images/newposts.gif
  11. BIN
      static/images/nonewposts.gif

@ -1,4 +1,5 @@
@echo off
del Templates.7z
del Static.7z
ping localhost -n 2 >nul
del 7z.exe

@ -1,3 +1,4 @@
@echo off
"C:\Program Files\7-Zip\7z.exe" a Templates.7z ..\..\templates\* -xr!.svn
"C:\Program Files\7-Zip\7z.exe" a Static.7z ..\..\static\* -xr!.svn
copy "C:\Program Files\7-Zip\7z.exe" 7z.exe

@ -60,6 +60,9 @@
<Component Id="Templates.7z" Guid="B41F4142-A39C-43BE-8D20-F31BFFA9B483">
<File Id="Templates.7z" Source="Templates.7z" KeyPath="yes" Checksum="yes"/>
</Component>
<Component Id="Static.7z" Guid="C5D6456D-39B0-40E1-8DB1-0950199B15D2">
<File Id="Static.7z" Source="Static.7z" KeyPath="yes" Checksum="yes"/>
</Component>
<Component Id="_7z.exe" Guid="57AD7901-2C9B-4349-ABD8-C8FBA82F2724">
<File Id="_7z.exe" Name="7z.exe" Source="7z.exe" KeyPath="yes" Checksum="yes"/>
</Component>
@ -91,13 +94,20 @@
<Feature Id="Templates" Title="Templates" Level="1">
<ComponentRef Id="Templates.7z"/>
</Feature>
<Feature Id="Static" Title="Static images css etc" Level="1">
<ComponentRef Id="Static.7z"/>
</Feature>
</Feature>
<CustomAction Id="InstallTemplates" FileKey="_7z.exe" ExeCommand="x &quot;C:\Program Files\FLocal\Templates.7z&quot; -oC:\inetpub\flocal-main\data\templates\ -aoa -y" Execute="deferred" Impersonate="no" Return="check"/>
<CustomAction Id="InstallStatic" FileKey="_7z.exe" ExeCommand="x &quot;C:\Program Files\FLocal\Static.7z&quot; -oC:\inetpub\flocal-main\data\Static\ -aoa -y" Execute="deferred" Impersonate="no" Return="check"/>
<InstallExecuteSequence>
<Custom Action="InstallTemplates" Before="InstallFinalize">
<![CDATA[NOT REMOVE]]>
</Custom>
<Custom Action="InstallStatic" Before="InstallFinalize">
<![CDATA[NOT REMOVE]]>
</Custom>
</InstallExecuteSequence>
</Product>
</Wix>

@ -0,0 +1,53 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Text.RegularExpressions;
using System.IO;
using Microsoft.Win32;
namespace FLocal.IISHandler.handlers {
class StaticHandler : ISpecificHandler {
private string[] requestParts;
public StaticHandler(string[] requestParts) {
this.requestParts = requestParts;
}
public void Handle(WebContext context) {
if(this.requestParts.Length < 2) {
throw new HttpException(403, "listing not allowed");
}
Regex checker = new Regex("^[a-z][0-9a-z]*(\\.[a-zA-Z]+)?$", RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.IgnoreCase | RegexOptions.Singleline);
string path = "";
for(int i=1; i<this.requestParts.Length; i++) {
if(!checker.IsMatch(this.requestParts[i])) {
throw new HttpException(400, "wrong url (checker='" + checker.ToString() + "'; string='" + this.requestParts[i] + "'");
}
path += FLocal.Common.Config.instance.DirSeparator + this.requestParts[i];
}
string fullPath = FLocal.Common.Config.instance.dataDir + "Static" + path;
if(!File.Exists(fullPath)) {
throw new HttpException(404, "not found");
}
FileInfo fileinfo = new FileInfo(fullPath);
if(!fileinfo.FullName.StartsWith(FLocal.Common.Config.instance.dataDir + "Static")) {
throw new HttpException(403, "forbidden");
}
RegistryKey regKey = Registry.ClassesRoot.OpenSubKey(fileinfo.Extension);
if (regKey != null && regKey.GetValue("Content Type") != null) {
context.httpresponse.ContentType = regKey.GetValue("Content Type").ToString();
} else {
throw new HttpException(403, "wrong file type");
}
context.httpresponse.WriteFile(fileinfo.FullName);
}
}
}

@ -1,4 +1,5 @@
@echo off
@rem Note that this script will only produce a .msi packet of your binaries and data. It will not compile your sources.
cd Builder
Builder IISMainHandler
move /Y IISMainHandler\product.msi ..\IISMainHandler.msi

@ -0,0 +1,215 @@
/* File Version 6.5.1 */
a:link {
color: #303030;
background: none;
}
a:visited {
color: #303030;
background: none;
}
a:active {
color: #303030;
background: none;
}
a:hover {
color: #827B6B;
background: none;
}
p,table,td,tr {
font-size: 10pt;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
form {
display: inline;
margin-bottom: 0;
}
body {
color: #000000;
background: #C0CEA9;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10pt;
}
.tablesurround {
background: #A8A08A;
color: #000000;
}
.tableborders {
background: #303030;
color: #ffffff;
}
.tdheader {
font-size: 10pt;
font-weight: bold;
color: #000000;
background: #79826B;
border-left: 2px solid #827B6B;
border-top: 2px solid #827B6B;
border-bottom: 1px solid #303030;
border-right: 1px solid #303030;
}
.menubar{
background: #dedfdf;
color: #000000;
font-size: 9pt;
}
.navigation{
background: #cccccc;
color: #000000;
font-size: 8pt;
border-style: solid;
border-width: 1px 1px 1px 1px;
border-color: #666699;
padding: 0px;
margin: 1px;
}
.catandforum {
font-size: 8pt;
}
.posttime {
font-size: 8pt;
background: #CFC4A9;
color: #000000;
text-align: center;
}
.threadtotal {
font-size: 10pt;
background: #CFCFCF;
color: #000000;
}
.posttotal,.modcolumn {
font-size: 10pt;
background: #CFCFCF;
color: #000000;
}
.modcolumn {
font-size: 8pt;
}
.small {
font-weight: normal;
font-size: 8pt;
}
.standouttext {
color: #ff0000;
background: none;
}
.pollcolor {
background: #ff0000;
color: #000000;
border: 1px solid #000000;
}
.forumtitle a {
font-size: 10pt;
font-weight: bold;
color: #303030;
background: none;
}
.forumdescript {
font-size: 8pt;
}
.lighttable {
background: #CFCFCF;
color: #000000;
}
.darktable {
background: #CFC4A9;
color: #000000;
}
.newlighttable {
background: #f7f7f7;
color: #000000;
}
.newdarktable {
background: #e6e6e6;
color: #000000;
}
.newpostsincat {
background: #FFFF00;
color: #000000;
}
.cleartable {
background: #f7f7f7;
color: #000000;
}
.newsubjecttable {
background: #c4c4c4;
font-weight: bold;
color: #000000;
}
.subjecttable {
background: #dedfdf;
color: #000000;
}
.formboxes{
background-color: #dedfdf;
color: #000000;
font-size: 10pt;
}
.buttons {
background-color: #dedfdf;
color: #000000;
font-size: 10pt;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
blockquote {
font-size: 9pt; border: 1px solid #e6e6e6;
margin: 0px 20px; padding: 0px 10px
}
blockquote .small {
background: #e6e6e6;
margin-left:-10px;
padding: 1px 2px;
color: #000000;
}
blockquote hr {
visibility:hidden;
height: 1px
}
blockquote br {
font-size: 1px
}
.post:first-letter {
font-weight: bold;
}
pre {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10pt;
display: block;
white-space: pre;
}
.modname {
color: #00AA00;
}
.adminname {
color: #FF0000;
}
.new {
font-size: 8pt;
color: red;
}
.new2 {
font-size: 8pt;
color: #880088;
}
a.cup {
text-decoration:none;
}
.topmenu{
background: #CCCC77;
}
.rating_positive
{
color: #00CC00;
}
.rating_positive_postlist
{
color: #00CC00;
}
.confluent
{
color: #CFCFCF;
}

@ -0,0 +1,165 @@
.decoration_0 {
position:absolute;
z-index:500;
width:800px;
height:25px;
top:-100px;
left:0px;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/decoration_0.png', sizingMethod='crop');
background-repeat: repeat-x;
}
.decoration_0[class]
{
background-image: url('/images/decoration_0.png');
}
.decoration_1 {
position:absolute;
z-index:500;
width:1000px;
height:40px;
top:-100px;
left:0px;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/decoration_8.png', sizingMethod='crop');
background-repeat: repeat-x;
}
.decoration_1[class]
{
background-image: url('/images/decoration_8.png');
}
.decoration_2 {
position:absolute;
z-index:500;
width:800px;
height:40px;
top:-100px;
left:0px;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/decoration_2.png', sizingMethod='crop');
background-repeat: no-repeat;
}
.decoration_2[class]
{
background-image: url('/images/decoration_2.png');
}
.decoration_3 {
position:absolute;
z-index:500;
width:1000px;
height:25px;
top:-100px;
left:0px;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/decoration_3.png', sizingMethod='crop');
background-repeat: repeat-x;
}
.decoration_3[class]
{
background-image: url('/images/decoration_3.png');
}
.decoration_4 {
position:absolute;
z-index:500;
width:1000px;
height:30px;
top:-100px;
left:0px;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/decoration_4.png', sizingMethod='crop');
background-repeat: repeat-x;
}
.decoration_4[class]
{
background-image: url('/images/decoration_4.png');
}
.decoration_5 {
position:absolute;
z-index:500;
width:1000px;
height:40px;
top:-100px;
left:0px;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/decoration_5.png', sizingMethod='crop');
background-repeat: repeat-x;
}
.decoration_5[class]
{
background-image: url('/images/decoration_5.png');
}
.decoration_6 {
position:absolute;
z-index:500;
width:1000px;
height:25px;
top:-100px;
left:0px;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/decoration_6.png', sizingMethod='crop');
background-repeat: repeat-x;
}
.decoration_6[class]
{
background-image: url('/images/decoration_6.png');
}
.decoration_7 {
position:absolute;
z-index:500;
width:1000px;
height:30px;
top:-100px;
left:0px;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/decoration_7.png', sizingMethod='crop');
background-repeat: repeat-x;
}
.decoration_7[class]
{
background-image: url('/images/decoration_7.png');
}
.decoration_tree {
position:absolute;
z-index:500;
width:386px;
height:500px;
top:-500px;
left:0px;
/* filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/ct.png', sizingMethod='crop'); */
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/no_ct.png', sizingMethod='crop');
background-repeat: no-repeat;
}
.decoration_tree[class]
{
/* background-image: url('/images/ct.png');*/
background-image: url('/images/no_ct.png');
}
.decoration_snowman {
position:absolute;
z-index:500;
width:386px;
height:500px;
top:-500px;
left:0px;
/* filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/ct.png', sizingMethod='crop'); */
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/snowman.png', sizingMethod='crop');
background-repeat: no-repeat;
}
.decoration_snowman[class]
{
/* background-image: url('/images/ct.png');*/
background-image: url('/images/snowman.png');
}
.decoration_pile {
position:absolute;
z-index:500;
width:198px;
height:175px;
top:-500px;
left:0px;
/* filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/ct.png', sizingMethod='crop'); */
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/pile.png', sizingMethod='crop');
background-repeat: no-repeat;
}
.decoration_pile[class]
{
/* background-image: url('/images/ct.png');*/
background-image: url('/images/pile.png');
}

@ -0,0 +1,52 @@
.message_out
{
color: #880000;
}
.message_out A:link
{
color: #880000;
}
.message_out A:visited
{
color: #880000;
}
.message_in
{
color: #000088;
}
.message_in A:link
{
color: #000088;
}
.message_in A:visited
{
color: #000088;
}
.rating_positive
{
color: #007F00;
}
.rating_positive_postlist
{
color: #007F00;
}
.rating_negative
{
}
.lite_r_span
{
padding-left: 10px;
padding-right: 10px;
}
.math{background-color:#FFFFFF;border:3pt solid #FFFFFF;}
pre
{
overflow-x: auto;
overflow-y: hidden;
margin: 10px;
width: 99%;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 B

Loading…
Cancel
Save