-
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 branch 'main' of github.com:mmz-srf/srf-weather-widget into main
- Loading branch information
Showing
4 changed files
with
70 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Create wp-plugin zip | ||
on: | ||
push: | ||
branches: ["main"] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Create zip archive | ||
uses: thedoctor0/[email protected] | ||
with: | ||
type: 'zip' | ||
filename: "wp-srf-weather-widget.zip" | ||
directory: "./wp-plugin" | ||
path: "./srf-weather-widget" | ||
|
||
- name: Upload zip | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: 'wp-srf-weather-widget' | ||
path: './wp-plugin/wp-srf-weather-widget.zip' |
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,43 @@ | ||
## Wordpress Plugin for SRF Weather Widget | ||
|
||
### Installation | ||
|
||
tbd | ||
|
||
### Shortcode usage | ||
|
||
The following shortcode can be added to a post's content or in the theme of your blog at your prefered position (e.g. sidebar). Just click on the Plus-Button, choose "shortcode" and enter the widget's shortcode like below. | ||
|
||
Most simple variant. Uses position set in wordpress settings, size s, displays next hours: | ||
```html | ||
[meteo] | ||
``` | ||
|
||
Same as above, but set a specific size: | ||
```html | ||
[meteo size="L"] | ||
``` | ||
|
||
Medium size and with days instead of hours: | ||
```html | ||
[meteo size="M" mode="days"] | ||
``` | ||
|
||
Small widget with Bern as position: | ||
```html | ||
[meteo geolocation="46.9471,7.4441"] | ||
``` | ||
|
||
Or use Bern as position by its name: | ||
```html | ||
[meteo locationName="Bern"] | ||
``` | ||
|
||
### Shortcode Attributes | ||
|
||
| Name | Attribute | Possible Values | Default | Required | | ||
|---------------|---------------------| ------------------------ | ------------------------------------- | -------- | | ||
| Size | size | S, M, L | S | No | | ||
| Mode | mode | hours, three_hours, days | hours | No | | ||
| Geolocation | geolocation | | 47.4171,8.5612 (Zürich Fernsehstudio) | No | | ||
| Location Name | locationName | Zürich, Genf, MyLocation | | No | |
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