Commit 9d4948f9 authored by Nigel McNie's avatar Nigel McNie
Browse files

Copy static files into the export for stylistic purposes

parent 83ecf0a1
......@@ -103,6 +103,9 @@ class PluginExportHtml extends PluginExport {
// Build index.html
$this->build_index_page($summaries);
// Copy all static files into the export
$this->copy_static_files();
// zip everything up
......@@ -189,6 +192,21 @@ class PluginExportHtml extends PluginExport {
);
}
/**
* Copies the static files (stylesheets etc.) into the export
*/
private function copy_static_files() {
$staticdir = $this->get('exportdir') . '/' . $this->get('rootdir') . '/static/';
foreach (new RecursiveDirectoryIterator(get_config('docroot') . 'export/html/static/') as $fileinfo) {
if (!$fileinfo->isFile() || substr($fileinfo->getFilename(), 0, 1) == '.') {
continue;
}
if (!copy($fileinfo->getPathname(), $staticdir . $fileinfo->getFilename())) {
throw new SystemException("Could not copy static file " . $fileinfo->getPathname());
}
}
}
}
abstract class HtmlExportArtefactPlugin {
......
/**
* Stylesheet for static HTML export
*
* (C) 2009 Catalyst IT Ltd.
*
* This file is licensed under the same terms as Mahara itself
*/
html {
max-width: 1280px;
margin: 0 auto;
padding: 0;
}
body {
margin: 0;
padding: 0;
}
a img {
border: none;
}
#mahara-logo {
float: right;
}
h1 {
border-bottom: 1px solid #bbb;
font-family: Arial, sans-serif;
margin: 1em 0 0;
}
h1 a {
text-decoration: none;
}
#content {
margin: 0 1em;
font-family: "Times New Roman", serif;
}
#breadcrumbs ul {
margin: .5em 0 0;
padding: 0;
}
#breadcrumbs li {
list-style-type: none;
margin: 0;
padding: 0;
}
#breadcrumbs a {
color: #808080;
font-size: smaller;
font-family: Arial, sans-serif;
float: left;
}
#breadcrumbs-footer {
clear: both;
}
h2, h3, h4, h5, h6 {
font-family: Arial, sans-serif;
margin: 1em 0 .5em;
}
.summary {
border-top: 1px dotted #ccc;
clear: both;
}
#summary-internal {
border: none;
}
#summary-internal ul {
list-style-position: inside;
}
#summary-internal #profile-introduction {
font-size: larger;
}
#summary-internal #profile-icon {
float: left;
padding: 0 1em 1em 0;
}
#footer {
border-top: 1px solid #bbb;
text-align: center;
font-size: smaller;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment