瀏覽代碼

Dynamic global menu is working fine

Md Mozahidur Rahman 1 年之前
父節點
當前提交
d1026a1409

File diff suppressed because it is too large
+ 488 - 557
css/theme-styles.css


+ 69 - 55
functions.php

@@ -171,9 +171,9 @@ function uiu_cse_header_menu()
 {
 	register_nav_menus(
 		array(
-			'uiu-header-menu' => __('UIU Header'),
-			'cse-header-menu' => __('CSE Header Menu'),
-			'uiu-footer-menu' => __('UIU Footer Menu')
+			'uiu-global-header-menu' => __('UIU Global Header Menu'),
+			'uiu-departmental-header-menu' => __('UIU Departmental Header Menu'),
+			'uiu-global-footer-menu' => __('UIU Global Footer Menu')
 		)
 	);
 }
@@ -260,78 +260,92 @@ function uiu_acf_update_user_id($value, $post_id, $field)
 add_filter('acf/update_value/name=employeeid', 'uiu_acf_update_user_id', 10, 3);
 
 
+// function fetch_conference_data($params)
+// {
+// 	$auth_token = get_field('auth_token', 'option');
+// 	$client_id = get_field('client_id', 'option');
+// 	$conference_api = get_field('conference_api', 'option');
+
+// 	$curl = curl_init();
+
+// 	curl_setopt_array($curl, array(
+// 		CURLOPT_URL => $conference_api,
+// 		CURLOPT_RETURNTRANSFER => true,
+// 		CURLOPT_ENCODING => '',
+// 		CURLOPT_MAXREDIRS => 10,
+// 		CURLOPT_TIMEOUT => 0,
+// 		CURLOPT_FOLLOWLOCATION => true,
+// 		CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
+// 		CURLOPT_CUSTOMREQUEST => 'POST',
+// 		CURLOPT_POSTFIELDS => '{
+// 			"auth_token" : "' . $auth_token . '",
+//             "user_login_id" : "' . $client_id . '",
+
+//             "employee_id" : ' . isset($params["author"]) ? " " : " " . ',
+//             "fromYear" : ' . $params["fromYear"] ?? " " . ',
+//     		"toYear" : ' . $params["toYear"] . ',
+// 			"page" : ' . $params["page"] . ',
+// 			"limit" : ' . $params["limit"] . '
+//         }',
+// 		CURLOPT_HTTPHEADER => array(
+// 			'Content-Type: application/json'
+// 		),
+// 	));
+
+// 	$response = curl_exec($curl);
+// 	curl_close($curl);
+// 	$response = json_decode($response, true);
+
+// 	return  $response;
+// }
+
+// function uiu_conference_route_menu_with_params(WP_REST_Request $request)
+// {
+// 	// $arg = $request->get_param('limit');
+// 	$params = $request->get_params();
+// 	// var_dump($params);
+
+// 	return fetch_conference_data($params);
+// }
+
+
+// add_action("rest_api_init", function () {
+// 	register_rest_route("uiu_api", "/conference", [
+// 		"methods" => "GET",
+// 		"callback" => "uiu_conference_route_menu_with_params",
+// 	]);
+// });
+
+
+
 /**
  * Make theme option page field value available via REST API
  */
-function theme_options_route_menu()
+function theme_options_route_menu_global_header()
 {
-	return get_field('menu_rich_contents', 'option');
+	return get_field('global_menu_rich_contents', 'option');
 }
