single-faculty.php 17 KB

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