Skip to content

Instantly share code, notes, and snippets.

@onocom
Created October 27, 2015 06:56
Show Gist options
  • Save onocom/c83c4c87cf678af6b028 to your computer and use it in GitHub Desktop.
Save onocom/c83c4c87cf678af6b028 to your computer and use it in GitHub Desktop.
【concrete5】ナビゲーション・メニューを上部に固定(fixed)している場合、ログイン後のツールバーと被らないようにするためのコード
<head>
<?php
$c = Page::getCurrentPage();
$cp = new Permissions($c);
if (is_object($cp) && ($cp->canWrite() || $cp->canAddSubContent() || $cp->canAdminPage())) : ?>
<style type="text/css">
body {margin-top: 124px;}
.navbar-fixed-top {top: 48px !important;}
</style>
<?php endif; ?>
</head>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment