Skip to content

Commit deb207b

Browse files
committed
Allow disabling mobile site
1 parent e45f69d commit deb207b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

config.sample.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
false,
55
"BNETDocs has to take a brief moment to do some system maintenance. We'll be back shortly."
66
],
7+
"mobile_site_enabled": false,
78
"user_login_disabled": false,
89
"user_password_pepper": "bnetdocs-INSERTRANDOMVALUEHERE",
910
"user_register_disabled": false,

templates/header.inc.phtml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,13 @@ if (isset($this->getContext()->user_session)) {
2424
<?php echo Logger::getTimingHeader(); ?>
2525
<title><?php echo $title; ?> - BNETDocs</title>
2626
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
27+
<?php if (Common::$config->bnetdocs->mobile_site_enabled) { ?>
2728
<link rel="stylesheet" href="<?php echo Common::relativeUrlToAbsolute("/a/main.css"); ?>" type="text/css" media="(min-width:1000px)"/>
2829
<link rel="stylesheet" href="<?php echo Common::relativeUrlToAbsolute("/a/main-mobile.css"); ?>" type="text/css" media="(max-width:999px)"/>
29-
<?php foreach ($this->additional_css as $path) { ?>
30+
<?php } else { ?>
31+
<link rel="stylesheet" href="<?php echo Common::relativeUrlToAbsolute("/a/main.css"); ?>" type="text/css" media="all"/>
32+
<?php }
33+
foreach ($this->additional_css as $path) { ?>
3034
<link rel="stylesheet" type="text/css" href="<?php echo Common::relativeUrlToAbsolute($path); ?>" media="all"/>
3135
<?php } ?>
3236
<link rel="icon" href="<?php echo Common::relativeUrlToAbsolute("/favicon.png"); ?>" type="image/png" sizes="48x48"/>

0 commit comments

Comments
 (0)