logo + oidc client PostIt
This commit is contained in:
parent
fa7d6242f1
commit
164bd928aa
12 changed files with 197 additions and 17 deletions
|
|
@ -306,7 +306,7 @@ public static class HostingExtensions
|
|||
sql => sql.MigrationsAssembly(migrationsAssembly));
|
||||
}
|
||||
|
||||
b.UseSeeding(EnsureDefaultApplicationScopes());
|
||||
b.UseSeeding(EnsureDefaultConfiguration());
|
||||
};
|
||||
})
|
||||
.AddOperationalStore(options =>
|
||||
|
|
@ -351,7 +351,47 @@ public static class HostingExtensions
|
|||
context.SaveChanges();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private static Action<DbContext, bool> EnsureDefaultConfiguration()
|
||||
{
|
||||
return (context, _) =>
|
||||
{
|
||||
EnsureDefaultApplicationScopes()(context, _);
|
||||
|
||||
var existingClient = context.Set<Client>().FirstOrDefault(c => c.ClientId == "postit");
|
||||
if (existingClient == null)
|
||||
{
|
||||
var client = new Client
|
||||
{
|
||||
ClientId = "postit",
|
||||
Enabled = true,
|
||||
RequireClientSecret = true,
|
||||
ProtocolType = "oidc",
|
||||
RequireConsent = false,
|
||||
};
|
||||
|
||||
context.Set<Client>().Add(client);
|
||||
context.Set<ClientGrantType>().Add(new ClientGrantType
|
||||
{
|
||||
Client = client,
|
||||
GrantType = "client_credentials"
|
||||
});
|
||||
context.Set<ClientScope>().Add(new ClientScope
|
||||
{
|
||||
Client = client,
|
||||
Scope = "blog"
|
||||
});
|
||||
context.Set<ClientSecret>().Add(new ClientSecret
|
||||
{
|
||||
Client = client,
|
||||
Value = "postit-secret".Sha256(),
|
||||
Type = IdentityServer8.Models.IdentityServerConstants.SecretTypes.SharedSecret
|
||||
});
|
||||
|
||||
context.SaveChanges();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no" />
|
||||
<link rel="icon" type="image/x-icon" href="~/favicon.ico" asp-append-version="true"/>
|
||||
<link rel="shortcut icon" type="image/x-icon" href="~/favicon.ico" asp-append-version="true"/>
|
||||
<link rel="icon" type="image/svg+xml" href="~/images/yavsc-logo.svg" asp-append-version="true" />
|
||||
<link rel="alternate icon" type="image/x-icon" href="@SiteSettings.Value.FavIcon" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/lib/jquery-ui/jquery-ui.min.css">
|
||||
<link rel="stylesheet" href="~/lib/bootstrap.quartz.min.css" asp-append-version="true"/>
|
||||
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true"/>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
<nav class="navbar navbar-expand-sm navbar-dark bg-dark" aria-label="Yavsc">
|
||||
<a class="navbar-brand" href="#">@Config.SiteSetup.Title</a>
|
||||
<a class="navbar-brand" href="/">
|
||||
<img src="~/images/yavsc-logo.svg" alt="Yavsc" style="height:32px; margin-right:8px; display:inline-block; vertical-align:middle;" />
|
||||
@Config.SiteSetup.Title
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
|
||||
data-bs-target="#navbar" aria-controls="navbar"
|
||||
aria-expanded="true" aria-label="Toggle navigation">
|
||||
|
|
@ -15,4 +18,3 @@
|
|||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
|
|
|||
|
|
@ -12,11 +12,12 @@
|
|||
"YavscConnection": "Server=[YOURSERVERNAME];Port=5432;Database=[YOURDBNAME];Username=[YOURDBUSERNAME];Password=[YOURDBPASSW];"
|
||||
},
|
||||
"Site": {
|
||||
"Title": "Yavsc",
|
||||
"Title": "yavsc",
|
||||
"Slogan": "Yavsc!",
|
||||
"StyleSheet": "/css/default.css",
|
||||
"Authority": "https://127.0.0.1:5001/",
|
||||
"Banner": "/images/arts/concert.jpg",
|
||||
"Authority": "https://localhost:5001",
|
||||
"ExternalUrl": "https://localhost:5001",
|
||||
"Banner": "~/images/arts/PillarOfCreationOil.svg",
|
||||
"Owner": {
|
||||
"Name": "[Site owner's name]",
|
||||
"EMail": "[Site owner's e-mail address]"
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 303 KiB |
21
src/Yavsc.Org/wwwroot/images/yavsc-logo.svg
Normal file
21
src/Yavsc.Org/wwwroot/images/yavsc-logo.svg
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" role="img" aria-label="Yavsc — Yet Another Very Small Company">
|
||||
<title>Yavsc</title>
|
||||
<desc>Yet Another Very Small Company</desc>
|
||||
<defs>
|
||||
<linearGradient id="g" x1="0" y1="0" x2="1" y2="1">
|
||||
<stop offset="0%" stop-color="#0EA5E9"/>
|
||||
<stop offset="100%" stop-color="#1E40AF"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<!-- Rounded square badge -->
|
||||
<rect x="8" y="8" width="224" height="224" rx="44" ry="44" fill="url(#g)"/>
|
||||
<!-- Stylized Y formed by three strokes converging -->
|
||||
<g fill="none" stroke="#ffffff" stroke-width="22" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M70 60 L120 130"/>
|
||||
<path d="M170 60 L120 130"/>
|
||||
<path d="M120 130 L120 188"/>
|
||||
</g>
|
||||
<!-- Small dot: the "very small" wink -->
|
||||
<circle cx="120" cy="46" r="8" fill="#FACC15"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 903 B |
Loading…
Add table
Add a link
Reference in a new issue