single-faculty.php 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748
  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. header {
  220. margin: 0px !important;
  221. padding: 0px !important;
  222. height: 350px;
  223. overflow: hidden;
  224. }
  225. main {
  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. border-radius: 50%;
  311. border: 2px solid #F68B1F;
  312. overflow: hidden;
  313. }
  314. .profile-img-container img {
  315. height: 100%;
  316. width: 100%;
  317. -o-object-position: top;
  318. object-position: top;
  319. -o-object-fit: cover;
  320. object-fit: cover;
  321. }
  322. @media screen and (max-width: 600px) {
  323. .profile-img-container {
  324. flex-basis: 100px;
  325. width: 100px !important;
  326. height: 100px !important;
  327. border-radius: 50%;
  328. border: 2px solid #F68B1F;
  329. overflow: hidden;
  330. }
  331. }
  332. .profile-header-text {
  333. margin: 20px 0px 0px 50px !important;
  334. }
  335. @media screen and (max-width: 600px) {
  336. .profile-header-text {
  337. margin: 20px 0px !important;
  338. }
  339. }
  340. .profile-header-text h1 {
  341. font-size: 40px !important;
  342. margin: 5px 0px !important;
  343. }
  344. .profile-header-text h2 {
  345. font-size: 20px !important;
  346. line-height: 24px !important;
  347. color: #fff;
  348. letter-spacing: 2px;
  349. font-weight: normal;
  350. margin: 5px 0px !important;
  351. }
  352. .profile-header-text .contact-dets {
  353. display: inline-block;
  354. font-size: 12px;
  355. margin-top: 15px !important;
  356. margin-right: 20px !important;
  357. font-weight: lighter;
  358. color: #fff;
  359. letter-spacing: 2px;
  360. }
  361. .profile-header-text h3 {
  362. font-size: 14px !important;
  363. text-transform: uppercase;
  364. text-decoration: none !important;
  365. font-family: "Open Sans", sans-serif;
  366. letter-spacing: 2px;
  367. text-align: center !important;
  368. font-weight: normal;
  369. margin: 5px 0px 0px 0px !important;
  370. text-align: left !important;
  371. }
  372. @media screen and (max-width: 700px) {
  373. .profile-header-text {
  374. text-align: center;
  375. }
  376. .profile-header-text h1 {
  377. font-size: 20px !important;
  378. margin: 5px 0px 0px 0px !important;
  379. text-align: center;
  380. }
  381. .profile-header-text h2 {
  382. font-size: 14px !important;
  383. line-height: 16px !important;
  384. color: #fff;
  385. letter-spacing: 2px;
  386. font-weight: normal;
  387. margin: 5px 0px 10px 0px !important;
  388. text-align: center;
  389. }
  390. .profile-header-text h3 {
  391. font-size: 14px !important;
  392. text-transform: uppercase;
  393. text-decoration: none !important;
  394. font-family: "Open Sans", sans-serif;
  395. letter-spacing: 2px;
  396. text-align: center !important;
  397. font-weight: normal;
  398. margin: 5px 0px 0px 0px !important;
  399. text-align: center;
  400. }
  401. .profile-header-text .contact-dets {
  402. display: block;
  403. font-size: 12px;
  404. margin-top: 5px !important;
  405. font-weight: lighter;
  406. color: #fff;
  407. letter-spacing: 1px;
  408. }
  409. }
  410. .profile-second-row {
  411. display: flex;
  412. flex-direction: row;
  413. justify-content: space-between;
  414. }
  415. .left-col {
  416. margin-right: 30px;
  417. width: 400px;
  418. }
  419. @media screen and (max-width: 650px) {
  420. .left-col {
  421. display: none;
  422. }
  423. }
  424. ul.profile-choices>li {
  425. list-style: none;
  426. border-radius: 5px;
  427. overflow: hidden;
  428. height: 50px;
  429. }
  430. ul.profile-choices>li a {
  431. padding: 5px 10px;
  432. font-size: 20px;
  433. line-height: 40px;
  434. font-weight: lighter;
  435. color: #fff;
  436. display: flex;
  437. flex-direction: row;
  438. justify-content: space-between;
  439. transition-duration: 0.5s;
  440. height: 50px !important;
  441. }
  442. ul.profile-choices>li a:after {
  443. content: "chevron_right";
  444. font-family: "Material Icons";
  445. font-size: 20px;
  446. margin-right: 10px;
  447. }
  448. ul.profile-choices>li a:hover {
  449. color: #000;
  450. text-decoration: none;
  451. background-color: rgba(255, 255, 255, 0.2039215686);
  452. }
  453. .pickr {
  454. display: inline-block;
  455. margin-right: 6px !important;
  456. }
  457. .profile-des {
  458. font-family: "Open Sans", sans-serif;
  459. font-size: 25px;
  460. font-weight: normal;
  461. margin: 5px 0px;
  462. color: #fff;
  463. }
  464. details {
  465. margin-left: 0px !important;
  466. }
  467. .accordions {
  468. margin-top: 100px;
  469. }
  470. .sub-title {
  471. font-family: "Open Sans", sans-serif !important;
  472. font-size: 14px;
  473. letter-spacing: 5px;
  474. }
  475. b {
  476. font-weight: 500 !important;
  477. font-size: 22px !important;
  478. }
  479. i {
  480. font-size: 14px;
  481. margin-bottom: 130px !important;
  482. border-bottom: 1px solid #fff;
  483. }
  484. ul {
  485. margin-top: 20px !important;
  486. margin-bottom: 50px !important;
  487. }
  488. ul>li {
  489. list-style: none;
  490. font-size: 16px;
  491. line-height: 20px;
  492. }
  493. h2.m-text {
  494. font-size: 30px;
  495. margin-left: 0px;
  496. font-weight: normal;
  497. }
  498. .desc-block {
  499. opacity: 1;
  500. transition-duration: 0.4s;
  501. overflow: none;
  502. }
  503. .desc-block-hidden {
  504. display: none;
  505. }
  506. .desc-active {
  507. text-decoration: none;
  508. background-color: rgba(255, 255, 255, 0.2039215686);
  509. }
  510. .desc-active a {
  511. color: #000;
  512. }
  513. ul.m-text {
  514. margin-top: 10px !important;
  515. }
  516. /* The Overlay (background) */
  517. .overlay {
  518. /* Height & width depends on how you want to reveal the overlay (see JS below) */
  519. height: 0%;
  520. width: 100%;
  521. position: fixed;
  522. /* Stay in place */
  523. z-index: 1100;
  524. /* Sit on top */
  525. left: 0;
  526. top: 0;
  527. background-color: rgb(0, 0, 0);
  528. /* Black fallback color */
  529. background-color: rgba(0, 0, 0, 0.9);
  530. /* Black w/opacity */
  531. overflow-x: hidden;
  532. /* Disable horizontal scroll */
  533. transition: 0.5s;
  534. /* 0.5 second transition effect to slide in or slide down the overlay (height or width, depending on reveal) */
  535. }
  536. /* Position the content inside the overlay */
  537. .overlay-content {
  538. position: relative;
  539. height: 100%;
  540. top: 25%;
  541. /* 25% from the top */
  542. width: 100%;
  543. /* 100% width */
  544. text-align: center;
  545. /* Centered text/links */
  546. margin-top: 30px;
  547. /* 30px top margin to avoid conflict with the close button on smaller screens */
  548. }
  549. /* The navigation links inside the overlay */
  550. .overlay a {
  551. padding: 8px;
  552. text-decoration: none;
  553. font-size: 18px;
  554. color: white;
  555. display: block;
  556. /* Display block instead of inline */
  557. transition: 0.3s;
  558. /* Transition effects on hover (color) */
  559. }
  560. .overlay h1 {
  561. color: white;
  562. font-size: 20px;
  563. font-weight: lighter;
  564. margin-bottom: 10px;
  565. text-decoration: underline;
  566. }
  567. /* When you mouse over the navigation links, change their color */
  568. .overlay a:hover,
  569. .overlay a:focus {
  570. color: #f1f1f1;
  571. }
  572. /* Position the close button (top right corner) */
  573. .overlay .closebtn {
  574. position: absolute;
  575. top: 20px;
  576. right: 45px;
  577. font-size: 60px;
  578. }
  579. /* added by rousnay */
  580. .profile-header-text h2 {
  581. margin: 5px 0px 10px !important;
  582. }
  583. .profile-header-text .contact-dets {
  584. margin-top: 0px !important;
  585. margin-right: 10px !important;
  586. }
  587. h3.paper-type {
  588. margin: 40px 0 0;
  589. text-decoration: underline;
  590. color: antiquewhite;
  591. font-family: "DM Serif Text", serif;
  592. letter-spacing: 1px;
  593. font-size: 1.4em;
  594. }
  595. .paper-details {
  596. padding: 30px 0px;
  597. border-bottom: 1px solid rgba(51, 51, 51, 0.1764705882);
  598. }
  599. .paper-details .paper-year {
  600. font-size: 14px;
  601. display: block;
  602. color: antiquewhite;
  603. }
  604. .paper-details a {
  605. text-decoration: none;
  606. }
  607. .paper-details p {
  608. line-height: 1.8em !important;
  609. }
  610. .paper-details .paper-title {
  611. font-size: 18px;
  612. margin: 10px 0px;
  613. font-family: "Open Sans", sans-serif;
  614. line-height: 1.7em;
  615. letter-spacing: 0.5px;
  616. color: antiquewhite;
  617. }
  618. .paper-details .paper-tags {
  619. /* margin: 20px 0px; */
  620. }
  621. .paper-details .paper-tags .tag {
  622. font-size: 14px;
  623. border: 1px solid rgba(17, 124, 247, 0.431372549);
  624. padding: 3px 8px;
  625. border-radius: 10px;
  626. }
  627. .paper-details p {
  628. margin: 5px;
  629. font-size: 14px;
  630. }
  631. .paper-details .paper-contributors {
  632. /* color: #222222; */
  633. }
  634. .paper-details.multiple .paper-contributors {
  635. margin-bottom: 45px;
  636. }
  637. </style>
  638. <?php get_footer(); ?>