Vorstösse

Untenstehend ist eine Liste der Vorstösse, welche im Thuner Stadtrat durch unsere Fraktion eingereicht wurden.

Liste der Vorstoesse
#vorstoesse { list-style-type: none; padding-left: 0; } /* Optional: Style the list items */ #vorstoesse li { margin-bottom: 5px; } /* Style for the year headings */ #vorstoesse li.year { font-weight: bold; margin-top: 15px; } /* Style for the month headings */ #vorstoesse li.month { font-style: italic; margin-top: 10px; } $(document).ready(function(){ $.getJSON("https://api.sp-thun.ch/vorstoesse.php", function(data) { // Check if data is an array if (!Array.isArray(data)) { console.error('Data is not an array:', data); return; } // Sort data by 'einreichung' date in descending order data.sort(function(a, b){ return Date.parse(b.einreichung) - Date.parse(a.einreichung); }); var currentYear = ''; var currentMonth = ''; data.forEach(function(item){ // Check if 'einreichung' and 'title' exist if (!item.einreichung || !item.title) { console.warn('Missing properties in item:', item); return; } var dateParts = item.einreichung.split("-"); var year = dateParts[0]; var month = dateParts[1]; var day = dateParts[2]; // Add Year title if it has changed if (year !== currentYear) { $('#vorstoesse').append('
  • ' + year + '
  • '); currentYear = year; currentMonth = ''; // Reset month when year changes } // Add Month title if it has changed if (month !== currentMonth) { var monthNames = ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"]; $('#vorstoesse').append('
  • ' + monthNames[parseInt(month, 10) - 1] + '
  • '); currentMonth = month; } // Append the item to the list using the correct title property $('#vorstoesse').append( '
  • ' + item.title + '
  • ' ); }); }) .fail(function(jqxhr, textStatus, error) { console.error("Request Failed: " + textStatus + ", " + error); }); });
      Animation laden...Animation laden...Animation laden...

      Newsfeed