-
 add_action("rest_api_init", function () {
-	register_rest_route("options", "/menu", [
+	register_rest_route("options/menu", "/global-header", [
 		"methods" => "GET",
-		"callback" => "theme_options_route_menu",
+		"callback" => "theme_options_route_menu_global_header",
 	]);
 });
 
 
-function fetch_conference_data($limit)
-{
-	$auth_token = get_field('auth_token', 'option');
-	$client_id = get_field('client_id', 'option');
-	$conference_api = get_field('conference_api', 'option');
-
-	$curl = curl_init();
-
-	curl_setopt_array($curl, array(
-		CURLOPT_URL => $conference_api,
-		CURLOPT_RETURNTRANSFER => true,
-		CURLOPT_ENCODING => '',
-		CURLOPT_MAXREDIRS => 10,
-		CURLOPT_TIMEOUT => 0,
-		CURLOPT_FOLLOWLOCATION => true,
-		CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
-		CURLOPT_CUSTOMREQUEST => 'POST',
-		CURLOPT_POSTFIELDS => '{
-            "employee_id" : " ",
-            "year" : " ",
-            "auth_token" : "' . $auth_token . '",
-            "user_login_id" : "' . $client_id . '",
-			 "page" : 1,
-			 "limit" : ' . $limit . '
-        }',
-		CURLOPT_HTTPHEADER => array(
-			'Content-Type: application/json'
-		),
-	));
-
-	$response = curl_exec($curl);
-	curl_close($curl);
-	$response = json_decode($response, true);
-
-	return  $response;
-}
 
-function uiu_conference_route_menu_with_params(WP_REST_Request $request)
+function theme_options_route_menu_departmental_header()
 {
-	$arg = $request->get_param('limit');
-	//   $params = $request->get_params();
-	//    var_dump( $arg );
-
-	return fetch_conference_data($arg);
+	return get_field('departmental_menu_rich_contents', 'option');
 }
-
-
 add_action("rest_api_init", function () {
-	register_rest_route("uiu_api", "/conference", [
+	register_rest_route("options/menu", "/departmental-header", [
 		"methods" => "GET",
-		"callback" => "uiu_conference_route_menu_with_params",
+		"callback" => "theme_options_route_menu_departmental_header",
 	]);
 });
 
 
-
 add_action('rest_api_init', function () {
 	header("Access-Control-Allow-Origin: *");
 });

+ 22 - 17
header.php

@@ -9,8 +9,8 @@
  *
  * @package UIU_CSE
  */
-
 ?>
+
 <!doctype html>
 <html <?php language_attributes(); ?>>
 
@@ -18,7 +18,6 @@
 	<meta charset="<?php bloginfo('charset'); ?>">
 	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="profile" href="https://gmpg.org/xfn/11">
-
 	<?php wp_head(); ?>
 </head>
 
@@ -26,31 +25,37 @@
 	<?php wp_body_open(); ?>
 	<div id="page" class="site">
 		<a class="skip-link screen-reader-text" href="#primary"><?php esc_html_e('Skip to content', 'uiu-cse'); ?></a>
-
 		<header id="navbar">
-
 			<section id="uiu-global-nav">
-
 				<nav class="container-fluid">
-
 					<div class="logo-close-menu">
-
-						<a class="logo" href="<?php echo get_site_url(); ?>"> <img src="<?php echo (get_header_image()); ?>" alt="<?php echo (get_bloginfo('title')); ?>" /></a>
-
-						<a id="menu-bars" class="material-icons">
+						<span id="menu-bars" class="material-icons">
 							menu
-						</a>
+						</span>
+						<a class="logo" href="<?php echo get_site_url(); ?>"> <img src="<?php echo (get_header_image()); ?>" alt="<?php echo (get_bloginfo('title')); ?>" /></a>
+						<span id="seacrh" class="seacrh material-symbols-outlined" onclick="openSearch()">
+							search
+						</span>
 					</div>
-
-					<?php wp_nav_menu(array('theme_location' => 'uiu-header-menu', 'container_class' => 'custom-menu-class'));
+					<?php wp_nav_menu(array('theme_location' => 'uiu-global-header-menu', 'container_class' => 'uiu-global-header-menu'));
 					?>
-
 				</nav>
-
 			</section>
 
-
-
+			<section id="uiu-departmental-nav">
+				<nav class="container-fluid">
+					<div id="responsive-btn" class="dep-name-res-icon">
+						<span class="department">
+							Departmental Menu of CSE
+						</span>
+						<span class="responsive-btn material-symbols-outlined">
+							filter_list
+						</span>
+					</div>
+					<?php wp_nav_menu(array('theme_location' => 'uiu-departmental-header-menu', 'container_class' => 'uiu-departmental-header-menu'));
+					?>
+				</nav>
+			</section>
 		</header>
 
 

+ 134 - 4
inc/acf-json/group_648ad0b0ca222.json

@@ -21,7 +21,7 @@
         },
         {
             "key": "field_648b021524f7d",
-            "label": "Header Menu Contents",
+            "label": "Global Menu Contents",
             "name": "",
             "aria-label": "",
             "type": "tab",
@@ -38,8 +38,8 @@
         },
         {
             "key": "field_648ad18328484",
-            "label": "Menu Rich contents",
-            "name": "menu_rich_contents",
+            "label": "Global Menu Rich contents",
+            "name": "global_menu_rich_contents",
             "aria-label": "",
             "type": "repeater",
             "instructions": "",
@@ -148,6 +148,136 @@
                     "parent_repeater": "field_648ad18328484"
                 }
             ]
+        },
+        {
+            "key": "field_64901ac1c8176",
+            "label": "Departmental Menu Contents",
+            "name": "",
+            "aria-label": "",
+            "type": "tab",
+            "instructions": "",
+            "required": 0,
+            "conditional_logic": 0,
+            "wrapper": {
+                "width": "",
+                "class": "",
+                "id": ""
+            },
+            "placement": "left",
+            "endpoint": 0
+        },
+        {
+            "key": "field_64901a6bc8171",
+            "label": "Departmental Menu Rich contents",
+            "name": "departmental_menu_rich_contents",
+            "aria-label": "",
+            "type": "repeater",
+            "instructions": "",
+            "required": 0,
+            "conditional_logic": 0,
+            "wrapper": {
+                "width": "",
+                "class": "",
+                "id": ""
+            },
+            "layout": "table",
+            "pagination": 0,
+            "min": 0,
+            "max": 0,
+            "collapsed": "",
+            "button_label": "Add Row",
+            "rows_per_page": 20,
+            "sub_fields": [
+                {
+                    "key": "field_64901a6bc8172",
+                    "label": "Parent Navigation Label",
+                    "name": "parent_navigation_label",
+                    "aria-label": "",
+                    "type": "text",
+                    "instructions": "",
+                    "required": 0,
+                    "conditional_logic": 0,
+                    "wrapper": {
+                        "width": "",
+                        "class": "",
+                        "id": ""
+                    },
+                    "default_value": "",
+                    "maxlength": "",
+                    "placeholder": "",
+                    "prepend": "",
+                    "append": "",
+                    "parent_repeater": "field_64901a6bc8171"
+                },
+                {
+                    "key": "field_64901a6bc8173",
+                    "label": "Menu Feature Image",
+                    "name": "menu_feature_image",
+                    "aria-label": "",
+                    "type": "image",
+                    "instructions": "",
+                    "required": 0,
+                    "conditional_logic": 0,
+                    "wrapper": {
+                        "width": "",
+                        "class": "",
+                        "id": ""
+                    },
+                    "return_format": "url",
+                    "library": "all",
+                    "min_width": "",
+                    "min_height": "",
+                    "min_size": "",
+                    "max_width": "",
+                    "max_height": "",
+                    "max_size": "",
+                    "mime_types": "",
+                    "preview_size": "medium",
+                    "parent_repeater": "field_64901a6bc8171"
+                },
+                {
+                    "key": "field_64901a6bc8174",
+                    "label": "Menu Title",
+                    "name": "menu_title",
+                    "aria-label": "",
+                    "type": "text",
+                    "instructions": "",
+                    "required": 0,
+                    "conditional_logic": 0,
+                    "wrapper": {
+                        "width": "",
+                        "class": "",
+                        "id": ""
+                    },
+                    "default_value": "",
+                    "maxlength": "",
+                    "placeholder": "",
+                    "prepend": "",
+                    "append": "",
+                    "parent_repeater": "field_64901a6bc8171"
+                },
+                {
+                    "key": "field_64901a6bc8175",
+                    "label": "Menu Description",
+                    "name": "menu_description",
+                    "aria-label": "",
+                    "type": "textarea",
+                    "instructions": "",
+                    "required": 0,
+                    "conditional_logic": 0,
+                    "wrapper": {
+                        "width": "",
+                        "class": "",
+                        "id": ""
+                    },
+                    "default_value": "",
+                    "maxlength": "",
+                    "rows": 5,
+                    "placeholder": "",
+                    "new_lines": "",
+                    "parent_repeater": "field_64901a6bc8171"
+                }
+            ]
         }
     ],
     "location": [
@@ -168,5 +298,5 @@
     "active": true,
     "description": "",
     "show_in_rest": 1,
-    "modified": 1687070795
+    "modified": 1687181501
 }

