single-faculty.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589
  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. $login_id_e = "";
  10. if (function_exists('get_field')) {
  11. $pid = get_post();
  12. if (has_blocks($pid_content)) {
  13. $blocks = parse_blocks($pid->post_content);
  14. foreach ($blocks as $block) {
  15. if ($block["blockName"] == "acf/faculty-member") {
  16. $login_id_e = $block["attrs"]["data"]["login_id"];
  17. }
  18. }
  19. }
  20. }
  21. $url_employeeInfo = 'http://103.109.52.3/webapi/api/EmployeeInfo';
  22. $response_employeeInfo = wp_remote_post(
  23. $url_employeeInfo,
  24. array(
  25. 'body' => array(
  26. 'user_login_id' => 'api_user',
  27. 'login_id' => $login_id_e,
  28. 'auth_token' => 'api_user20230419045143'
  29. )
  30. )
  31. );
  32. $employeeInfo = json_decode(wp_remote_retrieve_body($response_employeeInfo), true);
  33. $url_employeeJournal = 'http://103.109.52.3/webapi/api/EmployeeJournal';
  34. $response_employeeJournal = wp_remote_post(
  35. $response_employeeJournal,
  36. array(
  37. 'body' => array(
  38. 'employee_id' => $login_id_e,
  39. "year" => "",
  40. 'user_login_id' => 'api_user',
  41. 'auth_token' => 'api_user20230419045143'
  42. )
  43. )
  44. );
  45. $employeeJournal = json_decode(wp_remote_retrieve_body($response_employeeJournal), true);
  46. $url_employeeConference = 'http://103.109.52.3/webapi/api/EmployeeConference';
  47. $response_employeeConference = wp_remote_post(
  48. $url_employeeConference,
  49. array(
  50. 'body' => array(
  51. 'employee_id' => $login_id_e,
  52. "year" => "",
  53. 'user_login_id' => 'api_user',
  54. 'auth_token' => 'api_user20230419045143'
  55. )
  56. )
  57. );
  58. $employeeConference = json_decode(wp_remote_retrieve_body($response_employeeConference), true);
  59. ?>
  60. <section class="static-banner">
  61. <div class="static-banner-underlay">
  62. <img src="<?php echo get_the_post_thumbnail_url(); ?>" alt="">
  63. </div>
  64. <div class="static-banner-overlay"></div>
  65. </section>
  66. <main>
  67. <section class="profile-header">
  68. <div class="profile-main">
  69. <div class="container">
  70. <div class="top-row">
  71. <div class="profile-img-container">
  72. <img src="<?php the_field('profile_photo'); ?>" alt="">
  73. </div>
  74. <div class="profile-header-text">
  75. <!-- <h3 class="sub-title">Faculty Profile</h3> -->
  76. <h1 class="profile-name">
  77. <?php echo get_the_title(); ?>
  78. </h1>
  79. <h2 class="profile-des">
  80. <?php the_field('designation'); ?>
  81. </h2>
  82. <?php if (have_rows('contact_details')) : ?>
  83. <?php while (have_rows('contact_details')) : the_row(); ?>
  84. <span class="contact-dets"><?php the_sub_field('contact_info'); ?></span>
  85. <?php
  86. // $sub_field_3 = get_sub_field('sub_field_3');
  87. // do something with $sub_field_3
  88. ?>
  89. <?php endwhile; ?>
  90. <?php endif; ?>
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. </section>
  96. <section class="profile-body primary-c">
  97. <div class="container">
  98. <div class="profile-second-row">
  99. <div class="left-col">
  100. <ul class="profile-choices">
  101. </ul>
  102. </div>
  103. <div class="profile-main-description">
  104. <?php if (have_rows('main_information')) : ?>
  105. <?php while (have_rows('main_information')) : the_row(); ?>
  106. <span class="contact-dets"></span>
  107. <div class="bio desc-block">
  108. <h2 class="m-text"><?php the_sub_field('title'); ?></h2>
  109. <p class="m-text">
  110. <?php the_sub_field('contents'); ?>
  111. </p>
  112. </div>
  113. <?php endwhile; ?>
  114. <?php endif; ?>
  115. <div class="bio desc-block">
  116. <h2 class="m-text">Publication</h2>
  117. <p class="m-text">
  118. <?php
  119. print_r($employeeInfo);
  120. print_r($employeeJournal);
  121. print_r($employeeConference);
  122. ?>
  123. </div>
  124. </div>
  125. </div>
  126. </div>
  127. </section>
  128. </main>
  129. <!-- #main -->
  130. <?php endwhile; // end of the loop.
  131. ?>
  132. <style>
  133. header {
  134. margin: 0px !important;
  135. padding: 0px !important;
  136. height: 350px;
  137. overflow: hidden;
  138. }
  139. main {
  140. min-height: calc(100vh - 400px);
  141. position: relative;
  142. padding: 0px !important;
  143. background: rgb(56, 32, 23);
  144. background: linear-gradient(180deg, rgb(48, 18, 7) 0%, rgb(40, 21, 13) 22%, rgb(5, 0, 6) 100%);
  145. height: 100%;
  146. }
  147. h1 {
  148. font-family: "DM Serif Text", serif;
  149. font-size: 40px !important;
  150. letter-spacing: 2px !important;
  151. line-height: 110%;
  152. color: #fff;
  153. width: 100%;
  154. margin: 20px auto !important;
  155. text-align: left;
  156. }
  157. h2 {
  158. font-family: "DM Serif Text", serif;
  159. font-size: 40px;
  160. line-height: 45px;
  161. color: #ffc3c3;
  162. width: 100%;
  163. margin: 20px auto;
  164. text-align: left;
  165. }
  166. p {
  167. max-width: 1200px;
  168. font-size: 18px;
  169. color: #ffc3c3;
  170. margin: 50px 15px !important;
  171. }
  172. .desc-block ul>li {
  173. list-style: none;
  174. font-size: 16px;
  175. line-height: 20px;
  176. font-size: 18px;
  177. color: #ffc3c3;
  178. }
  179. .static-banner {
  180. position: relative;
  181. }
  182. .static-banner .static-banner-underlay {
  183. position: fixed;
  184. height: 100%;
  185. width: 100%;
  186. top: 0px;
  187. }
  188. .static-banner .static-banner-underlay img {
  189. height: 100%;
  190. width: 100%;
  191. -o-object-fit: cover;
  192. object-fit: cover;
  193. -o-object-position: bottom;
  194. object-position: bottom;
  195. }
  196. .static-banner .static-banner-overlay {
  197. position: fixed;
  198. width: 100%;
  199. height: 100%;
  200. background-color: #0b1419;
  201. opacity: 0.8;
  202. }
  203. .profile-header {
  204. position: absolute;
  205. top: -300px;
  206. width: 100%;
  207. }
  208. .top-row {
  209. display: flex;
  210. flex-direction: row;
  211. margin-top: 50px;
  212. }
  213. @media screen and (max-width: 600px) {
  214. .top-row {
  215. display: flex;
  216. flex-direction: column;
  217. justify-content: center;
  218. align-items: center;
  219. margin-top: -10px;
  220. }
  221. }
  222. .profile-img-container {
  223. flex-basis: 200px;
  224. border-radius: 50%;
  225. border: 2px solid #F68B1F;
  226. overflow: hidden;
  227. }
  228. .profile-img-container img {
  229. height: 100%;
  230. width: 100%;
  231. -o-object-position: top;
  232. object-position: top;
  233. -o-object-fit: cover;
  234. object-fit: cover;
  235. }
  236. @media screen and (max-width: 600px) {
  237. .profile-img-container {
  238. flex-basis: 100px;
  239. width: 100px !important;
  240. height: 100px !important;
  241. border-radius: 50%;
  242. border: 2px solid #F68B1F;
  243. overflow: hidden;
  244. }
  245. }
  246. .profile-header-text {
  247. margin: 20px 0px 0px 50px !important;
  248. }
  249. @media screen and (max-width: 600px) {
  250. .profile-header-text {
  251. margin: 20px 0px !important;
  252. }
  253. }
  254. .profile-header-text h1 {
  255. font-size: 40px !important;
  256. margin: 5px 0px !important;
  257. }
  258. .profile-header-text h2 {
  259. font-size: 20px !important;
  260. line-height: 24px !important;
  261. color: #fff;
  262. letter-spacing: 2px;
  263. font-weight: normal;
  264. margin: 5px 0px !important;
  265. }
  266. .profile-header-text .contact-dets {
  267. display: inline-block;
  268. font-size: 12px;
  269. margin-top: 15px !important;
  270. margin-right: 20px !important;
  271. font-weight: lighter;
  272. color: #fff;
  273. letter-spacing: 2px;
  274. }
  275. .profile-header-text h3 {
  276. font-size: 14px !important;
  277. text-transform: uppercase;
  278. text-decoration: none !important;
  279. font-family: "Open Sans", sans-serif;
  280. letter-spacing: 2px;
  281. text-align: center !important;
  282. font-weight: normal;
  283. margin: 5px 0px 0px 0px !important;
  284. text-align: left !important;
  285. }
  286. @media screen and (max-width: 700px) {
  287. .profile-header-text {
  288. text-align: center;
  289. }
  290. .profile-header-text h1 {
  291. font-size: 20px !important;
  292. margin: 5px 0px 0px 0px !important;
  293. text-align: center;
  294. }
  295. .profile-header-text h2 {
  296. font-size: 14px !important;
  297. line-height: 16px !important;
  298. color: #fff;
  299. letter-spacing: 2px;
  300. font-weight: normal;
  301. margin: 5px 0px 10px 0px !important;
  302. text-align: center;
  303. }
  304. .profile-header-text h3 {
  305. font-size: 14px !important;
  306. text-transform: uppercase;
  307. text-decoration: none !important;
  308. font-family: "Open Sans", sans-serif;
  309. letter-spacing: 2px;
  310. text-align: center !important;
  311. font-weight: normal;
  312. margin: 5px 0px 0px 0px !important;
  313. text-align: center;
  314. }
  315. .profile-header-text .contact-dets {
  316. display: block;
  317. font-size: 12px;
  318. margin-top: 5px !important;
  319. font-weight: lighter;
  320. color: #fff;
  321. letter-spacing: 1px;
  322. }
  323. }
  324. .profile-second-row {
  325. display: flex;
  326. flex-direction: row;
  327. justify-content: space-between;
  328. }
  329. .left-col {
  330. margin-right: 30px;
  331. width: 400px;
  332. }
  333. @media screen and (max-width: 650px) {
  334. .left-col {
  335. display: none;
  336. }
  337. }
  338. ul.profile-choices>li {
  339. list-style: none;
  340. border-radius: 5px;
  341. overflow: hidden;
  342. height: 50px;
  343. }
  344. ul.profile-choices>li a {
  345. padding: 5px 10px;
  346. font-size: 20px;
  347. line-height: 40px;
  348. font-weight: lighter;
  349. color: #fff;
  350. display: flex;
  351. flex-direction: row;
  352. justify-content: space-between;
  353. transition-duration: 0.5s;
  354. height: 50px !important;
  355. }
  356. ul.profile-choices>li a:after {
  357. content: "chevron_right";
  358. font-family: "Material Icons";
  359. font-size: 20px;
  360. margin-right: 10px;
  361. }
  362. ul.profile-choices>li a:hover {
  363. color: #000;
  364. text-decoration: none;
  365. background-color: rgba(255, 255, 255, 0.2039215686);
  366. }
  367. .pickr {
  368. display: inline-block;
  369. margin-right: 6px !important;
  370. }
  371. .profile-des {
  372. font-family: "Open Sans", sans-serif;
  373. font-size: 25px;
  374. font-weight: normal;
  375. margin: 5px 0px;
  376. color: #fff;
  377. }
  378. details {
  379. margin-left: 0px !important;
  380. }
  381. .accordions {
  382. margin-top: 100px;
  383. }
  384. .sub-title {
  385. font-family: "Open Sans", sans-serif !important;
  386. font-size: 14px;
  387. letter-spacing: 5px;
  388. }
  389. b {
  390. font-weight: 500 !important;
  391. font-size: 22px !important;
  392. }
  393. i {
  394. font-size: 14px;
  395. margin-bottom: 130px !important;
  396. border-bottom: 1px solid #fff;
  397. }
  398. ul {
  399. margin-top: 20px !important;
  400. margin-bottom: 50px !important;
  401. }
  402. ul>li {
  403. list-style: none;
  404. font-size: 16px;
  405. line-height: 20px;
  406. }
  407. h2.m-text {
  408. font-size: 30px;
  409. margin-left: 0px;
  410. font-weight: normal;
  411. }
  412. .desc-block {
  413. opacity: 1;
  414. transition-duration: 0.4s;
  415. overflow: none;
  416. }
  417. .desc-block-hidden {
  418. display: none;
  419. }
  420. .desc-active {
  421. text-decoration: none;
  422. background-color: rgba(255, 255, 255, 0.2039215686);
  423. }
  424. .desc-active a {
  425. color: #000;
  426. }
  427. ul.m-text {
  428. margin-top: 10px !important;
  429. }
  430. /* The Overlay (background) */
  431. .overlay {
  432. /* Height & width depends on how you want to reveal the overlay (see JS below) */
  433. height: 0%;
  434. width: 100%;
  435. position: fixed;
  436. /* Stay in place */
  437. z-index: 1100;
  438. /* Sit on top */
  439. left: 0;
  440. top: 0;
  441. background-color: rgb(0, 0, 0);
  442. /* Black fallback color */
  443. background-color: rgba(0, 0, 0, 0.9);
  444. /* Black w/opacity */
  445. overflow-x: hidden;
  446. /* Disable horizontal scroll */
  447. transition: 0.5s;
  448. /* 0.5 second transition effect to slide in or slide down the overlay (height or width, depending on reveal) */
  449. }
  450. /* Position the content inside the overlay */
  451. .overlay-content {
  452. position: relative;
  453. height: 100%;
  454. top: 25%;
  455. /* 25% from the top */
  456. width: 100%;
  457. /* 100% width */
  458. text-align: center;
  459. /* Centered text/links */
  460. margin-top: 30px;
  461. /* 30px top margin to avoid conflict with the close button on smaller screens */
  462. }
  463. /* The navigation links inside the overlay */
  464. .overlay a {
  465. padding: 8px;
  466. text-decoration: none;
  467. font-size: 18px;
  468. color: white;
  469. display: block;
  470. /* Display block instead of inline */
  471. transition: 0.3s;
  472. /* Transition effects on hover (color) */
  473. }
  474. .overlay h1 {
  475. color: white;
  476. font-size: 20px;
  477. font-weight: lighter;
  478. margin-bottom: 10px;
  479. text-decoration: underline;
  480. }
  481. /* When you mouse over the navigation links, change their color */
  482. .overlay a:hover,
  483. .overlay a:focus {
  484. color: #f1f1f1;
  485. }
  486. /* Position the close button (top right corner) */
  487. .overlay .closebtn {
  488. position: absolute;
  489. top: 20px;
  490. right: 45px;
  491. font-size: 60px;
  492. }
  493. </style>
  494. <?php get_footer(); ?>