single-faculty.php 11 KB

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