-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from culturecreates/develop
Develop
- Loading branch information
Showing
7 changed files
with
111 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,67 @@ | ||
# calendar-widget | ||
|
||
This is the widget used by Footlight CMS to display a list of events. The widget is designed to run in an iframe so it can be added to any website. The widget calls Footlight Open API and can can configured to have different appearences and events using [Footlight CMS](https://cms.footlight.io) by a user with an admin role. | ||
|
||
## CMS Widget Integration Guide | ||
|
||
* div integration example: | ||
``` | ||
<head> | ||
<script defer="defer" src="https://listing-widget.footlight.io/v0/static/js/widget.js"></script> | ||
<link href="https://listing-widget.footlight.io/v0/static/css/widget.css" rel="stylesheet" /> | ||
</head> | ||
<body style="margin: 20px; font-family: 'Roboto', 'Helvetica', sans-serif"> | ||
<div | ||
id="calendar-widget" | ||
data-api="api.footlight.io" | ||
data-calendar="calendar-slug" | ||
data-calendar-name="calendar-name" | ||
data-locale="en" | ||
data-color="#fc6060" | ||
data-limit="6" | ||
data-height="600px" | ||
data-font="Roboto" | ||
></div> | ||
</body> | ||
``` | ||
|
||
* Iframe integration example | ||
``` | ||
<iframe | ||
src="https://listing-widget.footlight.io/v0/index.html" | ||
width="100%" | ||
height="600px" | ||
frameborder="0"> | ||
</iframe> | ||
``` | ||
|
||
## Updating Widget Versions | ||
|
||
How to Update to a New Version | ||
|
||
Each new major release of the widget will be available under a new version directory. For example, if you are currently using version v0 and a new version v1 is released, follow these steps: | ||
|
||
### For div method | ||
* Update the JavaScript and CSS file references to point to the new major version: | ||
``` | ||
<head> | ||
<script defer="defer" src="https://listing-widget.footlight.io/v1/static/js/widget.js"></script> | ||
<link href="https://listing-widget.footlight.io/v1/static/css/widget.css" rel="stylesheet" /> | ||
</head> | ||
``` | ||
|
||
### for iframe method | ||
* Update the iframe src URL to reflect the new version: | ||
``` | ||
src="https://listing-widget.footlight.io/v1/index.html" | ||
``` | ||
|
||
### Versioning Format | ||
* The widget follows semantic versioning. Only the major version (e.g., v1, v2) is relevant for embedding. | ||
* Minor and patch versions do not require changes in the integration code, as updates will automatically be applied to the referenced major version. | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module.exports = function override(config, env) { | ||
config.output.filename = `static/js/widget.js`; | ||
|
||
const miniCssExtractPlugin = config.plugins.find( | ||
(plugin) => plugin.constructor.name === 'MiniCssExtractPlugin', | ||
); | ||
if (miniCssExtractPlugin) { | ||
miniCssExtractPlugin.options.filename = `static/css/widget.css`; | ||
} | ||
|
||
return config; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters