feat: Implement Gogh Theme Engine with options page, theme parsing, and semantic theme derivation
We're cooked. <skull emoji> - Added options page for YAML palette editing, live color preview, and diagnostics. - Implemented theme engine to parse Gogh YAML palettes and derive semantic themes. - Configured TypeScript and Vite for building the extension. - Created new tab and popup HTML pages with corresponding scripts and styles. - Established storage management for user configurations in Chrome storage. - Added icons for the extension and updated manifest for MV3 compatibility.
This commit is contained in:
11
popup/popup.html
Normal file
11
popup/popup.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Chrome Extension Template Popup</title>
|
||||
<meta name="viewport" content="initial-scale=1, maximum-scale=1" />
|
||||
<meta name="description" content="Chrome Extension Template" />
|
||||
<script src="popup.js" type="text/javascript"></script>
|
||||
<link href="popup.css" rel="stylesheet" />
|
||||
</head>
|
||||
<body>This is a Chrome Extension popup window</body>
|
||||
</html>
|
||||
13
popup/scripts/index.js
Normal file
13
popup/scripts/index.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import { getStorage } from "../../common/storage";
|
||||
import { PRESET_CONFIGURATION, CHROME_SYNC_STORAGE_KEY } from "../../common/settings";
|
||||
|
||||
function loadConfiguration(result) {
|
||||
const savedConfiguration = result || PRESET_CONFIGURATION;
|
||||
const storageValue = savedConfiguration["storageValue"];
|
||||
console.info("Storage value", storageValue);
|
||||
}
|
||||
|
||||
window.onload = function() {
|
||||
console.info("Popup script loaded");
|
||||
getStorage(CHROME_SYNC_STORAGE_KEY, loadConfiguration);
|
||||
};
|
||||
10
popup/styles/_page.scss
Normal file
10
popup/styles/_page.scss
Normal file
@@ -0,0 +1,10 @@
|
||||
@import "./variables";
|
||||
|
||||
body {
|
||||
background-color: $light-gray;
|
||||
color: $dark-gray;
|
||||
font: {
|
||||
family: $font-family;
|
||||
size: 16px;
|
||||
}
|
||||
}
|
||||
3
popup/styles/_variables.scss
Normal file
3
popup/styles/_variables.scss
Normal file
@@ -0,0 +1,3 @@
|
||||
$dark-gray: #830000;
|
||||
$light-gray: #fdffd0;
|
||||
$font-family: -apple-system, BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,'Fira Sans','Droid Sans','Helvetica Neue',sans-serif;
|
||||
2
popup/styles/popup.scss
Normal file
2
popup/styles/popup.scss
Normal file
@@ -0,0 +1,2 @@
|
||||
@import "./variables";
|
||||
@import "./page";
|
||||
Reference in New Issue
Block a user