single-faculty.php 11 KB

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