+ 62 - 65
js/theme-settings.js

@@ -2,50 +2,28 @@
 
 // const sidebar = document.querySelector('#sidebar')
 
+// window.onscroll = function () {
+//   let navbar = document.querySelector("#navbar");
+//   let secondNav = document.querySelector("nav#second-nav");
+//   if (window.scrollY > 300) {
+//     if (navbar) navbar.classList.add("second-nav-active");
+//     navbar.classList.add("nav-resp");
+//   } else {
+//     if (navbar) navbar.classList.remove("second-nav-active");
+//     navbar.classList.remove("nav-resp");
+//   }
+// };
+
+// scroll responsive
 window.onscroll = function () {
   let navbar = document.querySelector("#navbar");
-  let secondNav = document.querySelector("nav#second-nav");
   if (window.scrollY > 300) {
-    if (navbar) navbar.classList.add("second-nav-active");
-    navbar.classList.add("nav-resp");
+    if (navbar) navbar.classList.add("scroll");
   } else {
-    if (navbar) navbar.classList.remove("second-nav-active");
-    navbar.classList.remove("nav-resp");
+    if (navbar) navbar.classList.remove("scroll");
   }
 };
 
-// show mega menu in upper nav
-// const menuItem = document.querySelectorAll(".menu-item");
-
-// // const allMenuBtn = document.querySelectorAll(".menu-btn");
-// const allMenuContent = document.querySelectorAll(".menu-content");
-
-// if (menuItem) {
-//   menuItem.forEach((item) => {
-//     const menuBtn = item.querySelector(".menu-btn");
-//     const menuContent = item.querySelector(".menu-content");
-
-//     menuBtn.addEventListener("click", () => {
-//       if (menuContent) {
-//         menuContent.classList.toggle("show-mega-menu");
-//         item.classList.toggle("active");
-//       }
-
-//       menuItem.forEach((singleItem) => {
-//         if (singleItem !== item) {
-//           singleItem.classList.remove("active");
-//         }
-//       });
-
-//       allMenuContent.forEach((content) => {
-//         if (menuContent !== content) {
-//           content.classList.remove("show-mega-menu");
-//           // item.classList.remove('active')
-//         }
-//       });
-//     });
-//   });
-// }
 // show mega menu in upper nav
 const menuItem = document.querySelectorAll("#navbar .menu > .menu-item");
 
