mirror of
https://github.com/yawaflua/oembed-tests.yawaflua.ru.git
synced 2025-12-08 19:39:29 +02:00
Try to add meta-tag whilst using asp mvc
This commit is contained in:
3
MVC/Pay.cshtml
Normal file
3
MVC/Pay.cshtml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
@page "{username}"
|
||||||
|
@model OembedTests.MVC.PayModel
|
||||||
|
<p>@Model.username</p>
|
||||||
14
MVC/Pay.cshtml.cs
Normal file
14
MVC/Pay.cshtml.cs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||||
|
|
||||||
|
namespace OembedTests.MVC
|
||||||
|
{
|
||||||
|
public class PayModel : PageModel
|
||||||
|
{
|
||||||
|
public string username { get; set; }
|
||||||
|
public void OnGet(string username)
|
||||||
|
{
|
||||||
|
this.username = username;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
19
MVC/_Layout.cshtml
Normal file
19
MVC/_Layout.cshtml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta name="viewport" content="width=device-width" />
|
||||||
|
<title>@ViewBag.Title</title>
|
||||||
|
@{
|
||||||
|
string oembedUrl = "https://" + Context.Request.Host.Host + "/oembed";
|
||||||
|
}
|
||||||
|
<link rel="alternate" type="application/json+oembed"
|
||||||
|
href="https://oembed-tests.yawaflua.ru/oembed/https://oembed-tests.yawaflua.ru/pay/yawaflua&format=json"
|
||||||
|
title="Donate to yawaflua now" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div>
|
||||||
|
@RenderBody()
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -20,7 +20,8 @@
|
|||||||
services
|
services
|
||||||
.AddSwaggerGen()
|
.AddSwaggerGen()
|
||||||
.AddSingleton(configuration)
|
.AddSingleton(configuration)
|
||||||
.AddEndpointsApiExplorer();
|
.AddEndpointsApiExplorer()
|
||||||
|
.AddRazorPages();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,6 +42,7 @@
|
|||||||
app.UseEndpoints(endpoints =>
|
app.UseEndpoints(endpoints =>
|
||||||
{
|
{
|
||||||
endpoints.MapControllers();
|
endpoints.MapControllers();
|
||||||
|
endpoints.MapRazorPages();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user