single-faculty.php 11 KB

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