single-faculty.php 12 KB

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