From 9e0a08c38cb1da8fcdfb49700bec64b147ee7610 Mon Sep 17 00:00:00 2001
From: Max <51083570+DRdrProfessor@users.noreply.github.com>
Date: Thu, 27 Apr 2023 17:23:01 +0200
Subject: [PATCH] Working on UI
---
.gitignore | 52 +---------------------
SharpRSS.sln | 22 +++++++++
SharpRss/Models/FeedInfo.cs | 10 +++++
SharpRss/RssService.cs | 24 ++++++++++
SharpRss/SharpRss.csproj | 14 ++++++
WebSharpRSS/App.razor | 12 +++++
WebSharpRSS/MainLayout.razor | 34 ++++++++++++++
WebSharpRSS/Pages/Index.razor | 8 ++++
WebSharpRSS/Pages/_Host.cshtml | 32 +++++++++++++
WebSharpRSS/Program.cs | 37 +++++++++++++++
WebSharpRSS/Properties/launchSettings.json | 35 +++++++++++++++
WebSharpRSS/WebSharpRSS.csproj | 22 +++++++++
WebSharpRSS/_Imports.razor | 6 +++
WebSharpRSS/appsettings.Development.json | 9 ++++
WebSharpRSS/appsettings.json | 9 ++++
WebSharpRSS/wwwroot/css/site.css | 28 ++++++++++++
16 files changed, 304 insertions(+), 50 deletions(-)
create mode 100644 SharpRSS.sln
create mode 100644 SharpRss/Models/FeedInfo.cs
create mode 100644 SharpRss/RssService.cs
create mode 100644 SharpRss/SharpRss.csproj
create mode 100644 WebSharpRSS/App.razor
create mode 100644 WebSharpRSS/MainLayout.razor
create mode 100644 WebSharpRSS/Pages/Index.razor
create mode 100644 WebSharpRSS/Pages/_Host.cshtml
create mode 100644 WebSharpRSS/Program.cs
create mode 100644 WebSharpRSS/Properties/launchSettings.json
create mode 100644 WebSharpRSS/WebSharpRSS.csproj
create mode 100644 WebSharpRSS/_Imports.razor
create mode 100644 WebSharpRSS/appsettings.Development.json
create mode 100644 WebSharpRSS/appsettings.json
create mode 100644 WebSharpRSS/wwwroot/css/site.css
diff --git a/.gitignore b/.gitignore
index 8a30d25..d2e0280 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,8 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
-## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
-
+## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
+.idea/
# User-specific files
*.rsuser
*.suo
@@ -23,7 +23,6 @@ mono_crash.*
[Rr]eleases/
x64/
x86/
-[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
@@ -62,9 +61,6 @@ project.lock.json
project.fragment.lock.json
artifacts/
-# ASP.NET Scaffolding
-ScaffoldingReadMe.txt
-
# StyleCop
StyleCopReport.xml
@@ -90,7 +86,6 @@ StyleCopReport.xml
*.tmp_proj
*_wpftmp.csproj
*.log
-*.tlog
*.vspscc
*.vssscc
.builds
@@ -142,11 +137,6 @@ _TeamCity*
.axoCover/*
!.axoCover/settings.json
-# Coverlet is a free, cross platform Code Coverage Tool
-coverage*.json
-coverage*.xml
-coverage*.info
-
# Visual Studio code coverage results
*.coverage
*.coveragexml
@@ -294,17 +284,6 @@ node_modules/
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
-# Visual Studio 6 auto-generated project file (contains which files were open etc.)
-*.vbp
-
-# Visual Studio 6 workspace and project file (working project files containing files to include in project)
-*.dsw
-*.dsp
-
-# Visual Studio 6 technical files
-*.ncb
-*.aps
-
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
@@ -361,9 +340,6 @@ ASALocalRun/
# Local History for Visual Studio
.localhistory/
-# Visual Studio History (VSHistory) files
-.vshistory/
-
# BeatPulse healthcheck temp database
healthchecksdb
@@ -372,27 +348,3 @@ MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
-
-# Fody - auto-generated XML schema
-FodyWeavers.xsd
-
-# VS Code files for those working on multiple tools
-.vscode/*
-!.vscode/settings.json
-!.vscode/tasks.json
-!.vscode/launch.json
-!.vscode/extensions.json
-*.code-workspace
-
-# Local History for Visual Studio Code
-.history/
-
-# Windows Installer files from build outputs
-*.cab
-*.msi
-*.msix
-*.msm
-*.msp
-
-# JetBrains Rider
-*.sln.iml
diff --git a/SharpRSS.sln b/SharpRSS.sln
new file mode 100644
index 0000000..0d958ac
--- /dev/null
+++ b/SharpRSS.sln
@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebSharpRSS", "WebSharpRSS\WebSharpRSS.csproj", "{749FE445-8D46-4631-BB57-FC648E22ADB6}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpRss", "SharpRss\SharpRss.csproj", "{DB3777BA-A383-4B83-AF65-DE51907CE75A}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {749FE445-8D46-4631-BB57-FC648E22ADB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {749FE445-8D46-4631-BB57-FC648E22ADB6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {749FE445-8D46-4631-BB57-FC648E22ADB6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {749FE445-8D46-4631-BB57-FC648E22ADB6}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DB3777BA-A383-4B83-AF65-DE51907CE75A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DB3777BA-A383-4B83-AF65-DE51907CE75A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DB3777BA-A383-4B83-AF65-DE51907CE75A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DB3777BA-A383-4B83-AF65-DE51907CE75A}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+EndGlobal
diff --git a/SharpRss/Models/FeedInfo.cs b/SharpRss/Models/FeedInfo.cs
new file mode 100644
index 0000000..a7fb64b
--- /dev/null
+++ b/SharpRss/Models/FeedInfo.cs
@@ -0,0 +1,10 @@
+using CodeHollow.FeedReader;
+
+namespace SharpRss.Models
+{
+ public class FeedInfo
+ {
+ public string FeedName { get; set; }
+ public string Url { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/SharpRss/RssService.cs b/SharpRss/RssService.cs
new file mode 100644
index 0000000..da99c92
--- /dev/null
+++ b/SharpRss/RssService.cs
@@ -0,0 +1,24 @@
+using System.Linq;
+using CodeHollow.FeedReader;
+
+namespace SharpRss
+{
+ public class RssService
+ {
+ public async void GetFeeds()
+ {
+ //TODO: Load from db or something.
+
+ var urls = await FeedReader.GetFeedUrlsFromUrlAsync(_feeds[0]);
+ string url;
+ if (urls.Count() < 1)
+ url = _feeds[0];
+ else
+ url = urls.First().Url;
+
+ Feed f = await FeedReader.ReadAsync(url);
+ }
+
+ private readonly string[] _feeds = { "https://www.reddit.com/r/freshrss/.rss", "http://fedoramagazine.org/" };
+ }
+}
\ No newline at end of file
diff --git a/SharpRss/SharpRss.csproj b/SharpRss/SharpRss.csproj
new file mode 100644
index 0000000..cdcac24
--- /dev/null
+++ b/SharpRss/SharpRss.csproj
@@ -0,0 +1,14 @@
+ Sorry, there's nothing at this address.