Skip to content

Instantly share code, notes, and snippets.

@ozero
Last active December 22, 2020 03:34
Show Gist options
  • Save ozero/e64b37240c691cda45f31fa04ba5f527 to your computer and use it in GitHub Desktop.
Save ozero/e64b37240c691cda45f31fa04ba5f527 to your computer and use it in GitHub Desktop.
Humhub 1.7.x: Modify mobile view for spaces
<!-- /themes/HumHub/views/layouts/head.php -->
<?php if(Yii::$app->user->isGuest){ ?>
<?php if($_SERVER['REQUEST_URI'] == "/dashboard"){ ?>
<meta http-equiv="refresh" content="0;URL=/p/about">
<?php } ?>
<?php } ?>
<style id="hideSpaceProfileOnMobile">
@media only screen and (max-width: 480px){
/* remove space icon */
.profile-user-photo-container{
display:none;
}
/* adjust space profile text */
#layout-content .panel-profile .panel-profile-header .img-profile-data{
padding-top: 40px !important;
padding-left: 20px;
}
/* adjust space profile text padding */
.panel-profile-controls{
padding-top: 0px;
}
}
</style>
<?php if(Yii::$app->user->isGuest){ ?>
<style id="hideSpaceProfileOnMobile-guest">
@media only screen and (max-width: 480px){
div.panel.panel-default.panel-profile div.panel-body{display:none;}
}
</style>
<style id="hideStreamFilterOnMobile-guest">
@media only screen and (max-width: 480px){
#wall-stream-filter-nav{display:none !important;}
}
</style>
<?php } ?>
<!-- end /themes/HumHub/views/layouts/head.php -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment