Compare commits
No commits in common. "fa6e8bf7ccc591e9b804ada932835fbf833aa806" and "7ed00cf42df3ef647cc0a853ccf1563faae052b3" have entirely different histories.
fa6e8bf7cc
...
7ed00cf42d
@ -15,7 +15,7 @@ namespace RBLNews.Maui
|
||||
});
|
||||
|
||||
builder.Services.AddMauiBlazorWebView();
|
||||
builder.Services.AddBlazorBootstrap();
|
||||
builder.Services.AddAntDesign();
|
||||
|
||||
#if DEBUG
|
||||
builder.Services.AddBlazorWebViewDeveloperTools();
|
||||
|
||||
@ -58,7 +58,6 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Blazor.Bootstrap" Version="3.0.0" />
|
||||
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
|
||||
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="$(MauiVersion)" />
|
||||
|
||||
@ -5,12 +5,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
|
||||
<title>RBLNews.Maui</title>
|
||||
<base href="/" />
|
||||
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css" rel="stylesheet" />
|
||||
<link href="_content/RBLNews.Shared/blazor.bootstrap.css" rel="stylesheet" />
|
||||
|
||||
<!--<link rel="stylesheet" href="_content/RBLNews.Shared/css/bootstrap/bootstrap.min.css" />-->
|
||||
<link rel="stylesheet" href="_content/RBLNews.Shared/css/bootstrap/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="_content/RBLNews.Shared/css/app.css" />
|
||||
<link rel="stylesheet" href="RBLNews.Maui.styles.css" />
|
||||
<link rel="icon" type="image/png" href="favicon.png" />
|
||||
@ -28,14 +23,6 @@
|
||||
<a class="dismiss">🗙</a>
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
|
||||
<!-- Add chart.js reference if chart components are used in your application. -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.0.1/chart.umd.js" integrity="sha512-gQhCDsnnnUfaRzD8k1L5llCCV6O9HN09zClIzzeJ8OJ9MpGmIlCxm+pdCkqTwqJ4JcjbojFr79rl2F1mzcoLMQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<!-- Add chartjs-plugin-datalabels.min.js reference if chart components with data label feature is used in your application. -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/chartjs-plugin-datalabels/2.2.0/chartjs-plugin-datalabels.min.js" integrity="sha512-JPcRR8yFa8mmCsfrw4TNte1ZvF1e3+1SdGMslZvmrzDYxS69J7J49vkFL8u6u8PlPJK+H3voElBtUCzaXj+6ig==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<!-- Add sortable.js reference if SortableList component is used in your application. -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/sortablejs@latest/Sortable.min.js"></script>
|
||||
|
||||
<script src="_framework/blazor.webview.js" autostart="false"></script>
|
||||
|
||||
</body>
|
||||
|
||||
@ -1,16 +1,14 @@
|
||||
@inherits LayoutComponentBase
|
||||
|
||||
<NavMenu />
|
||||
<div class="page">
|
||||
|
||||
|
||||
@* <div class="sidebar">
|
||||
<div class="sidebar">
|
||||
<NavMenu />
|
||||
</div> *@
|
||||
</div>
|
||||
|
||||
<main>
|
||||
@* <div class="top-row px-4">
|
||||
<div class="top-row px-4">
|
||||
<a href="https://learn.microsoft.com/aspnet/core/" target="_blank">About</a>
|
||||
</div> *@
|
||||
</div>
|
||||
|
||||
<article class="content px-4">
|
||||
@Body
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<div class="top-row ps-3 navbar navbar-dark">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="">RBL News auf einen Blick!</a>
|
||||
<a class="navbar-brand" href="">RBLNews.Maui</a>
|
||||
</div>
|
||||
</div>
|
||||
@*
|
||||
|
||||
<input type="checkbox" title="Navigation menu" class="navbar-toggler" />
|
||||
|
||||
<div class="nav-scrollable" onclick="document.querySelector('.navbar-toggler').click()">
|
||||
@ -14,7 +14,7 @@
|
||||
</NavLink>
|
||||
</div>
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="feeds">
|
||||
<NavLink class="nav-link" href="counter">
|
||||
<span class="bi bi-plus-square-fill-nav-menu" aria-hidden="true"></span> Counter
|
||||
</NavLink>
|
||||
</div>
|
||||
@ -25,4 +25,3 @@
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
*@
|
||||
16
RBLNews.Shared/Components/Pages/Counter.razor
Normal file
16
RBLNews.Shared/Components/Pages/Counter.razor
Normal file
@ -0,0 +1,16 @@
|
||||
@page "/counter"
|
||||
|
||||
<h1>Counter</h1>
|
||||
|
||||
<p role="status">Current count: @currentCount</p>
|
||||
|
||||
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>
|
||||
|
||||
@code {
|
||||
private int currentCount = 0;
|
||||
|
||||
private void IncrementCount()
|
||||
{
|
||||
currentCount++;
|
||||
}
|
||||
}
|
||||
@ -1,67 +0,0 @@
|
||||
@page "/"
|
||||
@using RBLFeederCommon.Models.RssFeed
|
||||
@using RBLNews.Shared.Enums
|
||||
@if (rssVM == null)
|
||||
{
|
||||
<div class="d-flex justify-content-center">
|
||||
Lade Feeds ...
|
||||
<Spinner Type="SpinnerType.Grow" Color="SpinnerColor.Primary" Size="SpinnerSize.Large" />
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="row">
|
||||
@foreach (FeedGroupVM feedGrp in rssVM.FeedGroups)
|
||||
{
|
||||
<h3>@feedGrp.PublishDate</h3>
|
||||
@foreach (FeedVM feed in feedGrp.Feeds)
|
||||
{
|
||||
<div class="col-sm-12 col-md-9 col-lg-6">
|
||||
<Card>
|
||||
<CardBody>
|
||||
<CardTitle>@feed.Title</CardTitle>
|
||||
<CardText>@feed.Description</CardText>
|
||||
</CardBody>
|
||||
<CardFooter>
|
||||
@GetRssSourceName((RssFeedSources)@feed.Source) | @feed.PubDate <Button Color="ButtonColor.Primary" To="@feed.Link" Type="ButtonType.Link">Öffnen</Button>
|
||||
</CardFooter>
|
||||
</Card>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
@code {
|
||||
private RssVM rssVM;
|
||||
HttpClient httpClient = new HttpClient();
|
||||
|
||||
protected async override Task OnInitializedAsync()
|
||||
{
|
||||
rssVM = await httpClient.GetFromJsonAsync<RssVM>("https://rblnews.de/api/feeds");
|
||||
}
|
||||
|
||||
private string GetRssSourceName(RssFeedSources source)
|
||||
{
|
||||
switch (source)
|
||||
{
|
||||
case RssFeedSources.RbLive:
|
||||
case RssFeedSources.NitterRbLive:
|
||||
return "RBLive!";
|
||||
case RssFeedSources.NitterFabrizioRomano:
|
||||
return "Fabrizio Romano";
|
||||
case RssFeedSources.Lvz:
|
||||
return "LVZ";
|
||||
case RssFeedSources.Kicker:
|
||||
return "Kicker";
|
||||
case RssFeedSources.Bild:
|
||||
return "BILD";
|
||||
case RssFeedSources.Transfermarkt:
|
||||
return "Transfermarkt";
|
||||
default:
|
||||
return "?";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
7
RBLNews.Shared/Components/Pages/Home.razor
Normal file
7
RBLNews.Shared/Components/Pages/Home.razor
Normal file
@ -0,0 +1,7 @@
|
||||
@page "/"
|
||||
|
||||
<h1>Hello, world!</h1>
|
||||
|
||||
Welcome to your new app.
|
||||
|
||||
<Button Type="primary">Hello World from ANT CSS!</Button>
|
||||
61
RBLNews.Shared/Components/Pages/Weather.razor
Normal file
61
RBLNews.Shared/Components/Pages/Weather.razor
Normal file
@ -0,0 +1,61 @@
|
||||
@page "/weather"
|
||||
|
||||
<h1>Weather</h1>
|
||||
|
||||
<p>This component demonstrates showing data.</p>
|
||||
|
||||
@if (forecasts == null)
|
||||
{
|
||||
<p><em>Loading...</em></p>
|
||||
}
|
||||
else
|
||||
{
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Temp. (C)</th>
|
||||
<th>Temp. (F)</th>
|
||||
<th>Summary</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var forecast in forecasts)
|
||||
{
|
||||
<tr>
|
||||
<td>@forecast.Date.ToShortDateString()</td>
|
||||
<td>@forecast.TemperatureC</td>
|
||||
<td>@forecast.TemperatureF</td>
|
||||
<td>@forecast.Summary</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
|
||||
@code {
|
||||
private WeatherForecast[]? forecasts;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
// Simulate asynchronous loading to demonstrate a loading indicator
|
||||
await Task.Delay(500);
|
||||
|
||||
var startDate = DateOnly.FromDateTime(DateTime.Now);
|
||||
var summaries = new[] { "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" };
|
||||
forecasts = Enumerable.Range(1, 5).Select(index => new WeatherForecast
|
||||
{
|
||||
Date = startDate.AddDays(index),
|
||||
TemperatureC = Random.Shared.Next(-20, 55),
|
||||
Summary = summaries[Random.Shared.Next(summaries.Length)]
|
||||
}).ToArray();
|
||||
}
|
||||
|
||||
private class WeatherForecast
|
||||
{
|
||||
public DateOnly Date { get; set; }
|
||||
public int TemperatureC { get; set; }
|
||||
public string? Summary { get; set; }
|
||||
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
|
||||
}
|
||||
}
|
||||
@ -1,13 +0,0 @@
|
||||
namespace RBLNews.Shared.Enums
|
||||
{
|
||||
public enum RssFeedSources
|
||||
{
|
||||
Lvz,
|
||||
Kicker,
|
||||
Bild,
|
||||
Transfermarkt,
|
||||
NitterRbLive,
|
||||
NitterFabrizioRomano,
|
||||
RbLive
|
||||
}
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace RBLFeederCommon.Models.RssFeed;
|
||||
|
||||
public class FeedGroupVM
|
||||
{
|
||||
[JsonProperty("pubDate")]
|
||||
public DateTime PublishDate { get; set; }
|
||||
|
||||
[JsonProperty("news")]
|
||||
public IList<FeedVM> Feeds { get; set; }
|
||||
}
|
||||
@ -1,27 +0,0 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace RBLFeederCommon.Models.RssFeed;
|
||||
|
||||
public class FeedVM
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public string Id { get; set; }
|
||||
|
||||
[JsonProperty("title")]
|
||||
public string Title { get; set; }
|
||||
|
||||
[JsonProperty("imgUrl")]
|
||||
public string ImgUrl { get; set; }
|
||||
|
||||
[JsonProperty("description")]
|
||||
public string Description { get; set; }
|
||||
|
||||
[JsonProperty("pubDate")]
|
||||
public DateTime? PubDate { get; set; }
|
||||
|
||||
[JsonProperty("link")]
|
||||
public string Link { get; set; }
|
||||
|
||||
[JsonProperty("source")]
|
||||
public int Source { get; set; }
|
||||
}
|
||||
@ -1,17 +0,0 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace RBLFeederCommon.Models.RssFeed;
|
||||
|
||||
public class RssVM
|
||||
{
|
||||
[JsonProperty("lastUpdate")]
|
||||
public DateTime LastUpdate { get; set; }
|
||||
|
||||
|
||||
[JsonProperty("description")]
|
||||
public string Description { get; set; }
|
||||
|
||||
|
||||
[JsonProperty("feedGroups")]
|
||||
public IList<FeedGroupVM> FeedGroups { get; set; } = new List<FeedGroupVM>();
|
||||
}
|
||||
@ -13,9 +13,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AntDesign" Version="0.20.3" />
|
||||
<PackageReference Include="Blazor.Bootstrap" Version="3.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.8" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
@* ANT CSS DESIGN IMPORT -------------------- *@
|
||||
@using BlazorBootstrap;
|
||||
@using AntDesign
|
||||
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*html, body {
|
||||
html, body {
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
@ -84,4 +84,3 @@ h1:focus {
|
||||
padding-left: env(safe-area-inset-left);
|
||||
}
|
||||
}
|
||||
*/
|
||||
7
RBLNews.Shared/wwwroot/css/bootstrap/bootstrap.min.css
vendored
Normal file
7
RBLNews.Shared/wwwroot/css/bootstrap/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -5,11 +5,7 @@
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<base href="/" />
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css" rel="stylesheet" />
|
||||
<link href="_content/RBLNews.Shared/blazor.bootstrap.css" rel="stylesheet" />
|
||||
|
||||
@* <link rel="stylesheet" href="_content/RBLNews.Shared/css/bootstrap/bootstrap.min.css" /> *@
|
||||
<link rel="stylesheet" href="_content/RBLNews.Shared/css/bootstrap/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="_content/RBLNews.Shared/css/app.css" />
|
||||
<link rel="stylesheet" href="RBLNews.Web.styles.css" />
|
||||
<HeadOutlet @rendermode="InteractiveServer" />
|
||||
@ -17,13 +13,7 @@
|
||||
|
||||
<body>
|
||||
<Routes @rendermode="InteractiveServer" />
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
|
||||
<!-- Add chart.js reference if chart components are used in your application. -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.0.1/chart.umd.js" integrity="sha512-gQhCDsnnnUfaRzD8k1L5llCCV6O9HN09zClIzzeJ8OJ9MpGmIlCxm+pdCkqTwqJ4JcjbojFr79rl2F1mzcoLMQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<!-- Add chartjs-plugin-datalabels.min.js reference if chart components with data label feature is used in your application. -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/chartjs-plugin-datalabels/2.2.0/chartjs-plugin-datalabels.min.js" integrity="sha512-JPcRR8yFa8mmCsfrw4TNte1ZvF1e3+1SdGMslZvmrzDYxS69J7J49vkFL8u6u8PlPJK+H3voElBtUCzaXj+6ig==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<!-- Add sortable.js reference if SortableList component is used in your application. -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/sortablejs@latest/Sortable.min.js"></script>
|
||||
<AntContainer @rendermode="RenderMode.InteractiveAuto" />
|
||||
<script src="_framework/blazor.web.js"></script>
|
||||
</body>
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
@using RBLNews.Shared.Components
|
||||
|
||||
@* ANT CSS DESIGN IMPORT -------------------- *@
|
||||
@using BlazorBootstrap;
|
||||
@using AntDesign
|
||||
|
||||
@* DEFAULT IMPORTS -------------------------- *@
|
||||
@using System.Net.Http
|
||||
|
||||
@ -5,7 +5,7 @@ var builder = WebApplication.CreateBuilder(args);
|
||||
// Add services to the container.
|
||||
builder.Services.AddRazorComponents()
|
||||
.AddInteractiveServerComponents();
|
||||
builder.Services.AddBlazorBootstrap();
|
||||
builder.Services.AddAntDesign();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
@ -14,8 +14,4 @@
|
||||
<Folder Include="wwwroot\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Blazor.Bootstrap" Version="3.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user