This commit is contained in:
Daniel Roth 2021-05-03 22:00:50 -07:00
Родитель 83555941c2
Коммит 97a743ed31
126 изменённых файлов: 254 добавлений и 2610 удалений

Просмотреть файл

@ -40,6 +40,10 @@
<PackageReference Include="PInvoke.User32" Version="0.7.104" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BlazorWeather\BlazorWeather.csproj" />
</ItemGroup>
<ItemGroup>
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" RuntimeFrameworkVersion="10.0.19041.16" />
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.19041.16" />
@ -70,9 +74,6 @@
<EmbeddedResource Include="..\BlazorWeather.Maui\wwwroot\css\*" Link="wwwroot\css\%(FileName)%(Extension)" />
<EmbeddedResource Include="..\BlazorWeather.Maui\wwwroot\weather-icons\*" Link="wwwroot\weather-icons\%(FileName)%(Extension)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BlazorWeather2021\BlazorWeather2021.csproj" />
</ItemGroup>
<ItemGroup>
<Content Include="Windows\Resources\trayicon.ico">

Просмотреть файл

@ -24,9 +24,9 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BlazorWeather2021\BlazorWeather2021.csproj" />
<ProjectReference Include="..\BlazorWeather\BlazorWeather.csproj" />
</ItemGroup>
<ItemGroup>
<MauiImage Include="Resources\AppIcons\appicon.svg" ForegroundFile="Resources\AppIcons\appiconfg.svg" IsAppIcon="true" />
<MauiSplashScreen Include="Resources\AppIcons\appiconfg.svg" Color="#512BD4" />

Просмотреть файл

@ -1 +1,3 @@
<BlazorWeather2021.App />
@namespace BlazorWeather.Maui
<BlazorWeather.App />

Просмотреть файл