@@ -81,41 +59,50 @@ if (menuItem) {
 
 // toggle responsive menu
 
-const toggleBtn = document.getElementById("menu-bars");
+// global menu
+const toggleBtnGlobal = document.getElementById("menu-bars");
 
-const menuContainer = document.querySelector("#uiu-global-nav .menu");
+const menuContainerGlobal = document.querySelector("#uiu-global-nav .menu");
 
-if (toggleBtn && menuContainer) {
-  toggleBtn.addEventListener("click", () => {
-    menuContainer.classList.toggle("show");
+if (toggleBtnGlobal && menuContainerGlobal) {
+  toggleBtnGlobal.addEventListener("click", () => {
+    menuContainerGlobal.classList.toggle("show");
   });
 }
 
-// fetch submenu extra item data
+// department menu
+const toggleBtnDepartment = document.getElementById("responsive-btn");
 
-const fetchMenudata = async () => {
-  try {
-    const res = await fetch("https://cse.uiu.local/wp-json/options/menu", {
-      method: "GET",
-    });
-    const data = await res.json();
+const menuContainerDepartment = document.querySelector("#uiu-departmental-nav");
 
-    return data;
-  } catch (error) {
-    console.log(`Error: ${error}`);
-  }
-};
+if (toggleBtnDepartment && menuContainerDepartment) {
+  toggleBtnDepartment.addEventListener("click", () => {
+    menuContainerDepartment.classList.toggle("show");
+  });
+}
 
-fetchMenudata().then((data) => {
-  // adding menu data into html
-  addDataToMenu(data);
-});
+// fetch submenu extra item data
+const addMenuFeature = (url, parentClass) => {
+  const fetchMenudata = async () => {
+    try {
+      const res = await fetch(url, { method: "GET" });
+      const data = await res.json();
+
+      return data;
+    } catch (error) {
+      console.log(`Error: ${error}`);
+    }
+  };
 
-function addDataToMenu(data) {
-  if (data) {
-    const menuItem = document.querySelectorAll(".menu-item");
+  fetchMenudata().then((data) => {
+    // adding menu data into html
+    addDataToMenu(data);
+  });
+
+  function addDataToMenu(data) {
+    if (data) {
+      const menuItem = document.querySelectorAll(`.${parentClass} .menu-item`);
 
-    if (menuItem) {
       menuItem.forEach((item) => {
         const targetData = data.find((data) =>
           item.innerHTML
@@ -123,8 +110,6 @@ function addDataToMenu(data) {
             .includes(data.parent_navigation_label.toLowerCase())
         );
 
-        console.log(targetData);
-
         const menuTitle = item.querySelector(".menu_title");
 
         const menuDesc = item.querySelector(".menu_description");
@@ -145,7 +130,19 @@ function addDataToMenu(data) {
       });
     }
   }
-}
+};
+
+// add content in global menu
+addMenuFeature(
+  "https://cse.uiu.local/wp-json/options/menu/global-header",
+  "uiu-global-header-menu"
+);
+
+// add content in departmentalmenu menu
+addMenuFeature(
+  "https://cse.uiu.local/wp-json/options/menu/departmental-header",
+  "uiu-departmental-header-menu"
+);
 
 // fetch submenu extra item data end
 

+ 0 - 450
page-template/page-conferences.php → page-template/page-conference-test.php

@@ -202,456 +202,6 @@ get_header(); ?>
 <?php endwhile; // end of the loop.
 ?>
 <style>
-    *,
-    *::before,
-    *::after {
-        box-sizing: border-box;
-    }
-
-    * {
-        font-family: "Open Sans", sans-serif;
-        margin: 0px auto;
-        padding: 0px;
-    }
-
-    p {
-        font-size: 16px !important;
-        line-height: 30px;
-        color: #4e4e4e !important;
-        margin: 0 auto;
-    }
-
-    .grid {
-        gap: 30px;
-    }
-
-    body {
-        overflow-y: scroll;
-        overflow-x: hidden;
-    }
-
-    section {
-        background: #fff;
-        margin: 0 auto;
-    }
-
-    header {
-        margin: 0px;
-        padding: 0px !important;
-        height: 50px;
-        overflow: hidden;
-    }
-
-    main {
-        position: relative;
-        padding: 0px !important;
-        background-color: #fff;
-    }
-
-    h1 {
-        font-size: 40px !important;
-        letter-spacing: 2px !important;
-        line-height: 100%;
-    }
-
-    h1,
-    h2,
-    h3,
-    h4 {
-        font-weight: normal;
-        margin-bottom: 0px !important;
-    }
-
-    button {
-        margin: 40px auto;
-        margin-bottom: 30px;
-        max-width: 300px;
-        font-size: 20px;
-        border-radius: 0px;
-        border: none;
-        border-radius: 4px;
-        background: #f68b1f;
-        transition-duration: 0.3s;
-    }
-
-    button:hover {
-        background: #117cf7;
-    }
-
-    .container {
-        margin: 0px auto;
-        padding: 10px 10px;
-        max-width: 1200px !important;
-    }
-
-    .container-fluid {
-        padding: 0px !important;
-    }
-
-    #search-close {
-        width: 100px;
-        border-radius: 40px;
-        background-color: #F68B1F;
-        margin-top: 30px;
-        margin-right: 30px;
-    }
-
-    .overlay-content {
-        overflow: hidden;
-    }
-
-    .overlay-content label {
-        display: inline-block;
-    }
-
-    .overlay-content h4 {
-        display: inline-block;
-        margin: 0px 20px;
-    }
-
-    .overlay-content div a {
-        display: inline-block;
-        text-decoration: underline;
-    }
-
-    .overlay-content div h6 {
-        display: inline-block;
-    }
-
-    #search-bar {
-        width: 60%;
-        display: inline-block;
-    }
-
-    #search-button {
-        width: 300px;
-        display: inline-block;
-        border-radius: 30px;
-        margin-left: 20px;
-        background: #485680;
-    }
-
-    #search-modal {
-        overflow: hidden;
-    }
-
-    #search-button:hover {
-        background-color: #F68B1F;
-    }
-
-    #first-nav>ul>img {
-        transition-duration: 0.5s;
-    }
-
-    section#first-nav-section nav {
-        position: fixed;
-        text-align: center;
-        padding: 0px;
-        justify-content: space-evenly;
-        height: 70px;
-        z-index: 10;
-        transition: 0.5s ease-in-out;
-        background-color: #160c0c;
-        border-bottom: 4px solid #F68B1F;
-        box-shadow: 0px 5px 12px -5px #2F4858;
-    }
-
-    section#first-nav-section nav ul {
-        align-items: center;
-        z-index: 3;
-    }
-
-    section#first-nav-section nav ul img {
-        height: 50px;
-        width: auto;
-        margin-right: 30px;
-        padding-left: 20px;
-    }
-
-    section#first-nav-section nav ul>li {
-        margin-right: 50px;
-    }
-
-    section#first-nav-section nav ul>li:last-child {
-        margin-right: 0px;
-    }
-
-    section#first-nav-section nav ul>li:last-child {
-        margin-right: 0;
-    }
-
-    section#first-nav-section nav ul>li>a {
-        color: #fff;
-        transition-duration: 0.3s;
-        font-size: 14px;
-        letter-spacing: 2px;
-        text-transform: uppercase;
-        font-weight: bold;
-        font-size: 12px;
-    }
-
-    section#first-nav-section nav ul>li:after {
-        content: "";
-        display: block;
-        margin: auto;
-        height: 1px;
-        width: 0px;
-        background: transparent;
-        transition: width 0.3s ease, background-color 0.5s ease;
-    }
-
-    section#first-nav-section nav ul>li:hover:after {
-        width: 100%;
-        background: #fff;
-    }
-
-    section#first-nav-section .nav-resp {
-        height: 50px;
-        background-color: #160c0c;
-        border-bottom: 4px solid #F68B1F;
-        box-shadow: 0px 5px 12px -5px #2F4858;
-    }
-
-    section#first-nav-section .nav-resp ul img {
-        height: 30px !important;
-        padding-left: 20px;
-    }
-
-    section#first-nav-section .nav-resp #menu-bars {
-        padding-top: 2px;
-    }
-
-    #menu-bars {
-        display: none;
-        padding-top: 2px;
-        color: #fff;
-    }
-
-    section#second-nav-section nav {
-        position: fixed;
-        top: 70px;
-        text-align: center;
-        padding: 0px;
-        justify-content: space-evenly;
-        height: 50px;
-        z-index: 10;
-        transition: 0.5s ease-in-out;
-        background: #117cf7;
-    }
-
-    section#second-nav-section nav ul {
-        margin-top: 0px;
-        width: 100vw;
-        justify-content: space-evenly;
-        display: inline-flex;
-    }
-
-    section#second-nav-section nav ul li>a {
-        margin: 0px;
-        color: #fff;
-        transition-duration: 0.3s;
-        font-size: 14px;
-        letter-spacing: 2px;
-        text-transform: uppercase;
-        font-weight: normal;
-        font-size: 12px;
-        border-radius: 0px;
-    }
-
-    section#second-nav-section nav ul li>a:hover {
-        border-radius: 0;
-        font-weight: bolder;
-        color: #eeffb0;
-        text-decoration: none !important;
-    }
-
-    section#second-nav-section nav ul li:first-of-type>a:hover {
-        background: none;
-    }
-
-    section#second-nav-section nav ul li>a>img {
-        height: 40px !important;
-    }
-
-    section#second-nav-section nav ul li>a>img:hover {
-        background-color: rgba(255, 255, 255, 0);
-    }
-
-    section#second-nav-section .second-nav-active {
-        height: 40px;
-        top: 50px;
-        background-color: #117cf7;
-    }
-
-    section#second-nav-section .second-nav-active ul>li>a>img {
-        height: 30px !important;
-    }
-
-    #top-search {
-        width: 140px;
-        border-radius: 0;
-        height: 30px;
-    }
-
-    @media (max-width: 1100px) {
-        #first-nav>ul {
-            position: relative;
-            width: 100%;
-            left: 0px;
-        }
-
-        #first-nav>ul>img {
-            width: 350px;
-            -o-object-fit: contain;
-            object-fit: contain;
-            margin-right: auto;
-        }
-
-        #first-nav>ul>li {
-            display: none;
-        }
-
-        #first-nav>ul>li:last-child {
-            display: inline-block;
-            margin-right: auto;
-            width: 40px;
-        }
-
-        #top-search {
-            display: none;
-        }
-
-        #menu-bars {
-            display: inline-block;
-            margin: 0px auto;
-            padding-top: 13px;
-            font-size: 45px;
-            color: #fff;
-        }
-
-        #first-nav>ul>li:last-child {
-            display: none;
-        }
-    }
-
-    @media (max-width: 576px) {
-        #menu-bars {
-            margin: 0px auto;
-            padding-top: 13px;
-            font-size: 45px;
-            color: #fff;
-        }
-
-        #first-nav>ul>img {
-            width: 170px;
-            margin-left: 10px !important;
-        }
-
-        #search>button.filled {
-            display: none;
-        }
-
-        body>main>section:nth-child(2)>div>h1 {
-            font-size: 60px;
-        }
-
-        #first-nav>ul>li:last-child {
-            display: none;
-        }
-
-        #cta {
-            display: flex;
-            flex-direction: column;
-        }
-
-        #cta>button:nth-child(2) {
-            display: none;
-        }
-
-        #second-nav-section {
-            display: none !important;
-        }
-    }
-
-    #slider-container {
-        padding: 0px !important;
-    }
-
-    .yellow-line {
-        display: block;
-        width: 100px;
-        height: 4px;
-        background-color: #00ff00;
-        margin-left: 10px;
-        margin-top: 10px;
-        margin-bottom: 0px;
-    }
-
-    @media screen and (max-width: 800px) {
-        .yellow-line {
-            margin-left: calc(50vw - 50%) !important;
-        }
-    }
-
-    footer {
-        position: relative;
-        z-index: 30 !important;
-    }
-
-    #footer1 {
-        z-index: 10;
-        height: 400px;
-        background: url("../img/footer2.png") no-repeat;
-        background-size: cover;
-        background-position: top;
-    }
-
-    footer.container-fluid {
-        border-top: 10px solid #C85688;
-        overflow: hidden;
-        text-align: left;
-        margin: 0px;
-        padding: 0px !important;
-        background: #160c0c;
-        min-height: 350px;
-    }
-
-    footer.container-fluid h3 {
-        margin: 10px auto;
-        margin: 30px 0px;
-        font-family: "Open Sans", sans-serif;
-        font-size: 20px;
-        color: #fff;
-        font-weight: normal;
-        text-decoration: underline;
-    }
-
-    footer.container-fluid ul {
-        padding: 0px;
-    }
-
-    footer.container-fluid ul>li {
-        list-style: none;
-        margin: 0px;
-        padding: 0px;
-        line-height: 110%;
-    }
-
-    footer.container-fluid ul>li a {
-        text-decoration: none;
-        color: #fff;
-        font-size: 12px;
-        letter-spacing: 2px;
-        font-weight: normal;
-        font-family: "Open Sans", sans-serif;
-        text-transform: uppercase;
-    }
-
-    footer.container-fluid ul>li a:hover {
-        color: #F68B1F;
-        text-decoration: underline;
-    }
-
     #fine-print {
         text-align: center;
         margin: 10px auto;

