concerto_weather 0.3.2 → 0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +43 -0
- data/app/assets/fonts/concerto_weather/weathericons-regular-webfont.eot +0 -0
- data/app/assets/fonts/concerto_weather/weathericons-regular-webfont.svg +257 -0
- data/app/assets/fonts/concerto_weather/weathericons-regular-webfont.ttf +0 -0
- data/app/assets/fonts/concerto_weather/weathericons-regular-webfont.woff +0 -0
- data/app/assets/fonts/concerto_weather/weathericons-regular-webfont.woff2 +0 -0
- data/app/assets/stylesheets/concerto_weather/application.css +2 -0
- data/app/assets/stylesheets/concerto_weather/weather-icons-wind.min.css.scss +6099 -0
- data/app/assets/stylesheets/concerto_weather/weather-icons.min.css.scss +1989 -0
- data/app/models/weather.rb +107 -26
- data/app/views/contents/weather/_form_top.html.erb +19 -0
- data/app/views/contents/weather/_render_default.html.erb +10 -0
- data/lib/concerto_weather/version.rb +1 -1
- metadata +10 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f3b305c49d520a14b485d360e103d7d9d50aeae1
|
|
4
|
+
data.tar.gz: a9174426494b15866b904fbac424c2eed53cf1c6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cc5772d0ec6f33c20500d4db8e07cb667e2791db2fc84eb0ee428db97a712f585577ba49c21bd04d9b2d34e2e97225ce8d52de30ac3233fa608f6340b2c06318
|
|
7
|
+
data.tar.gz: 66a587392ffbe69540564a511e09b58b9c3a4757efb79d969fbe75f618d8db60e6e7e2458a29d14b48923d8b2cc1a02c8eb49b4d0337d14c85536378bce2e31b
|
data/README.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
This plugin provides support to add weather content in Concerto 2 using the [OpenWeatherMap API](http://openweathermap.org/).
|
|
3
3
|
|
|
4
4
|
Custom weather icons are included from [owfont](http://websygen.github.io/owfont/).
|
|
5
|
+
Additional weather icons are added from [weathericons](https://erikflowers.github.io/weather-icons/).
|
|
5
6
|
|
|
6
7
|
Concerto 2 Weather is licensed under the Apache License, Version 2.0.
|
|
7
8
|
|
|
@@ -15,3 +16,45 @@ Concerto 2 Weather is licensed under the Apache License, Version 2.0.
|
|
|
15
16
|
|
|
16
17
|
(for development)
|
|
17
18
|
``` RAILS_ENV=development rake assets:precompile```
|
|
19
|
+
|
|
20
|
+
## Added support for formatting
|
|
21
|
+
|
|
22
|
+
A custom formatting script is now supported. It can be added at creation time of the forecast
|
|
23
|
+
|
|
24
|
+
It uses ruby's variable substitution. The following variables are supported:
|
|
25
|
+
|
|
26
|
+
* #{format_city} - City name
|
|
27
|
+
* #{format_iconid} - Icon ID in OpenWeatherMap API number. Should be used if you want to use a custom font that supports OWM.
|
|
28
|
+
* #{format_icon} - the html code to inject the weather icon (<i...> </i>) - uses OWF or WI font based on the setting
|
|
29
|
+
* #{format_high} - High temperature (including units) for the day
|
|
30
|
+
* #{format_low} - Low temperature (including units) for the day
|
|
31
|
+
|
|
32
|
+
It can be used for example as follows:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
<h1>#{format_city}</h1>
|
|
36
|
+
<div style='float: left; width: 50%'>
|
|
37
|
+
#{format_icon}
|
|
38
|
+
</div>
|
|
39
|
+
<div style='float: left; width: 50%'>
|
|
40
|
+
<h1> ↑ #{format_high} | ↓ #{format_low} </h1>
|
|
41
|
+
</div>
|
|
42
|
+
```
|
|
43
|
+
Variables can be omitted, used twice, etc..
|
|
44
|
+
|
|
45
|
+
If no format is specified the following is used:
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
<h1> Today in #{format_city} </h1>
|
|
49
|
+
<div style='float: left; width: 50%'>
|
|
50
|
+
#{format_icon}
|
|
51
|
+
</div>
|
|
52
|
+
<div style='float: left; width: 50%'>
|
|
53
|
+
<p> High </p>
|
|
54
|
+
<h1> #{format_high} </h1>
|
|
55
|
+
<p> Low </p>
|
|
56
|
+
<h1> #{format_low}</h1>
|
|
57
|
+
</div>
|
|
58
|
+
````
|
|
59
|
+
|
|
60
|
+
|
|
Binary file
|