@ -1,4 +1,4 @@
using BlazorWeather2021;
using BlazorWeather;
using Microsoft.AspNetCore.Components.WebView.Maui;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
@ -17,25 +17,32 @@ namespace BlazorWeather.Maui
{
InitializeComponent();
// Setup configuration
var configBuilder = new ConfigurationBuilder();
configBuilder.AddUserSecrets(this.GetType().Assembly);
var config = configBuilder.Build();
// Configure services
var serviceCollection = new ServiceCollection();
serviceCollection.AddBlazorWebView();
serviceCollection.AddBlazorWeather(config["WeatherBaseUri"]);
// Create the BlazorWebView
var blazorWebView = new BlazorWebView()
{
VerticalOptions = LayoutOptions.FillAndExpand,
HostPage = @"wwwroot/index.html",
Services = serviceCollection.BuildServiceProvider(),
RootComponents =
{
new RootComponent
{
Selector = "#app",
ComponentType = Type.GetType("BlazorWeather.Maui.Main")
}
}
};
var componentType = Type.GetType("BlazorWeather.Maui.Main")
?? Type.GetType("BlazorWeather.Maui.WinUI3.Main");
blazorWebView.RootComponents.Add(new RootComponent { Selector = "#app", ComponentType = componentType, });
Content = blazorWebView;
SetupTrayIcon();

Просмотреть файл

@ -1,6 +1,6 @@
@import '';
/* _content/BlazorWeather2021/Pages/Favorites/Favorites.razor.rz.scp.css */
/* _content/BlazorWeather/Pages/Favorites/Favorites.razor.rz.scp.css */
.grid[b-94j5n3mwyr] {
grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
grid-auto-rows: 1fr;
@ -35,7 +35,7 @@ a[b-94j5n3mwyr] {
a:hover[b-94j5n3mwyr] {
color: white;
}
/* _content/BlazorWeather2021/Pages/Home/Home.razor.rz.scp.css */
/* _content/BlazorWeather/Pages/Home/Home.razor.rz.scp.css */
.desktop h3[b-cgs33b3v3l], .desktop .right-col[b-cgs33b3v3l] {
border-color: #152C39;
}
@ -67,7 +67,7 @@ a:hover[b-94j5n3mwyr] {
50% { transform: rotate(-22deg) }
100% { transform: rotate(-28deg) }
}
/* _content/BlazorWeather2021/Pages/Home/Next14Days.razor.rz.scp.css */
/* _content/BlazorWeather/Pages/Home/Next14Days.razor.rz.scp.css */
.temperature-gradient[b-nlww04gcqp] {
background: linear-gradient(180deg, #7014E8 0%, rgba(73, 49, 222, 0) 100%);
border-radius: 5px;
@ -77,7 +77,7 @@ a:hover[b-94j5n3mwyr] {
color: #91A7B7;
border-color: #91A7B7;
}
/* _content/BlazorWeather2021/Pages/Home/StatBoxes.razor.rz.scp.css */
/* _content/BlazorWeather/Pages/Home/StatBoxes.razor.rz.scp.css */
.grid[b-qorhpl6y3o] {
grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
grid-auto-rows: 1fr;
@ -105,7 +105,7 @@ a[b-qorhpl6y3o] {
a:hover[b-qorhpl6y3o] {
color: white;
}
/* _content/BlazorWeather2021/Pages/Settings/Settings.razor.rz.scp.css */
/* _content/BlazorWeather/Pages/Settings/Settings.razor.rz.scp.css */
label:hover[b-wte9vde8oz] {
background-color: var(--mid-background);
}
@ -131,8 +131,8 @@ label > svg[b-wte9vde8oz] {
input[type=radio]:checked + div + svg[b-wte9vde8oz] {
display: block;
}
/* _content/BlazorWeather2021/Shared/MainLayout.razor.rz.scp.css */
/* _content/BlazorWeather2021/Shared/NavMenu.razor.rz.scp.css */
/* _content/BlazorWeather/Shared/MainLayout.razor.rz.scp.css */
/* _content/BlazorWeather/Shared/NavMenu.razor.rz.scp.css */
nav[b-sphds4i9k6] {
background-color: var(--mid-background);
z-index: 1;

Просмотреть файл

@ -5,9 +5,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>Blazor Android app</title>
<base href="/" />
<link href="_content/BlazorWeather2021/css/tailwind.min.css" rel="stylesheet" />
<link href="_content/BlazorWeather2021/css/app.css" rel="stylesheet" />
<link href="_content/BlazorWeather2021/BlazorWeather2021.bundle.scp.css" rel="stylesheet" />
<link href="_content/BlazorWeather/css/tailwind.min.css" rel="stylesheet" />
<link href="_content/BlazorWeather/css/app.css" rel="stylesheet" />
<link href="_content/BlazorWeather/BlazorWeather.bundle.scp.css" rel="stylesheet" />
</head>
<body>

Просмотреть файл

@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<UserSecretsId>99cc6bcb-dbb2-493e-8f6e-04c9d2d10a3f</UserSecretsId>
<UserSecretsId>6da98b65-8ce9-42d6-b26b-84b7c4b3051a</UserSecretsId>
</PropertyGroup>
<ItemGroup>

Просмотреть файл

@ -10,9 +10,10 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>BlazorWeather.Server</title>
<title>Blazor Weather 2021</title>
<base href="~/" />
<link href="_content/BlazorWeather/css/weather.css" rel="stylesheet" />
<link href="_content/BlazorWeather/css/app.css" rel="stylesheet" />
<link href="_content/BlazorWeather/css/tailwind.min.css" rel="stylesheet" />
<link href="BlazorWeather.Server.styles.css" rel="stylesheet" />
</head>
<body>
@ -31,4 +32,4 @@
<script src="_framework/blazor.server.js"></script>
</body>
</html>
</html>

Просмотреть файл

@ -26,7 +26,7 @@ namespace BlazorWeather.Server
{
services.AddRazorPages();
services.AddServerSideBlazor();
services.AddBlazorWeather();
services.AddBlazorWeather(Configuration["WeatherBaseUri"]);
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.

Просмотреть файл

@ -1,27 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<UserSecretsId>99cc6bcb-dbb2-493e-8f6e-04c9d2d10a3f</UserSecretsId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.WindowsForms" Version="6.0.0-preview.4.21222.16" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="6.0.0-preview.4.21222.10" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BlazorWeather\BlazorWeather.csproj" />
</ItemGroup>
<ItemGroup>
<Content Update="wwwroot\app.css">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\index.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup></Project>

41
BlazorWeather.WindowsForms/Form1.Designer.cs сгенерированный
Просмотреть файл

@ -1,41 +0,0 @@

namespace BlazorWeather.WindowsForms
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Text = "Form1";
}
#endregion
}
}

Просмотреть файл

@ -1,42 +0,0 @@
using Microsoft.AspNetCore.Components.WebView.WindowsForms;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace BlazorWeather.WindowsForms
{
public partial class Form1 : Form
{
public Form1()
{
var services = new ServiceCollection();
services.AddBlazorWebView();
services.AddBlazorWeather();
var builder = new ConfigurationBuilder()
.AddUserSecrets<Form1>();
var configuration = builder.Build();
services.AddSingleton<IConfiguration>(_ => configuration);
var blazor = new BlazorWebView()
{
Dock = DockStyle.Fill,
HostPage = "wwwroot/index.html",
Services = services.BuildServiceProvider(),
};
blazor.RootComponents.Add<App>("#app");
Controls.Add(blazor);
InitializeComponent();
}
}
}

Просмотреть файл

@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

Просмотреть файл

@ -1,23 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace BlazorWeather.WindowsForms
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.SetHighDpiMode(HighDpiMode.SystemAware);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}

Просмотреть файл

@ -1,20 +0,0 @@
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>BlazorWeather</title>
<link href="_content/BlazorWeather/css/weather.css" rel="stylesheet" />
</head>
<body>
<div id="app"></div>
<div id="blazor-error-ui">
An unhandled error has occurred.
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>
<script src="_framework/blazor.webview.js"></script>
</body>
</html>

Просмотреть файл

@ -3,27 +3,19 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29311.281
MinimumVisualStudioVersion = 15.0.26124.0
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WeatherClientLib", "WeatherClientLib\WeatherClientLib.csproj", "{E7DC79FD-C066-43B9-8D91-6AB167540C29}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWeather.Server", "BlazorWeather.Server\BlazorWeather.Server.csproj", "{7B73AE56-8A04-4C40-A168-0624BDE6E777}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWeather", "BlazorWeather\BlazorWeather.csproj", "{75932D29-0317-4E1D-9718-56FBD1D4CA37}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWeather.WindowsForms", "BlazorWeather.WindowsForms\BlazorWeather.WindowsForms.csproj", "{CAE64143-966B-43B3-8D52-06EEB2EE355A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWeather2021", "BlazorWeather2021\BlazorWeather2021.csproj", "{BB52D8A0-A330-4678-8ADD-F3E4EBE28691}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWeather.Maui", "BlazorWeather.Maui\BlazorWeather.Maui.csproj", "{AD4262EF-94A3-4248-A261-16EB23FF03AC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WeatherClient2021", "WeatherClient2021\WeatherClient2021.csproj", "{9BE9C852-9F23-48F2-AF18-3359E6762B6C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWeather.Maui.WinUI3", "BlazorWeather.Maui.WinUI3\BlazorWeather.Maui.WinUI3.csproj", "{34FC8854-83D8-4B30-A8BF-33AB4F4CC6E8}"
EndProject
Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "BlazorWeather.Maui.WinUI3 (Package)", "BlazorWeather.Maui.WinUI3 (Package)\BlazorWeather.Maui.WinUI3 (Package).wapproj", "{A88FCF8C-EC35-4623-B126-C591EEF99C70}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWeather2021.Client", "BlazorWeather2021.Client\BlazorWeather2021.Client.csproj", "{C7E9EFA3-B797-4A97-92AA-D1E99607E237}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "native", "native", "{C2147996-A910-4375-9ED1-3EF5C744D6EF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWeather2021.Server", "BlazorWeather2021.Server\BlazorWeather2021.Server.csproj", "{D95183C5-8B1F-4BFE-971A-1F22EB6BD89E}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WeatherClient", "WeatherClient\WeatherClient.csproj", "{4464A83F-1E70-4372-A620-0E4FA3DF5CFE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWeather", "BlazorWeather\BlazorWeather.csproj", "{ECC6086F-BF11-4E90-90EB-55B496429B09}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWeather.Server", "BlazorWeather.Server\BlazorWeather.Server.csproj", "{6A7E0E01-1D24-41EF-8640-FE0DE8F784DE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -37,86 +29,6 @@ Global
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E7DC79FD-C066-43B9-8D91-6AB167540C29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E7DC79FD-C066-43B9-8D91-6AB167540C29}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E7DC79FD-C066-43B9-8D91-6AB167540C29}.Debug|arm64.ActiveCfg = Debug|Any CPU
{E7DC79FD-C066-43B9-8D91-6AB167540C29}.Debug|arm64.Build.0 = Debug|Any CPU
{E7DC79FD-C066-43B9-8D91-6AB167540C29}.Debug|x64.ActiveCfg = Debug|Any CPU
{E7DC79FD-C066-43B9-8D91-6AB167540C29}.Debug|x64.Build.0 = Debug|Any CPU
{E7DC79FD-C066-43B9-8D91-6AB167540C29}.Debug|x86.ActiveCfg = Debug|Any CPU
{E7DC79FD-C066-43B9-8D91-6AB167540C29}.Debug|x86.Build.0 = Debug|Any CPU
{E7DC79FD-C066-43B9-8D91-6AB167540C29}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E7DC79FD-C066-43B9-8D91-6AB167540C29}.Release|Any CPU.Build.0 = Release|Any CPU
{E7DC79FD-C066-43B9-8D91-6AB167540C29}.Release|arm64.ActiveCfg = Release|Any CPU
{E7DC79FD-C066-43B9-8D91-6AB167540C29}.Release|arm64.Build.0 = Release|Any CPU
{E7DC79FD-C066-43B9-8D91-6AB167540C29}.Release|x64.ActiveCfg = Release|Any CPU
{E7DC79FD-C066-43B9-8D91-6AB167540C29}.Release|x64.Build.0 = Release|Any CPU
{E7DC79FD-C066-43B9-8D91-6AB167540C29}.Release|x86.ActiveCfg = Release|Any CPU
{E7DC79FD-C066-43B9-8D91-6AB167540C29}.Release|x86.Build.0 = Release|Any CPU
{7B73AE56-8A04-4C40-A168-0624BDE6E777}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7B73AE56-8A04-4C40-A168-0624BDE6E777}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7B73AE56-8A04-4C40-A168-0624BDE6E777}.Debug|arm64.ActiveCfg = Debug|Any CPU
{7B73AE56-8A04-4C40-A168-0624BDE6E777}.Debug|arm64.Build.0 = Debug|Any CPU
{7B73AE56-8A04-4C40-A168-0624BDE6E777}.Debug|x64.ActiveCfg = Debug|Any CPU
{7B73AE56-8A04-4C40-A168-0624BDE6E777}.Debug|x64.Build.0 = Debug|Any CPU
{7B73AE56-8A04-4C40-A168-0624BDE6E777}.Debug|x86.ActiveCfg = Debug|Any CPU
{7B73AE56-8A04-4C40-A168-0624BDE6E777}.Debug|x86.Build.0 = Debug|Any CPU
{7B73AE56-8A04-4C40-A168-0624BDE6E777}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7B73AE56-8A04-4C40-A168-0624BDE6E777}.Release|Any CPU.Build.0 = Release|Any CPU
{7B73AE56-8A04-4C40-A168-0624BDE6E777}.Release|arm64.ActiveCfg = Release|Any CPU
{7B73AE56-8A04-4C40-A168-0624BDE6E777}.Release|arm64.Build.0 = Release|Any CPU
{7B73AE56-8A04-4C40-A168-0624BDE6E777}.Release|x64.ActiveCfg = Release|Any CPU
{7B73AE56-8A04-4C40-A168-0624BDE6E777}.Release|x64.Build.0 = Release|Any CPU
{7B73AE56-8A04-4C40-A168-0624BDE6E777}.Release|x86.ActiveCfg = Release|Any CPU
{7B73AE56-8A04-4C40-A168-0624BDE6E777}.Release|x86.Build.0 = Release|Any CPU
{75932D29-0317-4E1D-9718-56FBD1D4CA37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{75932D29-0317-4E1D-9718-56FBD1D4CA37}.Debug|Any CPU.Build.0 = Debug|Any CPU
{75932D29-0317-4E1D-9718-56FBD1D4CA37}.Debug|arm64.ActiveCfg = Debug|Any CPU
{75932D29-0317-4E1D-9718-56FBD1D4CA37}.Debug|arm64.Build.0 = Debug|Any CPU
{75932D29-0317-4E1D-9718-56FBD1D4CA37}.Debug|x64.ActiveCfg = Debug|Any CPU
{75932D29-0317-4E1D-9718-56FBD1D4CA37}.Debug|x64.Build.0 = Debug|Any CPU
{75932D29-0317-4E1D-9718-56FBD1D4CA37}.Debug|x86.ActiveCfg = Debug|Any CPU
{75932D29-0317-4E1D-9718-56FBD1D4CA37}.Debug|x86.Build.0 = Debug|Any CPU
{75932D29-0317-4E1D-9718-56FBD1D4CA37}.Release|Any CPU.ActiveCfg = Release|Any CPU
{75932D29-0317-4E1D-9718-56FBD1D4CA37}.Release|Any CPU.Build.0 = Release|Any CPU
{75932D29-0317-4E1D-9718-56FBD1D4CA37}.Release|arm64.ActiveCfg = Release|Any CPU
{75932D29-0317-4E1D-9718-56FBD1D4CA37}.Release|arm64.Build.0 = Release|Any CPU
{75932D29-0317-4E1D-9718-56FBD1D4CA37}.Release|x64.ActiveCfg = Release|Any CPU
{75932D29-0317-4E1D-9718-56FBD1D4CA37}.Release|x64.Build.0 = Release|Any CPU
{75932D29-0317-4E1D-9718-56FBD1D4CA37}.Release|x86.ActiveCfg = Release|Any CPU
{75932D29-0317-4E1D-9718-56FBD1D4CA37}.Release|x86.Build.0 = Release|Any CPU
{CAE64143-966B-43B3-8D52-06EEB2EE355A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CAE64143-966B-43B3-8D52-06EEB2EE355A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CAE64143-966B-43B3-8D52-06EEB2EE355A}.Debug|arm64.ActiveCfg = Debug|Any CPU
{CAE64143-966B-43B3-8D52-06EEB2EE355A}.Debug|arm64.Build.0 = Debug|Any CPU
{CAE64143-966B-43B3-8D52-06EEB2EE355A}.Debug|x64.ActiveCfg = Debug|Any CPU
{CAE64143-966B-43B3-8D52-06EEB2EE355A}.Debug|x64.Build.0 = Debug|Any CPU
{CAE64143-966B-43B3-8D52-06EEB2EE355A}.Debug|x86.ActiveCfg = Debug|Any CPU
{CAE64143-966B-43B3-8D52-06EEB2EE355A}.Debug|x86.Build.0 = Debug|Any CPU
{CAE64143-966B-43B3-8D52-06EEB2EE355A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CAE64143-966B-43B3-8D52-06EEB2EE355A}.Release|Any CPU.Build.0 = Release|Any CPU
{CAE64143-966B-43B3-8D52-06EEB2EE355A}.Release|arm64.ActiveCfg = Release|Any CPU
{CAE64143-966B-43B3-8D52-06EEB2EE355A}.Release|arm64.Build.0 = Release|Any CPU
{CAE64143-966B-43B3-8D52-06EEB2EE355A}.Release|x64.ActiveCfg = Release|Any CPU
{CAE64143-966B-43B3-8D52-06EEB2EE355A}.Release|x64.Build.0 = Release|Any CPU
{CAE64143-966B-43B3-8D52-06EEB2EE355A}.Release|x86.ActiveCfg = Release|Any CPU
{CAE64143-966B-43B3-8D52-06EEB2EE355A}.Release|x86.Build.0 = Release|Any CPU
{BB52D8A0-A330-4678-8ADD-F3E4EBE28691}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BB52D8A0-A330-4678-8ADD-F3E4EBE28691}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BB52D8A0-A330-4678-8ADD-F3E4EBE28691}.Debug|arm64.ActiveCfg = Debug|Any CPU
{BB52D8A0-A330-4678-8ADD-F3E4EBE28691}.Debug|arm64.Build.0 = Debug|Any CPU
{BB52D8A0-A330-4678-8ADD-F3E4EBE28691}.Debug|x64.ActiveCfg = Debug|Any CPU
{BB52D8A0-A330-4678-8ADD-F3E4EBE28691}.Debug|x64.Build.0 = Debug|Any CPU
{BB52D8A0-A330-4678-8ADD-F3E4EBE28691}.Debug|x86.ActiveCfg = Debug|Any CPU
{BB52D8A0-A330-4678-8ADD-F3E4EBE28691}.Debug|x86.Build.0 = Debug|Any CPU
{BB52D8A0-A330-4678-8ADD-F3E4EBE28691}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BB52D8A0-A330-4678-8ADD-F3E4EBE28691}.Release|Any CPU.Build.0 = Release|Any CPU
{BB52D8A0-A330-4678-8ADD-F3E4EBE28691}.Release|arm64.ActiveCfg = Release|Any CPU
{BB52D8A0-A330-4678-8ADD-F3E4EBE28691}.Release|arm64.Build.0 = Release|Any CPU
{BB52D8A0-A330-4678-8ADD-F3E4EBE28691}.Release|x64.ActiveCfg = Release|Any CPU
{BB52D8A0-A330-4678-8ADD-F3E4EBE28691}.Release|x64.Build.0 = Release|Any CPU
{BB52D8A0-A330-4678-8ADD-F3E4EBE28691}.Release|x86.ActiveCfg = Release|Any CPU
{BB52D8A0-A330-4678-8ADD-F3E4EBE28691}.Release|x86.Build.0 = Release|Any CPU
{AD4262EF-94A3-4248-A261-16EB23FF03AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AD4262EF-94A3-4248-A261-16EB23FF03AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AD4262EF-94A3-4248-A261-16EB23FF03AC}.Debug|arm64.ActiveCfg = Debug|arm64
@ -132,22 +44,6 @@ Global
{AD4262EF-94A3-4248-A261-16EB23FF03AC}.Release|x64.Build.0 = Release|x64
{AD4262EF-94A3-4248-A261-16EB23FF03AC}.Release|x86.ActiveCfg = Release|x86
{AD4262EF-94A3-4248-A261-16EB23FF03AC}.Release|x86.Build.0 = Release|x86
{9BE9C852-9F23-48F2-AF18-3359E6762B6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9BE9C852-9F23-48F2-AF18-3359E6762B6C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9BE9C852-9F23-48F2-AF18-3359E6762B6C}.Debug|arm64.ActiveCfg = Debug|Any CPU
{9BE9C852-9F23-48F2-AF18-3359E6762B6C}.Debug|arm64.Build.0 = Debug|Any CPU
{9BE9C852-9F23-48F2-AF18-3359E6762B6C}.Debug|x64.ActiveCfg = Debug|Any CPU
{9BE9C852-9F23-48F2-AF18-3359E6762B6C}.Debug|x64.Build.0 = Debug|Any CPU
{9BE9C852-9F23-48F2-AF18-3359E6762B6C}.Debug|x86.ActiveCfg = Debug|Any CPU
{9BE9C852-9F23-48F2-AF18-3359E6762B6C}.Debug|x86.Build.0 = Debug|Any CPU
{9BE9C852-9F23-48F2-AF18-3359E6762B6C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9BE9C852-9F23-48F2-AF18-3359E6762B6C}.Release|Any CPU.Build.0 = Release|Any CPU
{9BE9C852-9F23-48F2-AF18-3359E6762B6C}.Release|arm64.ActiveCfg = Release|Any CPU
{9BE9C852-9F23-48F2-AF18-3359E6762B6C}.Release|arm64.Build.0 = Release|Any CPU
{9BE9C852-9F23-48F2-AF18-3359E6762B6C}.Release|x64.ActiveCfg = Release|Any CPU
{9BE9C852-9F23-48F2-AF18-3359E6762B6C}.Release|x64.Build.0 = Release|Any CPU
{9BE9C852-9F23-48F2-AF18-3359E6762B6C}.Release|x86.ActiveCfg = Release|Any CPU
{9BE9C852-9F23-48F2-AF18-3359E6762B6C}.Release|x86.Build.0 = Release|Any CPU
{34FC8854-83D8-4B30-A8BF-33AB4F4CC6E8}.Debug|Any CPU.ActiveCfg = Debug|x86
{34FC8854-83D8-4B30-A8BF-33AB4F4CC6E8}.Debug|arm64.ActiveCfg = Debug|arm64
{34FC8854-83D8-4B30-A8BF-33AB4F4CC6E8}.Debug|arm64.Build.0 = Debug|arm64
@ -182,42 +78,63 @@ Global
{A88FCF8C-EC35-4623-B126-C591EEF99C70}.Release|x86.ActiveCfg = Release|x86
{A88FCF8C-EC35-4623-B126-C591EEF99C70}.Release|x86.Build.0 = Release|x86
{A88FCF8C-EC35-4623-B126-C591EEF99C70}.Release|x86.Deploy.0 = Release|x86
{C7E9EFA3-B797-4A97-92AA-D1E99607E237}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C7E9EFA3-B797-4A97-92AA-D1E99607E237}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C7E9EFA3-B797-4A97-92AA-D1E99607E237}.Debug|arm64.ActiveCfg = Debug|Any CPU
{C7E9EFA3-B797-4A97-92AA-D1E99607E237}.Debug|arm64.Build.0 = Debug|Any CPU
{C7E9EFA3-B797-4A97-92AA-D1E99607E237}.Debug|x64.ActiveCfg = Debug|Any CPU
{C7E9EFA3-B797-4A97-92AA-D1E99607E237}.Debug|x64.Build.0 = Debug|Any CPU
{C7E9EFA3-B797-4A97-92AA-D1E99607E237}.Debug|x86.ActiveCfg = Debug|Any CPU
{C7E9EFA3-B797-4A97-92AA-D1E99607E237}.Debug|x86.Build.0 = Debug|Any CPU
{C7E9EFA3-B797-4A97-92AA-D1E99607E237}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C7E9EFA3-B797-4A97-92AA-D1E99607E237}.Release|Any CPU.Build.0 = Release|Any CPU
{C7E9EFA3-B797-4A97-92AA-D1E99607E237}.Release|arm64.ActiveCfg = Release|Any CPU
{C7E9EFA3-B797-4A97-92AA-D1E99607E237}.Release|arm64.Build.0 = Release|Any CPU
{C7E9EFA3-B797-4A97-92AA-D1E99607E237}.Release|x64.ActiveCfg = Release|Any CPU
{C7E9EFA3-B797-4A97-92AA-D1E99607E237}.Release|x64.Build.0 = Release|Any CPU
{C7E9EFA3-B797-4A97-92AA-D1E99607E237}.Release|x86.ActiveCfg = Release|Any CPU
{C7E9EFA3-B797-4A97-92AA-D1E99607E237}.Release|x86.Build.0 = Release|Any CPU
{D95183C5-8B1F-4BFE-971A-1F22EB6BD89E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D95183C5-8B1F-4BFE-971A-1F22EB6BD89E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D95183C5-8B1F-4BFE-971A-1F22EB6BD89E}.Debug|arm64.ActiveCfg = Debug|Any CPU
{D95183C5-8B1F-4BFE-971A-1F22EB6BD89E}.Debug|arm64.Build.0 = Debug|Any CPU
{D95183C5-8B1F-4BFE-971A-1F22EB6BD89E}.Debug|x64.ActiveCfg = Debug|Any CPU
{D95183C5-8B1F-4BFE-971A-1F22EB6BD89E}.Debug|x64.Build.0 = Debug|Any CPU
{D95183C5-8B1F-4BFE-971A-1F22EB6BD89E}.Debug|x86.ActiveCfg = Debug|Any CPU
{D95183C5-8B1F-4BFE-971A-1F22EB6BD89E}.Debug|x86.Build.0 = Debug|Any CPU
{D95183C5-8B1F-4BFE-971A-1F22EB6BD89E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D95183C5-8B1F-4BFE-971A-1F22EB6BD89E}.Release|Any CPU.Build.0 = Release|Any CPU
{D95183C5-8B1F-4BFE-971A-1F22EB6BD89E}.Release|arm64.ActiveCfg = Release|Any CPU
{D95183C5-8B1F-4BFE-971A-1F22EB6BD89E}.Release|arm64.Build.0 = Release|Any CPU
{D95183C5-8B1F-4BFE-971A-1F22EB6BD89E}.Release|x64.ActiveCfg = Release|Any CPU
{D95183C5-8B1F-4BFE-971A-1F22EB6BD89E}.Release|x64.Build.0 = Release|Any CPU
{D95183C5-8B1F-4BFE-971A-1F22EB6BD89E}.Release|x86.ActiveCfg = Release|Any CPU
{D95183C5-8B1F-4BFE-971A-1F22EB6BD89E}.Release|x86.Build.0 = Release|Any CPU
{4464A83F-1E70-4372-A620-0E4FA3DF5CFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4464A83F-1E70-4372-A620-0E4FA3DF5CFE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4464A83F-1E70-4372-A620-0E4FA3DF5CFE}.Debug|arm64.ActiveCfg = Debug|Any CPU
{4464A83F-1E70-4372-A620-0E4FA3DF5CFE}.Debug|arm64.Build.0 = Debug|Any CPU
{4464A83F-1E70-4372-A620-0E4FA3DF5CFE}.Debug|x64.ActiveCfg = Debug|Any CPU
{4464A83F-1E70-4372-A620-0E4FA3DF5CFE}.Debug|x64.Build.0 = Debug|Any CPU
{4464A83F-1E70-4372-A620-0E4FA3DF5CFE}.Debug|x86.ActiveCfg = Debug|Any CPU
{4464A83F-1E70-4372-A620-0E4FA3DF5CFE}.Debug|x86.Build.0 = Debug|Any CPU
{4464A83F-1E70-4372-A620-0E4FA3DF5CFE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4464A83F-1E70-4372-A620-0E4FA3DF5CFE}.Release|Any CPU.Build.0 = Release|Any CPU
{4464A83F-1E70-4372-A620-0E4FA3DF5CFE}.Release|arm64.ActiveCfg = Release|Any CPU
{4464A83F-1E70-4372-A620-0E4FA3DF5CFE}.Release|arm64.Build.0 = Release|Any CPU
{4464A83F-1E70-4372-A620-0E4FA3DF5CFE}.Release|x64.ActiveCfg = Release|Any CPU
{4464A83F-1E70-4372-A620-0E4FA3DF5CFE}.Release|x64.Build.0 = Release|Any CPU
{4464A83F-1E70-4372-A620-0E4FA3DF5CFE}.Release|x86.ActiveCfg = Release|Any CPU
{4464A83F-1E70-4372-A620-0E4FA3DF5CFE}.Release|x86.Build.0 = Release|Any CPU
{ECC6086F-BF11-4E90-90EB-55B496429B09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ECC6086F-BF11-4E90-90EB-55B496429B09}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ECC6086F-BF11-4E90-90EB-55B496429B09}.Debug|arm64.ActiveCfg = Debug|Any CPU
{ECC6086F-BF11-4E90-90EB-55B496429B09}.Debug|arm64.Build.0 = Debug|Any CPU
{ECC6086F-BF11-4E90-90EB-55B496429B09}.Debug|x64.ActiveCfg = Debug|Any CPU
{ECC6086F-BF11-4E90-90EB-55B496429B09}.Debug|x64.Build.0 = Debug|Any CPU
{ECC6086F-BF11-4E90-90EB-55B496429B09}.Debug|x86.ActiveCfg = Debug|Any CPU
{ECC6086F-BF11-4E90-90EB-55B496429B09}.Debug|x86.Build.0 = Debug|Any CPU
{ECC6086F-BF11-4E90-90EB-55B496429B09}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ECC6086F-BF11-4E90-90EB-55B496429B09}.Release|Any CPU.Build.0 = Release|Any CPU
{ECC6086F-BF11-4E90-90EB-55B496429B09}.Release|arm64.ActiveCfg = Release|Any CPU
{ECC6086F-BF11-4E90-90EB-55B496429B09}.Release|arm64.Build.0 = Release|Any CPU
{ECC6086F-BF11-4E90-90EB-55B496429B09}.Release|x64.ActiveCfg = Release|Any CPU
{ECC6086F-BF11-4E90-90EB-55B496429B09}.Release|x64.Build.0 = Release|Any CPU
{ECC6086F-BF11-4E90-90EB-55B496429B09}.Release|x86.ActiveCfg = Release|Any CPU
{ECC6086F-BF11-4E90-90EB-55B496429B09}.Release|x86.Build.0 = Release|Any CPU
{6A7E0E01-1D24-41EF-8640-FE0DE8F784DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6A7E0E01-1D24-41EF-8640-FE0DE8F784DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6A7E0E01-1D24-41EF-8640-FE0DE8F784DE}.Debug|arm64.ActiveCfg = Debug|Any CPU
{6A7E0E01-1D24-41EF-8640-FE0DE8F784DE}.Debug|arm64.Build.0 = Debug|Any CPU
{6A7E0E01-1D24-41EF-8640-FE0DE8F784DE}.Debug|x64.ActiveCfg = Debug|Any CPU
{6A7E0E01-1D24-41EF-8640-FE0DE8F784DE}.Debug|x64.Build.0 = Debug|Any CPU
{6A7E0E01-1D24-41EF-8640-FE0DE8F784DE}.Debug|x86.ActiveCfg = Debug|Any CPU
{6A7E0E01-1D24-41EF-8640-FE0DE8F784DE}.Debug|x86.Build.0 = Debug|Any CPU
{6A7E0E01-1D24-41EF-8640-FE0DE8F784DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6A7E0E01-1D24-41EF-8640-FE0DE8F784DE}.Release|Any CPU.Build.0 = Release|Any CPU
{6A7E0E01-1D24-41EF-8640-FE0DE8F784DE}.Release|arm64.ActiveCfg = Release|Any CPU
{6A7E0E01-1D24-41EF-8640-FE0DE8F784DE}.Release|arm64.Build.0 = Release|Any CPU
{6A7E0E01-1D24-41EF-8640-FE0DE8F784DE}.Release|x64.ActiveCfg = Release|Any CPU
{6A7E0E01-1D24-41EF-8640-FE0DE8F784DE}.Release|x64.Build.0 = Release|Any CPU
{6A7E0E01-1D24-41EF-8640-FE0DE8F784DE}.Release|x86.ActiveCfg = Release|Any CPU
{6A7E0E01-1D24-41EF-8640-FE0DE8F784DE}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{AD4262EF-94A3-4248-A261-16EB23FF03AC} = {C2147996-A910-4375-9ED1-3EF5C744D6EF}
{34FC8854-83D8-4B30-A8BF-33AB4F4CC6E8} = {C2147996-A910-4375-9ED1-3EF5C744D6EF}
{A88FCF8C-EC35-4623-B126-C591EEF99C70} = {C2147996-A910-4375-9ED1-3EF5C744D6EF}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {DDBF187C-B0CA-4286-A745-0345D7BEDF9F}
EndGlobalSection

