Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                
<head>
  <!-- Import AlpineJS and our Embed JSON script -->
  <script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/@churchsuite/embed@^5/dist/calendar.min.js"></script>

  <!-- Import Tailwind -->
  <script src="https://cdn.tailwindcss.com"></script>
  
  <!-- Tell it which ChurchSuite account you belong to -->
  <script> CS.url = 'https://demo.churchsuite.com';</script>
</head>

<body class="bg-gray-800 text-white">
  <div class="m-8">
    <!-- Tell it which configuration to use... -->
    <div x-data="CSEvents({configuration: '62436903-841e-4239-bc95-e6952e17430e'})" class="flex flex-col gap-2">
 
      <!-- ... and then get designing! -->
      <template x-for="event in events">
        <!-- There can only be one element within the template -->
        <div class="flex flex-col md:flex-row items-center rounded-md min-h-28 lg:w-1/2 border-l-8 w-full bg-gray-900 shadow-md" :style="{ 'border-left-color': brand.color }">
          
          <!-- Image with date overlay -->
          <div class="shrink-0 relative bg-cover flex flex-col items-center justify-center font-bold h-40 md:h-28 md:w-36 w-full">
            <img :src="event.image?.medium ?? brand.emblem.px_200" class="w-full h-full object-center object-cover">
            <div class="flex flex-col items-center justify-center bg-gradient-to-l md:from-gray-900 from-transparent/60 to-transparent/60 md:to-transparent/30 w-full h-full absolute">
              <span x-text="event.start.format('DD')" class="text-5xl"></span>
              <span x-text="event.start.format('MMM')"></span>
            </div>
          </div>
          
          <!-- Event name and details -->
          <div class="flex flex-col items-center md:items-start flex-grow justify-center my-4">
            <p class="text-gray-300 text-sm"><span x-text="event.start.format('h:mma')"></span> - <span x-text="event.end.format('h:mma')"></span></p>
            <span x-text="event.name" class="text-lg"></span>
            <span x-text="event.location" :style="{ color: brand.color }"></span>
          </div>
          
          <a :href="event.link" class="shrink-0 justify-self-end h-8 p-2 m-4 border rounded-md text-xs text-center">MORE INFO</a>
          
        </div>
      </template>

    </div>
  </div>
</body>
              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console