Skip to content

Commit

Permalink
Merge pull request #838 from Martin-Gleiss/develop
Browse files Browse the repository at this point in the history
release v3.3.1
  • Loading branch information
wvhn authored Jan 26, 2023
2 parents f8c661b + d78d5a1 commit eafd22a
Show file tree
Hide file tree
Showing 21 changed files with 376 additions and 213 deletions.
94 changes: 94 additions & 0 deletions apps/app_spiegel.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
/**
* -----------------------------------------------------------------------------
* @package smartVISU
* @author René Frieß, Wolfram v. Hülsen
* @copyright 2012 - 2022
* @license GPL [http://www.gnu.de]
* @version 1.0
*
* @title Der Spiegel
* @category news
* @icon icons/ws/DER_SPIEGEL.svg
* @color #b00
* @description Nachrichten von Spiegel Online
*
* @info Weitere feeds auf
* @link https://www.spiegel.de/dienste/besser-surfen-auf-spiegel-online-so-funktioniert-rss-a-1040321.html
* -----------------------------------------------------------------------------
*/


{% extends "apps.html" %}

{% block sidebar %}
<ul data-role="listview" data-dividertheme="c" class="newslistMenu">
<li><a href="#" data-feed="schlagzeilen/eilmeldungen"><h3>Eilmeldungen</h3></a></li>
<li><a href="#" data-feed="schlagzeilen/tops"><h3>Top-Meldungen</h3></a></li>
<li><a href="#" data-feed="schlagzeilen"><h3>Schlagzeilen</h3></a></li>
<li><a href="#" data-feed="politik"><h3>Politik</h3></a></li>
<li><a href="#" data-feed="wirtschaft"><h3>Wirtschaft</h3></a></li>
<li><a href="#" data-feed="sport"><h3>Sport</h3></a></li>
</ul>
{% endblock %}


{% block content %}
<style type="text/css">
.newslist ul {
margin: 0 !important;
}
.newslist li {
padding: 0 0 0 90px !important;
height: 75px;
}
</style>

<div class="visible-phone">
<div data-role="controlgroup" data-type="horizontal" class="ui-mini newslistMenu" style="margin: 0 0 20px 0;">

<a class="ui-btn ui-corner-all" href="#" data-feed="schlagzeilen/eilmeldungen">Eilmeld.</a>
<a class="ui-btn ui-corner-all" href="#" data-feed="schlagzeilen/tops">Topmeld.</a>
<a class="ui-btn ui-corner-all" href="#" data-feed="schlagzeilen">Schlagzeilen</a>
<a class="ui-btn ui-corner-all" href="#" data-feed="politik">Politik</a>
<a class="ui-btn ui-corner-all" href="#" data-feed="wirtschaft">Wirtschaft</a>
<a class="ui-btn ui-corner-all" href="#" data-feed="sport">Sport</a>
</div>
</div>
<h3>DER SPIEGEL - Nachrichten</h3>
<br />

<div id="spiegel_news" class="newslist"> <ul data-role="listview"> </ul> </div>

<script type="text/javascript">
$('#{{ page }}').on('pagecreate', function (event, ui) {
$('#{{ page }} .newslistMenu').on('init click', function(event){
var element = event.target.closest('a');
var feed = $(element).attr('data-feed');
if (!feed || feed == '')
feed = 'schlagzeilen/eilmeldungen';
$.getJSON('lib/feeds/rss.php?url=www.spiegel.de/'+ feed +'/index.rss', function (data) {
var line = '';
var entry = data['entry'];
if (entry == undefined)
line = '<h3>Keine aktuellen Meldungen</h3><br>(www.spiegel.de/'+ feed + ')';
for (var i in entry) {
var ret = '';
if (entry[i].image) {
ret += '<img src="' + entry[i].image.url + '"/>';
}
ret += '<h3><a class="ui-link" href="' + entry[i].link + '" target="_blank">' + entry[i].title + '</a></h3>';
ret += '<p>' + entry[i].description + '&nbsp;</p>';
line += '<li>' + ret + '</li>';
}
$('#spiegel_news ul').html(line).trigger('prepare').listview('refresh').trigger('redraw');
})
.fail(notify.json);
});
$(document).on('pagecontainershow', function(){
if (sv.activePage.attr('id') == '{{ page }}')
$('#{{ page }} .newslistMenu').trigger('init');
});
});