Просмотреть файл

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
@ -13,10 +13,11 @@
<PackageReference Include="Blazored.LocalStorage" Version="3.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.0-preview.4.21222.16" />
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0-preview.4.21222.10" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0-preview.4.21222.10" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\WeatherClientLib\WeatherClientLib.csproj" />
<ProjectReference Include="..\WeatherClient\WeatherClient.csproj" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,109 +0,0 @@
@inject IWeatherForecastService WeatherForecastService
@inject IGeolocationService GeolocationService
@using System.Threading.Tasks
<div>
<img class="@GetSearchClass()" src="@GetSearchIcon()" />
<input class="search" list="locations" @bind="@SearchQuery" @bind:event="oninput" @onchange="LocationSelected" placeholder="US city..." autocomplete="off" spellcheck="false" />
<img class="current-location" src="_content/BlazorWeather/icons/target.svg" @onclick="GetLocalWeather" />
</div>
<datalist id="locations">
@foreach (var location in locations.Take(10))
{
<option value="@CityState(location)"></option>
}
</datalist>
<p>
@if (noResults)
{
<span>No results.</span>
}
</p>
@code {
string searchQuery;
bool isSearching;
CancellationTokenSource currentSearchCts;
Location[] locations = new Location[0];
bool noResults;
string SearchQuery
{
get => searchQuery;
set
{
searchQuery = value;
if (!string.IsNullOrEmpty(searchQuery))
{
_ = SearchDebounced(searchQuery);
}
}
}
bool IsSearching => isSearching || currentSearchCts != null;
[Parameter]
public EventCallback<Location> LocationChanged { get; set; }
async Task GetLocalWeather()
{
isSearching = true;
var result = await GeolocationService.GetCurrentPosition();
var geolocation = result.Position.Coords;
var currentLocation = await WeatherForecastService.GetLocationByGeolocation(geolocation.Latitude, geolocation.Longitude);
isSearching = false;
await LocationChanged.InvokeAsync(currentLocation);
}
async Task SearchDebounced(string query)
{
try
{
// Cancel any existing pending search, and begin a new one
noResults = false;
currentSearchCts?.Cancel();
currentSearchCts = new CancellationTokenSource();
var cancellationToken = currentSearchCts.Token;
await Task.Delay(500);
if (!cancellationToken.IsCancellationRequested)
{
var results = await WeatherForecastService.GetLocationsByText(query, cancellationToken);
if (!cancellationToken.IsCancellationRequested)
{
locations = results;
noResults = locations.Length == 0;
currentSearchCts = null;
}
}
StateHasChanged();
}
catch (OperationCanceledException) { }
catch (Exception ex)
{
Console.Error.WriteLine(ex.StackTrace);
}
}
void LocationSelected(ChangeEventArgs e)
{
var locationName = (string)e.Value;
var selectedLocation = locations.FirstOrDefault(l => CityState(l) == locationName);
if (selectedLocation != null)
{
searchQuery = null;
noResults = false;
locations = new Location[0];
LocationChanged.InvokeAsync(selectedLocation);
}
}
string CityState(Location location) => $"{location.LocalizedName}, {location.AdministrativeArea.ID}";
string GetSearchClass() => IsSearching ? "search-icon spinning" : "search-icon";
string GetSearchIcon() => IsSearching ? "_content/BlazorWeather/icons/loop-circular.svg" : "_content/BlazorWeather/icons/magnifying-glass.svg";
}

Просмотреть файл

@ -1 +0,0 @@


Просмотреть файл

@ -1,15 +0,0 @@
<label class="pushpin-container">@Label
<input type="checkbox" checked="@IsChecked" @onchange="IsCheckedChanged" />
<span class="pushpin"></span>
</label>
@code {
[Parameter]
public string Label { get; set; }
[Parameter]
public bool IsChecked { get; set; }
[Parameter]
public EventCallback<ChangeEventArgs> IsCheckedChanged { get; set; }
}

Просмотреть файл

@ -1,2 +0,0 @@
body {
}

Просмотреть файл

@ -1,18 +0,0 @@
<div class="unit-switch" @onclick="SwitchTemperatureUnit">
<span class="temp-unit">@TemperatureUnit</span>
<span class="temp-unit-option">/ @(TemperatureUnit == "F" ? "C" : "F")</span>
</div>
@code {
[Parameter]
public string TemperatureUnit { get; set; } = "F";
[Parameter]
public EventCallback<string> TemperatureUnitChanged { get; set; }
Task SwitchTemperatureUnit()
{
TemperatureUnit = TemperatureUnit == "F" ? "C" : "F";
return TemperatureUnitChanged.InvokeAsync(TemperatureUnit);
}
}

Просмотреть файл

@ -1 +0,0 @@


Просмотреть файл

