mirror of
https://github.com/silverstripe/silverstripe-frameworktest
synced 2024-10-22 11:06:02 +02:00
FEATURE: added a literal in the cms to show the sifr sample image
MINOR: tells sifr to use the new font
This commit is contained in:
parent
881c24e181
commit
33511a8b5c
@ -1,6 +1,13 @@
|
||||
<?php
|
||||
class SifrPage extends Page {
|
||||
|
||||
function getCMSFields() {
|
||||
$fields = parent::getCMSFields();
|
||||
$fields->addFieldToTab("Root.Content.SifrSampleImage", new LiteralField("SifrSampleImage", '<p><img src="frameworktest/images/sifr_sample.png"/></p>'));
|
||||
|
||||
return $fields;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class SifrPage_Controller extends Page_Controller {
|
||||
@ -8,10 +15,10 @@ class SifrPage_Controller extends Page_Controller {
|
||||
function init() {
|
||||
parent::init();
|
||||
|
||||
Sifr::add_font('chunkfive', 'themes/fonts/chunkfive.swf');
|
||||
Sifr::replace_element('chunkfive', 'h2', "'.sIFR-root { text-align: left; color: red;'");
|
||||
Sifr::replace_element('chunkfive', 'h3', "'.sIFR-root { text-align: left; color: red;'");
|
||||
Sifr::replace_element('chunkfive', 'h4', "'.sIFR-root { text-align: left; color: red;'");
|
||||
Sifr::add_font('blackout', 'themes/fonts/blackout.swf');
|
||||
Sifr::replace_element('blackout', 'h2', "'.sIFR-root { text-align: left; color: red;'");
|
||||
Sifr::replace_element('blackout', 'h3', "'.sIFR-root { text-align: left; color: red;'");
|
||||
Sifr::replace_element('blackout', 'h4', "'.sIFR-root { text-align: left; color: red;'");
|
||||
Sifr::activate_sifr();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user