Skip to content

Commit

Permalink
Themes.
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdriscoll committed Mar 27, 2022
1 parent 2fb675b commit 491548a
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
4 changes: 4 additions & 0 deletions media/css/theme.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
body {
background-color: #cacecb;
color: #2d2d2d;
}
4 changes: 4 additions & 0 deletions media/css/theme.dark.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
body {
background-color: #262626;
color: #cacecb;
}
1 change: 1 addition & 0 deletions src/webviews/welcome.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<link href="{0}" rel="stylesheet">
<script src="{1}/bootstrap.bundle.min.js"></script>
<script src="{1}/fontawesome.js"></script>
<link href="{3}" rel="stylesheet">

<script>
function walkthrough() {
Expand Down
7 changes: 6 additions & 1 deletion src/webviews/welcome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,12 @@ export default class WelcomePanel {
undefined
);

panel.webview.html = format(content, [bootstrapCss.toString(), js.toString(), images.toString()]);
let theme = panel.webview.asWebviewUri(vscode.Uri.joinPath(this._extensionUri, 'media', 'css', 'theme.css'));
if (vscode.window.activeColorTheme.kind == vscode.ColorThemeKind.Dark) {
theme = panel.webview.asWebviewUri(vscode.Uri.joinPath(this._extensionUri, 'media', 'css', 'theme.dark.css'));
}

panel.webview.html = format(content, [bootstrapCss.toString(), js.toString(), images.toString(), theme.toString()]);

// Listen for when the panel is disposed
// This happens when the user closes the panel or when the panel is closed programmatically
Expand Down
2 changes: 1 addition & 1 deletion walkthroughs/getting-started/3-connect.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Connect Visual Studio Code

The PowerShell Unviersal Visual Studio Code extension requires connection information to login to your PowerShell Universal instance. Once logged into PowerShell Universal, click Settings \ Configurations and then Edit with VS Code. You'll be prompted and VS Code will be configured automatically.
The PowerShell Universal Visual Studio Code extension requires connection information to login to your PowerShell Universal instance. Once logged into PowerShell Universal, click Settings \ Configurations and then Edit with VS Code. You'll be prompted and VS Code will be configured automatically.

<p align="center">
<img src="../../images/connect.png" alt="PowerShell Universal" />
Expand Down

0 comments on commit 491548a

Please sign in to comment.