Skip to content

Commit cd15fc2

Browse files
committed
add qrcode;
1 parent 5da3b3b commit cd15fc2

File tree

2 files changed

+77
-1
lines changed

2 files changed

+77
-1
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
@page "/QrCode"
2+
@inject IOptions<SiteOption> SiteOption
3+
4+
@code {
5+
[SupplyParameterFromQuery]
6+
public string? Title { get; set; }
7+
8+
[SupplyParameterFromQuery]
9+
public string? Description { get; set; }
10+
11+
[SupplyParameterFromQuery]
12+
public string? Button { get; set; }
13+
14+
[SupplyParameterFromQuery]
15+
public string? Phone { get; set; }
16+
}
17+
18+
<PageTitle>@Title - @SiteOption.Value.AppTitle</PageTitle>
19+
20+
<div class="container cl-container cl-post">
21+
<div>
22+
<CmsCard>
23+
24+
@if (string.IsNullOrWhiteSpace(Title) || string.IsNullOrWhiteSpace(Phone))
25+
{
26+
<h1 class="invalid-page">ÎÞÐ§Ò³Ãæ</h1>
27+
}
28+
else
29+
{
30+
<h1 class="title">@Title</h1>
31+
<p>@Description</p>
32+
<a class="phone-link" href="tel:@Phone">@Button</a>
33+
}
34+
</CmsCard>
35+
<div style="height:20px;"></div>
36+
</div>
37+
<div>
38+
<UWebSiteCount />
39+
<div style="height: 20px;"></div>
40+
<UPostRank />
41+
</div>
42+
</div>
43+
44+
<style>
45+
.invalid-page {
46+
font-size: 1.5rem;
47+
font-weight: bold;
48+
color: red;
49+
text-align: center;
50+
margin: 20px 0;
51+
}
52+
.title {
53+
font-size: 1.4rem;
54+
font-weight: bold;
55+
color: #333;
56+
margin-bottom: 15px;
57+
text-align: center;
58+
}
59+
.phone-link {
60+
display: block;
61+
font-size: 1.2rem;
62+
color: #FE5722;
63+
text-decoration: none;
64+
padding: 12px 20px;
65+
border: 1px solid #007bff;
66+
border-radius: 5px;
67+
transition: background-color 0.3s, color 0.3s;
68+
text-align: center;
69+
margin: 0 auto;
70+
max-width: 200px;
71+
}
72+
.phone-link:hover {
73+
background-color: #007bff;
74+
color: white;
75+
}
76+
</style>

src/WebSite/WebSite.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<PackageReference Include="Known.Core" Version="3.1.9" />
1616
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.0-preview.1.25120.3" />
1717
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.2" />
18-
<PackageReference Include="Scalar.AspNetCore" Version="2.0.24" />
18+
<PackageReference Include="Scalar.AspNetCore" Version="2.0.26" />
1919
<PackageReference Include="Microsoft.SemanticKernel" Version="1.40.1" />
2020
<ProjectReference Include="..\CodeWF\CodeWF.csproj" />
2121
</ItemGroup>

0 commit comments

Comments
 (0)