@ -12,7 +12,7 @@
@for (var i = 0; i < 5; i++)
{
<div class="stat-box justify-between">
<img class="w-9 absolute top-4 right-4" src="_content/BlazorWeather2021/weather-icons/cloud-sun.svg" />
<img class="w-9 absolute top-4 right-4" src="_content/BlazorWeather/weather-icons/cloud-sun.svg" />
<div class="mb-1 text-3xl">18˚</div>
<div class="text-sm">
St. Louis
@ -25,7 +25,7 @@
</div>
<div class="flex items-center">
<svg class="inline-block w-4 mr-1" viewBox="0 0 21 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6.2967 8.99949H0.64293C0.289319 8.99949 0 9.28881 0 9.64242V10.9283C0 11.2819 0.289319 11.5712 0.64293 11.5712H6.35697C6.99588 11.5712 7.59461 12.0092 7.69909 12.6401C7.83169 13.4437 7.21287 14.1429 6.4293 14.1429C5.86272 14.1429 5.38052 13.7732 5.20774 13.2629C5.12335 13.0098 4.86216 12.8571 4.59695 12.8571H3.27894C2.88515 12.8571 2.5677 13.2107 2.64003 13.5964C2.98561 15.3685 4.55275 16.7147 6.42528 16.7147C8.71974 16.7147 10.5521 14.7015 10.2507 12.3508C10.0056 10.4059 8.25362 8.99949 6.2967 8.99949ZM0.64293 7.71363H14.1445C16.5434 7.71363 18.436 5.5116 17.9136 3.02426C17.6083 1.56963 16.4309 0.392264 14.9763 0.0868724C12.7501 -0.379252 10.753 1.08743 10.3592 3.1207C10.2829 3.50646 10.6043 3.85605 10.9941 3.85605H12.3121C12.5813 3.85605 12.8385 3.70336 12.9229 3.4502C13.0957 2.93988 13.5779 2.57019 14.1445 2.57019C14.924 2.57019 15.5469 3.26938 15.4143 4.07304C15.3098 4.70391 14.7151 5.14191 14.0721 5.14191H0.64293C0.289319 5.14191 0 5.43123 0 5.78484V7.0707C0 7.42431 0.289319 7.71363 0.64293 7.71363ZM16.0733 8.99949H9.79263C10.5682 9.66653 11.1267 10.5586 11.3919 11.5712H16.0733C17.1381 11.5712 18.002 12.4352 18.002 13.5C18.002 14.5649 17.1381 15.4288 16.0733 15.4288C15.354 15.4288 14.7352 15.031 14.4016 14.4483C14.2851 14.2474 14.052 14.1429 13.819 14.1429H12.4608C12.0228 14.1429 11.6973 14.5769 11.846 14.9908C12.5612 17.0241 14.6789 18.3983 17.0457 17.896C18.7012 17.5464 20.0634 16.2244 20.4492 14.5729C21.1363 11.6315 18.9062 8.99949 16.0733 8.99949Z" fill="#3E8EED"/></svg>
9 km/h
9 mph
</div>
</div>
</div>

Просмотреть файл

@ -1,170 +0,0 @@
@page "/"
@implements IDisposable
@inject IWeatherForecastService WeatherForecastService
@inject PinnedLocationsService PinnedLocationsService
<div id="main" class="@GetBackgroundClass()">
<div class="weather-now">
<h1 class="page-title">BLAZOR WEATHER</h1>
<LocationSearch LocationChanged="LocationChanged" />
@if (currentWeather == null)
{
<p><em>Search for a city, or use your current location.</em></p>
}
else
{
<div class="pinnable-location">
<h1>@currentLocation.LocalizedName.ToUpper()</h1>
<PushPin IsChecked="@currentLocation.IsPinned" IsCheckedChanged="PinLocation" />
</div>
<div class="location-carousel">
<img src="@GetCurrentLocationImage()" />
@if (ShowPinnedLocations())
{
<img class="previous" src="_content/BlazorWeather/icons/caret-left.svg" @onclick="PreviousPinnedLocation" alt="Previous pinned location" />
<img class="next" src="_content/BlazorWeather/icons/caret-right.svg" @onclick="NextPinnedLocation" alt="Next pinned location" />
}
</div>
<div class="temperature">
@GetTemperature()
<TemperatureUnitPicker @bind-TemperatureUnit="temperatureUnit" />
</div>
<div class="summary">
<img class="weather-img" src="@currentWeather.WeatherUri" alt="@currentWeather.WeatherText" />
@currentWeather.WeatherText
</div>
<div class="update-info">Updated @GetTimeToDisplay()</div>
<div class="metrics">
<div>UV index <p>@currentWeather.UVIndex</p></div>
<div>Barometer <p>@currentWeather.Pressure</p></div>
<div>Humidity <p>@currentWeather.RelativeHumidity%</p></div>
<div>Wind <p>@currentWeather.WindSpeed <span class="wind-details">mph @currentWeather.WindDirection</span></p></div>
</div>
}
</div>
</div>
@code {
WeatherResponse currentWeather;
string temperatureUnit = "F";
Location currentLocation;
IList<Location> pinnedLocations;
int pinnedLocationIndex;
CancellationTokenSource streamingWeatherCTS = new CancellationTokenSource();
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
pinnedLocations = await PinnedLocationsService.LoadPinnedLocations();
currentLocation = pinnedLocations.FirstOrDefault();
if (currentLocation != null)
{
_ = GetWeatherUpdates();
}
}
}
async Task GetWeatherUpdates()
{
await foreach (var weatherResponse in WeatherForecastService.GetStreamingWeather(currentLocation.Key, streamingWeatherCTS.Token))
{
currentWeather = weatherResponse;
StateHasChanged();
}
}
void LocationChanged(Location newLocation)
{
currentLocation = pinnedLocations.FirstOrDefault(l => l.Key == newLocation.Key) ?? newLocation;
streamingWeatherCTS.Cancel();
streamingWeatherCTS.Dispose();
streamingWeatherCTS = new CancellationTokenSource();
_ = GetWeatherUpdates();
}
async Task PinLocation(ChangeEventArgs e)
{
currentLocation.IsPinned = (bool)e.Value;
if (currentLocation.IsPinned)
{
pinnedLocations.Add(currentLocation);
pinnedLocationIndex = pinnedLocations.Count() - 1;
}
else
{
pinnedLocations.Remove(currentLocation);
}
await PinnedLocationsService.SavePinnedLocations(pinnedLocations);
}
bool ShowPinnedLocations() => pinnedLocations.Any() && !currentLocation.IsPinned || pinnedLocations.Count() > 1;
void NextPinnedLocation()
{
pinnedLocationIndex = (pinnedLocationIndex + 1) % pinnedLocations.Count();
LocationChanged(pinnedLocations[pinnedLocationIndex]);
}
void PreviousPinnedLocation()
{
int count = pinnedLocations.Count();
pinnedLocationIndex = (pinnedLocationIndex + count - 1) % count;
LocationChanged(pinnedLocations[pinnedLocationIndex]);
}
string GetBackgroundClass()
{
if (currentWeather == null)
{
return "warm";
}
else if (!currentWeather.IsDayTime)
{
return "night";
}
else if (currentWeather.Temperature > 60)
{
return "warm";
}
else
{
return "cold";
}
}
void SwitchTemperatureUnit() => temperatureUnit = temperatureUnit == "F" ? "C" : "F";
float GetTemperature()
=> temperatureUnit == "F" ? currentWeather.Temperature : TemperatureAsCelsius(currentWeather.Temperature);
float TemperatureAsCelsius(float f) => (float)Math.Round((f - 23f) / 1.8f);
string GetTimeToDisplay()
=> currentWeather.RetrievedTime.ToLocalTime().ToString("T");
string GetCurrentLocationImage()
{
switch (currentLocation.AdministrativeArea.ID)
{
case "WA":
case "NY":
case "MO":
case "IL":
case "HI":
return $"_content/BlazorWeather/images/locations/{currentLocation.AdministrativeArea.ID}.png";
default:
return "_content/BlazorWeather/images/locations/wa.png";
}
}
void IDisposable.Dispose()
{
streamingWeatherCTS.Cancel();
}
}

Просмотреть файл

@ -1 +0,0 @@


Просмотреть файл

