Current oav website
This commit is contained in:
36
dotclear._no/themes/customCSS/_config.php
Normal file
36
dotclear._no/themes/customCSS/_config.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Custom, a theme for Dotclear 2
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Themes
|
||||
*
|
||||
* @copyright Olivier Meunier & Association Dotclear
|
||||
* @copyright GPL-2.0-only
|
||||
*/
|
||||
|
||||
if (!defined('DC_CONTEXT_ADMIN')) {return;}
|
||||
|
||||
l10n::set(dirname(__FILE__) . '/locales/' . $_lang . '/main');
|
||||
$css_file = path::real($core->blog->public_path) . '/custom_style.css';
|
||||
|
||||
if (!is_file($css_file) && !is_writable(dirname($css_file))) {
|
||||
throw new Exception(
|
||||
sprintf(__('File %s does not exist and directory %s is not writable.'),
|
||||
$css_file, dirname($css_file))
|
||||
);
|
||||
}
|
||||
|
||||
if (isset($_POST['css'])) {
|
||||
@$fp = fopen($css_file, 'wb');
|
||||
fwrite($fp, $_POST['css']);
|
||||
fclose($fp);
|
||||
|
||||
dcPage::message(__('Style sheet upgraded.'), true, true);
|
||||
}
|
||||
|
||||
$css_content = is_file($css_file) ? file_get_contents($css_file) : '';
|
||||
|
||||
echo
|
||||
'<p class="area"><label>' . __('Style sheet:') . '</label> ' .
|
||||
form::textarea('css', 60, 20, html::escapeHTML($css_content)) . '</p>';
|
||||
22
dotclear._no/themes/customCSS/_define.php
Normal file
22
dotclear._no/themes/customCSS/_define.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Custom, a theme for Dotclear 2
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Themes
|
||||
*
|
||||
* @copyright Olivier Meunier & Association Dotclear
|
||||
* @copyright GPL-2.0-only
|
||||
*/
|
||||
|
||||
if (!defined('DC_RC_PATH')) {return;}
|
||||
|
||||
$this->registerModule(
|
||||
"Custom theme", // Name
|
||||
"A CSS customizable theme", // Description
|
||||
"Olivier", // Author
|
||||
'1.2', // Version
|
||||
[
|
||||
'type' => 'theme'
|
||||
]
|
||||
);
|
||||
27
dotclear._no/themes/customCSS/_public.php
Normal file
27
dotclear._no/themes/customCSS/_public.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Custom, a theme for Dotclear 2
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Themes
|
||||
*
|
||||
* @copyright Olivier Meunier & Association Dotclear
|
||||
* @copyright GPL-2.0-only
|
||||
*/
|
||||
|
||||
namespace themes\customcss;
|
||||
|
||||
if (!defined('DC_RC_PATH')) {return;}
|
||||
|
||||
$core->addBehavior('publicHeadContent', [__NAMESPACE__ . '\tplCustomTheme', 'publicHeadContent']);
|
||||
|
||||
class tplCustomTheme
|
||||
{
|
||||
public static function publicHeadContent($core)
|
||||
{
|
||||
echo
|
||||
'<style type="text/css">' . "\n" .
|
||||
'@import url(' . $core->blog->settings->system->public_url . '/custom_style.css);' . "\n" .
|
||||
"</style>\n";
|
||||
}
|
||||
}
|
||||
19
dotclear._no/themes/customCSS/locales/fr/main.lang.php
Normal file
19
dotclear._no/themes/customCSS/locales/fr/main.lang.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Dotclear
|
||||
*
|
||||
* @copyright Olivier Meunier & Association Dotclear
|
||||
* @copyright GPL-2.0-only
|
||||
*/#
|
||||
#
|
||||
#
|
||||
# DOT NOT MODIFY THIS FILE !
|
||||
|
||||
|
||||
|
||||
|
||||
$GLOBALS['__l10n'][''] = 'Content-Type: text/plain; charset=UTF-8
|
||||
';
|
||||
$GLOBALS['__l10n']['File %s does not exist and directory %s is not writable.'] = 'Le fichier %s n\'existe pas et le répertoire %s n\'est pas accessible en écriture.';
|
||||
$GLOBALS['__l10n']['Style sheet upgraded.'] = 'Feuille de style mise à jour.';
|
||||
$GLOBALS['__l10n']['Style sheet:'] = 'Feuille de style :';
|
||||
15
dotclear._no/themes/customCSS/locales/fr/main.po
Normal file
15
dotclear._no/themes/customCSS/locales/fr/main.po
Normal file
@ -0,0 +1,15 @@
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
#: themes/custom/_config.php:27
|
||||
#, php-format
|
||||
msgid "File %s does not exist and directory %s is not writable."
|
||||
msgstr "Le fichier %s n'existe pas et le répertoire %s n'est pas accessible en écriture."
|
||||
|
||||
#: themes/custom/_config.php:40
|
||||
msgid "Style sheet upgraded."
|
||||
msgstr "Feuille de style mise à jour."
|
||||
|
||||
#: themes/custom/_config.php:47
|
||||
msgid "Style sheet:"
|
||||
msgstr "Feuille de style :"
|
||||
0
dotclear._no/themes/customCSS/style.css
Normal file
0
dotclear._no/themes/customCSS/style.css
Normal file
Reference in New Issue
Block a user