HTML/Scripts

* append a filemtime timestamp to js/css files to work around browser caching after update
 * shuffle script handling around a bit
 * also user pages cant have community content
 * also fix breadcrumbs on items page
This commit is contained in:
Sarjuuk
2023-04-11 13:56:25 +02:00
parent b06d1a5c2c
commit 9f1cbc0233
51 changed files with 275 additions and 220 deletions

View File

@@ -7,8 +7,11 @@ if (!defined('AOWOW_REVISION'))
class HomePage extends GenericPage
{
protected $tpl = 'home';
protected $js = [[JS_FILE, 'home.js']];
protected $css = [[CSS_FILE, 'home.css']];
protected $scripts = array(
[SC_JS_FILE, 'js/home.js'],
[SC_CSS_FILE, 'css/home.css'],
[SC_CSS_STRING, '.announcement { margin: auto; max-width: 1200px; padding: 0px 15px 15px 15px }']
);
protected $featuredBox = [];
protected $oneliner = '';
@@ -21,8 +24,6 @@ class HomePage extends GenericPage
protected function generateContent()
{
$this->addScript([CSS_STRING, '.announcement { margin: auto; max-width: 1200px; padding: 0px 15px 15px 15px }']);
// load oneliner
if ($_ = DB::Aowow()->selectRow('SELECT * FROM ?_home_oneliner WHERE active = 1 LIMIT 1'))
$this->oneliner = Util::jsEscape(Util::localizedString($_, 'text'));