single-faculty.php 11 KB

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