Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
9d4948f9
Commit
9d4948f9
authored
Apr 21, 2009
by
Nigel McNie
Browse files
Copy static files into the export for stylistic purposes
parent
83ecf0a1
Changes
3
Hide whitespace changes
Inline
Side-by-side
htdocs/export/html/lib.php
View file @
9d4948f9
...
...
@@ -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
{
...
...
htdocs/export/html/static/mahara.png
0 → 100644
View file @
9d4948f9
5.19 KB
htdocs/export/html/static/style.css
0 → 100644
View file @
9d4948f9
/**
* 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
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment