/ single-event.php
single-event.php
 1  <?php get_header();
 2  
 3  while (have_posts()) {
 4      the_post(); ?>
 5  
 6      <main class="w-full">
 7  
 8          <div class="md:hidden block pb-8">
 9              <img class="w-full h-96 object-cover" src="<?php echo get_the_post_thumbnail_url(); ?>">
10              <div class="w-full p-4 bg-green-600">
11                  <h2 class="line-clamp-1 text-2xl font-semibold"><?php the_title(); ?></h2>
12                  <p class="pt-2 line-clamp-3"><?php echo get_field(
13                      "event_description"
14                  ); ?></p>
15              </div>
16              <div class="p-4">
17                  <?php the_content(); ?>
18              </div>
19              <div class="p-4 text-nowrap">
20                  <?php if (get_field("flyer")) { ?>
21                      <div class="pb-2">
22                          <h2 class="text-lg font-semibold pb-2 hover:underline"><a href="<?php echo get_field(
23                              "flyer"
24                          ); ?>"><i class="fa-sharp fa-regular fa-download"></i> Zum Flyer</a></h2>
25                      </div>
26                  <?php } ?>
27                  <div class="prose">
28                      <?php echo get_field("event_dates"); ?>
29                  </div>
30              </div>
31          </div>
32  
33  
34          <div class="hidden md:block mx-auto max-w-7xl pb-8 pt-20">
35              <div class="px-4 mb-4">
36                  <h1 style="font-family: 'DellaRespira';" class="text-5xl font-semibold pb-4"><?php the_title(); ?></h1>
37                  <p class=" line-clamp-3"><?php echo get_field(
38                      "event_description"
39                  ); ?></p>
40                  <div class="flex justify-between gap-4 mt-8">
41                      <div>
42                          <?php the_content(); ?>
43                      </div>
44                      <div class="text-nowrap">
45                          <?php if (get_field("flyer")) { ?>
46                              <div class="pb-2">
47                                  <h2 class="text-lg font-semibold pb-2 hover:underline"><a href="<?php echo get_field(
48                                      "flyer"
49                                  ); ?>"><i class="fa-sharp fa-regular fa-download"></i> Zum Flyer</a></h2>
50                              </div>
51                              <?php } ?>
52                          <div class="prose">
53                              <?php echo get_field("event_dates"); ?>
54                          </div>
55                      </div>
56                  </div>
57              </div>
58          </div>
59  
60      </main>
61  
62  <?php
63  }
64  get_footer(); ?>