single-faculty.php 11 KB

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