@@ -1491,6 +1491,13 @@ export class NewProjectPanel {
14911491 )
14921492 ) ;
14931493
1494+ const defaultTheme =
1495+ window . activeColorTheme . kind === ColorThemeKind . Dark ||
1496+ window . activeColorTheme . kind === ColorThemeKind . HighContrast
1497+ ? "dark"
1498+ : "light" ;
1499+ const riscvDefaultSvgUri = defaultTheme === "dark" ? riscvWhiteSvgUri : riscvBlackSvgUri ;
1500+
14941501 this . _versionBundlesLoader = new VersionBundlesLoader ( this . _extensionUri ) ;
14951502
14961503 // construct auxiliary html
@@ -1664,14 +1671,16 @@ export class NewProjectPanel {
16641671 var doProjectImport = ${ this . _isProjectImport } ;
16651672 var forceCreateFromExample = ${ forceCreateFromExample } ;
16661673
1674+ localStorage.theme = "${ defaultTheme } ";
1675+
16671676 // riscv logos
16681677 const riscvWhiteSvgUri = "${ riscvWhiteSvgUri . toString ( ) } ";
16691678 const riscvWhiteYellowSvgUri = "${ riscvWhiteYellowSvgUri . toString ( ) } ";
16701679 const riscvBlackSvgUri = "${ riscvBlackSvgUri . toString ( ) } ";
16711680 const riscvColorSvgUri = "${ riscvColorSvgUri . toString ( ) } ";
16721681 </script>
16731682 </head>
1674- <body class="scroll-smooth w-screen">
1683+ <body class="scroll-smooth w-screen${ defaultTheme === "dark" ? " dark" : "" } ">
16751684 <div id="above-nav" class="container max-w-6xl mx-auto flex justify-between items-center w-full sticky top-0 z-10 pl-5 h-5">
16761685 </div>
16771686 <div id="nav-overlay" class="overlay hidden md:hidden inset-y-0 right-0 w-auto z-50 overflow-y-auto ease-out bg-slate-400 dark:bg-slate-800 drop-shadow-lg">
@@ -1796,7 +1805,7 @@ export class NewProjectPanel {
17961805 <label for="riscvToggle" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Architecture (Pico 2)</label>
17971806 <div class="flex items-center justify-between p-2 bg-gray-100 rounded-lg dark:bg-gray-700">
17981807 <input type="checkbox" id="sel-riscv" class="ms-2" />
1799- <img id="riscvIcon" src="${ riscvColorSvgUri . toString ( ) } " alt="RISC-V Logo" class="h-6 mx-auto w-28">
1808+ <img id="riscvIcon" src="${ riscvDefaultSvgUri . toString ( ) } " alt="RISC-V Logo" class="h-6 mx-auto w-28">
18001809 </div>
18011810 </div>
18021811 </div>
0 commit comments