+ 2 - 452
page-template/page-conference.php

@@ -148,8 +148,8 @@ get_header(); ?>
                                         echo "<h2 class='paper-title'>{$conference['PaperTitle']}</h2>";
                                         echo "</a>";
                                         echo "<p class='paper-tags'>";
-                                        $conferenceKeyword = explode(',', $conference['Keyword']);
-                                        foreach ($conferenceKeyword as $keyword) {
+                                        // $conferenceKeyword = explode(',', $conference['Keyword']);
+                                        foreach ($conference['KeyWords'] as $keyword) {
                                             if ($keyword) {
                                                 echo "<span class='tag'>{$keyword}</span>";
                                             }
@@ -209,456 +209,6 @@ get_header(); ?>
 <?php endwhile; // end of the loop.
 ?>
 <style>
-    *,
-    *::before,
-    *::after {
-        box-sizing: border-box;
-    }
-
-    * {
-        font-family: "Open Sans", sans-serif;
-        margin: 0px auto;
-        padding: 0px;
-    }
-
-    p {
-        font-size: 16px !important;
-        line-height: 30px;
-        color: #4e4e4e !important;
-        margin: 0 auto;
-    }
-
-    .grid {
-        gap: 30px;
-    }
-
-    body {
-        overflow-y: scroll;
-        overflow-x: hidden;
-    }
-
-    section {
-        background: #fff;
-        margin: 0 auto;
-    }
-
-    header {
-        margin: 0px;
-        padding: 0px !important;
-        height: 50px;
-        overflow: hidden;
-    }
-
-    main {
-        position: relative;
-        padding: 0px !important;
-        background-color: #fff;
-    }
-
-    h1 {
-        font-size: 40px !important;
-        letter-spacing: 2px !important;
-        line-height: 100%;
-    }
-
-    h1,
-    h2,
-    h3,
-    h4 {
-        font-weight: normal;
-        margin-bottom: 0px !important;
-    }
-
-    button {
-        margin: 40px auto;
-        margin-bottom: 30px;
-        max-width: 300px;
-        font-size: 20px;
-        border-radius: 0px;
-        border: none;
-        border-radius: 4px;
-        background: #f68b1f;
-        transition-duration: 0.3s;
-    }
-
-    button:hover {
-        background: #117cf7;
-    }
-
-    .container {
-        margin: 0px auto;
-        padding: 10px 10px;
-        max-width: 1200px !important;
-    }
-
-    .container-fluid {
-        padding: 0px !important;
-    }
-
-    #search-close {
-        width: 100px;
-        border-radius: 40px;
-        background-color: #F68B1F;
-        margin-top: 30px;
-        margin-right: 30px;
-    }
-
-    .overlay-content {
-        overflow: hidden;
-    }
-
-    .overlay-content label {
-        display: inline-block;
-    }
-
-    .overlay-content h4 {
-        display: inline-block;
-        margin: 0px 20px;
-    }
-
-    .overlay-content div a {
-        display: inline-block;
-        text-decoration: underline;
-    }
-
-    .overlay-content div h6 {
-        display: inline-block;
-    }
-
-    #search-bar {
-        width: 60%;
-        display: inline-block;
-    }
-
-    #search-button {
-        width: 300px;
-        display: inline-block;
-        border-radius: 30px;
-        margin-left: 20px;
-        background: #485680;
-    }
-
-    #search-modal {
-        overflow: hidden;
-    }
-
-    #search-button:hover {
-        background-color: #F68B1F;
-    }
-
-    #first-nav>ul>img {
-        transition-duration: 0.5s;
-    }
-
-    section#first-nav-section nav {
-        position: fixed;
-        text-align: center;
-        padding: 0px;
-        justify-content: space-evenly;
-        height: 70px;
-        z-index: 10;
-        transition: 0.5s ease-in-out;
-        background-color: #160c0c;
-        border-bottom: 4px solid #F68B1F;
-        box-shadow: 0px 5px 12px -5px #2F4858;
-    }
-
-    section#first-nav-section nav ul {
-        align-items: center;
-        z-index: 3;
-    }
-
-    section#first-nav-section nav ul img {
-        height: 50px;
-        width: auto;
-        margin-right: 30px;
-        padding-left: 20px;
-    }
-
-    section#first-nav-section nav ul>li {
-        margin-right: 50px;
-    }
-
-    section#first-nav-section nav ul>li:last-child {
-        margin-right: 0px;
-    }
-
-    section#first-nav-section nav ul>li:last-child {
-        margin-right: 0;
-    }
-
-    section#first-nav-section nav ul>li>a {
-        color: #fff;
-        transition-duration: 0.3s;
-        font-size: 14px;
-        letter-spacing: 2px;
-        text-transform: uppercase;
-        font-weight: bold;
-        font-size: 12px;
-    }
-
-    section#first-nav-section nav ul>li:after {
-        content: "";
-        display: block;
-        margin: auto;
-        height: 1px;
-        width: 0px;
-        background: transparent;
-        transition: width 0.3s ease, background-color 0.5s ease;
-    }
-
-    section#first-nav-section nav ul>li:hover:after {
-        width: 100%;
-        background: #fff;
-    }
-
-    section#first-nav-section .nav-resp {
-        height: 50px;
-        background-color: #160c0c;
-        border-bottom: 4px solid #F68B1F;
-        box-shadow: 0px 5px 12px -5px #2F4858;
-    }
-
-    section#first-nav-section .nav-resp ul img {
-        height: 30px !important;
-        padding-left: 20px;
-    }
-
-    section#first-nav-section .nav-resp #menu-bars {
-        padding-top: 2px;
-    }
-
-    #menu-bars {
-        display: none;
-        padding-top: 2px;
-        color: #fff;
-    }
-
-    section#second-nav-section nav {
-        position: fixed;
-        top: 70px;
-        text-align: center;
-        padding: 0px;
-        justify-content: space-evenly;
-        height: 50px;
-        z-index: 10;
-        transition: 0.5s ease-in-out;
-        background: #117cf7;
-    }
-
-    section#second-nav-section nav ul {
-        margin-top: 0px;
-        width: 100vw;
-        justify-content: space-evenly;
-        display: inline-flex;
-    }
-
-    section#second-nav-section nav ul li>a {
-        margin: 0px;
-        color: #fff;
-        transition-duration: 0.3s;
-        font-size: 14px;
-        letter-spacing: 2px;
-        text-transform: uppercase;
-        font-weight: normal;
-        font-size: 12px;
-        border-radius: 0px;
-    }
-
-    section#second-nav-section nav ul li>a:hover {
-        border-radius: 0;
-        font-weight: bolder;
-        color: #eeffb0;
-        text-decoration: none !important;
-    }
-
-    section#second-nav-section nav ul li:first-of-type>a:hover {
-        background: none;
-    }
-
-    section#second-nav-section nav ul li>a>img {
-        height: 40px !important;
-    }
-
-    section#second-nav-section nav ul li>a>img:hover {
-        background-color: rgba(255, 255, 255, 0);
-    }
-
-    section#second-nav-section .second-nav-active {
-        height: 40px;
-        top: 50px;
-        background-color: #117cf7;
-    }
-
-    section#second-nav-section .second-nav-active ul>li>a>img {
-        height: 30px !important;
-    }
-
-    #top-search {
-        width: 140px;
-        border-radius: 0;
-        height: 30px;
-    }
-
-    @media (max-width: 1100px) {
-        #first-nav>ul {
-            position: relative;
-            width: 100%;
-            left: 0px;
-        }
-
-        #first-nav>ul>img {
-            width: 350px;
-            -o-object-fit: contain;
-            object-fit: contain;
-            margin-right: auto;
-        }
-
-        #first-nav>ul>li {
-            display: none;
-        }
-
-        #first-nav>ul>li:last-child {
-            display: inline-block;
-            margin-right: auto;
-            width: 40px;
-        }
-
-        #top-search {
-            display: none;
-        }
-
-        #menu-bars {
-            display: inline-block;
-            margin: 0px auto;
-            padding-top: 13px;
-            font-size: 45px;
-            color: #fff;
-        }
-
-        #first-nav>ul>li:last-child {
-            display: none;
-        }
-    }
-
-    @media (max-width: 576px) {
-        #menu-bars {
-            margin: 0px auto;
-            padding-top: 13px;
-            font-size: 45px;
-            color: #fff;
-        }
-
-        #first-nav>ul>img {
-            width: 170px;
-            margin-left: 10px !important;
-        }
-
-        #search>button.filled {
-            display: none;
-        }
-
-        body>main>section:nth-child(2)>div>h1 {
-            font-size: 60px;
-        }
-
-        #first-nav>ul>li:last-child {
-            display: none;
-        }
-
-        #cta {
-            display: flex;
-            flex-direction: column;
-        }
-
-        #cta>button:nth-child(2) {
-            display: none;
-        }
-
-        #second-nav-section {
-            display: none !important;
-        }
-    }
-
-    #slider-container {
-        padding: 0px !important;
-    }
-
-    .yellow-line {
-        display: block;
-        width: 100px;
-        height: 4px;
-        background-color: #00ff00;
-        margin-left: 10px;
-        margin-top: 10px;
-        margin-bottom: 0px;
-    }
-
-    @media screen and (max-width: 800px) {
-        .yellow-line {
-            margin-left: calc(50vw - 50%) !important;
-        }
-    }
-
-    footer {
-        position: relative;
-        z-index: 30 !important;
-    }
-
-    #footer1 {
-        z-index: 10;
-        height: 400px;
-        background: url("../img/footer2.png") no-repeat;
-        background-size: cover;
-        background-position: top;
-    }
-
-    footer.container-fluid {
-        border-top: 10px solid #C85688;
-        overflow: hidden;
-        text-align: left;
-        margin: 0px;
-        padding: 0px !important;
-        background: #160c0c;
-        min-height: 350px;
-    }
-
-    footer.container-fluid h3 {
-        margin: 10px auto;
-        margin: 30px 0px;
-        font-family: "Open Sans", sans-serif;
-        font-size: 20px;
-        color: #fff;
-        font-weight: normal;
-        text-decoration: underline;
-    }
-
-    footer.container-fluid ul {
-        padding: 0px;
-    }
-
-    footer.container-fluid ul>li {
-        list-style: none;
-        margin: 0px;
-        padding: 0px;
-        line-height: 110%;
-    }
-
-    footer.container-fluid ul>li a {
-        text-decoration: none;
-        color: #fff;
-        font-size: 12px;
-        letter-spacing: 2px;
-        font-weight: normal;
-        font-family: "Open Sans", sans-serif;
-        text-transform: uppercase;
-    }
-
-    footer.container-fluid ul>li a:hover {
-        color: #F68B1F;
-        text-decoration: underline;
-    }
-
     #fine-print {
         text-align: center;
         margin: 10px auto;

