single-faculty.php 11 KB

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