123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746 |
- <?php
- /**
- * The template for displaying all single faculty posts
- *
- * @package UIU_CSE
- */
- get_header(); ?>
- <?php while (have_posts()) : the_post();
- $auth_token = get_field('auth_token', 'option');
- $client_id = get_field('client_id', 'option');
- $employee_info_api = get_field('employee_info_api', 'option');
- $journal_api = get_field('journal_api', 'option');
- $conference_api = get_field('conference_api', 'option');
- $login_id_e = "";
- if (function_exists('get_field')) {
- $pid_content = get_post();
- if (has_blocks($pid_content)) {
- $blocks = parse_blocks($pid_content->post_content);
- foreach ($blocks as $block) {
- if ($block["blockName"] == "acf/faculty-member") {
- $login_id_e = $block["attrs"]["data"]["login_id"];
- }
- }
- }
- }
- $response_employeeInfo = wp_remote_post(
- $employee_info_api,
- array(
- 'body' => array(
- 'user_login_id' => $client_id,
- 'login_id' => $login_id_e,
- 'auth_token' => $auth_token
- )
- )
- );
- $employeeInfo = json_decode(wp_remote_retrieve_body($response_employeeInfo), true);
- $response_employeeJournal = wp_remote_post(
- $journal_api,
- array(
- 'body' => array(
- 'employee_id' => $login_id_e,
- "year" => "",
- 'user_login_id' => $client_id,
- 'auth_token' => $auth_token
- // 'page' => 1,
- // 'limit' => 1
- )
- )
- );
- $employeeJournal = json_decode(wp_remote_retrieve_body($response_employeeJournal), true);
- $response_employeeConference = wp_remote_post(
- $conference_api,
- array(
- 'body' => array(
- 'employee_id' => $login_id_e,
- "year" => "",
- 'user_login_id' => $client_id,
- 'auth_token' => $auth_token
- // 'page' => 1,
- // 'limit' => 1
- )
- )
- );
- $employeeConference = json_decode(wp_remote_retrieve_body($response_employeeConference), true);
- ?>
- <section class="static-banner">
- <div class="static-banner-underlay">
- <img src="<?php echo get_the_post_thumbnail_url(); ?>" alt="">
- </div>
- <div class="static-banner-overlay"></div>
- </section>
- <main>
- <section class="profile-header">
- <div class="profile-main">
- <div class="container">
- <div class="top-row">
- <div class="profile-img-container">
- <img src="<?php the_field('profile_photo'); ?>" alt="">
- </div>
- <div class="profile-header-text">
- <!-- <h3 class="sub-title">Faculty profile</h3> -->
- <h1 class="profile-name">
- <?php echo $employeeInfo[0]['Title'];
- echo " " . $employeeInfo[0]['FullName'];
- ?>
- </h1>
- <h2 class="profile-des">
- <?php echo $employeeInfo[0]['Designation'];
- echo ", " . $employeeInfo[0]['Office'];
- ?>
- </h2>
- <span class="contact-dets"><?php echo "ROOM: " . $employeeInfo[0]['Room']; ?></span>
- <span class="contact-dets"><?php echo "PABX: " . $employeeInfo[0]['PABX']; ?></span>
- <br />
- <span class="contact-dets"><?php echo $employeeInfo[0]['Phone']; ?></span>
- <span class="contact-dets"><?php echo $employeeInfo[0]['Email']; ?></span>
- <?php if (have_rows('contact_details')) : ?>
- <?php while (have_rows('contact_details')) : the_row(); ?>
- <span class="contact-dets"><?php the_sub_field('contact_info'); ?></span>
- <?php endwhile; ?>
- <?php endif; ?>
- </div>
- </div>
- </div>
- </div>
- </section>
- <section class="profile-body primary-c">
- <div class="container">
- <div class="profile-second-row">
- <div class="left-col">
- <ul class="profile-choices">
- </ul>
- </div>
- <div class="profile-main-description">
- <?php if (have_rows('main_information')) : ?>
- <?php while (have_rows('main_information')) : the_row(); ?>
- <span class="contact-dets"></span>
- <div class="bio desc-block">
- <h2 class="m-text"><?php the_sub_field('title'); ?></h2>
- <p class="m-text">
- <?php the_sub_field('contents'); ?>
- </p>
- </div>
- <?php endwhile; ?>
- <?php endif; ?>
- <div class="bio desc-block">
- <h2 class="m-text">Publication</h2>
- <p class="m-text">
- <h3 class="paper-type">Journal Papers</h3>
- <?php
- foreach ($employeeJournal as $item) {
- // Access individual elements of each response
- echo "<div class='paper-details'>";
- echo "<span class='paper-year'>{$item['Year']}</span>";
- // Iterate over the JournalList array within each item
- foreach ($item['JournalList'] as $journal) {
- // Access individual elements of each journal
- echo "<a href='{$journal['JournalLink']}'>";
- echo "<h2 class='paper-title'>{$journal['PaperTitle']}</h2>";
- echo "</a>";
- echo "<p class='paper-tags'>";
- $journalKeyword = explode(',', $journal['Keyword']);
- foreach ($journalKeyword as $keyword) {
- if ($keyword) {
- echo "<span class='tag'>{$keyword}</span>";
- }
- }
- echo "</p>";
- echo "<p class='paper-event'>Publication: {$journal['JournalTitle']}</p>";
- echo "<p class='paper-contributors'>";
- echo "Author List: ";
- // Iterate over the Author array within each journal
- foreach ($journal['Author'] as $author) {
- // Access individual elements of each author
- $authorName = $author['AuthorName'];
- // Process or output the values as needed
- echo " $authorName,";
- }
- echo "</p>";
- }
- echo "</div>";
- }
- ?>
- <h3 class="paper-type">Conference Papers</h3>
- <?php
- foreach ($employeeConference as $item) {
- // Access individual elements of each response
- $item_count = "single";
- if (count($item['ConferenceList']) > 1) {
- $item_count = "multiple";
- }
- echo "<div class='paper-details {$item_count}'>";
- echo "<span class='paper-year'>{$item['Year']}</span>";
- // Iterate over the JournalList array within each item
- foreach ($item['ConferenceList'] as $conference) {
- // Access individual elements of each journal
- echo "<a href='{$conference['Link']}'>";
- echo "<h2 class='paper-title'>{$conference['PaperTitle']}</h2>";
- echo "</a>";
- echo "<p class='paper-tags'>";
- $conferenceKeyword = explode(',', $conference['Keyword']);
- foreach ($conferenceKeyword as $keyword) {
- if ($keyword) {
- echo "<span class='tag'>{$keyword}</span>";
- }
- }
- echo "</p>";
- echo "<p class='paper-event'>Conference: {$conference['ConferenceName']}</p>";
- echo "<p class='paper-contributors'>";
- echo "Author List: ";
- // Iterate over the Author array within each journal
- foreach ($conference['Author'] as $author) {
- // Process or output the values as needed
- echo " {$author['AuthorName']},";
- }
- echo "</p>";
- }
- echo "</div>";
- }
- ?>
- </div>
- </div>
- </div>
- </div>
- </section>
- </main>
- <!-- #main -->
- <?php endwhile; // end of the loop.
- ?>
- <div class="pickers">
- <span class="color-picker"></span>
- <span class="color-picker2"></span>
- <span class="color-picker3"></span>
- <span class="color-picker4"></span>
- </div>
- <style>
- header {
- margin: 0px !important;
- padding: 0px !important;
- height: 350px;
- overflow: hidden;
- }
- main {
- min-height: calc(100vh - 400px);
- position: relative;
- padding: 0px !important;
- background: rgb(56, 32, 23);
- background: linear-gradient(180deg, rgb(48, 18, 7) 0%, rgb(40, 21, 13) 22%, rgb(5, 0, 6) 100%);
- height: 100%;
- }
- h1 {
- font-family: "DM Serif Text", serif;
- font-size: 40px !important;
- letter-spacing: 2px !important;
- line-height: 110%;
- color: #fff;
- width: 100%;
- margin: 20px auto !important;
- text-align: left;
- }
- h2 {
- font-family: "DM Serif Text", serif;
- font-size: 40px;
- line-height: 45px;
- color: #ffc3c3;
- width: 100%;
- margin: 20px auto;
- text-align: left;
- }
- p {
- max-width: 1200px;
- font-size: 18px;
- color: #ffc3c3;
- /* margin: 50px 15px !important; */
- }
- .desc-block ul>li {
- list-style: none;
- font-size: 16px;
- line-height: 20px;
- font-size: 18px;
- color: #ffc3c3;
- }
- .static-banner {
- position: relative;
- }
- .static-banner .static-banner-underlay {
- position: fixed;
- height: 100%;
- width: 100%;
- top: 0px;
- }
- .static-banner .static-banner-underlay img {
- height: 100%;
- width: 100%;
- -o-object-fit: cover;
- object-fit: cover;
- -o-object-position: bottom;
- object-position: bottom;
- }
- .static-banner .static-banner-overlay {
- position: fixed;
- width: 100%;
- height: 100%;
- background-color: #0b1419;
- opacity: 0.8;
- }
- .profile-header {
- position: absolute;
- top: -300px;
- width: 100%;
- }
- .top-row {
- display: flex;
- flex-direction: row;
- margin-top: 50px;
- }
- @media screen and (max-width: 600px) {
- .top-row {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- margin-top: -10px;
- }
- }
- .profile-img-container {
- flex-basis: 200px;
- border-radius: 50%;
- border: 2px solid #F68B1F;
- overflow: hidden;
- }
- .profile-img-container img {
- height: 100%;
- width: 100%;
- -o-object-position: top;
- object-position: top;
- -o-object-fit: cover;
- object-fit: cover;
- }
- @media screen and (max-width: 600px) {
- .profile-img-container {
- flex-basis: 100px;
- width: 100px !important;
- height: 100px !important;
- border-radius: 50%;
- border: 2px solid #F68B1F;
- overflow: hidden;
- }
- }
- .profile-header-text {
- margin: 20px 0px 0px 50px !important;
- }
- @media screen and (max-width: 600px) {
- .profile-header-text {
- margin: 20px 0px !important;
- }
- }
- .profile-header-text h1 {
- font-size: 40px !important;
- margin: 5px 0px !important;
- }
- .profile-header-text h2 {
- font-size: 20px !important;
- line-height: 24px !important;
- color: #fff;
- letter-spacing: 2px;
- font-weight: normal;
- margin: 5px 0px !important;
- }
- .profile-header-text .contact-dets {
- display: inline-block;
- font-size: 12px;
- margin-top: 15px !important;
- margin-right: 20px !important;
- font-weight: lighter;
- color: #fff;
- letter-spacing: 2px;
- }
- .profile-header-text h3 {
- font-size: 14px !important;
- text-transform: uppercase;
- text-decoration: none !important;
- font-family: "Open Sans", sans-serif;
- letter-spacing: 2px;
- text-align: center !important;
- font-weight: normal;
- margin: 5px 0px 0px 0px !important;
- text-align: left !important;
- }
- @media screen and (max-width: 700px) {
- .profile-header-text {
- text-align: center;
- }
- .profile-header-text h1 {
- font-size: 20px !important;
- margin: 5px 0px 0px 0px !important;
- text-align: center;
- }
- .profile-header-text h2 {
- font-size: 14px !important;
- line-height: 16px !important;
- color: #fff;
- letter-spacing: 2px;
- font-weight: normal;
- margin: 5px 0px 10px 0px !important;
- text-align: center;
- }
- .profile-header-text h3 {
- font-size: 14px !important;
- text-transform: uppercase;
- text-decoration: none !important;
- font-family: "Open Sans", sans-serif;
- letter-spacing: 2px;
- text-align: center !important;
- font-weight: normal;
- margin: 5px 0px 0px 0px !important;
- text-align: center;
- }
- .profile-header-text .contact-dets {
- display: block;
- font-size: 12px;
- margin-top: 5px !important;
- font-weight: lighter;
- color: #fff;
- letter-spacing: 1px;
- }
- }
- .profile-second-row {
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- }
- .left-col {
- margin-right: 30px;
- width: 400px;
- }
- @media screen and (max-width: 650px) {
- .left-col {
- display: none;
- }
- }
- ul.profile-choices>li {
- list-style: none;
- border-radius: 5px;
- overflow: hidden;
- height: 50px;
- }
- ul.profile-choices>li a {
- padding: 5px 10px;
- font-size: 20px;
- line-height: 40px;
- font-weight: lighter;
- color: #fff;
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- transition-duration: 0.5s;
- height: 50px !important;
- }
- ul.profile-choices>li a:after {
- content: "chevron_right";
- font-family: "Material Icons";
- font-size: 20px;
- margin-right: 10px;
- }
- ul.profile-choices>li a:hover {
- color: #000;
- text-decoration: none;
- background-color: rgba(255, 255, 255, 0.2039215686);
- }
- .pickr {
- display: inline-block;
- margin-right: 6px !important;
- }
- .profile-des {
- font-family: "Open Sans", sans-serif;
- font-size: 25px;
- font-weight: normal;
- margin: 5px 0px;
- color: #fff;
- }
- details {
- margin-left: 0px !important;
- }
- .accordions {
- margin-top: 100px;
- }
- .sub-title {
- font-family: "Open Sans", sans-serif !important;
- font-size: 14px;
- letter-spacing: 5px;
- }
- b {
- font-weight: 500 !important;
- font-size: 22px !important;
- }
- i {
- font-size: 14px;
- margin-bottom: 130px !important;
- border-bottom: 1px solid #fff;
- }
- ul {
- margin-top: 20px !important;
- margin-bottom: 50px !important;
- }
- ul>li {
- list-style: none;
- font-size: 16px;
- line-height: 20px;
- }
- h2.m-text {
- font-size: 30px;
- margin-left: 0px;
- font-weight: normal;
- }
- .desc-block {
- opacity: 1;
- transition-duration: 0.4s;
- overflow: none;
- }
- .desc-block-hidden {
- display: none;
- }
- .desc-active {
- text-decoration: none;
- background-color: rgba(255, 255, 255, 0.2039215686);
- }
- .desc-active a {
- color: #000;
- }
- ul.m-text {
- margin-top: 10px !important;
- }
- /* The Overlay (background) */
- .overlay {
- /* Height & width depends on how you want to reveal the overlay (see JS below) */
- height: 0%;
- width: 100%;
- position: fixed;
- /* Stay in place */
- z-index: 1100;
- /* Sit on top */
- left: 0;
- top: 0;
- background-color: rgb(0, 0, 0);
- /* Black fallback color */
- background-color: rgba(0, 0, 0, 0.9);
- /* Black w/opacity */
- overflow-x: hidden;
- /* Disable horizontal scroll */
- transition: 0.5s;
- /* 0.5 second transition effect to slide in or slide down the overlay (height or width, depending on reveal) */
- }
- /* Position the content inside the overlay */
- .overlay-content {
- position: relative;
- height: 100%;
- top: 25%;
- /* 25% from the top */
- width: 100%;
- /* 100% width */
- text-align: center;
- /* Centered text/links */
- margin-top: 30px;
- /* 30px top margin to avoid conflict with the close button on smaller screens */
- }
- /* The navigation links inside the overlay */
- .overlay a {
- padding: 8px;
- text-decoration: none;
- font-size: 18px;
- color: white;
- display: block;
- /* Display block instead of inline */
- transition: 0.3s;
- /* Transition effects on hover (color) */
- }
- .overlay h1 {
- color: white;
- font-size: 20px;
- font-weight: lighter;
- margin-bottom: 10px;
- text-decoration: underline;
- }
- /* When you mouse over the navigation links, change their color */
- .overlay a:hover,
- .overlay a:focus {
- color: #f1f1f1;
- }
- /* Position the close button (top right corner) */
- .overlay .closebtn {
- position: absolute;
- top: 20px;
- right: 45px;
- font-size: 60px;
- }
- /* added by rousnay */
- .profile-header-text h2 {
- margin: 5px 0px 10px !important;
- }
- .profile-header-text .contact-dets {
- margin-top: 0px !important;
- margin-right: 10px !important;
- }
- h3.paper-type {
- margin: 40px 0 0;
- text-decoration: underline;
- color: antiquewhite;
- font-family: "DM Serif Text", serif;
- letter-spacing: 1px;
- font-size: 1.4em;
- }
- .paper-details {
- padding: 30px 0px;
- border-bottom: 1px solid rgba(51, 51, 51, 0.1764705882);
- }
- .paper-details .paper-year {
- font-size: 14px;
- display: block;
- color: antiquewhite;
- }
- .paper-details a {
- text-decoration: none;
- }
- .paper-details p {
- line-height: 1.8em !important;
- }
- .paper-details .paper-title {
- font-size: 18px;
- margin: 10px 0px;
- font-family: "Open Sans", sans-serif;
- line-height: 1.7em;
- letter-spacing: 0.5px;
- color: antiquewhite;
- }
- .paper-details .paper-tags {
- /* margin: 20px 0px; */
- }
- .paper-details .paper-tags .tag {
- font-size: 14px;
- border: 1px solid rgba(17, 124, 247, 0.431372549);
- padding: 3px 8px;
- border-radius: 10px;
- }
- .paper-details p {
- margin: 5px;
- font-size: 14px;
- }
- .paper-details .paper-contributors {
- /* color: #222222; */
- }
- .paper-details.multiple .paper-contributors {
- margin-bottom: 45px;
- }
- </style>
- <?php get_footer(); ?>
|