+ 2 - 26
page-template/page-journal.php

@@ -26,8 +26,6 @@ get_header(); ?>
         CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
         CURLOPT_CUSTOMREQUEST => 'POST',
         CURLOPT_POSTFIELDS => '{
-            "employee_id" : " ",
-            "year" : " ",
             "auth_token" : "' . $auth_token . '",
             "user_login_id" : "' . $client_id . '"
         }',
@@ -40,28 +38,6 @@ get_header(); ?>
     curl_close($curl);
     $response = json_decode($response, true);
 
-
-    // Decode the JSON data
-    $data = json_decode($data, true);
-
-    // Array to store unique paper titles
-    $uniquePaperTitles = [];
-
-    // Iterate over the data and extract unique paper titles
-    foreach ($response as $entry) {
-        foreach ($entry['JournalList'] as $journal) {
-            $paperTitle = $journal['PaperTitle'];
-            if (!in_array($paperTitle, $uniquePaperTitles)) {
-                $uniquePaperTitles[] = $paperTitle;
-            }
-        }
-    }
-
-    // Output the unique paper titles
-    foreach ($uniquePaperTitles as $title) {
-        echo $title . "\n";
-    }
-
 ?>
 
     <main id="main" class="site-main" role="main">
@@ -134,8 +110,8 @@ get_header(); ?>
                                     echo "<h2 class='paper-title'>{$journal['PaperTitle']}</h2>";
                                     echo "</a>";
                                     echo "<p class='paper-tags'>";
