single-faculty.php 11 KB

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