From a22dda2701e12dea4d9e80e91f592411c7d4b1ba Mon Sep 17 00:00:00 2001 From: Alvaro Graves <alvaro@graves.cl> Date: Wed, 25 Jan 2012 16:05:28 -0800 Subject: [PATCH] Fixing https://github.com/alangrafu/lodspeakr/issues/37 --- modules/staticModule.php | 1 + {css => static/css}/basic.css | 0 {css => static/css}/person.css | 0 static/index.html | 4 ++-- views/class.rdfs:Resource/html.template | 2 +- views/service.classes/html.template | 2 +- views/service.instances/html.template | 2 +- views/service.namedGraphs/html.template | 2 +- 8 files changed, 7 insertions(+), 6 deletions(-) rename {css => static/css}/basic.css (100%) rename {css => static/css}/person.css (100%) diff --git a/modules/staticModule.php b/modules/staticModule.php index 7861946e..3d7b0534 100644 --- a/modules/staticModule.php +++ b/modules/staticModule.php @@ -24,6 +24,7 @@ class StaticModule extends abstractModule{ global $acceptContentType; global $endpoints; global $base; + header("Content-type: "); echo file_get_contents($conf['static']['directory'].$file); } diff --git a/css/basic.css b/static/css/basic.css similarity index 100% rename from css/basic.css rename to static/css/basic.css diff --git a/css/person.css b/static/css/person.css similarity index 100% rename from css/person.css rename to static/css/person.css diff --git a/static/index.html b/static/index.html index 6a3920ee..83751e8b 100644 --- a/static/index.html +++ b/static/index.html @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"> - <html xmlns="http://www.w3.org/1999/xhtml" xmlns:local="http://localhost/lodspeakr/" + <html xmlns="http://www.w3.org/1999/xhtml" version="XHTML+RDFa 1.0" xml:lang="en"> <head> <title>Main</title> - <link href="http://localhost/lodspeakr//lodspeakr/css/basic.css" rel="stylesheet" type="text/css" media="screen" /> + <link href="css/basic.css" rel="stylesheet" type="text/css" media="screen" /> </head> <body> <h1>Services available</h1> diff --git a/views/class.rdfs:Resource/html.template b/views/class.rdfs:Resource/html.template index 8567fdd6..1bff5b29 100644 --- a/views/class.rdfs:Resource/html.template +++ b/views/class.rdfs:Resource/html.template @@ -5,7 +5,7 @@ {%endfor%}version="XHTML+RDFa 1.0" xml:lang="en"> <head> <title>Page about {{base.this.value}}</title> - <link href="{{base.baseUrl}}/lodspeakr/css/basic.css" rel="stylesheet" type="text/css" media="screen" /> + <link href="{{base.baseUrl}}css/basic.css" rel="stylesheet" type="text/css" media="screen" /> <link rel="alternate" type="application/rdf+xml" title="RDF/XML Version" href="{{base.this.value}}.rdf" /> <link rel="alternate" type="text/turtle" title="Turtle Version" href="{{base.this.value}}.ttl" /> <link rel="alternate" type="text/plain" title="N-Triples Version" href="{{base.this.value}}.nt" /> diff --git a/views/service.classes/html.template b/views/service.classes/html.template index 779c41b6..e65319da 100644 --- a/views/service.classes/html.template +++ b/views/service.classes/html.template @@ -5,7 +5,7 @@ {%endfor%}version="XHTML+RDFa 1.0" xml:lang="en"> <head> <title>My new Service</title> - <link href="{{base.baseUrl}}/lodspeakr/css/basic.css" rel="stylesheet" type="text/css" media="screen" /> + <link href="css/basic.css" rel="stylesheet" type="text/css" media="screen" /> </head> <body> <h1>Classes available</h1> diff --git a/views/service.instances/html.template b/views/service.instances/html.template index 74bebad2..b1345c9e 100644 --- a/views/service.instances/html.template +++ b/views/service.instances/html.template @@ -5,7 +5,7 @@ {%endfor%}version="XHTML+RDFa 1.0" xml:lang="en"> <head> <title>Instances of {{base.args.arg0}}</title> - <link href="{{base.baseUrl}}/lodspeakr/css/basic.css" rel="stylesheet" type="text/css" media="screen" /> + <link href="css/basic.css" rel="stylesheet" type="text/css" media="screen" /> </head> <body> <h1>Instances of class {{base.args.arg0}}</h1> diff --git a/views/service.namedGraphs/html.template b/views/service.namedGraphs/html.template index ee2c2999..1df5c5d4 100644 --- a/views/service.namedGraphs/html.template +++ b/views/service.namedGraphs/html.template @@ -5,7 +5,7 @@ {%endfor%}version="XHTML+RDFa 1.0" xml:lang="en"> <head> <title>Named Graphs</title> - <link href="{{base.baseUrl}}/lodspeakr/css/basic.css" rel="stylesheet" type="text/css" media="screen" /> + <link href="css/basic.css" rel="stylesheet" type="text/css" media="screen" /> </head> <body> <h1>Named graphs available</h1> -- GitLab