</script>
{% endblock %}
65 changes: 36 additions & 29 deletions apps/app_tankerkoenig.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,16 @@
</div>
<h3 style="padding: 40px 0 8px 0;">Tankerkönig</h3>
</div>
<div class="ui-field-contain">
<br />
<div>
<label for="tkFuel">Kraftstoffsorte</label>
<select name="tkFuel" id="tkFuel">
<option value="Diesel" selected="selected">Diesel</option>
<option value="E10">Super E10 </option>
<option value="E5"> Super E5 </option>
</select>
</div>
<div class="ui-field-contain">
<div>
<label for="tkDistance">Entfernung</label>
<select name="tkDistance" id="tkDistance">
<option value="1"> 1 km </option>
Expand All @@ -55,37 +56,38 @@ <h3 style="padding: 40px 0 8px 0;">Tankerkönig</h3>

{% block content %}


<div class="visible-phone">
<div class="ui-field-contain">
<label for="tkFuel1">Kraftstoffsorte</label>
<select name="tkFuel1" id="tkFuel1">
<option value="Diesel" selected="selected">Diesel</option>
<option value="E10">Super E10 </option>
<option value="E5"> Super E5 </option>
</select>
</div>
<div class="ui-field-contain">
<label for="tkDistance1">Entfernung</label>
<select name="tkDistance1" id="tkDistance1">
<option value="1"> 1 km </option>
<option value="2"> 2 km </option>
<option value="5" selected="selected"> 5 km </option>
<option value="10"> 10 km </option>
<option value="15"> 15 km </option>
</select>
</div>
</div>
<h3>Kraftstoffpreise</h3>
<br />

Stand:&nbsp;<span id="tkStand"></span>
<br /><br />

<style type="text/css">
.tvlist ul {
margin: 0 !important;
}

.tvlist li {
padding: 0 0 0 125px !important;
}

.tvlist .ui-li-thumb {
height: 63px;
max-width: 113px;
top: 5px;
left: 5px;
border: 1px solid #aaa;
}

.tvlist .ui-li-aside {
background-color: white;
border: 1px solid #ccc;
border-radius: 5px;
height: 25px;
width: 70px;
margin: 3px;
text-align: center;
vertical-align: middle;
line-height: 27px;
padding: 0 0 0 10px !important;
}

.tvlist li p {
Expand All @@ -102,14 +104,16 @@ <h3>Kraftstoffpreise</h3>

<script type="text/javascript">
$('#{{ page }}').on('pagecreate', function (event, ui) {
$('#tkFuel, #tkDistance').on('change init', function(event,ui){
$('#tkFuel, #tkFuel1, #tkDistance, #tkDistance1').on('change init', function(event,ui){
var tkLocation = '{{ config_tanker_location ? config_tanker_location|raw : config_weather_location|replace("lon", "lng")|raw }}';
var tkKey = '{{ config_tanker_key ? config_tanker_key : "00000000-0000-0000-0000-000000000002" }}';
var fuelType = $('#tkFuel').val();
var fuelDist = $('#tkDistance').val().toString();
var source = ($(window).width() >= 600 ? '' : '1');
var fuelType = $('#tkFuel'+ source).val();
var fuelDist = $('#tkDistance' + source).val().toString();
$.getJSON('https://creativecommons.tankerkoenig.de/json/list.php?'+tkLocation+'&rad='+fuelDist+'&sort=price&type='+fuelType.toLowerCase()+'&apikey='+tkKey, function (data) {
//console.log(data);
if (data['status'] != 'error'){
$('#tkStand').text(new Date().transUnit('d.m.Y H:i') + ' Uhr');
var line = '';
var entry = data['stations'];

Expand All @@ -129,7 +133,10 @@ <h3>Kraftstoffpreise</h3>
})
.fail(notify.json);
})
$('#tkFuel').trigger('init');
$(document).on('pagecontainershow', function(){
if (sv.activePage.attr('id') == '{{ page }}')
$('#tkFuel').trigger('init');
});
});
</script>

Expand Down
Loading

0 comments on commit eafd22a

Please sign in to comment.