page-home.php 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  1. <?php
  2. /**
  3. * Template Name: Home
  4. *
  5. * @package UIU_CSE
  6. */
  7. get_header(); ?>
  8. <!-- <div class="container full-width">
  9. <div class="row"> -->
  10. <section id="banner" class="container-fluid">
  11. <div class="banner-slider" data-banner-slider>
  12. <button class="banner-slider-button prev" data-banner-slider-button="prev">
  13. <span class="material-symbols-outlined">
  14. arrow_back_ios
  15. </span>
  16. </button>
  17. <button class="banner-slider-button next" data-banner-slider-button="next">
  18. <span class="material-symbols-outlined">
  19. arrow_forward_ios
  20. </span>
  21. </button>
  22. <ul data-slides>
  23. <?php
  24. $i = 0;
  25. if (have_rows('home_slider_slides', 'option')) :
  26. while (have_rows('home_slider_slides', 'option')) : the_row();
  27. $bg_image = get_sub_field('bg_image');
  28. $sub_heading = get_sub_field('sub_heading');
  29. $heading_main = get_sub_field('heading_main');
  30. $text = get_sub_field('text'); ?>
  31. <li class="slide" <?php if ($i == 0) {
  32. echo 'data-active';
  33. } ?>>
  34. <div class="slider-single-div">
  35. <img src="<?php echo $bg_image ?>" alt="">
  36. <div class="banner-overlay">
  37. <h4><?php echo $sub_heading ?></h4>
  38. <h1><?php echo $heading_main ?></h1>
  39. <h3>
  40. <?php echo $text ?>
  41. </h3>
  42. </div>
  43. </div>
  44. </li>
  45. <?php
  46. $i = $i + 1;
  47. endwhile;
  48. else :
  49. echo '<div class="no-post-found">No faculty profile has found! </div>';
  50. endif; ?>
  51. </ul>
  52. </div>
  53. </section>
  54. <main id="main" class="site-main" role="main">
  55. <div class="sections">
  56. <section class="container-fluid white-bg">
  57. <div class="container">
  58. <h1>We evolve with technology</h1>
  59. <p>
  60. The CSE Department of UIU has been involved in several projects in last five years including projects under Thrust/Emerging Areas, Modernization and Removal of Obsolescence, Industry-Institution Interaction.
  61. </p>
  62. <button class="primary-c">Learn more</button>
  63. <div class="grid">
  64. <div class="program">
  65. <div class="img-cont-2">
  66. <img src="<?php echo (get_template_directory_uri()) ?>/img/student_03.jpg" alt="">
  67. </div>
  68. <div class="program-details">
  69. <h2>Graduate Program</h2>
  70. <p>
  71. <b>UIU</b> has been running its M.Sc. in Computer Science and Engineering program since its inception and has attracted not only fresh undergraduates but also a handful number of ICT professionals from the industry.
  72. </p>
  73. <button class="primary-c"> View All Programs </button>
  74. </div>
  75. </div>
  76. <div class="program">
  77. <div class="img-cont-2">
  78. <img src="<?php echo (get_template_directory_uri()) ?>/img/undergrad.jpg" alt="">
  79. </div>
  80. <div class="program-details">
  81. <h2>Undergraduate Program</h2>
  82. <p>
  83. Bachelor of Science in Computer Science and Engineering primarily involves the study of a number of core courses, which every CSE graduate should know, and a significant number of courses from specialized areas.
  84. </p>
  85. <button class="primary-c"> View All Programs </button>
  86. </div>
  87. </div>
  88. </div>
  89. </div>
  90. </section>
  91. <section id="faculty-section" class="container-fluid white-bg">
  92. <div class="container">
  93. <h1>World Class Faculty</h1>
  94. <p>
  95. The Department of Computer Science and Engineering at UIU boasts one of the biggest faculty bodies
  96. amongst all private universities in the country and is bolstered by a rich and diverse battery of published research work.
  97. </p>
  98. </div>
  99. <div class="container">
  100. <div id="faculty-img">
  101. <img src="<?php echo (get_template_directory_uri()) ?>/img/faculty-grp.jpg" alt="">
  102. </div>
  103. <p>
  104. The Department of Computer Science and Engineering faculty members are an impressive group, bearing the academic tradition of higher excellence. World renowned, they are engaged in ground-breaking research. Further, they are so attuned to what’s happening in business that they are shaping its future.
  105. </p>
  106. <a href="/faculty/">
  107. <button class="primary-c">
  108. View complete faculty list
  109. </button>
  110. </a>
  111. </div>
  112. </section>
  113. <section class="container-fluid car" id="faculty-carousel">
  114. <div class="car-buttons">
  115. <button class="car-control primary-c" id="prev-car" onclick="scrollToPrev()">
  116. >
  117. </button>
  118. <button class="car-control primary-c" id="next-car" onclick="scrollToNext()">
  119. >
  120. </button>
  121. </div>
  122. <div class="profile-carousel">
  123. <?php
  124. $args = array(
  125. 'post_type' => 'faculty',
  126. 'posts_per_page' => 10,
  127. //'post__not_in' => array(get_the_ID()),
  128. 'orderby' => 'date',
  129. 'order' => 'DESC',
  130. );
  131. $query = new WP_Query($args);
  132. if ($query->have_posts()) :
  133. while ($query->have_posts()) : $query->the_post();
  134. $login_id_e = "";
  135. $auth_token = get_field('auth_token', 'option');
  136. $client_id = get_field('client_id', 'option');
  137. $employee_info_api = get_field('employee_info_api', 'option');
  138. if (function_exists('get_field')) {
  139. $pid_content = get_post();
  140. if (has_blocks($pid_content)) {
  141. $blocks = parse_blocks($pid_content->post_content);
  142. foreach ($blocks as $block) {
  143. if ($block["blockName"] == "acf/faculty-member") {
  144. // $FullName = $block['login_id_e'];
  145. $login_id_e = $block["attrs"]["data"]["login_id"];
  146. // $Designation = $block["attrs"]["data"];
  147. }
  148. }
  149. }
  150. };
  151. $response_employeeInfo = wp_remote_post(
  152. $employee_info_api,
  153. array(
  154. 'body' => array(
  155. 'user_login_id' => $client_id,
  156. 'login_id' => $login_id_e,
  157. 'auth_token' => $auth_token
  158. )
  159. )
  160. );
  161. $employeeInfo = json_decode(wp_remote_retrieve_body($response_employeeInfo), true);
  162. $Title = $employeeInfo[0]['Title'];
  163. $FullName = $Title . ' ' . $employeeInfo[0]['FullName'];
  164. $Designation = $employeeInfo[0]['Designation'] . ', ' . $employeeInfo[0]['Office'];
  165. ?>
  166. <div class="car-item">
  167. <div class="car-item-holder">
  168. <div class="car-img-holder">
  169. <img src="<?php the_field('profile_photo') ?>" alt="">
  170. </div>
  171. <a class="faculty-name" href="<?php echo get_the_permalink(); ?>">
  172. <div class="faculty-details">
  173. <h2><?php echo $FullName; ?>
  174. <!-- <span class="degree"><?php //if ($Title == "Dr.") {echo ', PhD';}
  175. ?>
  176. </span> -->
  177. </h2>
  178. <h3><span class="degree"><?php echo $Designation; ?></span></h3>
  179. </div>
  180. </a>
  181. </div>
  182. </div>
  183. <?php
  184. endwhile;
  185. else :
  186. echo '<div class="no-post-found">No faculty profile has found! </div>';
  187. endif; ?>
  188. </div>
  189. </section>
  190. <section id="Success-section" class="container-fluid white-bg">
  191. <div class="container">
  192. <h1>Success Stories</h1>
  193. <p>
  194. Our students inspire us by their courage and perseverance, and are a reminder that obstacles can be overcome when you have just one person cheering you on to the finish line.
  195. </p>
  196. </div>
  197. <div class="container">
  198. <div id="us-imgs" class="grid student-stories">
  199. <?php
  200. $args = array(
  201. 'post_type' => 'success_story',
  202. 'posts_per_page' => 3,
  203. //'post__not_in' => array(get_the_ID()),
  204. 'orderby' => 'date',
  205. 'order' => 'DESC',
  206. );
  207. $query = new WP_Query($args);
  208. if ($query->have_posts()) :
  209. while ($query->have_posts()) :
  210. $query->the_post(); ?>
  211. <div>
  212. <div class="img-cont">
  213. <img src="<?php the_field('profile_image'); ?>" alt="">
  214. </div>
  215. <div>
  216. <h2><?php echo get_the_title() ?></h2>
  217. <h5><?php the_field('student_designation'); ?></h5>
  218. <p>
  219. <?php the_excerpt(); ?>
  220. </p>
  221. <a href="<?php echo get_the_permalink() ?>">Learn more</a>
  222. </div>
  223. </div>
  224. <?php
  225. endwhile;
  226. else :
  227. echo '<div class="no-post-found">No success story has found! </div>';
  228. endif; ?>
  229. </div>
  230. <div>
  231. <h1>Notable Alumni</h1>
  232. <p>
  233. Pellentesque est est, luctus non iaculis sed, congue non diam. In efficitur gravida ipsum vitae finibus. Etiam sollicitudin placerat leo.
  234. </p>
  235. </div>
  236. <a href="/alumni/">
  237. <button class="primary-c">
  238. View complete Alumni list
  239. </button>
  240. </a>
  241. </div>
  242. </section>
  243. <section class="container-fluid car" id="alumni-carousel">
  244. <div class="car-buttons">
  245. <button class="car-control primary-c" onclick="scrollToPrevAl()">
  246. < </button>
  247. <button class="car-control primary-c" onclick="scrollToNextAl()">
  248. >
  249. </button>
  250. </div>
  251. <div class="profile-carousel">
  252. <?php
  253. $args = array(
  254. 'post_type' => 'alumni',
  255. 'posts_per_page' => 10,
  256. //'post__not_in' => array(get_the_ID()),
  257. 'orderby' => 'date',
  258. 'order' => 'DESC',
  259. );
  260. $query = new WP_Query($args);
  261. if ($query->have_posts()) :
  262. while ($query->have_posts()) :
  263. $query->the_post(); ?>
  264. <div class="car-item">
  265. <div class="car-item-holder">
  266. <div class="car-img-holder">
  267. <img src="<?php the_field('profile_photo'); ?>" alt="">
  268. </div>
  269. <a class="faculty-name" href="<?php echo get_the_permalink(); ?>">
  270. <div class="faculty-details">
  271. <h2><?php echo get_the_title(); ?></h2>
  272. <h3><span class="degree"><?php the_field('alumni_designation'); ?></span></h3>
  273. </div>
  274. </a>
  275. </div>
  276. </div>
  277. <?php
  278. endwhile;
  279. else :
  280. echo '<div class="no-post-found">No alumni has found! </div>';
  281. endif; ?>
  282. </div>
  283. </section>
  284. <section id="dept-notices" class="container-fluid mid-roll">
  285. <div class="bg-tint">
  286. <div class="container">
  287. <h1>Department Notices</h1>
  288. <div class="notice-main">
  289. <?php
  290. $args = array(
  291. 'post_type' => 'notice',
  292. 'posts_per_page' => 5,
  293. 'orderby' => 'date',
  294. 'order' => 'DESC',
  295. );
  296. $query = new WP_Query($args);
  297. if ($query->have_posts()) :
  298. while ($query->have_posts()) :
  299. $query->the_post();
  300. $custom_date_full = get_the_date('M jS, Y');
  301. $custom_date_min = explode(', ', $custom_date_full);
  302. $custom_date_array = explode(' ', $custom_date_min[0]);
  303. ?>
  304. <a href="<?php echo get_the_permalink(); ?>">
  305. <div class="notice-container">
  306. <div class="event-date">
  307. <h3><?php echo $custom_date_array[0] ?></h3>
  308. <h3><?php echo $custom_date_array[1] ?></h3>
  309. </div>
  310. <div>
  311. <h6><span class="subtitle"><?php echo get_the_date(); ?></span></h6>
  312. <h4><?php echo get_the_title(); ?></h4>
  313. <p>Maecenas sed enim ut sem viverra aliquet. Neque laoreet suspendisse interdum consectetur.</p>
  314. </div>
  315. </div>
  316. </a>
  317. <?php
  318. endwhile;
  319. else :
  320. echo '<div class="no-post-found">No event has found! </div>';
  321. endif; ?>
  322. <a href="/notice/">
  323. <button>View All Notices</button>
  324. </a>
  325. </div>
  326. </div>
  327. </div>
  328. </section>
  329. <section id="dept-news" class="container-fluid white-bg">
  330. <div class="container">
  331. <h1>Department News</h1>
  332. <p>
  333. Catch up with what's happening at the Department of CSE
  334. </p>
  335. <div class="news-row">
  336. <!-- <div class="news-big-img">
  337. <div class="news-big-img-holder">
  338. <img src="<?php //echo (get_template_directory_uri())
  339. ?>/img/campus_05.jpg" alt="">
  340. </div>
  341. <div class="news-big-img-text">
  342. <h5>28th March, 2016</h5>
  343. <h4> <a href=""> Seminar</a></h4>
  344. <a href="">
  345. <p>Development and Mining of a Volatile Organic Compound Database</p>
  346. </a>
  347. </div>
  348. </div>
  349. -->
  350. <?php
  351. $args = array(
  352. 'post_type' => 'news',
  353. 'posts_per_page' => 4,
  354. 'post__not_in' => array(get_the_ID()),
  355. 'orderby' => 'date',
  356. 'order' => 'DESC',
  357. );
  358. $query = new WP_Query($args);
  359. if ($query->have_posts()) :
  360. while ($query->have_posts()) :
  361. $query->the_post(); ?>
  362. <div class="news-small-img">
  363. <div class="news-sm-img-holder">
  364. <img src="<?php echo get_the_post_thumbnail_url() ?>" alt="">
  365. </div>
  366. <div class="news-sm-img-text">
  367. <h5><?php the_field('news_date'); ?></h5>
  368. <!-- <h4> <a href=""> Seminar</a></h4> -->
  369. <a href="<?php echo get_permalink(); ?>">
  370. <p><?php echo get_the_title(); ?></p>
  371. </a>
  372. </div>
  373. </div>
  374. <?php
  375. endwhile;
  376. else :
  377. echo '<div class="no-post-found">No related news has found! </div>';
  378. endif; ?>
  379. </div>
  380. <a href="/news/">
  381. <button class="primary-c">View All News</button> </a>
  382. </div>
  383. </section>
  384. <section id="events" class="container-fluid mid-roll">
  385. <div class="bg-tint">
  386. <div class="container">
  387. <h1>Upcoming Events</h1>
  388. <div class="grid">
  389. <?php
  390. $args = array(
  391. 'post_type' => 'event',
  392. 'posts_per_page' => 5,
  393. //'post__not_in' => array(get_the_ID()),
  394. 'orderby' => 'date',
  395. 'order' => 'DESC',
  396. );
  397. $query = new WP_Query($args);
  398. if ($query->have_posts()) :
  399. while ($query->have_posts()) :
  400. $query->the_post(); ?>
  401. <div class="event-holder">
  402. <div class="event-img-holder">
  403. <img src="<?php echo get_the_post_thumbnail_url(); ?>" alt="">
  404. </div>
  405. <div class="event-date primary-c">
  406. <h3><?php the_field('event_date_start'); ?></h3>
  407. </div>
  408. <div class="event-details">
  409. <a href="<?php echo get_permalink(); ?>">
  410. <h3><?php echo get_the_title(); ?></h3>
  411. <h2><?php the_field('event_venue'); ?></h2>
  412. </a>
  413. </div>
  414. </div>
  415. <?php
  416. endwhile;
  417. else :
  418. echo '<div class="no-post-found">No event has found! </div>';
  419. endif; ?>
  420. </div>
  421. <a href="/event/">
  422. <button class="primary-c">View all events</button>
  423. </a>
  424. </div>
  425. </div>
  426. </section>
  427. <section id="research-grants" class="white-bg">
  428. <div class="container">
  429. <h1>Research &amp; Grants</h1>
  430. <p>Maecenas sed enim ut sem viverra aliquet. Neque laoreet suspendisse interdum consectetur.
  431. Mus mauris vitae ultricies leo integer malesuada nunc vel. Mus mauris vitae ultricies leo integer malesuada nunc vel.
  432. </p>
  433. <div id="research-pointers" class="grid">
  434. <div>
  435. <h3>32 Research Projects</h3>
  436. <p>Spread across Undergraduate and Graduate Programs</p>
  437. </div>
  438. <div>
  439. <h3>Tk 5 Crores in grants</h3>
  440. <p>Spread across Undergraduate and Graduate Programs</p>
  441. </div>
  442. <div>
  443. <h3>32 Research Projects</h3>
  444. <p>Spread across Undergraduate and Graduate Programs</p>
  445. </div>
  446. </div>
  447. </div>
  448. </section>
  449. </div>
  450. </main><!-- #main -->
  451. <!-- </div> .row -->
  452. <!-- </div>.container -->
  453. <?php get_footer(); ?>