single-faculty.php 11 KB

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