single-event.php 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510
  1. <?php
  2. /**
  3. * The template for displaying all single event posts
  4. *
  5. * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
  6. *
  7. * @package UIU_CSE
  8. */
  9. get_header(); ?>
  10. <?php while (have_posts()) : the_post(); ?>
  11. <main id="main" class="site-main" role="main">
  12. <section id="hero-single">
  13. <div class="container">
  14. <!-- page title -->
  15. <div class="page-title">
  16. Event
  17. </div>
  18. <!-- breadcrumb -->
  19. <nav class="breadcrumb" aria-label="breadcrumb">
  20. <ul>
  21. <li><a href="/">Home</a></li>
  22. <li><a href="/event/">Events</a></li>
  23. </ul>
  24. </nav>
  25. <div class="content">
  26. <!-- main title -->
  27. <div class="main-title">
  28. <?php echo get_the_title(); ?>
  29. </div>
  30. <div class="publish-date">
  31. <span class="title">Publish Date :</span>
  32. <span class="date"><?php echo get_the_date(); ?></span>
  33. </div>
  34. <div class="links">
  35. <!-- message -->
  36. <a href="mailto:#">
  37. <img src="<?php echo (get_template_directory_uri()) ?>/img/envelope-solid.svg" alt="">
  38. </a>
  39. <!-- printer -->
  40. <a onclick="window.print()">
  41. <img src="<?php echo (get_template_directory_uri()) ?>/img/print-solid.svg" alt="">
  42. </a>
  43. <!-- facebook -->
  44. <a href="#">
  45. <img src="<?php echo (get_template_directory_uri()) ?>/img/facebook-f.svg" alt="">
  46. </a>
  47. <!-- twitter -->
  48. <a href="#">
  49. <img src="<?php echo (get_template_directory_uri()) ?>/img/twitter.svg" alt="">
  50. </a>
  51. <!-- linkedin -->
  52. <a href="#">
  53. <img src="<?php echo (get_template_directory_uri()) ?>/img/linkedin-in.svg" alt="">
  54. </a>
  55. </div>
  56. </div>
  57. </div>
  58. </section>
  59. <div class="container">
  60. <!-- feture image -->
  61. <div class="feature-image-holder">
  62. <img src="<?php echo get_the_post_thumbnail_url(); ?>" alt="">
  63. </div>
  64. <!-- event info container -->
  65. <div id="event-info-container">
  66. <div class="event-date">
  67. <h3>Jun</h3>
  68. <h3>6th</h3>
  69. </div>
  70. <!-- event info -->
  71. <section id="event-info">
  72. <div class="container content">
  73. <div class="single-content">
  74. <div class="title">
  75. Registration URL :
  76. </div>
  77. <a class="detail" href="#">
  78. https://www.eventbrite.co.uk/e/billets-inscription-au-colloque-pourquoi-alain-f…
  79. </a>
  80. </div>
  81. <div class="single-content">
  82. <div class="title">
  83. Organizer :
  84. </div>
  85. <div class="detail">
  86. United International University (UIU)
  87. </div>
  88. </div>
  89. <div class="single-content">
  90. <div class="title">
  91. Venue :
  92. </div>
  93. <div class="detail">
  94. <?php the_field('event_venue'); ?>
  95. </div>
  96. </div>
  97. <div class="single-content">
  98. <div class="title">
  99. Event dates :
  100. </div>
  101. <div class="detail">
  102. <?php the_field('event_date_start'); ?> to <?php the_field('event_date_end'); ?>
  103. </div>
  104. </div>
  105. </div>
  106. </section>
  107. </div>
  108. <section id="event-container">
  109. <!-- main component -->
  110. <div class="main-comp">
  111. <!-- notice details -->
  112. <div class="event-details">
  113. <?php echo get_the_content() ?>
  114. </div>
  115. </div>
  116. </section>
  117. <section id="more-event">
  118. <div class="section-title">
  119. Recent Events
  120. </div>
  121. <div class="events">
  122. <?php
  123. $args = array(
  124. 'post_type' => 'event',
  125. 'posts_per_page' => 6,
  126. 'post__not_in' => array(get_the_ID()),
  127. 'orderby' => 'date',
  128. 'order' => 'DESC',
  129. );
  130. $query = new WP_Query($args);
  131. if ($query->have_posts()) :
  132. while ($query->have_posts()) :
  133. $query->the_post(); ?>
  134. <div class="single-event">
  135. <div class="event-img">
  136. <img src="<?php echo get_the_post_thumbnail_url() ?>" alt="">
  137. </div>
  138. <a class="detail" href="<?php echo get_the_permalink(); ?>">
  139. <div class="event-date">
  140. <img class="icon" src="<?php echo (get_template_directory_uri()) ?>/img/calendar-days-regular.svg" alt="">
  141. <span class="date">
  142. <?php the_field('event_date_start'); ?>
  143. </span>
  144. </div>
  145. <div class="title">
  146. <?php echo get_the_title(); ?>
  147. </div>
  148. </a>
  149. </div>
  150. <?php
  151. endwhile;
  152. else :
  153. echo '<div class="no-post-found">No related news has found! </div>';
  154. endif; ?>
  155. </div>
  156. </section>
  157. </div>
  158. </main>
  159. <?php endwhile; ?>
  160. <style>
  161. #hero-single {
  162. padding: 6rem 0 3rem;
  163. }
  164. #hero-single .page-title {
  165. font-size: 1.8rem;
  166. font-weight: bold;
  167. color: #0f465e;
  168. font-family: "DM Serif Text", serif;
  169. letter-spacing: 3px;
  170. }
  171. #hero-single .breadcrumb {
  172. margin-top: 0 !important;
  173. }
  174. #hero-single .breadcrumb li {
  175. padding-top: 10px;
  176. padding-bottom: 10px;
  177. font-size: 0.8rem;
  178. font-weight: 600;
  179. }
  180. #hero-single .content {
  181. display: block;
  182. }
  183. #hero-single .main-title {
  184. margin-top: 1.5rem;
  185. font-size: 1.7rem;
  186. font-weight: bold;
  187. letter-spacing: 2px;
  188. line-height: 1.4 !important;
  189. color: #333 !important;
  190. text-transform: capitalize;
  191. font-family: "DM Serif Text", serif;
  192. }
  193. #hero-single .publish-date {
  194. margin-top: 0.75rem;
  195. font-size: 0.8rem;
  196. }
  197. #hero-single .publish-date .title {
  198. font-weight: bold;
  199. }
  200. #hero-single .publish-date .date {
  201. margin-left: 0.25rem;
  202. font-weight: 600;
  203. }
  204. #hero-single .links {
  205. margin-top: 2.5rem;
  206. padding-bottom: 1rem;
  207. border-bottom: 1px solid #000;
  208. display: flex;
  209. gap: 1.5rem;
  210. }
  211. #hero-single .links a {
  212. height: 1.2rem;
  213. }
  214. #hero-single .links a:hover {
  215. transform: scale(1.2);
  216. opacity: 1 !important;
  217. }
  218. #hero-single .links a img {
  219. height: 100%;
  220. }
  221. #event-info-container {
  222. display: flex;
  223. gap: 2rem;
  224. }
  225. #event-info-container .event-date {
  226. width: 100px;
  227. height: 135px;
  228. padding-top: 1rem;
  229. color: #fff;
  230. background: #F68B1F;
  231. position: relative;
  232. display: flex;
  233. flex-direction: column;
  234. justify-content: center;
  235. align-items: center;
  236. font-weight: 300 !important;
  237. line-height: 1.2;
  238. font-family: "Open Sans", sans-serif;
  239. color: #485680;
  240. }
  241. #event-info-container .event-date h3 {
  242. font-weight: inherit;
  243. margin: 0;
  244. padding: 0;
  245. color: #fff;
  246. }
  247. #event-info-container .event-date::before,
  248. #event-info-container .event-date::after {
  249. content: "";
  250. position: absolute;
  251. height: 0;
  252. width: 0;
  253. bottom: -70px;
  254. left: 0;
  255. border-top: 70px solid #f68b1f;
  256. border-right: 70px solid transparent;
  257. }
  258. #event-info-container .event-date::after {
  259. right: 0;
  260. left: unset;
  261. border-right: unset;
  262. border-left: 70px solid transparent;
  263. }
  264. #event-info-container #event-info {
  265. margin-bottom: 2rem;
  266. padding-top: 0;
  267. flex: auto;
  268. }
  269. #event-info-container #event-info .content {
  270. background: #0f465e;
  271. padding: 1.5rem 2rem;
  272. color: #fff;
  273. }
  274. #event-info-container #event-info .content .single-content {
  275. display: flex;
  276. align-items: flex-start;
  277. margin-bottom: 0.75rem;
  278. font-size: 0.8rem;
  279. }
  280. #event-info-container #event-info .content .single-content:last-child {
  281. margin-bottom: unset;
  282. }
  283. #event-info-container #event-info .content .single-content .title {
  284. min-width: 200px;
  285. font-weight: 700;
  286. font-size: inherit;
  287. }
  288. #event-info-container #event-info .content .single-content .detail {
  289. font-size: inherit;
  290. font-weight: 500;
  291. line-break: anywhere;
  292. color: #fff !important;
  293. }
  294. a {
  295. transition: all 0.25s ease-in-out;
  296. }
  297. a:hover {
  298. opacity: 0.65;
  299. text-decoration: none;
  300. }
  301. .feature-image-holder {
  302. width: 100%;
  303. margin-bottom: 2rem;
  304. }
  305. .feature-image-holder img {
  306. width: 100%;
  307. }
  308. #event-container {
  309. margin-top: 1rem;
  310. }
  311. #event-container .main-comp {
  312. padding-bottom: 2rem;
  313. }
  314. #event-container .main-comp .event-details {
  315. margin-top: 1rem;
  316. }
  317. #event-container .main-comp .event-details img {
  318. width: 100%;
  319. margin-bottom: 2rem;
  320. }
  321. #more-event .section-title {
  322. color: rgb(0, 0, 0);
  323. font-weight: 600;
  324. font-size: 1.8rem;
  325. padding-bottom: 1rem;
  326. border-bottom: 1px solid #333;
  327. }
  328. #more-event .events {
  329. margin-top: 2rem;
  330. display: flex;
  331. gap: 2rem;
  332. flex-wrap: wrap;
  333. }
  334. #more-event .events .single-event {
  335. width: calc(33.3333% - 2rem);
  336. overflow: hidden;
  337. border-radius: 5px;
  338. border: 1px solid rgba(0, 0, 0, 0.5);
  339. }
  340. #more-event .events .single-event .event-img {
  341. width: 100%;
  342. overflow: hidden;
  343. }
  344. #more-event .events .single-event .event-img img {
  345. transition: 4s ease-in-out;
  346. }
  347. #more-event .events .single-event:hover .event-img img {
  348. transform: scale(1.4);
  349. }
  350. #more-event .events .single-event .detail {
  351. padding: 0.5rem 0.75rem 0.75rem;
  352. background-color: #fff;
  353. display: block;
  354. }
  355. #more-event .events .single-event .detail:hover {
  356. opacity: unset;
  357. }
  358. #more-event .events .single-event .detail .event-date {
  359. display: flex;
  360. gap: 0.5rem;
  361. align-items: center;
  362. justify-content: start;
  363. margin: 0.25rem 0 0.75rem;
  364. }
  365. #more-event .events .single-event .detail .event-date .icon {
  366. height: 0.9rem;
  367. }
  368. #more-event .events .single-event .detail .event-date .date {
  369. font-size: 0.7rem;
  370. font-weight: 700;
  371. }
  372. #more-event .events .single-event .detail .title {
  373. font-size: 0.7rem;
  374. font-weight: 600;
  375. color: #0f465e;
  376. line-height: 1.7 !important;
  377. }
  378. @media (max-width: 1000px) {
  379. #more-event .events .single-event {
  380. width: calc(50% - 2rem);
  381. }
  382. }
  383. @media (max-width: 768px) {
  384. #more-event .events .single-event {
  385. width: 100%;
  386. }
  387. }
  388. @media print {
  389. head,
  390. header,
  391. footer {
  392. display: none;
  393. }
  394. main {
  395. padding-top: 0 !important;
  396. margin-top: 0 !important;
  397. }
  398. #archive-hero {
  399. margin: 0;
  400. }
  401. #event-container {
  402. padding: 0;
  403. }
  404. }
  405. /*# sourceMappingURL=single-event2.css.map */
  406. </style>
  407. <?php get_footer(); ?>