single-faculty.php 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759
  1. <?php
  2. /**
  3. * The template for displaying all single faculty posts
  4. *
  5. * @package UIU_CSE
  6. */
  7. get_header(); ?>
  8. <?php while (have_posts()) : the_post();
  9. $auth_token = get_field('auth_token', 'option');
  10. $client_id = get_field('client_id', 'option');
  11. $employee_info_api = get_field('employee_info_api', 'option');
  12. $journal_api = get_field('journal_api', 'option');
  13. $conference_api = get_field('conference_api', 'option');
  14. $login_id_e = "";
  15. if (function_exists('get_field')) {
  16. $pid_content = get_post();
  17. if (has_blocks($pid_content)) {
  18. $blocks = parse_blocks($pid_content->post_content);
  19. foreach ($blocks as $block) {
  20. if ($block["blockName"] == "acf/faculty-member") {
  21. $login_id_e = $block["attrs"]["data"]["login_id"];
  22. }
  23. }
  24. }
  25. }
  26. $response_employeeInfo = wp_remote_post(
  27. $employee_info_api,
  28. array(
  29. 'body' => array(
  30. 'user_login_id' => $client_id,
  31. 'login_id' => $login_id_e,
  32. 'auth_token' => $auth_token
  33. )
  34. )
  35. );
  36. $employeeInfo = json_decode(wp_remote_retrieve_body($response_employeeInfo), true);
  37. $response_employeeJournal = wp_remote_post(
  38. $journal_api,
  39. array(
  40. 'body' => array(
  41. 'employee_id' => $login_id_e,
  42. "year" => "",
  43. 'user_login_id' => $client_id,
  44. 'auth_token' => $auth_token
  45. // 'page' => 1,
  46. // 'limit' => 1
  47. )
  48. )
  49. );
  50. $employeeJournal = json_decode(wp_remote_retrieve_body($response_employeeJournal), true);
  51. $response_employeeConference = wp_remote_post(
  52. $conference_api,
  53. array(
  54. 'body' => array(
  55. 'employee_id' => $login_id_e,
  56. "year" => "",
  57. 'user_login_id' => $client_id,
  58. 'auth_token' => $auth_token
  59. // 'page' => 1,
  60. // 'limit' => 1
  61. )
  62. )
  63. );
  64. $employeeConference = json_decode(wp_remote_retrieve_body($response_employeeConference), true);
  65. ?>
  66. <section class="static-banner">
  67. <div class="static-banner-underlay">
  68. <img src="<?php echo get_the_post_thumbnail_url(); ?>" alt="">
  69. </div>
  70. <div class="static-banner-overlay"></div>
  71. </section>
  72. <main>
  73. <section class="profile-header">
  74. <div class="profile-main">
  75. <div class="container">
  76. <div class="top-row">
  77. <div class="profile-img-container">
  78. <img src="<?php the_field('profile_photo'); ?>" alt="">
  79. </div>
  80. <div class="profile-header-text">
  81. <!-- <h3 class="sub-title">Faculty profile</h3> -->
  82. <h1 class="profile-name">
  83. <?php echo $employeeInfo[0]['Title'];
  84. echo " " . $employeeInfo[0]['FullName'];
  85. ?>
  86. <!-- <span class="degree"><?php //if ($employeeInfo[0]['Title'] == "Dr.") {
  87. //echo ', PhD';}
  88. //
  89. ?>
  90. </span> -->
  91. </h1>
  92. <h2 class="profile-des">
  93. <?php echo $employeeInfo[0]['Designation'];
  94. echo ", " . $employeeInfo[0]['Office'];
  95. ?>
  96. </h2>
  97. <span class="contact-dets"><?php echo "ROOM: " . $employeeInfo[0]['Room']; ?></span>
  98. <span class="contact-dets"><?php echo "PABX: " . $employeeInfo[0]['PABX']; ?></span>
  99. <br />
  100. <span class="contact-dets"><?php echo $employeeInfo[0]['Phone']; ?></span>
  101. <span class="contact-dets"><?php echo $employeeInfo[0]['Email']; ?></span>
  102. <?php if (have_rows('contact_details')) : ?>
  103. <?php while (have_rows('contact_details')) : the_row(); ?>
  104. <span class="contact-dets"><?php the_sub_field('contact_info'); ?></span>
  105. <?php endwhile; ?>
  106. <?php endif; ?>
  107. </div>
  108. </div>
  109. </div>
  110. </div>
  111. </section>
  112. <section class="profile-body primary-c">
  113. <div class="container">
  114. <div class="profile-second-row">
  115. <div class="left-col">
  116. <ul class="profile-choices">
  117. </ul>
  118. </div>
  119. <div class="profile-main-description">
  120. <?php if (have_rows('main_information')) : ?>
  121. <?php while (have_rows('main_information')) : the_row(); ?>
  122. <span class="contact-dets"></span>
  123. <div class="bio desc-block">
  124. <h2 class="m-text"><?php the_sub_field('title'); ?></h2>
  125. <p class="m-text">
  126. <?php the_sub_field('contents'); ?>
  127. </p>
  128. </div>
  129. <?php endwhile; ?>
  130. <?php endif; ?>
  131. <?php if ($employeeJournal || $employeeConference) : ?>
  132. <div class="bio desc-block">
  133. <h2 class="m-text">Publication</h2>
  134. <p class="m-text">
  135. <h3 class="paper-type">Journal Papers</h3>
  136. <?php
  137. foreach ($employeeJournal as $item) {
  138. // Access individual elements of each response
  139. echo "<div class='paper-details'>";
  140. echo "<span class='paper-year'>{$item['Year']}</span>";
  141. // Iterate over the JournalList array within each item
  142. foreach ($item['JournalList'] as $journal) {
  143. // Access individual elements of each journal
  144. echo "<a href='{$journal['JournalLink']}'>";
  145. echo "<h2 class='paper-title'>{$journal['PaperTitle']}</h2>";
  146. echo "</a>";
  147. echo "<p class='paper-tags'>";
  148. // $journalKeyword = $journal['KeyWords'];
  149. foreach ($journal['KeyWords'] as $keyword) {
  150. if ($keyword) {
  151. echo "<span class='tag'>{$keyword}</span>";
  152. }
  153. }
  154. echo "</p>";
  155. echo "<p class='paper-event'>Publication: {$journal['JournalTitle']}</p>";
  156. echo "<p class='paper-contributors'>";
  157. echo "Author List: ";
  158. // Iterate over the Author array within each journal
  159. foreach ($journal['Author'] as $author) {
  160. // Access individual elements of each author
  161. $authorName = $author['AuthorName'];
  162. // Process or output the values as needed
  163. echo " $authorName,";
  164. }
  165. echo "</p>";
  166. }
  167. echo "</div>";
  168. }
  169. ?>
  170. <h3 class="paper-type">Conference Papers</h3>
  171. <?php
  172. foreach ($employeeConference as $item) {
  173. // Access individual elements of each response
  174. $item_count = "single";
  175. if (count($item['ConferenceList']) > 1) {
  176. $item_count = "multiple";
  177. }
  178. echo "<div class='paper-details {$item_count}'>";
  179. echo "<span class='paper-year'>{$item['Year']}</span>";
  180. // Iterate over the JournalList array within each item
  181. foreach ($item['ConferenceList'] as $conference) {
  182. // Access individual elements of each journal
  183. echo "<a href='{$conference['Link']}'>";
  184. echo "<h2 class='paper-title'>{$conference['PaperTitle']}</h2>";
  185. echo "</a>";
  186. echo "<p class='paper-tags'>";
  187. // $conferenceKeyword = $conference['KeyWords'];
  188. foreach ($conference['KeyWords'] as $keyword) {
  189. if ($keyword) {
  190. echo "<span class='tag'>{$keyword}</span>";
  191. }
  192. }
  193. echo "</p>";
  194. echo "<p class='paper-event'>Conference: {$conference['ConferenceName']}</p>";
  195. echo "<p class='paper-contributors'>";
  196. echo "Author List: ";
  197. // Iterate over the Author array within each journal
  198. foreach ($conference['Author'] as $author) {
  199. // Process or output the values as needed
  200. echo " {$author['AuthorName']},";
  201. }
  202. echo "</p>";
  203. }
  204. echo "</div>";
  205. }
  206. ?>
  207. </div>
  208. <?php endif; ?>
  209. </div>
  210. </div>
  211. </div>
  212. </section>
  213. </main>
  214. <!-- #main -->
  215. <?php endwhile; // end of the loop.
  216. ?>
  217. <div class="pickers">
  218. <span class="color-picker"></span>
  219. <span class="color-picker2"></span>
  220. <span class="color-picker3"></span>
  221. <span class="color-picker4"></span>
  222. </div>
  223. <style>
  224. main {
  225. margin-top: 390px;
  226. min-height: calc(100vh - 400px);
  227. position: relative;
  228. padding: 0px !important;
  229. background: rgb(56, 32, 23);
  230. background: linear-gradient(180deg, rgb(48, 18, 7) 0%, rgb(40, 21, 13) 22%, rgb(5, 0, 6) 100%);
  231. height: 100%;
  232. }
  233. h1 {
  234. font-family: "DM Serif Text", serif;
  235. font-size: 40px !important;
  236. letter-spacing: 2px !important;
  237. line-height: 110%;
  238. color: #fff;
  239. width: 100%;
  240. margin: 20px auto !important;
  241. text-align: left;
  242. }
  243. h2 {
  244. font-family: "DM Serif Text", serif;
  245. font-size: 40px;
  246. line-height: 45px;
  247. color: #ffc3c3;
  248. width: 100%;
  249. margin: 20px auto;
  250. text-align: left;
  251. }
  252. p {
  253. max-width: 1200px;
  254. font-size: 18px;
  255. color: #ffc3c3;
  256. /* margin: 50px 15px !important; */
  257. }
  258. .desc-block ul>li {
  259. list-style: none;
  260. font-size: 16px;
  261. line-height: 20px;
  262. font-size: 18px;
  263. color: #ffc3c3;
  264. }
  265. .static-banner {
  266. position: relative;
  267. }
  268. .static-banner .static-banner-underlay {
  269. position: fixed;
  270. height: 100%;
  271. width: 100%;
  272. top: 0px;
  273. }
  274. .static-banner .static-banner-underlay img {
  275. height: 100%;
  276. width: 100%;
  277. -o-object-fit: cover;
  278. object-fit: cover;
  279. -o-object-position: bottom;
  280. object-position: bottom;
  281. }
  282. .static-banner .static-banner-overlay {
  283. position: fixed;
  284. width: 100%;
  285. height: 100%;
  286. background-color: #0b1419;
  287. opacity: 0.8;
  288. }
  289. .profile-header {
  290. position: absolute;
  291. top: -300px;
  292. width: 100%;
  293. }
  294. .top-row {
  295. display: flex;
  296. flex-direction: row;
  297. margin-top: 50px;
  298. }
  299. @media screen and (max-width: 600px) {
  300. .top-row {
  301. display: flex;
  302. flex-direction: column;
  303. justify-content: center;
  304. align-items: center;
  305. margin-top: -10px;
  306. }
  307. }
  308. .profile-img-container {
  309. flex-basis: 200px;
  310. height: 200px;
  311. border-radius: 50%;
  312. border: 2px solid #F68B1F;
  313. overflow: hidden;
  314. }
  315. .profile-img-container img {
  316. height: 100%;
  317. width: 100%;
  318. -o-object-position: top;
  319. object-position: top;
  320. -o-object-fit: cover;
  321. object-fit: cover;
  322. }
  323. .profile-body td,
  324. .profile-body th {
  325. color: antiquewhite;
  326. }
  327. section.profile-body .container {
  328. padding: 100px 30px;
  329. }
  330. @media screen and (max-width: 600px) {
  331. .profile-img-container {
  332. flex-basis: 100px;
  333. width: 100px !important;
  334. height: 100px !important;
  335. border-radius: 50%;
  336. border: 2px solid #F68B1F;
  337. overflow: hidden;
  338. }
  339. }
  340. .profile-header-text {
  341. margin: 20px 0px 0px 50px !important;
  342. }
  343. @media screen and (max-width: 600px) {
  344. .profile-header-text {
  345. margin: 20px 0px !important;
  346. }
  347. }
  348. .profile-header-text h1 {
  349. font-size: 40px !important;
  350. margin: 5px 0px !important;
  351. }
  352. .profile-header-text h2 {
  353. font-size: 20px !important;
  354. line-height: 24px !important;
  355. color: #fff;
  356. letter-spacing: 2px;
  357. font-weight: normal;
  358. margin: 5px 0px !important;
  359. }
  360. .profile-header-text .contact-dets {
  361. display: inline-block;
  362. font-size: 12px;
  363. margin-top: 15px !important;
  364. margin-right: 20px !important;
  365. font-weight: lighter;
  366. color: #fff;
  367. letter-spacing: 2px;
  368. }
  369. .profile-header-text h3 {
  370. font-size: 14px !important;
  371. text-transform: uppercase;
  372. text-decoration: none !important;
  373. font-family: "Open Sans", sans-serif;
  374. letter-spacing: 2px;
  375. text-align: center !important;
  376. font-weight: normal;
  377. margin: 5px 0px 0px 0px !important;
  378. text-align: left !important;
  379. }
  380. @media screen and (max-width: 700px) {
  381. .profile-header-text {
  382. text-align: center;
  383. }
  384. .profile-header-text h1 {
  385. font-size: 20px !important;
  386. margin: 5px 0px 0px 0px !important;
  387. text-align: center;
  388. }
  389. .profile-header-text h2 {
  390. font-size: 14px !important;
  391. line-height: 16px !important;
  392. color: #fff;
  393. letter-spacing: 2px;
  394. font-weight: normal;
  395. margin: 5px 0px 10px 0px !important;
  396. text-align: center;
  397. }
  398. .profile-header-text h3 {
  399. font-size: 14px !important;
  400. text-transform: uppercase;
  401. text-decoration: none !important;
  402. font-family: "Open Sans", sans-serif;
  403. letter-spacing: 2px;
  404. text-align: center !important;
  405. font-weight: normal;
  406. margin: 5px 0px 0px 0px !important;
  407. text-align: center;
  408. }
  409. .profile-header-text .contact-dets {
  410. display: block;
  411. font-size: 12px;
  412. margin-top: 5px !important;
  413. font-weight: lighter;
  414. color: #fff;
  415. letter-spacing: 1px;
  416. }
  417. }
  418. .profile-second-row {
  419. display: flex;
  420. flex-direction: row;
  421. justify-content: space-between;
  422. }
  423. .left-col {
  424. margin-right: 30px;
  425. width: 400px;
  426. }
  427. @media screen and (max-width: 650px) {
  428. .left-col {
  429. display: none;
  430. }
  431. }
  432. ul.profile-choices>li {
  433. list-style: none;
  434. border-radius: 5px;
  435. overflow: hidden;
  436. height: 50px;
  437. }
  438. ul.profile-choices>li a {
  439. padding: 5px 10px;
  440. font-size: 20px;
  441. line-height: 40px;
  442. font-weight: lighter;
  443. color: #fff;
  444. display: flex;
  445. flex-direction: row;
  446. justify-content: space-between;
  447. transition-duration: 0.5s;
  448. height: 50px !important;
  449. }
  450. ul.profile-choices>li a:after {
  451. content: "chevron_right";
  452. font-family: "Material Icons";
  453. font-size: 20px;
  454. margin-right: 10px;
  455. }
  456. ul.profile-choices>li a:hover {
  457. color: #000;
  458. text-decoration: none;
  459. background-color: rgba(255, 255, 255, 0.2039215686);
  460. }
  461. .pickr {
  462. display: inline-block;
  463. margin-right: 6px !important;
  464. }
  465. .profile-des {
  466. font-family: "Open Sans", sans-serif;
  467. font-size: 25px;
  468. font-weight: normal;
  469. margin: 5px 0px;
  470. color: #fff;
  471. }
  472. details {
  473. margin-left: 0px !important;
  474. }
  475. .accordions {
  476. margin-top: 100px;
  477. }
  478. .sub-title {
  479. font-family: "Open Sans", sans-serif !important;
  480. font-size: 14px;
  481. letter-spacing: 5px;
  482. }
  483. b {
  484. font-weight: 500 !important;
  485. font-size: 22px !important;
  486. }
  487. i {
  488. font-size: 14px;
  489. margin-bottom: 130px !important;
  490. border-bottom: 1px solid #fff;
  491. }
  492. /* ul {
  493. margin-top: 20px !important;
  494. margin-bottom: 50px !important;
  495. } */
  496. ul>li {
  497. list-style: none;
  498. font-size: 16px;
  499. line-height: 20px;
  500. }
  501. h2.m-text {
  502. font-size: 30px;
  503. margin-left: 0px;
  504. font-weight: normal;
  505. }
  506. .desc-block {
  507. opacity: 1;
  508. transition-duration: 0.4s;
  509. overflow: none;
  510. }
  511. .desc-block-hidden {
  512. display: none;
  513. }
  514. .desc-active {
  515. text-decoration: none;
  516. background-color: rgba(255, 255, 255, 0.2039215686);
  517. }
  518. .desc-active a {
  519. color: #000;
  520. }
  521. ul.m-text {
  522. margin-top: 10px !important;
  523. }
  524. /* The Overlay (background) */
  525. .overlay {
  526. /* Height & width depends on how you want to reveal the overlay (see JS below) */
  527. height: 0%;
  528. width: 100%;
  529. position: fixed;
  530. /* Stay in place */
  531. z-index: 1100;
  532. /* Sit on top */
  533. left: 0;
  534. top: 0;
  535. background-color: rgb(0, 0, 0);
  536. /* Black fallback color */
  537. background-color: rgba(0, 0, 0, 0.9);
  538. /* Black w/opacity */
  539. overflow-x: hidden;
  540. /* Disable horizontal scroll */
  541. transition: 0.5s;
  542. /* 0.5 second transition effect to slide in or slide down the overlay (height or width, depending on reveal) */
  543. }
  544. /* Position the content inside the overlay */
  545. .overlay-content {
  546. position: relative;
  547. height: 100%;
  548. top: 25%;
  549. /* 25% from the top */
  550. width: 100%;
  551. /* 100% width */
  552. text-align: center;
  553. /* Centered text/links */
  554. margin-top: 30px;
  555. /* 30px top margin to avoid conflict with the close button on smaller screens */
  556. }
  557. /* The navigation links inside the overlay */
  558. .overlay a {
  559. padding: 8px;
  560. text-decoration: none;
  561. font-size: 18px;
  562. color: white;
  563. display: block;
  564. /* Display block instead of inline */
  565. transition: 0.3s;
  566. /* Transition effects on hover (color) */
  567. }
  568. .overlay h1 {
  569. color: white;
  570. font-size: 20px;
  571. font-weight: lighter;
  572. margin-bottom: 10px;
  573. text-decoration: underline;
  574. }
  575. /* When you mouse over the navigation links, change their color */
  576. .overlay a:hover,
  577. .overlay a:focus {
  578. color: #f1f1f1;
  579. }
  580. /* Position the close button (top right corner) */
  581. .overlay .closebtn {
  582. position: absolute;
  583. top: 20px;
  584. right: 45px;
  585. font-size: 60px;
  586. }
  587. /* added by rousnay */
  588. .profile-header-text h2 {
  589. margin: 5px 0px 10px !important;
  590. }
  591. .profile-header-text .contact-dets {
  592. margin-top: 0px !important;
  593. margin-right: 10px !important;
  594. }
  595. h3.paper-type {
  596. margin: 40px 0 0;
  597. text-decoration: underline;
  598. color: antiquewhite;
  599. font-family: "DM Serif Text", serif;
  600. letter-spacing: 1px;
  601. font-size: 1.4em;
  602. }
  603. .paper-details {
  604. padding: 30px 0px;
  605. border-bottom: 1px solid rgba(51, 51, 51, 0.1764705882);
  606. }
  607. .paper-details .paper-year {
  608. font-size: 14px;
  609. display: block;
  610. color: antiquewhite;
  611. }
  612. .paper-details a {
  613. text-decoration: none;
  614. }
  615. .paper-details p {
  616. line-height: 1.8em !important;
  617. }
  618. .paper-details .paper-title {
  619. font-size: 18px;
  620. margin: 10px 0px;
  621. font-family: "Open Sans", sans-serif;
  622. line-height: 1.7em;
  623. letter-spacing: 0.5px;
  624. color: antiquewhite;
  625. }
  626. .paper-details .paper-tags {
  627. /* margin: 20px 0px; */
  628. }
  629. .paper-details .paper-tags .tag {
  630. font-size: 14px;
  631. border: 1px solid rgba(17, 124, 247, 0.431372549);
  632. padding: 3px 8px;
  633. border-radius: 10px;
  634. }
  635. .paper-details p {
  636. margin: 5px;
  637. font-size: 14px;
  638. }
  639. .paper-details .paper-contributors {
  640. /* color: #222222; */
  641. }
  642. .paper-details.multiple .paper-contributors {
  643. margin-bottom: 45px;
  644. }
  645. </style>
  646. <?php get_footer(); ?>