forked from LiveCarta/LiveCartaWP
LAW-1825 LawCarta menu integration
This commit is contained in:
@@ -6,3 +6,6 @@ define( 'DB_PASSWORD', 'local_db_password' );
|
||||
define( 'DB_HOST', 'local_db_host' );
|
||||
|
||||
define('DOMAIN_CURRENT_SITE', 'local_domain_current_site');
|
||||
|
||||
define('LAWCARTA_SUBDOMAIN', 'app');
|
||||
define('LAWCARTA_PORT', '');
|
||||
|
||||
@@ -30,6 +30,9 @@ if ( file_exists( dirname( __FILE__ ) . '/wp-config-local.php' ) ) {
|
||||
define('WP_DEBUG', true);
|
||||
|
||||
define('DOMAIN_CURRENT_SITE', 'lawcarta.loc');
|
||||
|
||||
define('LAWCARTA_SUBDOMAIN', '');
|
||||
define('LAWCARTA_PORT', '8080');
|
||||
}
|
||||
|
||||
define('DB_CHARSET', 'utf8');
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -2,6 +2,31 @@
|
||||
|
||||
require_once 'inc/walker-nav-menu.php';
|
||||
|
||||
$urlParts = parse_url(home_url());
|
||||
$scheme = isset($urlParts['scheme']) ? $urlParts['scheme'] . '://' : '';
|
||||
|
||||
$host = isset($urlParts['host']) ? $urlParts['host'] : '';
|
||||
if (defined('LAWCARTA_SUBDOMAIN')) {
|
||||
$hostParts = explode('.', $host);
|
||||
if (count($hostParts) === 3) {
|
||||
array_shift($hostParts);
|
||||
}
|
||||
if (!empty(LAWCARTA_SUBDOMAIN)) {
|
||||
array_unshift($hostParts, LAWCARTA_SUBDOMAIN);
|
||||
}
|
||||
$host = implode('.', $hostParts);
|
||||
}
|
||||
|
||||
$port = isset($urlParts['port']) ? $urlParts['port'] : '';
|
||||
if (defined('LAWCARTA_PORT')) {
|
||||
$port = LAWCARTA_PORT;
|
||||
}
|
||||
if (!empty($port)) {
|
||||
$port = ':' . $port;
|
||||
}
|
||||
|
||||
$lawCartaUrl = "$scheme$host$port";
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html <?php language_attributes(); ?>>
|
||||
@@ -25,7 +50,7 @@ require_once 'inc/walker-nav-menu.php';
|
||||
<div class="wrapper">
|
||||
|
||||
<header>
|
||||
<div class="cont">
|
||||
<div id="header-menu" class="cont">
|
||||
<a href="<?= site_url(); ?>" class="main-logo"><img src="<?= get_theme_file_uri('/assets/img/logo.png'); ?>"></a>
|
||||
|
||||
<?php
|
||||
@@ -43,6 +68,17 @@ require_once 'inc/walker-nav-menu.php';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<iframe src="<?= $lawCartaUrl ?>/menu" style="display: none;"></iframe>
|
||||
<script type="application/javascript">
|
||||
var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
|
||||
var eventer = window[eventMethod];
|
||||
var messageEvent = eventMethod === "attachEvent" ? "onmessage" : "message";
|
||||
eventer(messageEvent, function (ev) {
|
||||
if (ev.origin.indexOf('<?= $lawCartaUrl ?>') !== -1) {
|
||||
document.getElementById('header-menu').insertAdjacentHTML('beforeend', ev.data);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</header>
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -339,6 +339,22 @@ h1, .sign-page h1 {
|
||||
.top-panel h1 {
|
||||
color: #fff; }
|
||||
|
||||
.student-casebook-title .sct-bg {
|
||||
background: #fff; }
|
||||
|
||||
.casebook-top-options .dropdown .button.xl.white {
|
||||
background: none;
|
||||
border: 2px solid #fff;
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
line-height: 30px; }
|
||||
|
||||
.casebook-top-options .dropdown span {
|
||||
color: #fff; }
|
||||
|
||||
.casebook-top-options .dropdown .casebook-options:after, .casebook-top-options .dropdown .casebook-options:before, .casebook-top-options .dropdown .casebook-options i {
|
||||
background: #fff; }
|
||||
|
||||
.casebook-item .casebook-bottom .casebook-title {
|
||||
color: #475669; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user