-                                    $journalKeyword = explode(',', $journal['Keyword']);
-                                    foreach ($journalKeyword as $keyword) {
+                                    // $journalKeyword = explode(',', $journal['Keyword']);
+                                    foreach ($journal['KeyWords'] as $keyword) {
                                         if ($keyword) {
                                             echo "<span class='tag'>{$keyword}</span>";
                                         }

+ 4 - 4
single-faculty.php

@@ -182,8 +182,8 @@ get_header(); ?>
 										echo "<h2 class='paper-title'>{$journal['PaperTitle']}</h2>";
 										echo "</a>";
 										echo "<p class='paper-tags'>";
-										$journalKeyword = explode(',', $journal['Keyword']);
-										foreach ($journalKeyword as $keyword) {
+										// $journalKeyword = $journal['KeyWords'];
+										foreach ($journal['KeyWords'] as $keyword) {
 											if ($keyword) {
 												echo "<span class='tag'>{$keyword}</span>";
 											}
@@ -224,8 +224,8 @@ get_header(); ?>
 										echo "<h2 class='paper-title'>{$conference['PaperTitle']}</h2>";
 										echo "</a>";
 										echo "<p class='paper-tags'>";
-										$conferenceKeyword = explode(',', $conference['Keyword']);
-										foreach ($conferenceKeyword as $keyword) {
+										// $conferenceKeyword = $conference['KeyWords'];
+										foreach ($conference['KeyWords'] as $keyword) {
 											if ($keyword) {
 												echo "<span class='tag'>{$keyword}</span>";
 											}

Some files were not shown because too many files changed in this diff