single-faculty.php 17 KB

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