forked from LiveCarta/LiveCartaWP
LAW-1825 LawCarta menu integration
This commit is contained in:
@@ -5,4 +5,7 @@ define( 'DB_USER', 'local_db_user' );
|
|||||||
define( 'DB_PASSWORD', 'local_db_password' );
|
define( 'DB_PASSWORD', 'local_db_password' );
|
||||||
define( 'DB_HOST', 'local_db_host' );
|
define( 'DB_HOST', 'local_db_host' );
|
||||||
|
|
||||||
define('DOMAIN_CURRENT_SITE', 'local_domain_current_site');
|
define('DOMAIN_CURRENT_SITE', 'local_domain_current_site');
|
||||||
|
|
||||||
|
define('LAWCARTA_SUBDOMAIN', 'app');
|
||||||
|
define('LAWCARTA_PORT', '');
|
||||||
|
|||||||
@@ -1,78 +1,81 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* The base configuration for WordPress
|
* The base configuration for WordPress
|
||||||
*
|
*
|
||||||
* The wp-config.php creation script uses this file during the
|
* The wp-config.php creation script uses this file during the
|
||||||
* installation. You don't have to use the web site, you can
|
* installation. You don't have to use the web site, you can
|
||||||
* copy this file to "wp-config.php" and fill in the values.
|
* copy this file to "wp-config.php" and fill in the values.
|
||||||
*
|
*
|
||||||
* This file contains the following configurations:
|
* This file contains the following configurations:
|
||||||
*
|
*
|
||||||
* * MySQL settings
|
* * MySQL settings
|
||||||
* * Secret keys
|
* * Secret keys
|
||||||
* * Database table prefix
|
* * Database table prefix
|
||||||
* * ABSPATH
|
* * ABSPATH
|
||||||
*
|
*
|
||||||
* @link https://codex.wordpress.org/Editing_wp-config.php
|
* @link https://codex.wordpress.org/Editing_wp-config.php
|
||||||
*
|
*
|
||||||
* @package WordPress
|
* @package WordPress
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( file_exists( dirname( __FILE__ ) . '/wp-config-local.php' ) ) {
|
if ( file_exists( dirname( __FILE__ ) . '/wp-config-local.php' ) ) {
|
||||||
include( dirname( __FILE__ ) . '/wp-config-local.php' );
|
include( dirname( __FILE__ ) . '/wp-config-local.php' );
|
||||||
} else {
|
} else {
|
||||||
define('DB_NAME', getenv('DB_NAME'));
|
define('DB_NAME', getenv('DB_NAME'));
|
||||||
define('DB_USER', getenv('DB_USER'));
|
define('DB_USER', getenv('DB_USER'));
|
||||||
define('DB_PASSWORD', getenv('DB_PASSWORD'));
|
define('DB_PASSWORD', getenv('DB_PASSWORD'));
|
||||||
define('DB_HOST', getenv('DB_HOST'));
|
define('DB_HOST', getenv('DB_HOST'));
|
||||||
|
|
||||||
define('WP_LOCAL_DEV', true);
|
define('WP_LOCAL_DEV', true);
|
||||||
define('WP_DEBUG', true);
|
define('WP_DEBUG', true);
|
||||||
|
|
||||||
define('DOMAIN_CURRENT_SITE', 'lawcarta.loc');
|
define('DOMAIN_CURRENT_SITE', 'lawcarta.loc');
|
||||||
}
|
|
||||||
|
define('LAWCARTA_SUBDOMAIN', '');
|
||||||
define('DB_CHARSET', 'utf8');
|
define('LAWCARTA_PORT', '8080');
|
||||||
define('DB_COLLATE', '');
|
}
|
||||||
|
|
||||||
/** Multisite */
|
define('DB_CHARSET', 'utf8');
|
||||||
define('WP_ALLOW_MULTISITE', true);
|
define('DB_COLLATE', '');
|
||||||
define('MULTISITE', true);
|
|
||||||
define('SUBDOMAIN_INSTALL', false);
|
/** Multisite */
|
||||||
define('PATH_CURRENT_SITE', '/');
|
define('WP_ALLOW_MULTISITE', true);
|
||||||
define('SITE_ID_CURRENT_SITE', 1);
|
define('MULTISITE', true);
|
||||||
define('BLOG_ID_CURRENT_SITE', 1);
|
define('SUBDOMAIN_INSTALL', false);
|
||||||
define('SUNRISE', 'on');
|
define('PATH_CURRENT_SITE', '/');
|
||||||
|
define('SITE_ID_CURRENT_SITE', 1);
|
||||||
/**
|
define('BLOG_ID_CURRENT_SITE', 1);
|
||||||
* Authentication Unique Keys and Salts.
|
define('SUNRISE', 'on');
|
||||||
*
|
|
||||||
* Change these to different unique phrases!
|
/**
|
||||||
* You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
|
* Authentication Unique Keys and Salts.
|
||||||
* You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
|
*
|
||||||
*
|
* Change these to different unique phrases!
|
||||||
* @since 2.6.0
|
* You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
|
||||||
*/
|
* You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
|
||||||
define('AUTH_KEY', 'i*V4B`A#NWjOUQu->3vSB@zE1#gtH4#02;1q,t[Wzd%1C&$K+-k2yXFz-r3LSR<#');
|
*
|
||||||
define('SECURE_AUTH_KEY', ':*S8U~Xl~`+QUWMxDp%1e?7`:-nt9Ccz@.d0o Y/)LRJCls&r[:zl]+NeUxu1V|v');
|
* @since 2.6.0
|
||||||
define('LOGGED_IN_KEY', 'GG&iWQx&fPj6Q]lx*Ts1F!QNKV:qVVRS&Y-P/-NN!|4wrz:_*EQcXIuy};piV|-e');
|
*/
|
||||||
define('NONCE_KEY', '|kLD9iG,F/kw,225&|VZNH(VoE[&{EDQkb7YA0h<{N`2}I7 }=8qdGl&OeD[UzBk');
|
define('AUTH_KEY', 'i*V4B`A#NWjOUQu->3vSB@zE1#gtH4#02;1q,t[Wzd%1C&$K+-k2yXFz-r3LSR<#');
|
||||||
define('AUTH_SALT', '2TMhC58*(LTTaPdK8:hWl6+yCV-]p%M-*HN$]:HZ7,y|P3ew-$D( i}.|r+<VXH|');
|
define('SECURE_AUTH_KEY', ':*S8U~Xl~`+QUWMxDp%1e?7`:-nt9Ccz@.d0o Y/)LRJCls&r[:zl]+NeUxu1V|v');
|
||||||
define('SECURE_AUTH_SALT', '?~*:ck|!M_@:CV- )quHp50vcN<;72q*j5u+YD%3DpM.-L/p|3QYQP|N/78KKmSo');
|
define('LOGGED_IN_KEY', 'GG&iWQx&fPj6Q]lx*Ts1F!QNKV:qVVRS&Y-P/-NN!|4wrz:_*EQcXIuy};piV|-e');
|
||||||
define('LOGGED_IN_SALT', '1X?t.RE+q@V?X*0PxOxwzehc)_vTk,y/nc5;bWXBD|H6UFM5OiWS6X[]i|vg}Au8');
|
define('NONCE_KEY', '|kLD9iG,F/kw,225&|VZNH(VoE[&{EDQkb7YA0h<{N`2}I7 }=8qdGl&OeD[UzBk');
|
||||||
define('NONCE_SALT', '3!Fc.@gSB}&Q2lr[HRx^K}+p[wx!RaC496P ^U/fsgcP_>QCOVoicd@234)D$L/5');
|
define('AUTH_SALT', '2TMhC58*(LTTaPdK8:hWl6+yCV-]p%M-*HN$]:HZ7,y|P3ew-$D( i}.|r+<VXH|');
|
||||||
|
define('SECURE_AUTH_SALT', '?~*:ck|!M_@:CV- )quHp50vcN<;72q*j5u+YD%3DpM.-L/p|3QYQP|N/78KKmSo');
|
||||||
/**
|
define('LOGGED_IN_SALT', '1X?t.RE+q@V?X*0PxOxwzehc)_vTk,y/nc5;bWXBD|H6UFM5OiWS6X[]i|vg}Au8');
|
||||||
* WordPress Database Table prefix.
|
define('NONCE_SALT', '3!Fc.@gSB}&Q2lr[HRx^K}+p[wx!RaC496P ^U/fsgcP_>QCOVoicd@234)D$L/5');
|
||||||
*
|
|
||||||
* You can have multiple installations in one database if you give each
|
/**
|
||||||
* a unique prefix. Only numbers, letters, and underscores please!
|
* WordPress Database Table prefix.
|
||||||
*/
|
*
|
||||||
$table_prefix = 'wp_';
|
* You can have multiple installations in one database if you give each
|
||||||
|
* a unique prefix. Only numbers, letters, and underscores please!
|
||||||
/** Absolute path to the WordPress directory. */
|
*/
|
||||||
if ( !defined('ABSPATH') )
|
$table_prefix = 'wp_';
|
||||||
define('ABSPATH', dirname(__FILE__) . '/');
|
|
||||||
|
/** Absolute path to the WordPress directory. */
|
||||||
/** Sets up WordPress vars and included files. */
|
if ( !defined('ABSPATH') )
|
||||||
require_once(ABSPATH . 'wp-settings.php');
|
define('ABSPATH', dirname(__FILE__) . '/');
|
||||||
|
|
||||||
|
/** Sets up WordPress vars and included files. */
|
||||||
|
require_once(ABSPATH . 'wp-settings.php');
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -2,6 +2,31 @@
|
|||||||
|
|
||||||
require_once 'inc/walker-nav-menu.php';
|
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>
|
<!DOCTYPE html>
|
||||||
<html <?php language_attributes(); ?>>
|
<html <?php language_attributes(); ?>>
|
||||||
@@ -25,7 +50,7 @@ require_once 'inc/walker-nav-menu.php';
|
|||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
|
|
||||||
<header>
|
<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>
|
<a href="<?= site_url(); ?>" class="main-logo"><img src="<?= get_theme_file_uri('/assets/img/logo.png'); ?>"></a>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
@@ -43,6 +68,17 @@ require_once 'inc/walker-nav-menu.php';
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</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>
|
</header>
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|||||||
@@ -339,6 +339,22 @@ h1, .sign-page h1 {
|
|||||||
.top-panel h1 {
|
.top-panel h1 {
|
||||||
color: #fff; }
|
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 {
|
.casebook-item .casebook-bottom .casebook-title {
|
||||||
color: #475669; }
|
color: #475669; }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user