single-faculty.php 11 KB

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