single-faculty.php 11 KB

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