Skip to content

Commit

Permalink
add deprecation notes, more centralized redirects, lots of cleanup
Browse files Browse the repository at this point in the history
also fix titles and meta descriptions
  • Loading branch information
TimHess committed Sep 3, 2024
1 parent dc45d01 commit 751305d
Show file tree
Hide file tree
Showing 94 changed files with 1,265 additions and 2,404 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
# Steeltoe Main Site

The site was built using [Blazor](https://docs.microsoft.com/en-us/aspnet/core/blazor/) in Visual Studio.
The site was built using [Blazor](https://docs.microsoft.com/aspnet/core/blazor/) in Visual Studio.

## Install Dependencies
Requires .NET Core SDK 8.0

```powershell
PS> dotnet new -i Microsoft.AspNetCore.Blazor.Templates
```
Requires .NET 8.0+ SDK

## Local testing of Steeltoe site

Expand All @@ -16,7 +13,8 @@ PS> dotnet new -i Microsoft.AspNetCore.Blazor.Templates
PS> cd src/Client
```

2. Run the application with the `watch` command. So as changes are made in Visual Studio, the site will refresh.
1. Run the application with the `watch` command. So as changes are made, the site will refresh.

```powershell
PS> dotnet watch run
Expand Down
67 changes: 30 additions & 37 deletions src/Client/Components/App.razor
Original file line number Diff line number Diff line change
@@ -1,31 +1,25 @@
@using Steeltoe.Client.Components.Layout
@inject IHostEnvironment HostEnvironment

<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.cookielaw.org/scripttemplates/otSDKStub.js" data-domain-script="018ee7f5-70e6-7787-8d98-05c8f935c75d"></script>
<script>function OptanonWrapper() { }</script>
<script>function OptanonWrapper(){}</script>
<script>
function setGTM(w,d,s,l,i){ w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);}
if(document.cookie.indexOf('OptanonConsent')>-1&&document.cookie.indexOf('groups=')>-1){setGTM(window,document,'script','dataLayer','GTM-MMDFJKF');}else{waitForOnetrustActiveGroups();}var timer;function waitForOnetrustActiveGroups(){if(document.cookie.indexOf('OptanonConsent')>-1&&document.cookie.indexOf('groups=')>-1){clearTimeout(timer);setGTM(window,document,'script','dataLayer','GTM-MMDFJKF');}else{timer=setTimeout(waitForOnetrustActiveGroups,250);}}
</script>

<meta content="IE=edge" http-equiv="X-UA-Compatible">
<meta charset="utf-8">
<meta content="width=device-width,initial-scale=1.0" name="viewport">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">

<meta property="og:type" content="website">
<meta property="og:title" content="Create cloud-native .NET microservices with Steeltoe." />
<meta property="og:url" content="https://www.steeltoe.io" />
<meta property="og:image" content="https://steeltoe.io/images/favicon.png" />
<meta property="og:description" content="Create .NET microservices for modern platforms with Steeltoe. It's a friend of Spring Cloud and can be used anywhere." />
<meta name="twitter:title" content="Create cloud-native .NET microservices with Steeltoe.">

<meta property="og:url" content="https://www.steeltoe.io"/>
<meta property="og:image" content="https://steeltoe.io/images/favicon.png"/>
<meta content="Create cloud-native .NET microservices with Steeltoe." name="DC.Title" xml:lang="EN">
<meta content="cloud-native, .net, dotnet, framework, cloud, developer" name="DC.Subject" xml:lang="EN">
<meta content="Create .NET microservices for modern platforms with Steeltoe. It's a friend of Spring Cloud and can be used anywhere." name="description" xml:lang="EN">
<meta content="EN" name="DC.Language" scheme="dcterms:RFC1766">
<meta content="https://steeltoe.io/" name="DC.Identifier" schema="DCterms:URI">
<meta content="text/html" name="DC.Format" schema="DCterms:IMT">
Expand All @@ -35,36 +29,35 @@
<meta content="Steeltoe OSS" name="DC.Contributor">
<meta content="2019-10-03" name="DC.Date" scheme="ISO8601">
<meta content="text/html" name="DC.Type">
<meta content="https://steeltoe.io/" name="DC.Identifier">
<meta content="Copyright © 2005-@(DateTime.Now.Year) Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries." name="DC.Rights">

<base href="/" />
<title>Steeltoe OSS</title>
<meta content="Copyright © 2005-@(DateTime.Now.Year) Broadcom. All Rights Reserved. The term &quot;Broadcom&quot; refers to Broadcom Inc. and/or its subsidiaries." name="DC.Rights">
<base href="/"/>
<link rel="canonical" href="https://steeltoe.io/">
<link rel="icon" href="https://steeltoe.io/images/favicon.png" type="image/png" />
<link rel="icon" href="/images/favicon.png" type="image/png"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
<link rel="stylesheet" href="css/fonts.css" />
<link rel="stylesheet" href="css/site.css" />
<link rel="stylesheet" href="css/mobile.css" />
<HeadOutlet />
<link rel="stylesheet" href="css/fonts.css"/>
<link rel="stylesheet" href="css/site.css"/>
<link rel="stylesheet" href="css/mobile.css"/>
<HeadOutlet/>
</head>
<body>
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-MMDFJKF" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<div id="blazor-error-ui">
@if (HostEnvironment.IsProduction())
{
<span>An error has occurred.</span>
}
else
{
<span>An unhandled exception occurred. See browser dev tools for details.</span>
}
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>
<Routes />
<script src="js/functions.js" type="text/javascript"></script>
<script src="_framework/blazor.web.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script>
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-MMDFJKF" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<div id="blazor-error-ui">
@if (HostEnvironment.IsProduction())
{
<span>An error has occurred.</span>
}
else
{
<span>An unhandled exception occurred. See browser dev tools for details.</span>
}
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>
<Router AppAssembly="@typeof(App).Assembly">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)"/>
</Found>
</Router>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script>
</body>
</html>
24 changes: 9 additions & 15 deletions src/Client/Components/Banner.razor
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<div class="rounded-pill banner">
<div class="banner">
<Href href="@Href" NewWindow="@NewWindow">
<div class="row no-gutters align-items-center">
<div class="col-2" style="margin: .7% 3% .7% 5%;max-width: 11%;">
<div class="sign rounded-pill special-link">
<div style="padding: 2px 0px 2px 0px;">@BannerTypeName</div>
</div>
<div style="padding: 2px;">@BannerTypeName</div>
</div>
</div>
<div class="col desc">
@ChildContent
Expand All @@ -13,16 +13,10 @@
</Href>
</div>

@code {
[Parameter]
public RenderFragment ChildContent { get; set; }

[Parameter]
public string Href {get;set;}

[Parameter]
public string BannerTypeName { get; set; } = "event";

[Parameter]
public bool NewWindow { get; set; } = true;
@code
{
[Parameter] public RenderFragment ChildContent { get; set; }
[Parameter] public string Href {get;set;}
[Parameter] public string BannerTypeName { get; set; } = "event";
[Parameter] public bool NewWindow { get; set; } = true;
}
37 changes: 0 additions & 37 deletions src/Client/Components/Breadcrumbs.razor

This file was deleted.

13 changes: 0 additions & 13 deletions src/Client/Components/CustomPageTitle.razor

This file was deleted.

17 changes: 0 additions & 17 deletions src/Client/Components/GetStarted.razor

This file was deleted.

24 changes: 12 additions & 12 deletions src/Client/Components/Href.razor
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<NavLink class="@(Class + " nav-link" + (AsButton?"border border-dark font-weight-bold btn btn-default border-black p-3":""))" target="@(NewWindow?"_blank":"")" role="@(AsButton?"button":"")" @attributes="AdditionalAttributes">@ChildContent</NavLink>

@code {
[Parameter]
public RenderFragment ChildContent { get; set; }
[Parameter]
public string Class { get; set; }
[Parameter]
public bool AsButton { get; set; } = false;
[Parameter]
public bool NewWindow { get; set; } = false;
[Parameter(CaptureUnmatchedValues = true)]
public Dictionary<string, object> AdditionalAttributes { get; set; }
<NavLink class="@(Class + " nav-link" + (AsButton ? " border border-dark font-weight-bold btn btn-default border-black p-3" : ""))"
target="@(NewWindow ? "_blank" : "")" role="@(AsButton ? "button" : "")" @attributes="AdditionalAttributes">@ChildContent</NavLink>

@code
{
[Parameter] public RenderFragment ChildContent { get; set; }
[Parameter] public string Class { get; set; }
[Parameter] public bool AsButton { get; set; } = false;
[Parameter] public bool NewWindow { get; set; } = false;

[Parameter(CaptureUnmatchedValues = true)]
public Dictionary<string, object> AdditionalAttributes { get; set; }
}
35 changes: 2 additions & 33 deletions src/Client/Components/Layout/MainLayout.razor
Original file line number Diff line number Diff line change
@@ -1,38 +1,7 @@
@inherits LayoutComponentBase
@inject NavigationManager NavigationManager

<header class="sticky-top bg-white" style="box-shadow: 0 0 20px -4px #eeeeee;">
<SiteHeader />
</header>
<SiteHeader />
<div id="main">
@Body
</div>
<footer class="@footerClass">
<SiteFooter />
</footer>

@code {
private string footerClass { get; set; } = "";

protected override async Task OnInitializedAsync() {
NavigationManager.LocationChanged += LocationChanged;

if (NavigationManager.Uri.Contains("docs") || NavigationManager.Uri.Contains("labs"))
footerClass = "hide";
else
footerClass = "";

await base.OnInitializedAsync();
}
private void LocationChanged(object sender, LocationChangedEventArgs e) {
if (e.Location.Contains("docs") || NavigationManager.Uri.Contains("labs"))
footerClass = "hide";
else
footerClass = "";

StateHasChanged();
}
private void Dispose() {
NavigationManager.LocationChanged -= LocationChanged;
}
}
<SiteFooter />
Loading

0 comments on commit 751305d

Please sign in to comment.