# Show upcoming appointments from church.tools instance ## Setup * Upload `css/ct-events.css` and `js/ct-events.js` to your site * Download `mithril.min.js` from https://unpkg.com/browse/mithril@2.2.11/ (or a newer version, but tested with this) * Upload `mithril.min.js` to the same folder as `ct-events.js` * Download `fontawesome-free-6.7.1-web.zip` from https://fontawesome.com/download ("Free for Web"), tested with version 6.7.1 * Extract and upload `css/all.min.css` and `webfonts/fa-solid-900*`; the CSS expects the font to be in `../webfonts/`, so keep the folder hierarchy. * Add the following to your site template header (adapt paths to your local setup), i.e. in `...`: ```html ``` * Add the following to your site template footer (adapt paths to your local setup), i.e. at the end of `...`: ```html ``` ## Allow church-tools API CORS from your site Add your site (`https://your-site`) to `Access-Control-Allow-Origins` sent by your church-tool instance, see: ## Add calendar events Add this snippet to your page: ```html
``` The class `cte-events` triggers the javascript; options can be overridden and set via `data-cte-*` attributes. You can add multiple snippets on a page with different settings.