@ -19,11 +19,11 @@ else {
<!-- Rainfall, wind, etc. -->
<div class="px-6 mt-9 flex items-center">
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17.99 8.89071C17.6287 6.88427 16.6142 5.05354 15.1045 3.68345C13.5948 2.31337 11.6745 1.48079 9.64252 1.31529V0H8.3568V1.31529C6.32481 1.48079 4.40452 2.31337 2.8948 3.68345C1.38508 5.05354 0.370622 6.88427 0.00930376 8.89071C-0.0115025 9.01168 0.00275608 9.13607 0.0503944 9.24919C0.0980328 9.36231 0.17706 9.45943 0.278135 9.52907C0.37921 9.5987 0.498108 9.63795 0.620777 9.64216C0.743446 9.64638 0.864758 9.61539 0.970375 9.55286C1.4428 9.22457 1.99676 9.03324 2.57109 9C3.11696 9.01322 3.64986 9.16913 4.11677 9.45221C4.58369 9.7353 4.96836 10.1357 5.23252 10.6136C5.29383 10.7037 5.37625 10.7775 5.47261 10.8285C5.56898 10.8795 5.67635 10.9062 5.78538 10.9062C5.8944 10.9062 6.00178 10.8795 6.09814 10.8285C6.1945 10.7775 6.27692 10.7037 6.33823 10.6136C6.55385 10.2351 6.84386 9.90422 7.19077 9.64083C7.53769 9.37744 7.93433 9.18701 8.3568 9.081V15.1071C8.3568 15.5334 8.18748 15.9422 7.88608 16.2436C7.58468 16.545 7.1759 16.7143 6.74966 16.7143C6.32342 16.7143 5.91464 16.545 5.61324 16.2436C5.31184 15.9422 5.14252 15.5334 5.14252 15.1071V14.7857H3.8568V15.1071C3.8568 15.8744 4.16159 16.6102 4.7041 17.1527C5.24662 17.6952 5.98243 18 6.74966 18C7.51689 18 8.2527 17.6952 8.79522 17.1527C9.33774 16.6102 9.64252 15.8744 9.64252 15.1071V9.08036C10.0651 9.18651 10.4618 9.37715 10.8087 9.64076C11.1557 9.90438 11.4456 10.2355 11.6611 10.6142C11.718 10.7101 11.7989 10.7896 11.8958 10.8448C11.9928 10.9 12.1024 10.929 12.2139 10.929C12.3255 10.929 12.4351 10.9 12.532 10.8448C12.629 10.7896 12.7099 10.7101 12.7668 10.6142C13.0309 10.1362 13.4155 9.73569 13.8824 9.45249C14.3494 9.16929 14.8823 9.01329 15.4282 9C16.0026 9.03324 16.5565 9.22457 17.0289 9.55286C17.1346 9.61558 17.256 9.64673 17.3787 9.64261C17.5015 9.63849 17.6206 9.59927 17.7217 9.5296C17.8229 9.45994 17.902 9.36274 17.9497 9.24951C17.9973 9.13628 18.0116 9.01177 17.9907 8.89071H17.99ZM2.57109 7.71429C2.24418 7.71427 1.91891 7.76037 1.60488 7.85121C2.04127 6.63566 2.76555 5.54387 3.7158 4.66919C4.66604 3.79452 5.81397 3.16298 7.06145 2.82857C5.78715 4.47141 5.09799 6.49275 5.1033 8.57186C4.37494 8.01826 3.48595 7.7172 2.57109 7.71429ZM8.99966 7.71429C8.05185 7.71866 7.13321 8.04254 6.39223 8.63357C6.41602 7.20643 6.78309 4.46143 8.99966 2.73471C11.2047 4.45564 11.5769 7.20257 11.6045 8.63164C10.864 8.04185 9.94636 7.71869 8.99966 7.71429ZM15.4282 7.71429C14.5134 7.71701 13.6245 8.01785 12.896 8.57121C12.9013 6.4921 12.2122 4.47076 10.9379 2.82793C12.1854 3.1624 13.3334 3.79403 14.2836 4.66883C15.2339 5.54362 15.9581 6.63554 16.3944 7.85121C16.0804 7.76037 15.7551 7.71427 15.4282 7.71429Z" fill="#3E8EED"/></svg>
<div class="flex-grow pl-2">@weather.CurrentWeather.ChanceOfPercipitation%</div>
<div class="flex-grow pl-2">@weather.CurrentWeather.PrecipitationProbability%</div>
<svg width="21" height="18" viewBox="0 0 21 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6.2967 8.99949H0.64293C0.289319 8.99949 0 9.28881 0 9.64242V10.9283C0 11.2819 0.289319 11.5712 0.64293 11.5712H6.35697C6.99588 11.5712 7.59461 12.0092 7.69909 12.6401C7.83169 13.4437 7.21287 14.1429 6.4293 14.1429C5.86272 14.1429 5.38052 13.7732 5.20774 13.2629C5.12335 13.0098 4.86216 12.8571 4.59695 12.8571H3.27894C2.88515 12.8571 2.5677 13.2107 2.64003 13.5964C2.98561 15.3685 4.55275 16.7147 6.42528 16.7147C8.71974 16.7147 10.5521 14.7015 10.2507 12.3508C10.0056 10.4059 8.25362 8.99949 6.2967 8.99949ZM0.64293 7.71363H14.1445C16.5434 7.71363 18.436 5.5116 17.9136 3.02426C17.6083 1.56963 16.4309 0.392264 14.9763 0.0868724C12.7501 -0.379252 10.753 1.08743 10.3592 3.1207C10.2829 3.50646 10.6043 3.85605 10.9941 3.85605H12.3121C12.5813 3.85605 12.8385 3.70336 12.9229 3.4502C13.0957 2.93988 13.5779 2.57019 14.1445 2.57019C14.924 2.57019 15.5469 3.26938 15.4143 4.07304C15.3098 4.70391 14.7151 5.14191 14.0721 5.14191H0.64293C0.289319 5.14191 0 5.43123 0 5.78484V7.0707C0 7.42431 0.289319 7.71363 0.64293 7.71363ZM16.0733 8.99949H9.79263C10.5682 9.66653 11.1267 10.5586 11.3919 11.5712H16.0733C17.1381 11.5712 18.002 12.4352 18.002 13.5C18.002 14.5649 17.1381 15.4288 16.0733 15.4288C15.354 15.4288 14.7352 15.031 14.4016 14.4483C14.2851 14.2474 14.052 14.1429 13.819 14.1429H12.4608C12.0228 14.1429 11.6973 14.5769 11.846 14.9908C12.5612 17.0241 14.6789 18.3983 17.0457 17.896C18.7012 17.5464 20.0634 16.2244 20.4492 14.5729C21.1363 11.6315 18.9062 8.99949 16.0733 8.99949Z" fill="#3E8EED"/></svg>
<div class="flex-grow pl-2">9km/h</div>
<div class="flex-grow pl-2">9mph</div>
<svg width="13" height="18" viewBox="0 0 13 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.8629 7.91477L7.08998 0.314299C7.02073 0.217104 6.92925 0.137868 6.82316 0.0831964C6.71708 0.0285246 6.59947 0 6.48012 0C6.36078 0 6.24317 0.0285246 6.13709 0.0831964C6.031 0.137868 5.93952 0.217104 5.87027 0.314299L1.0757 7.95077C0.409605 9.02522 0.0385681 10.2563 0 11.5199C0 13.2385 0.682725 14.8868 1.89798 16.102C3.11324 17.3173 4.76149 18 6.48012 18C8.19876 18 9.847 17.3173 11.0623 16.102C12.2775 14.8868 12.9602 13.2385 12.9602 11.5199C12.9189 10.2424 12.5403 8.99865 11.8629 7.91477ZM6.48012 16.56C5.14393 16.5583 3.86296 16.0267 2.91813 15.0819C1.9733 14.137 1.44174 12.8561 1.44003 11.5199C1.4783 10.513 1.78074 9.53391 2.317 8.68086L2.99022 7.60804L10.2436 14.8615C9.77254 15.3952 9.19338 15.8227 8.54455 16.1157C7.89571 16.4086 7.19203 16.5603 6.48012 16.5607V16.56Z" fill="#3E8EED"/></svg>
<div class="pl-2">9km/h</div>
<div class="pl-2">9mph</div>
</div>
<!-- Sunrise, sunset -->
<div class="mt-6 relative pt-7">
@ -62,13 +62,13 @@ else {
<svg viewBox="0 0 212 212" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M106 91L106 121" stroke="#91A7B7" stroke-width="2"/><line x1="121" y1="107" x2="91" y2="107" stroke="#91A7B7" stroke-width="2"/><line x1="212" y1="107" x2="182" y2="107" stroke="#91A7B7" stroke-width="4"/><line x1="197.799" y1="53" x2="171.818" y2="68" stroke="#91A7B7" stroke-width="2"/><line x1="158.982" y1="14.317" x2="143.982" y2="40.2978" stroke="#91A7B7" stroke-width="2"/><line x1="133.046" y1="3.45174" x2="125.281" y2="32.4295" stroke="#91A7B7"/><line x1="78.2709" y1="3.54649" x2="86.0355" y2="32.5243" stroke="#91A7B7"/><line x1="30.9729" y1="31.5765" x2="52.1861" y2="52.7897" stroke="#91A7B7"/><line x1="106" y1="-2.62268e-07" x2="106" y2="30" stroke="#91A7B7" stroke-width="4"/><line x1="53.0001" y1="14.2013" x2="68.0001" y2="40.1821" stroke="#91A7B7" stroke-width="2"/><line x1="30.7749" y1="31.253" x2="51.9881" y2="52.4662" stroke="#91A7B7"/><line x1="3.60231" y1="78.7585" x2="32.5801" y2="86.5231" stroke="#91A7B7"/><line x1="3.91405" y1="134.046" x2="32.8918" y2="126.282" stroke="#91A7B7"/><line x1="14.183" y1="53.1157" x2="40.1637" y2="68.1157" stroke="#91A7B7" stroke-width="2"/><line x1="3.57643" y1="79.0174" x2="32.5542" y2="86.782" stroke="#91A7B7"/><line x1="3.92992" y1="133.723" x2="32.9077" y2="125.958" stroke="#91A7B7"/><line x1="31.68" y1="181.483" x2="52.8932" y2="160.27" stroke="#91A7B7"/><line x1="30" y1="107" x2="1.74846e-07" y2="107" stroke="#91A7B7" stroke-width="4"/><line x1="40.1821" y1="144" x2="14.2014" y2="159" stroke="#91A7B7" stroke-width="2"/><line x1="67.9817" y1="171.934" x2="52.9818" y2="197.914" stroke="#91A7B7" stroke-width="2"/><line x1="85.941" y1="179.25" x2="78.1764" y2="208.228" stroke="#91A7B7"/><line x1="125.376" y1="179.345" x2="133.141" y2="208.323" stroke="#91A7B7"/><line x1="159.666" y1="160.27" x2="180.88" y2="181.483" stroke="#91A7B7"/><line x1="106" y1="182" x2="106" y2="212" stroke="#91A7B7" stroke-width="4"/><line x1="144" y1="171.818" x2="159" y2="197.799" stroke="#91A7B7" stroke-width="2"/><line x1="171.8" y1="144.116" x2="197.78" y2="159.116" stroke="#91A7B7" stroke-width="2"/><line x1="179.375" y1="126.122" x2="208.353" y2="133.887" stroke="#91A7B7"/><line x1="179.729" y1="86.6179" x2="208.706" y2="78.8533" stroke="#91A7B7"/><line x1="160.373" y1="52.7896" x2="181.587" y2="31.5764" stroke="#91A7B7"/></svg>
<!-- To set the angle of the pointer, set the style transform -->
<div class="compass-pointer" style="transform: rotate(45deg)">
<div class="compass-pointer" style="transform: rotate(@(weather.CurrentWeather.WindDirection)deg)">
<svg viewBox="-50 -183 250 250" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M42.5317 56.311C42.136 56.4512 41.7008 56.4284 41.3219 56.2477C40.943 56.067 40.6514 55.7432 40.5112 55.3475L32.584 32.9683L10.2048 40.8956C9.86532 41.0154 9.49515 41.0158 9.15537 40.8969C8.81559 40.778 8.5265 40.5468 8.33579 40.2415C8.14508 39.9362 8.06415 39.575 8.10635 39.2175C8.14854 38.8599 8.31135 38.5275 8.5679 38.275L45.9275 1.53321C46.1591 1.30458 46.4555 1.15289 46.7764 1.09879C47.0973 1.0447 47.427 1.09082 47.7208 1.23089C48.0145 1.37096 48.2579 1.59816 48.4179 1.88156C48.5778 2.16495 48.6465 2.49076 48.6147 2.81461L43.582 54.9718C43.5533 55.2717 43.4396 55.5573 43.2543 55.7948C43.069 56.0324 42.8197 56.2121 42.5357 56.3129L42.5317 56.311ZM15.8735 35.5293L33.019 29.456C33.4146 29.3158 33.8498 29.3386 34.2287 29.5193C34.6076 29.6999 34.8992 30.0237 35.0394 30.4194L41.1127 47.5649L45.0405 6.8412L15.8695 35.5274L15.8735 35.5293Z" fill="white"/></svg>
</div>
</div>
<p class="winds text-sm mt-2">Winds</p>
<p class="text-xl">14 | 25</p>
<p class="text-xl">@weather.CurrentWeather.WindSpeed | @(weather.CurrentWeather.WindSpeed + 10)</p>
</div>
</div>
@ -78,7 +78,7 @@ else {
<!-- Right col -->
<div class="right-col border-l p-10">
<StatBoxes />
<StatBoxes CurrentWeather="weather.CurrentWeather" />
</div>
</div>
</div>

Просмотреть файл

@ -1,4 +1,4 @@
<h3 class="subheading">Daily Forecasts</h3>
<h3 class="subheading">Daily</h3>
<div class="flex overflow-x-scroll pb-4 px-4 scrollbar-subtle mb-10">
@foreach (var forecast in DailyForecasts)
{
@ -15,7 +15,7 @@
<div class="pl-1 text-sm text-accent-blue-200">@min</div>
<div class="rain border-t mt-6 pt-2 text-xs flex items-center">
<svg class="inline-block w-3 mr-1" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.99445 4.93929C9.79372 3.82459 9.23013 2.80752 8.3914 2.04636C7.55267 1.28521 6.48584 0.82266 5.35695 0.730714V0H4.64267V0.730714C3.51378 0.82266 2.44696 1.28521 1.60822 2.04636C0.769491 2.80752 0.205901 3.82459 0.00516876 4.93929C-0.00639027 5.00649 0.00153115 5.0756 0.0279969 5.13844C0.0544627 5.20128 0.0983664 5.25524 0.154519 5.29393C0.210672 5.33261 0.276726 5.35442 0.344876 5.35676C0.413025 5.3591 0.480421 5.34188 0.539097 5.30714C0.801554 5.12476 1.10931 5.01847 1.42838 5C1.73164 5.00735 2.0277 5.09396 2.2871 5.25123C2.5465 5.4085 2.7602 5.63094 2.90695 5.89643C2.94101 5.94652 2.98681 5.98751 3.04034 6.01585C3.09388 6.04418 3.15353 6.059 3.2141 6.059C3.27467 6.059 3.33432 6.04418 3.38785 6.01585C3.44139 5.98751 3.48718 5.94652 3.52124 5.89643C3.64103 5.68617 3.80214 5.50235 3.99487 5.35602C4.1876 5.20969 4.40796 5.10389 4.64267 5.045V8.39286C4.64267 8.62966 4.5486 8.85676 4.38116 9.0242C4.21371 9.19165 3.98661 9.28571 3.74981 9.28571C3.51301 9.28571 3.28591 9.19165 3.11847 9.0242C2.95102 8.85676 2.85695 8.62966 2.85695 8.39286V8.21429H2.14267V8.39286C2.14267 8.8191 2.31199 9.22788 2.61339 9.52928C2.91479 9.83068 3.32357 10 3.74981 10C4.17605 10 4.58484 9.83068 4.88623 9.52928C5.18763 9.22788 5.35695 8.8191 5.35695 8.39286V5.04464C5.59172 5.10362 5.81212 5.20953 6.00485 5.35598C6.19759 5.50243 6.35867 5.6864 6.47838 5.89679C6.51001 5.95008 6.55495 5.99423 6.6088 6.02489C6.66265 6.05556 6.72356 6.07168 6.78553 6.07168C6.8475 6.07168 6.9084 6.05556 6.96225 6.02489C7.0161 5.99423 7.06105 5.95008 7.09267 5.89679C7.23938 5.63123 7.45306 5.40872 7.71246 5.25138C7.97187 5.09405 8.26794 5.00738 8.57124 5C8.89031 5.01847 9.19807 5.12476 9.46053 5.30714C9.51921 5.34199 9.58665 5.35929 9.65486 5.357C9.72307 5.35471 9.7892 5.33293 9.84541 5.29423C9.90162 5.25552 9.94557 5.20152 9.97205 5.13862C9.99853 5.07571 10.0064 5.00654 9.99481 4.93929H9.99445ZM1.42838 4.28571C1.24677 4.28571 1.06606 4.31132 0.891597 4.36179C1.13404 3.68648 1.53642 3.07993 2.06433 2.594C2.59224 2.10806 3.22998 1.75721 3.92303 1.57143C3.21508 2.48411 2.83222 3.60708 2.83517 4.76214C2.43052 4.45459 1.93664 4.28733 1.42838 4.28571ZM4.99981 4.28571C4.47325 4.28814 3.96289 4.46808 3.55124 4.79643C3.56445 4.00357 3.76838 2.47857 4.99981 1.51929C6.22481 2.47536 6.4316 4.00143 6.44695 4.79536C6.03554 4.46769 5.52576 4.28816 4.99981 4.28571ZM8.57124 4.28571C8.06302 4.28723 7.56915 4.45436 7.16445 4.76179C7.16741 3.60672 6.78454 2.48376 6.0766 1.57107C6.76968 1.75689 7.40744 2.1078 7.93536 2.59379C8.46327 3.07979 8.86563 3.68641 9.10803 4.36179C8.93356 4.31132 8.75286 4.28571 8.57124 4.28571Z" fill="#91A7B7"/></svg>
@forecast.ChanceOfPercipitation%
@forecast.Day.PrecipitationProbability%
</div>
</div>
}

Просмотреть файл

@ -0,0 +1,28 @@
<div class="grid gap-8">
@foreach (var weatherStation in weatherStations)
{
<WeatherStationStat WeatherStation="weatherStation" />
}
<div class="text-center flex items-center justify-center">
<a href="add-item" title="Add item" @onclick="AddWeatherStation" @onclick:preventDefault >
<svg class="w-12 inline-block" viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M27 13.875C27.5802 13.875 28.1366 14.1055 28.5468 14.5157C28.957 14.9259 29.1875 15.4823 29.1875 16.0625V24.8125H37.9375C38.5177 24.8125 39.0741 25.043 39.4843 25.4532C39.8945 25.8634 40.125 26.4198 40.125 27C40.125 27.5802 39.8945 28.1366 39.4843 28.5468C39.0741 28.957 38.5177 29.1875 37.9375 29.1875H29.1875V37.9375C29.1875 38.5177 28.957 39.0741 28.5468 39.4843C28.1366 39.8945 27.5802 40.125 27 40.125C26.4198 40.125 25.8634 39.8945 25.4532 39.4843C25.043 39.0741 24.8125 38.5177 24.8125 37.9375V29.1875H16.0625C15.4823 29.1875 14.9259 28.957 14.5157 28.5468C14.1055 28.1366 13.875 27.5802 13.875 27C13.875 26.4198 14.1055 25.8634 14.5157 25.4532C14.9259 25.043 15.4823 24.8125 16.0625 24.8125H24.8125V16.0625C24.8125 15.4823 25.043 14.9259 25.4532 14.5157C25.8634 14.1055 26.4198 13.875 27 13.875ZM0.75 27C0.75 23.5528 1.42898 20.1394 2.74816 16.9546C4.06735 13.7698 6.00091 10.876 8.43845 8.43845C10.876 6.00091 13.7698 4.06735 16.9546 2.74816C20.1394 1.42898 23.5528 0.75 27 0.75C30.4472 0.75 33.8606 1.42898 37.0454 2.74816C40.2302 4.06735 43.124 6.00091 45.5616 8.43845C47.9991 10.876 49.9327 13.7698 51.2518 16.9546C52.571 20.1394 53.25 23.5528 53.25 27C53.25 33.9619 50.4844 40.6387 45.5616 45.5616C40.6387 50.4844 33.9619 53.25 27 53.25C20.0381 53.25 13.3613 50.4844 8.43845 45.5616C3.51562 40.6387 0.75 33.9619 0.75 27ZM27 5.125C21.1984 5.125 15.6344 7.42968 11.532 11.532C7.42968 15.6344 5.125 21.1984 5.125 27C5.125 32.8016 7.42968 38.3656 11.532 42.468C15.6344 46.5703 21.1984 48.875 27 48.875C32.8016 48.875 38.3656 46.5703 42.468 42.468C46.5703 38.3656 48.875 32.8016 48.875 27C48.875 21.1984 46.5703 15.6344 42.468 11.532C38.3656 7.42968 32.8016 5.125 27 5.125Z" fill="currentColor"/></svg>
</a>
</div>
</div>
@code {
IList<WeatherStation> weatherStations;
[Parameter]
public WeatherSnapshot CurrentWeather { get; set; }
protected override void OnParametersSet()
{
weatherStations = new List<WeatherStation>(CurrentWeather.GetWeatherStations());
}
void AddWeatherStation()
{
weatherStations.Add(new WeatherStation { CurrentWeather = CurrentWeather });
}
}

Просмотреть файл

@ -0,0 +1,12 @@
.grid {
grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
grid-auto-rows: 1fr;
}
a {
color: #637989;
}
a:hover {
color: white;
}

Просмотреть файл

@ -0,0 +1,54 @@
<div class="stat-box" @onclick="SwitchStat">
@switch (stat)
{
case WeatherStat.WindSpeed:
<svg class="w-10 absolute top-4 right-4" viewBox="0 0 43 37" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.1598 18.499H1.34369C0.604661 18.499 0 19.0937 0 19.8205V22.4637C0 23.1906 0.604661 23.7853 1.34369 23.7853H13.2858C14.621 23.7853 15.8724 24.6856 16.0907 25.9824C16.3678 27.6344 15.0745 29.0716 13.4369 29.0716C12.2528 29.0716 11.245 28.3117 10.8839 27.2627C10.7075 26.7423 10.1617 26.4284 9.6074 26.4284H6.85283C6.02982 26.4284 5.36637 27.1553 5.51753 27.9482C6.23977 31.5908 9.51502 34.3579 13.4285 34.3579C18.2238 34.3579 22.0533 30.2197 21.4235 25.3877C20.9112 21.3899 17.2496 18.499 13.1598 18.499ZM1.34369 15.8558H29.5612C34.5749 15.8558 38.5304 11.3294 37.4386 6.21653C36.8004 3.22646 34.3397 0.806321 31.2996 0.178571C26.6471 -0.779574 22.4732 2.23528 21.6502 6.41477C21.4907 7.20772 22.1625 7.92633 22.9771 7.92633H25.7317C26.2944 7.92633 26.8318 7.61245 27.0082 7.09208C27.3693 6.04308 28.3771 5.28317 29.5612 5.28317C31.1904 5.28317 32.4921 6.72039 32.215 8.37236C31.9967 9.66916 30.7537 10.5695 29.4101 10.5695H1.34369C0.604661 10.5695 0 11.1642 0 11.8911V14.5342C0 15.2611 0.604661 15.8558 1.34369 15.8558ZM33.5923 18.499H20.4661C22.0869 19.8701 23.2543 21.7038 23.8085 23.7853H33.5923C35.8178 23.7853 37.6234 25.5611 37.6234 27.75C37.6234 29.9389 35.8178 31.7147 33.5923 31.7147C32.089 31.7147 30.7957 30.897 30.0987 29.6993C29.8552 29.2863 29.3681 29.0716 28.881 29.0716H26.0424C25.127 29.0716 24.4468 29.9637 24.7575 30.8144C26.2524 34.9939 30.6782 37.8188 35.6246 36.7863C39.0846 36.0677 41.9316 33.3502 42.7378 29.9554C44.1739 23.9092 39.5129 18.499 33.5923 18.499Z" fill="url(#paint0_linear)"/><defs><linearGradient id="paint0_linear" x1="7.34285" y1="6.68938" x2="28.6756" y2="29.93" gradientUnits="userSpaceOnUse"><stop offset="0.10243" stop-color="#28C2D1"/><stop offset="0.925347" stop-color="#4931DE"/></linearGradient></defs></svg>
<div class="mt-auto mb-1 text-xl">
<span class="text-4xl">@WeatherStation.CurrentWeather.WindSpeed</span> mph
</div>
break;
case WeatherStat.Temperature:
<svg class="w-10 absolute top-4 right-4" viewBox="-5 0 20 40" fill="none"><path d="M5 13.8672C5.18229 13.9323 5.35156 14.0234 5.50781 14.1406C5.66406 14.2578 5.79427 14.3945 5.89844 14.5508C6.00911 14.7005 6.09375 14.8698 6.15234 15.0586C6.21745 15.2409 6.25 15.4297 6.25 15.625C6.25 15.8854 6.20117 16.1296 6.10352 16.3574C6.00586 16.5853 5.8724 16.7839 5.70312 16.9531C5.53385 17.1224 5.33529 17.2559 5.10742 17.3535C4.87956 17.4512 4.63542 17.5 4.375 17.5C4.11458 17.5 3.87044 17.4512 3.64258 17.3535C3.41471 17.2559 3.21615 17.1224 3.04688 16.9531C2.8776 16.7839 2.74414 16.5853 2.64648 16.3574C2.54883 16.1296 2.5 15.8854 2.5 15.625C2.5 15.4297 2.5293 15.2409 2.58789 15.0586C2.65299 14.8698 2.73763 14.7005 2.8418 14.5508C2.95247 14.3945 3.08268 14.2578 3.23242 14.1406C3.38867 14.0234 3.5612 13.9323 3.75 13.8672V7.5H5V13.8672ZM7.5 12.8809C7.87109 13.291 8.16081 13.7467 8.36914 14.248C8.57747 14.7493 8.68164 15.2767 8.68164 15.8301C8.68164 16.416 8.56445 16.9629 8.33008 17.4707C8.10221 17.9785 7.78971 18.4212 7.39258 18.7988C6.99544 19.1699 6.53646 19.4629 6.01562 19.6777C5.49479 19.8926 4.94792 20 4.375 20C3.79557 20 3.24544 19.8926 2.72461 19.6777C2.21029 19.4629 1.75456 19.1699 1.35742 18.7988C0.960286 18.4212 0.644531 17.9785 0.410156 17.4707C0.182292 16.9629 0.0683594 16.416 0.0683594 15.8301C0.0683594 15.2767 0.172526 14.7493 0.380859 14.248C0.589193 13.7467 0.878906 13.291 1.25 12.8809V3.125C1.25 2.69531 1.33138 2.29167 1.49414 1.91406C1.6569 1.53646 1.87826 1.20768 2.1582 0.927734C2.44466 0.641276 2.77669 0.416667 3.1543 0.253906C3.53841 0.0846354 3.94531 0 4.375 0C4.80469 0 5.20833 0.0846354 5.58594 0.253906C5.96354 0.416667 6.29232 0.641276 6.57227 0.927734C6.85872 1.20768 7.08333 1.53646 7.24609 1.91406C7.41536 2.29167 7.5 2.69531 7.5 3.125V12.8809ZM4.375 18.75C4.77865 18.75 5.16276 18.6751 5.52734 18.5254C5.89844 18.3757 6.22396 18.1706 6.50391 17.9102C6.78385 17.6497 7.00521 17.3405 7.16797 16.9824C7.33724 16.6243 7.42188 16.2402 7.42188 15.8301C7.42188 15.3418 7.31445 14.8958 7.09961 14.4922C6.88477 14.082 6.60156 13.7142 6.25 13.3887V3.125C6.25 2.86458 6.20117 2.62044 6.10352 2.39258C6.00586 2.16471 5.8724 1.96615 5.70312 1.79688C5.53385 1.6276 5.33529 1.49414 5.10742 1.39648C4.87956 1.29883 4.63542 1.25 4.375 1.25C4.11458 1.25 3.87044 1.29883 3.64258 1.39648C3.41471 1.49414 3.21615 1.6276 3.04688 1.79688C2.8776 1.96615 2.74414 2.16471 2.64648 2.39258C2.54883 2.62044 2.5 2.86458 2.5 3.125V13.3887C2.14844 13.7142 1.86523 14.082 1.65039 14.4922C1.43555 14.8958 1.32812 15.3418 1.32812 15.8301C1.32812 16.2402 1.40951 16.6243 1.57227 16.9824C1.74154 17.3405 1.96615 17.6497 2.24609 17.9102C2.52604 18.1706 2.84831 18.3757 3.21289 18.5254C3.58398 18.6751 3.97135 18.75 4.375 18.75Z"fill="url(#paint0_linear)"/><defs><linearGradient id="paint0_linear" x1="6.14752" y1="6.50858" x2="26.9365" y2="25.9966" gradientUnits="userSpaceOnUse"><stop offset="0.10243" stop-color="#28C2D1"/><stop offset="0.925347" stop-color="#4931DE"/></linearGradient></defs></svg>
<div class="mt-auto mb-1 text-xl">
<span class="text-4xl">@WeatherStation.CurrentWeather.Temperature</span>
</div>
break;
case WeatherStat.RelativeHumidity:
<svg class="w-10 absolute top-4 right-4" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M35.98 17.7814C35.2574 13.7685 33.2285 10.1071 30.209 7.36691C27.1896 4.62674 23.349 2.96158 19.285 2.63057V0H16.7136V2.63057C12.6496 2.96158 8.80905 4.62674 5.78961 7.36691C2.77017 10.1071 0.741244 13.7685 0.0186075 17.7814C-0.023005 18.0234 0.00551215 18.2721 0.100789 18.4984C0.196066 18.7246 0.354119 18.9189 0.556269 19.0581C0.758419 19.1974 0.996215 19.2759 1.24155 19.2843C1.48689 19.2928 1.72952 19.2308 1.94075 19.1057C2.88559 18.4491 3.99353 18.0665 5.14218 18C6.23392 18.0264 7.29971 18.3383 8.23355 18.9044C9.16739 19.4706 9.93672 20.2714 10.465 21.2271C10.5877 21.4075 10.7525 21.555 10.9452 21.6571C11.138 21.7591 11.3527 21.8124 11.5708 21.8124C11.7888 21.8124 12.0036 21.7591 12.1963 21.6571C12.389 21.555 12.5538 21.4075 12.6765 21.2271C13.1077 20.4702 13.6877 19.8084 14.3815 19.2817C15.0754 18.7549 15.8687 18.374 16.7136 18.162V30.2143C16.7136 31.0668 16.375 31.8843 15.7722 32.4871C15.1694 33.0899 14.3518 33.4286 13.4993 33.4286C12.6468 33.4286 11.8293 33.0899 11.2265 32.4871C10.6237 31.8843 10.285 31.0668 10.285 30.2143V29.5714H7.71361V30.2143C7.71361 31.7488 8.32317 33.2204 9.4082 34.3054C10.4932 35.3904 11.9649 36 13.4993 36C15.0338 36 16.5054 35.3904 17.5904 34.3054C18.6755 33.2204 19.285 31.7488 19.285 30.2143V18.1607C20.1302 18.373 20.9236 18.7543 21.6175 19.2815C22.3113 19.8088 22.8912 20.471 23.3222 21.2284C23.436 21.4203 23.5978 21.5792 23.7917 21.6896C23.9856 21.8 24.2048 21.858 24.4279 21.858C24.651 21.858 24.8702 21.8 25.0641 21.6896C25.258 21.5792 25.4198 21.4203 25.5336 21.2284C26.0618 20.2724 26.831 19.4714 27.7649 18.905C28.6987 18.3386 29.7646 18.0266 30.8565 18C32.0051 18.0665 33.113 18.4491 34.0579 19.1057C34.2691 19.2312 34.5119 19.2935 34.7575 19.2852C35.003 19.277 35.2411 19.1985 35.4435 19.0592C35.6458 18.9199 35.8041 18.7255 35.8994 18.499C35.9947 18.2726 36.0231 18.0235 35.9813 17.7814H35.98ZM5.14218 15.4286C4.48836 15.4285 3.83781 15.5207 3.20975 15.7024C4.08254 13.2713 5.53111 11.0877 7.43159 9.33838C9.33208 7.58903 11.6279 6.32595 14.1229 5.65714C11.5743 8.94281 10.196 12.9855 10.2066 17.1437C8.74987 16.0365 6.97191 15.4344 5.14218 15.4286ZM17.9993 15.4286C16.1037 15.4373 14.2664 16.0851 12.7845 17.2671C12.832 14.4129 13.5662 8.92286 17.9993 5.46943C22.4093 8.91129 23.1537 14.4051 23.209 17.2633C21.728 16.0837 19.8927 15.4374 17.9993 15.4286ZM30.8565 15.4286C29.0269 15.434 27.2489 16.0357 25.792 17.1424C25.8027 12.9842 24.4243 8.94153 21.8757 5.65586C24.3708 6.32479 26.6668 7.58807 28.5673 9.33765C30.4678 11.0872 31.9163 13.2711 32.7889 15.7024C32.1608 15.5207 31.5103 15.4285 30.8565 15.4286Z" fill="url(#paint0_linear)"/><defs><linearGradient id="paint0_linear" x1="6.14752" y1="6.50858" x2="26.9365" y2="25.9966" gradientUnits="userSpaceOnUse"><stop offset="0.10243" stop-color="#28C2D1"/><stop offset="0.925347" stop-color="#4931DE"/></linearGradient></defs></svg>
<div class="mt-auto mb-1 text-xl">
<span class="text-4xl">@WeatherStation.CurrentWeather.RelativeHumidity</span>%
</div>
break;
}
<div class="text-xs">
From
<div class="stat-source">@WeatherStation.Name</div>
</div>
</div>
@code {
static WeatherStat defaultStat = WeatherStat.Temperature;
WeatherStat stat = defaultStat;
[Parameter]
public WeatherStation WeatherStation { get; set; }
protected override void OnInitialized()
{
defaultStat = NextStat(defaultStat);
}
public void SwitchStat() => stat = NextStat(stat);
static WeatherStat NextStat(WeatherStat stat)
=> (WeatherStat)(((int) stat + 1) % Enum.GetNames<WeatherStat>().Length);
enum WeatherStat
{
Temperature,
RelativeHumidity,
WindSpeed
}
}

Просмотреть файл

@ -1,9 +1,4 @@
.grid {
grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
grid-auto-rows: 1fr;
}
.stat-box {
.stat-box {
background-color: var(--mid-background);
aspect-ratio: 1;
max-width: 11rem;
@ -17,11 +12,3 @@
.stat-source {
color: #91A7B7;
}
a {
color: #637989;
}
a:hover {
color: white;
}

Просмотреть файл

@ -3,7 +3,7 @@
<div class="mt-10 m-auto md:float-right md:mr-12 w-56 text-center">
<p class="description">Your Location Now</p>
<p class="mb-4 text-lg">St. Louis, Missouri, USA</p>
<img class="inline-block w-20 mb-3" src="_content/BlazorWeather2021/weather-icons/cloud-sun.svg" />
<img class="inline-block w-20 mb-3" src="_content/BlazorWeather/weather-icons/cloud-sun.svg" />
<p class="text-5xl tracking-tighter mb-4 pl-2">18˚</p>
<span class="rounded-full px-4 py-1" style="background: var(--primary-dotnet)">Cloudy</span>
@ -11,9 +11,9 @@
<svg class="w-4" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17.99 8.89071C17.6287 6.88427 16.6142 5.05354 15.1045 3.68345C13.5948 2.31337 11.6745 1.48079 9.64252 1.31529V0H8.3568V1.31529C6.32481 1.48079 4.40452 2.31337 2.8948 3.68345C1.38508 5.05354 0.370622 6.88427 0.00930376 8.89071C-0.0115025 9.01168 0.00275608 9.13607 0.0503944 9.24919C0.0980328 9.36231 0.17706 9.45943 0.278135 9.52907C0.37921 9.5987 0.498108 9.63795 0.620777 9.64216C0.743446 9.64638 0.864758 9.61539 0.970375 9.55286C1.4428 9.22457 1.99676 9.03324 2.57109 9C3.11696 9.01322 3.64986 9.16913 4.11677 9.45221C4.58369 9.7353 4.96836 10.1357 5.23252 10.6136C5.29383 10.7037 5.37625 10.7775 5.47261 10.8285C5.56898 10.8795 5.67635 10.9062 5.78538 10.9062C5.8944 10.9062 6.00178 10.8795 6.09814 10.8285C6.1945 10.7775 6.27692 10.7037 6.33823 10.6136C6.55385 10.2351 6.84386 9.90422 7.19077 9.64083C7.53769 9.37744 7.93433 9.18701 8.3568 9.081V15.1071C8.3568 15.5334 8.18748 15.9422 7.88608 16.2436C7.58468 16.545 7.1759 16.7143 6.74966 16.7143C6.32342 16.7143 5.91464 16.545 5.61324 16.2436C5.31184 15.9422 5.14252 15.5334 5.14252 15.1071V14.7857H3.8568V15.1071C3.8568 15.8744 4.16159 16.6102 4.7041 17.1527C5.24662 17.6952 5.98243 18 6.74966 18C7.51689 18 8.2527 17.6952 8.79522 17.1527C9.33774 16.6102 9.64252 15.8744 9.64252 15.1071V9.08036C10.0651 9.18651 10.4618 9.37715 10.8087 9.64076C11.1557 9.90438 11.4456 10.2355 11.6611 10.6142C11.718 10.7101 11.7989 10.7896 11.8958 10.8448C11.9928 10.9 12.1024 10.929 12.2139 10.929C12.3255 10.929 12.4351 10.9 12.532 10.8448C12.629 10.7896 12.7099 10.7101 12.7668 10.6142C13.0309 10.1362 13.4155 9.73569 13.8824 9.45249C14.3494 9.16929 14.8823 9.01329 15.4282 9C16.0026 9.03324 16.5565 9.22457 17.0289 9.55286C17.1346 9.61558 17.256 9.64673 17.3787 9.64261C17.5015 9.63849 17.6206 9.59927 17.7217 9.5296C17.8229 9.45994 17.902 9.36274 17.9497 9.24951C17.9973 9.13628 18.0116 9.01177 17.9907 8.89071H17.99ZM2.57109 7.71429C2.24418 7.71427 1.91891 7.76037 1.60488 7.85121C2.04127 6.63566 2.76555 5.54387 3.7158 4.66919C4.66604 3.79452 5.81397 3.16298 7.06145 2.82857C5.78715 4.47141 5.09799 6.49275 5.1033 8.57186C4.37494 8.01826 3.48595 7.7172 2.57109 7.71429ZM8.99966 7.71429C8.05185 7.71866 7.13321 8.04254 6.39223 8.63357C6.41602 7.20643 6.78309 4.46143 8.99966 2.73471C11.2047 4.45564 11.5769 7.20257 11.6045 8.63164C10.864 8.04185 9.94636 7.71869 8.99966 7.71429ZM15.4282 7.71429C14.5134 7.71701 13.6245 8.01785 12.896 8.57121C12.9013 6.4921 12.2122 4.47076 10.9379 2.82793C12.1854 3.1624 13.3334 3.79403 14.2836 4.66883C15.2339 5.54362 15.9581 6.63554 16.3944 7.85121C16.0804 7.76037 15.7551 7.71427 15.4282 7.71429Z" fill="#3E8EED"/></svg>
<div class="flex-grow pr-2">13%</div>
<svg class="w-4" viewBox="0 0 21 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6.2967 8.99949H0.64293C0.289319 8.99949 0 9.28881 0 9.64242V10.9283C0 11.2819 0.289319 11.5712 0.64293 11.5712H6.35697C6.99588 11.5712 7.59461 12.0092 7.69909 12.6401C7.83169 13.4437 7.21287 14.1429 6.4293 14.1429C5.86272 14.1429 5.38052 13.7732 5.20774 13.2629C5.12335 13.0098 4.86216 12.8571 4.59695 12.8571H3.27894C2.88515 12.8571 2.5677 13.2107 2.64003 13.5964C2.98561 15.3685 4.55275 16.7147 6.42528 16.7147C8.71974 16.7147 10.5521 14.7015 10.2507 12.3508C10.0056 10.4059 8.25362 8.99949 6.2967 8.99949ZM0.64293 7.71363H14.1445C16.5434 7.71363 18.436 5.5116 17.9136 3.02426C17.6083 1.56963 16.4309 0.392264 14.9763 0.0868724C12.7501 -0.379252 10.753 1.08743 10.3592 3.1207C10.2829 3.50646 10.6043 3.85605 10.9941 3.85605H12.3121C12.5813 3.85605 12.8385 3.70336 12.9229 3.4502C13.0957 2.93988 13.5779 2.57019 14.1445 2.57019C14.924 2.57019 15.5469 3.26938 15.4143 4.07304C15.3098 4.70391 14.7151 5.14191 14.0721 5.14191H0.64293C0.289319 5.14191 0 5.43123 0 5.78484V7.0707C0 7.42431 0.289319 7.71363 0.64293 7.71363ZM16.0733 8.99949H9.79263C10.5682 9.66653 11.1267 10.5586 11.3919 11.5712H16.0733C17.1381 11.5712 18.002 12.4352 18.002 13.5C18.002 14.5649 17.1381 15.4288 16.0733 15.4288C15.354 15.4288 14.7352 15.031 14.4016 14.4483C14.2851 14.2474 14.052 14.1429 13.819 14.1429H12.4608C12.0228 14.1429 11.6973 14.5769 11.846 14.9908C12.5612 17.0241 14.6789 18.3983 17.0457 17.896C18.7012 17.5464 20.0634 16.2244 20.4492 14.5729C21.1363 11.6315 18.9062 8.99949 16.0733 8.99949Z" fill="#3E8EED"/></svg>
<div class="flex-grow pr-2">9km/h</div>
<div class="flex-grow pr-2">9mph</div>
<svg class="w-4" viewBox="0 -2 18 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.8629 7.91477L7.08998 0.314299C7.02073 0.217104 6.92925 0.137868 6.82316 0.0831964C6.71708 0.0285246 6.59947 0 6.48012 0C6.36078 0 6.24317 0.0285246 6.13709 0.0831964C6.031 0.137868 5.93952 0.217104 5.87027 0.314299L1.0757 7.95077C0.409605 9.02522 0.0385681 10.2563 0 11.5199C0 13.2385 0.682725 14.8868 1.89798 16.102C3.11324 17.3173 4.76149 18 6.48012 18C8.19876 18 9.847 17.3173 11.0623 16.102C12.2775 14.8868 12.9602 13.2385 12.9602 11.5199C12.9189 10.2424 12.5403 8.99865 11.8629 7.91477ZM6.48012 16.56C5.14393 16.5583 3.86296 16.0267 2.91813 15.0819C1.9733 14.137 1.44174 12.8561 1.44003 11.5199C1.4783 10.513 1.78074 9.53391 2.317 8.68086L2.99022 7.60804L10.2436 14.8615C9.77254 15.3952 9.19338 15.8227 8.54455 16.1157C7.89571 16.4086 7.19203 16.5603 6.48012 16.5607V16.56Z" fill="#3E8EED"/></svg>
<div>9km/h</div>
<div>7%</div>
</div>
</div>

Просмотреть файл

@ -6,15 +6,15 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WeatherClientLib;
using WeatherClient2021;
namespace BlazorWeather
{
public static class ServiceCollectionExtensions
{
public static IServiceCollection AddBlazorWeather(this IServiceCollection services)
public static IServiceCollection AddBlazorWeather(this IServiceCollection services, string baseUri)
{
services.AddHttpClient<IWeatherForecastService, HttpWeatherForecastService>();
services.AddHttpClient<IWeatherService, WeatherService>(httpClient => httpClient.BaseAddress = new Uri(baseUri));
services.AddScoped<IGeolocationService, GeolocationService>();
services.AddBlazoredLocalStorage();
services.AddScoped<PinnedLocationsService>();

Просмотреть файл

@ -3,7 +3,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using WeatherClientLib.Model;
using WeatherClient2021;
namespace BlazorWeather
{

Просмотреть файл

@ -1,4 +1,7 @@
@inherits LayoutComponentBase
@Body
@inherits LayoutComponentBase
<div class="flex flex-col md:flex-row min-h-screen">
<NavMenu />
<main class="flex-grow">
@Body
</main>
</div>

Просмотреть файл

@ -1 +0,0 @@


Просмотреть файл

@ -5,7 +5,7 @@ using System.Text;
using System.Threading.Tasks;
using WeatherClient2021;
namespace BlazorWeather2021
namespace BlazorWeather
{
public static class WeatherIcons
{
@ -24,7 +24,8 @@ namespace BlazorWeather2021
{ "Showers", "showers" },
{ "Thunderstorms", "thunderstorms" },
{ "Mostly cloudy w/ t-storms", "thunderstorms" },
{ "Partly sunny w/ t-storms", "thunderstorms" }
{ "Partly sunny w/ t-storms", "thunderstorms" },
{ "Clouds and sun", "partly-cloudy" }
};
public static string GetIconUrl(this WeatherSnapshot weather)

Просмотреть файл

@ -1,14 +1,10 @@
@using System.Net.Http
@using System.Threading
@using Microsoft.AspNetCore.Authorization
@using System.Net.Http.Json
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.JSInterop
@using BlazorWeather
@using BlazorWeather.Shared
@using BlazorWeather.Components
@using WeatherClientLib
@using WeatherClientLib.Model
@using Blazored.LocalStorage
@using Darnton.Blazor.DeviceInterop.Geolocation
@using WeatherClient2021

Просмотреть файл

Просмотреть файл

@ -1,333 +0,0 @@
* {
box-sizing: border-box;
}
html, body {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
color: white;
height: 100%;
margin: 0;
}
#main {
min-height: 100%;
display: flex;
flex-direction: row;
justify-content: space-between;
padding: 1.5rem;
}
.weather-now, .weather-graph {
flex-grow: 1;
margin: 1.5rem;
width: calc(50% - 3rem);
}
.weather-now {
display: flex;
flex-direction: column;
align-items: center;
}
.weather-now h1 {
font-size: 1.5rem;
font-weight: 200;
letter-spacing: 1px;
text-align: center;
margin: 0 0 1rem 0;
}
.weather-now .page-title {
font-size: 2rem;
}
.location-carousel {
display: flex;
flex-direction: row;
align-items: center;
}
.location-carousel .previous {
order: 1;
height: 30px;
}
.location-carousel img {
order: 2;
}
.location-carousel .next {
order: 3;
height: 30px;
}
.temperature {
font-size: 6rem;
display: inline-block;
position: relative;
}
.temperature::after {
content: "°";
position: absolute;
font-size: 5rem;
top: 0.3rem;
left: 100%;
}
.unit-switch {
position: absolute;
bottom: 0.75rem;
left: calc(100% + 2rem);
width: 200px;
font-size: 3rem;
cursor: pointer;
}
.temp-unit-option {
font-size: 1.5rem;
opacity: 0.5;
}
.summary {
text-transform: uppercase;
font-size: 2rem;
margin-bottom: 0.5rem;
display: flex;
align-items: center;
padding-right: 20px;
}
.weather-img {
margin-right: 10px;
margin-top: 2px;
}
.metrics {
display: flex;
margin-top: 2rem;
}
.metrics > div {
background: linear-gradient(-45deg, rgba(255,255,255,0.05), rgba(255,255,255,0.35));
padding: 0.75rem;
text-align: center;
font-size: 0.8rem;
font-weight: 600;
border-radius: 1rem;
border-bottom-right-radius: 0;
}
.metrics > div:not(:last-of-type) {
margin-right: 1rem;
}
.metrics > div p {
margin: 0;
font-weight: 200;
font-size: 1.2rem;
}
.update-info {
text-transform: uppercase;
}
.warm {
background-image: linear-gradient(#F6CC66, #FCA184);
}
.cold {
background-image: linear-gradient(#BDE3FA, #A5C9FD);
}
.night {
background-image: linear-gradient(#172941, #3C6683);
}
@media (max-width: 767.98px) {
#main {
flex-direction: column;
}
.weather-now, .weather-graph {
width: unset;
}
.location-img {
min-height: 30vh;
}
.wind-details {
display: none; /* not enough space on mobile */
}
}
.btn-link {
background: transparent;
border: 1px solid #fff;
padding: 12px;
font-size: 15px;
/*optional*/
/*input has OS specific font-family*/
border-radius: 1rem;
border-bottom-right-radius: 0;
text-decoration: none;
cursor: pointer;
color: #fff;
margin-bottom: 10px;
}
.btn-link.selected {
background: linear-gradient(-45deg, rgba(255,255,255,0.05), rgba(255,255,255,0.35));
font-weight: bold;
}
.image-predictor {
margin-top: 20px;
display: flex;
}
.result-label {
float: left;
position: absolute;
top: 0;
left: 0;
width: 100%;
background: rgba(0,0,0,0.5);
text-align: center;
font-size: 1.25rem;
padding: 12px;
border-radius: 1rem 1rem 0 0;
}
.result-pane {
float: left;
position: relative;
}
.result-pane img {
border-radius: 1rem;
border-bottom-right-radius: 0;
}
.image-selector {
display: flex;
flex-direction: column;
margin-right: 10px;
width: 200px;
margin-left: -200px;
}
h3 {
margin-top: 40px;
font-size: 2rem;
margin-bottom: 0;
}
.search {
margin-bottom: 10px;
}
.cycle-pins {
margin-bottom: 10px;
}
.search-icon {
width: 17px;
vertical-align: middle;
}
.search-icon.spinning {
animation: spin 4s linear infinite;
}
@keyframes spin {
100% {
transform: rotate(-360deg);
}
}
/* Customize the pushpin container */
.pushpin-container {
display: block;
position: relative;
margin-bottom: 12px;
cursor: pointer;
user-select: none;
}
/* Hide the browser's default checkbox */
.pushpin-container input {
position: absolute;
opacity: 0;
cursor: pointer;
height: 0;
width: 0;
}
/* Create a custom checkbox */
.pushpin {
position: absolute;
top: 0;
left: 0;
height: 15px;
width: 15px;
background-image: url(../icons/pin.svg);
background-repeat: no-repeat;
background-size: contain;
transform: rotate(90deg)
}
/* Show the checkmark when checked */
.pushpin-container input:checked ~ .pushpin {
transform: none;
}
.pinnable-location {
position: relative;
}
.pinnable-location h1 {
display: inline-block;
}
.pinnable-location .pushpin-container {
position: absolute;
top: 0.4rem;
left: 100%;
margin-left: 0.5rem;
}
.current-location {
width: 17px;
vertical-align: middle;
}
#blazor-error-ui {
background: lightyellow;
bottom: 0;
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
display: none;
left: 0;
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
position: fixed;
width: 100%;
z-index: 1000;
}
#blazor-error-ui .dismiss {
cursor: pointer;
position: absolute;
right: 0.75rem;
top: 0.5rem;
}
.blazor-error-boundary {
background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
padding: 1rem 1rem 1rem 3.7rem;
color: white;
}
.blazor-error-boundary::after {
content: "An error has occurred."
}

Просмотреть файл

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8">
<path fill="white" d="M4 0l-4 4 4 4v-8z" transform="translate(2)" />
</svg>

До

Ширина:  |  Высота:  |  Размер: 157 B

Просмотреть файл

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8">
<path fill="white" d="M0 0v8l4-4-4-4z" transform="translate(2)" />
</svg>

До

Ширина:  |  Высота:  |  Размер: 155 B

Просмотреть файл

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8">
<path fill="white" d="M4 0c-1.65 0-3 1.35-3 3h-1l1.5 2 1.5-2h-1c0-1.11.89-2 2-2v-1zm2.5 1l-1.5 2h1c0 1.11-.89 2-2 2v1c1.65 0 3-1.35 3-3h1l-1.5-2z" transform="translate(0 1)" />
</svg>

До

Ширина:  |  Высота:  |  Размер: 265 B

Просмотреть файл

@ -1,4 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8">
<path fill="white" d="M3.5 0c-1.93 0-3.5 1.57-3.5 3.5s1.57 3.5 3.5 3.5c.59 0 1.17-.14 1.66-.41a1 1 0 0 0 .13.13l1 1a1.02 1.02 0 1 0 1.44-1.44l-1-1a1 1 0 0 0-.16-.13c.27-.49.44-1.06.44-1.66 0-1.93-1.57-3.5-3.5-3.5zm0 1c1.39 0 2.5 1.11 2.5 2.5 0 .66-.24 1.27-.66 1.72-.01.01-.02.02-.03.03a1 1 0 0 0-.13.13c-.44.4-1.04.63-1.69.63-1.39 0-2.5-1.11-2.5-2.5s1.11-2.5 2.5-2.5z"
/>
</svg>

До

Ширина:  |  Высота:  |  Размер: 463 B

Просмотреть файл

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8">
<path fill="white" d="M1.34 0a.5.5 0 0 0 .16 1h.5v2h-1c-.55 0-1 .45-1 1h3v3l.44 1 .56-1v-3h3c0-.55-.45-1-1-1h-1v-2h.5a.5.5 0 1 0 0-1h-4a.5.5 0 0 0-.09 0 .5.5 0 0 0-.06 0z" />
</svg>

До

Ширина:  |  Высота:  |  Размер: 263 B

Просмотреть файл

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8">
<path fill="white" d="M4 0c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm0 1c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 1c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 1c.56 0 1 .44 1 1s-.44 1-1 1-1-.44-1-1 .44-1 1-1z" />
</svg>

До

Ширина:  |  Высота:  |  Размер: 324 B

Двоичные данные
BlazorWeather/wwwroot/images/locations/hi.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 22 KiB

Двоичные данные
BlazorWeather/wwwroot/images/locations/il.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 7.5 KiB

Двоичные данные
BlazorWeather/wwwroot/images/locations/mo.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 16 KiB

Двоичные данные
BlazorWeather/wwwroot/images/locations/ny.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 6.3 KiB

Двоичные данные
BlazorWeather/wwwroot/images/locations/wa.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 11 KiB

Просмотреть файл

@ -4,11 +4,11 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>BlazorWeather2021</title>
<title>BlazorWeather</title>
<base href="/" />
<link href="css/tailwind.min.css" rel="stylesheet" />
<link href="css/app.css" rel="stylesheet" />
<link href="BlazorWeather2021.styles.css" rel="stylesheet" />
<link href="BlazorWeather.styles.css" rel="stylesheet" />
</head>
<body>

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 1.2 KiB

После

Ширина:  |  Высота:  |  Размер: 1.2 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 4.4 KiB

После

Ширина:  |  Высота:  |  Размер: 4.4 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 3.0 KiB

После

Ширина:  |  Высота:  |  Размер: 3.0 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 1.2 KiB

После

Ширина:  |  Высота:  |  Размер: 1.2 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 1.2 KiB

После

Ширина:  |  Высота:  |  Размер: 1.2 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 2.7 KiB

После

Ширина:  |  Высота:  |  Размер: 2.7 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 1.3 KiB

После

Ширина:  |  Высота:  |  Размер: 1.3 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 3.0 KiB

После

Ширина:  |  Высота:  |  Размер: 3.0 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 4.3 KiB

После

Ширина:  |  Высота:  |  Размер: 4.3 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 6.2 KiB

После

Ширина:  |  Высота:  |  Размер: 6.2 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 6.2 KiB

После

Ширина:  |  Высота:  |  Размер: 6.2 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 2.3 KiB

После

Ширина:  |  Высота:  |  Размер: 2.3 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 1.3 KiB

После

Ширина:  |  Высота:  |  Размер: 1.3 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 3.0 KiB

После

Ширина:  |  Высота:  |  Размер: 3.0 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 2.2 KiB

После

Ширина:  |  Высота:  |  Размер: 2.2 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 1.4 KiB

После

Ширина:  |  Высота:  |  Размер: 1.4 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 2.1 KiB

После

Ширина:  |  Высота:  |  Размер: 2.1 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 3.3 KiB

После

Ширина:  |  Высота:  |  Размер: 3.3 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 3.0 KiB

После

Ширина:  |  Высота:  |  Размер: 3.0 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 4.2 KiB

После

Ширина:  |  Высота:  |  Размер: 4.2 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 2.4 KiB

После

Ширина:  |  Высота:  |  Размер: 2.4 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 3.3 KiB

После

Ширина:  |  Высота:  |  Размер: 3.3 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 7.9 KiB

После

Ширина:  |  Высота:  |  Размер: 7.9 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 4.9 KiB

После

Ширина:  |  Высота:  |  Размер: 4.9 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 4.4 KiB

После

Ширина:  |  Высота:  |  Размер: 4.4 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 2.5 KiB

После

Ширина:  |  Высота:  |  Размер: 2.5 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 2.5 KiB

После

Ширина:  |  Высота:  |  Размер: 2.5 KiB

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 3.5 KiB

После

Ширина:  |  Высота:  |  Размер: 3.5 KiB

Просмотреть файл

@ -1,16 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.0-preview.4.21222.16" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.0-preview.4.21222.16" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BlazorWeather2021\BlazorWeather2021.csproj" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,26 +0,0 @@
using System;
using System.Net.Http;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Text;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
namespace BlazorWeather2021
{
public class Program
{
public static async Task Main(string[] args)
{
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app");
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
builder.Services.AddBlazorWeather(baseUri: "[Weather base URI]");
await builder.Build().RunAsync();
}
}
}

Двоичные данные
BlazorWeather2021.Client/wwwroot/favicon.ico

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 5.3 KiB

Просмотреть файл

@ -1,25 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>BlazorWeather2021</title>
<base href="/" />
<link href="_content/BlazorWeather2021/css/tailwind.min.css" rel="stylesheet" />
<link href="_content/BlazorWeather2021/css/app.css" rel="stylesheet" />
<link href="BlazorWeather2021.Client.styles.css" rel="stylesheet" />
</head>
<body>
<div id="app">Loading...</div>
<div id="blazor-error-ui">
An unhandled error has occurred.
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>
<script src="_framework/blazor.webassembly.js"></script>
</body>
</html>

Просмотреть файл

@ -1,12 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<UserSecretsId>6da98b65-8ce9-42d6-b26b-84b7c4b3051a</UserSecretsId>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\BlazorWeather2021\BlazorWeather2021.csproj" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,42 +0,0 @@
@page
@model BlazorWeather2021.Server.Pages.ErrorModel
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>Error</title>
<link href="~/css/bootstrap/bootstrap.min.css" rel="stylesheet" />
<link href="~/css/app.css" rel="stylesheet" />
</head>
<body>
<div class="main">
<div class="content px-4">
<h1 class="text-danger">Error.</h1>
<h2 class="text-danger">An error occurred while processing your request.</h2>
@if (Model.ShowRequestId)
{
<p>
<strong>Request ID:</strong> <code>@Model.RequestId</code>
</p>
}
<h3>Development Mode</h3>
<p>
Swapping to the <strong>Development</strong> environment displays detailed information about the error that occurred.
</p>
<p>
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
It can result in displaying sensitive information from exceptions to end users.
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
and restarting the app.
</p>
</div>
</div>
</body>
</html>

Просмотреть файл

@ -1,32 +0,0 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
namespace BlazorWeather2021.Server.Pages
{
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
[IgnoreAntiforgeryToken]
public class ErrorModel : PageModel
{
public string RequestId { get; set; }
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
private readonly ILogger<ErrorModel> _logger;
public ErrorModel(ILogger<ErrorModel> logger)
{
_logger = logger;
}
public void OnGet()
{
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
}
}
}

Просмотреть файл

@ -1,35 +0,0 @@
@page "/"
@namespace BlazorWeather2021.Server.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@{
Layout = null;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Blazor Weather 2021</title>
<base href="~/" />
<link href="_content/BlazorWeather2021/css/app.css" rel="stylesheet" />
<link href="_content/BlazorWeather2021/css/tailwind.min.css" rel="stylesheet" />
<link href="BlazorWeather2021.Server.styles.css" rel="stylesheet" />
</head>
<body>
<component type="typeof(App)" render-mode="ServerPrerendered" />
<div id="blazor-error-ui">
<environment include="Staging,Production">
An error has occurred. This application may no longer respond until reloaded.
</environment>
<environment include="Development">
An unhandled exception has occurred. See browser dev tools for details.
</environment>
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>
<script src="_framework/blazor.server.js"></script>
</body>
</html>

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше