From d43512ade112f269ce82de16de93920136fa23ce Mon Sep 17 00:00:00 2001 From: Marshal Hayes <17213165+marshalhayes@users.noreply.github.com> Date: Fri, 31 Jan 2025 22:35:35 -0600 Subject: [PATCH] add framework guide for .NET --- .../installation/framework-guides/dotnet.tsx | 158 ++++++++++++++++++ .../installation/framework-guides/index.ts | 1 + src/docs/img/guides/dotnet-white.react.svg | 6 + src/docs/img/guides/dotnet.react.svg | 6 + 4 files changed, 171 insertions(+) create mode 100644 src/app/(docs)/docs/installation/framework-guides/dotnet.tsx create mode 100644 src/docs/img/guides/dotnet-white.react.svg create mode 100644 src/docs/img/guides/dotnet.react.svg diff --git a/src/app/(docs)/docs/installation/framework-guides/dotnet.tsx b/src/app/(docs)/docs/installation/framework-guides/dotnet.tsx new file mode 100644 index 000000000..4730d0853 --- /dev/null +++ b/src/app/(docs)/docs/installation/framework-guides/dotnet.tsx @@ -0,0 +1,158 @@ +import {shell, Page, Step, Tile, css, html} from "./utils"; +import Logo from "@/docs/img/guides/dotnet.react.svg"; +import LogoDark from "@/docs/img/guides/dotnet-white.react.svg"; + +export let tile: Tile = { + title: ".NET", + description: "An open-source, cross-platform framework for building modern apps and powerful cloud services.", + Logo, + LogoDark +}; + +export let page: Page = { + title: "Install Tailwind CSS with .NET", + description: "Setting up Tailwind CSS in a .NET project.", +}; + +export let steps: Step[] = [ + { + title: "Create your project", + body: ( + <> +
Start by creating a new .NET Blazor project if you don’t have one set up already.
+The steps in this guide will work not only for Blazor, but for any .NET Web project.
+ > + ), + code: { + name: "Terminal", + lang: "shell", + code: shell` + dotnet new blazor --empty -n my-app + `, + }, + }, + { + title: 'Create a new CSS file', + body: ( +
+ Create a new stylesheet at Styles/main.css
+
Add an @import
to ./src/styles.css
that imports Tailwind CSS.
+ Open the my-app.csproj
file and add the following targets.
+
+ Add a reference to the CSS file Tailwind generated to the head
of
+ the Components/App.razor
file.
+
Start using Tailwind’s utility classes to style your content.
+ ), + code: { + name: 'Components/Pages/Home.razor', + lang: 'html', + code: `
+ Build the project and start the application with dotnet run
.
+