Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(#407) Retain Astro Component CSS #408

Merged
merged 2 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Chocolatey choco-theme 0.7.1
# Chocolatey choco-theme 0.7.2

**NOTE: This project is used on Chocolatey websites and is being released for the benefit of the community. While we endeavour to help and fix issues, it will be limited to GitHub issues, discussions and pull requests when we are able to.**

Expand Down
4 changes: 3 additions & 1 deletion build/data/repository-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ export const astroRepositoryConfig = {
'src/**/*.mdx',
'src/**/*.js',
'src/**/*.ts',
'public/**/*.js'
'public/**/*.js',
'node_modules/choco-astro/src/**/*.astro',
'node_modules/choco-astro/src/**/*.ts'
Comment on lines +72 to +73
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@steviecoaster These are the main changes. Most of everything else are auto generated files as a result of updating choco-theme to a new version.

],
safelist: [
'::-webkit-scrollbar',
Expand Down
2 changes: 1 addition & 1 deletion build/esbuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const init = async () => {
const minify = process.argv.includes('--minify');

const banner: string = `/*!
* choco-theme v0.7.1 (https://github.com/chocolatey/choco-theme#readme)
* choco-theme v0.7.2 (https://github.com/chocolatey/choco-theme#readme)
* Copyright 2020-2024 Chocolatey Software
* Licensed under MIT (https://github.com/chocolatey/choco-theme/blob/main/LICENSE)
*/`;
Expand Down
2 changes: 1 addition & 1 deletion dist/css/boxstarter.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@charset "UTF-8";
/*!
* choco-theme boxstarter v0.7.1 (https://github.com/chocolatey/choco-theme#readme)
* choco-theme boxstarter v0.7.2 (https://github.com/chocolatey/choco-theme#readme)
* Copyright 2020-2024 Chocolatey Software
* Licensed under MIT (https://github.com/chocolatey/choco-theme/blob/main/LICENSE)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/css/boxstarter.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/chocolatey.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@charset "UTF-8";
/*!
* choco-theme chocolatey v0.7.1 (https://github.com/chocolatey/choco-theme#readme)
* choco-theme chocolatey v0.7.2 (https://github.com/chocolatey/choco-theme#readme)
* Copyright 2020-2024 Chocolatey Software
* Licensed under MIT (https://github.com/chocolatey/choco-theme/blob/main/LICENSE)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/css/chocolatey.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/zendesk.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@charset "UTF-8";
/*!
* choco-theme zendesk v0.7.1 (https://github.com/chocolatey/choco-theme#readme)
* choco-theme zendesk v0.7.2 (https://github.com/chocolatey/choco-theme#readme)
* Copyright 2020-2024 Chocolatey Software
* Licensed under MIT (https://github.com/chocolatey/choco-theme/blob/main/LICENSE)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/css/zendesk.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/blog.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* choco-theme v0.7.1 (https://github.com/chocolatey/choco-theme#readme)
* choco-theme v0.7.2 (https://github.com/chocolatey/choco-theme#readme)
* Copyright 2020-2024 Chocolatey Software
* Licensed under MIT (https://github.com/chocolatey/choco-theme/blob/main/LICENSE)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/js/blog.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 35 additions & 33 deletions dist/js/boxstarter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* choco-theme v0.7.1 (https://github.com/chocolatey/choco-theme#readme)
* choco-theme v0.7.2 (https://github.com/chocolatey/choco-theme#readme)
* Copyright 2020-2024 Chocolatey Software
* Licensed under MIT (https://github.com/chocolatey/choco-theme/blob/main/LICENSE)
*/
Expand Down Expand Up @@ -19655,44 +19655,46 @@
const tabMultiAttribute = "data-choco-tab-multi";
const tabMultiElements = document.querySelectorAll(`[${tabMultiAttribute}]`);
const tabCookies = /* @__PURE__ */ new Set();
for (const tabElement of tabMultiElements) {
const tabMultiConfigAttribute = tabElement.getAttribute(tabMultiAttribute).replace(/\s/g, "");
let tabMultiConfig = null;
try {
tabMultiConfig = JSON.parse(tabMultiConfigAttribute != null ? tabMultiConfigAttribute : "");
} catch (error) {
console.error(`Invalid JSON: ${tabMultiConfigAttribute}`);
return;
}
for (const key in tabMultiConfig) {
if (Object.prototype.hasOwnProperty.call(tabMultiConfig, key)) {
tabCookies.add(key);
}
}
tabElement.addEventListener("click", () => {
const tabMultiValue = tabElement.getAttribute(tabMultiAttribute).replace(/\s/g, "");
for (const otherTab of tabMultiElements) {
const otherTabMultiValue = otherTab.getAttribute(tabMultiAttribute).replace(/\s/g, "");
if (otherTabMultiValue == null ? void 0 : otherTabMultiValue.includes(tabMultiValue != null ? tabMultiValue : "")) {
Tab.getOrCreateInstance(otherTab).show();
}
if (tabMultiElements.value) {
for (const tabElement of tabMultiElements) {
const tabMultiConfigAttribute = tabElement.getAttribute(tabMultiAttribute).replace(/\s/g, "");
let tabMultiConfig = null;
try {
tabMultiConfig = JSON.parse(tabMultiConfigAttribute != null ? tabMultiConfigAttribute : "");
} catch (error) {
console.error(`Invalid JSON: ${tabMultiConfigAttribute}`);
return;
}
const cookieDomain = ~location.hostname.indexOf("chocolatey.org") ? "domain=chocolatey.org;" : "";
for (const key in tabMultiConfig) {
if (Object.prototype.hasOwnProperty.call(tabMultiConfig, key)) {
const value = tabMultiConfig[key];
document.cookie = `${key}=${value}; ${setCookieExpirationNever2()}path=/; ${cookieDomain}`;
tabCookies.add(key);
}
}
});
}
for (const cookieName of tabCookies) {
const cookieValue = getCookie2(cookieName);
if (cookieValue) {
for (const tabElement of tabMultiElements) {
tabElement.addEventListener("click", () => {
const tabMultiValue = tabElement.getAttribute(tabMultiAttribute).replace(/\s/g, "");
if ((tabMultiValue == null ? void 0 : tabMultiValue.includes(cookieName)) && (tabMultiValue == null ? void 0 : tabMultiValue.includes(cookieValue))) {
Tab.getOrCreateInstance(tabElement).show();
for (const otherTab of tabMultiElements) {
const otherTabMultiValue = otherTab.getAttribute(tabMultiAttribute).replace(/\s/g, "");
if (otherTabMultiValue == null ? void 0 : otherTabMultiValue.includes(tabMultiValue != null ? tabMultiValue : "")) {
Tab.getOrCreateInstance(otherTab).show();
}
}
const cookieDomain = ~location.hostname.indexOf("chocolatey.org") ? "domain=chocolatey.org;" : "";
for (const key in tabMultiConfig) {
if (Object.prototype.hasOwnProperty.call(tabMultiConfig, key)) {
const value = tabMultiConfig[key];
document.cookie = `${key}=${value}; ${setCookieExpirationNever2()}path=/; ${cookieDomain}`;
}
}
});
}
for (const cookieName of tabCookies) {
const cookieValue = getCookie2(cookieName);
if (cookieValue) {
for (const tabElement of tabMultiElements) {
const tabMultiValue = tabElement.getAttribute(tabMultiAttribute).replace(/\s/g, "");
if ((tabMultiValue == null ? void 0 : tabMultiValue.includes(cookieName)) && (tabMultiValue == null ? void 0 : tabMultiValue.includes(cookieValue))) {
Tab.getOrCreateInstance(tabElement).show();
}
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions dist/js/boxstarter.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/community-package-differ.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* choco-theme v0.7.1 (https://github.com/chocolatey/choco-theme#readme)
* choco-theme v0.7.2 (https://github.com/chocolatey/choco-theme#readme)
* Copyright 2020-2024 Chocolatey Software
* Licensed under MIT (https://github.com/chocolatey/choco-theme/blob/main/LICENSE)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/js/community-package-differ.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/js/community-package-stats.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* choco-theme v0.7.1 (https://github.com/chocolatey/choco-theme#readme)
* choco-theme v0.7.2 (https://github.com/chocolatey/choco-theme#readme)
* Copyright 2020-2024 Chocolatey Software
* Licensed under MIT (https://github.com/chocolatey/choco-theme/blob/main/LICENSE)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/js/community-package-stats.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 35 additions & 33 deletions dist/js/community-packages.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* choco-theme v0.7.1 (https://github.com/chocolatey/choco-theme#readme)
* choco-theme v0.7.2 (https://github.com/chocolatey/choco-theme#readme)
* Copyright 2020-2024 Chocolatey Software
* Licensed under MIT (https://github.com/chocolatey/choco-theme/blob/main/LICENSE)
*/
Expand Down Expand Up @@ -40244,44 +40244,46 @@ ${templateEnter}`;
const tabMultiAttribute = "data-choco-tab-multi";
const tabMultiElements = document.querySelectorAll(`[${tabMultiAttribute}]`);
const tabCookies = /* @__PURE__ */ new Set();
for (const tabElement of tabMultiElements) {
const tabMultiConfigAttribute = tabElement.getAttribute(tabMultiAttribute).replace(/\s/g, "");
let tabMultiConfig = null;
try {
tabMultiConfig = JSON.parse(tabMultiConfigAttribute != null ? tabMultiConfigAttribute : "");
} catch (error) {
console.error(`Invalid JSON: ${tabMultiConfigAttribute}`);
return;
}
for (const key in tabMultiConfig) {
if (Object.prototype.hasOwnProperty.call(tabMultiConfig, key)) {
tabCookies.add(key);
}
}
tabElement.addEventListener("click", () => {
const tabMultiValue = tabElement.getAttribute(tabMultiAttribute).replace(/\s/g, "");
for (const otherTab of tabMultiElements) {
const otherTabMultiValue = otherTab.getAttribute(tabMultiAttribute).replace(/\s/g, "");
if (otherTabMultiValue == null ? void 0 : otherTabMultiValue.includes(tabMultiValue != null ? tabMultiValue : "")) {
Tab.getOrCreateInstance(otherTab).show();
}
if (tabMultiElements.value) {
for (const tabElement of tabMultiElements) {
const tabMultiConfigAttribute = tabElement.getAttribute(tabMultiAttribute).replace(/\s/g, "");
let tabMultiConfig = null;
try {
tabMultiConfig = JSON.parse(tabMultiConfigAttribute != null ? tabMultiConfigAttribute : "");
} catch (error) {
console.error(`Invalid JSON: ${tabMultiConfigAttribute}`);
return;
}
const cookieDomain = ~location.hostname.indexOf("chocolatey.org") ? "domain=chocolatey.org;" : "";
for (const key in tabMultiConfig) {
if (Object.prototype.hasOwnProperty.call(tabMultiConfig, key)) {
const value = tabMultiConfig[key];
document.cookie = `${key}=${value}; ${setCookieExpirationNever2()}path=/; ${cookieDomain}`;
tabCookies.add(key);
}
}
});
}
for (const cookieName of tabCookies) {
const cookieValue = getCookie2(cookieName);
if (cookieValue) {
for (const tabElement of tabMultiElements) {
tabElement.addEventListener("click", () => {
const tabMultiValue = tabElement.getAttribute(tabMultiAttribute).replace(/\s/g, "");
if ((tabMultiValue == null ? void 0 : tabMultiValue.includes(cookieName)) && (tabMultiValue == null ? void 0 : tabMultiValue.includes(cookieValue))) {
Tab.getOrCreateInstance(tabElement).show();
for (const otherTab of tabMultiElements) {
const otherTabMultiValue = otherTab.getAttribute(tabMultiAttribute).replace(/\s/g, "");
if (otherTabMultiValue == null ? void 0 : otherTabMultiValue.includes(tabMultiValue != null ? tabMultiValue : "")) {
Tab.getOrCreateInstance(otherTab).show();
}
}
const cookieDomain = ~location.hostname.indexOf("chocolatey.org") ? "domain=chocolatey.org;" : "";
for (const key in tabMultiConfig) {
if (Object.prototype.hasOwnProperty.call(tabMultiConfig, key)) {
const value = tabMultiConfig[key];
document.cookie = `${key}=${value}; ${setCookieExpirationNever2()}path=/; ${cookieDomain}`;
}
}
});
}
for (const cookieName of tabCookies) {
const cookieValue = getCookie2(cookieName);
if (cookieValue) {
for (const tabElement of tabMultiElements) {
const tabMultiValue = tabElement.getAttribute(tabMultiAttribute).replace(/\s/g, "");
if ((tabMultiValue == null ? void 0 : tabMultiValue.includes(cookieName)) && (tabMultiValue == null ? void 0 : tabMultiValue.includes(cookieValue))) {
Tab.getOrCreateInstance(tabElement).show();
}
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions dist/js/community-packages.min.js

Large diffs are not rendered by default.

68 changes: 35 additions & 33 deletions dist/js/community.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* choco-theme v0.7.1 (https://github.com/chocolatey/choco-theme#readme)
* choco-theme v0.7.2 (https://github.com/chocolatey/choco-theme#readme)
* Copyright 2020-2024 Chocolatey Software
* Licensed under MIT (https://github.com/chocolatey/choco-theme/blob/main/LICENSE)
*/
Expand Down Expand Up @@ -21670,44 +21670,46 @@ ${templateEnter}`;
const tabMultiAttribute = "data-choco-tab-multi";
const tabMultiElements = document.querySelectorAll(`[${tabMultiAttribute}]`);
const tabCookies = /* @__PURE__ */ new Set();
for (const tabElement of tabMultiElements) {
const tabMultiConfigAttribute = tabElement.getAttribute(tabMultiAttribute).replace(/\s/g, "");
let tabMultiConfig = null;
try {
tabMultiConfig = JSON.parse(tabMultiConfigAttribute != null ? tabMultiConfigAttribute : "");
} catch (error) {
console.error(`Invalid JSON: ${tabMultiConfigAttribute}`);
return;
}
for (const key in tabMultiConfig) {
if (Object.prototype.hasOwnProperty.call(tabMultiConfig, key)) {
tabCookies.add(key);
}
}
tabElement.addEventListener("click", () => {
const tabMultiValue = tabElement.getAttribute(tabMultiAttribute).replace(/\s/g, "");
for (const otherTab of tabMultiElements) {
const otherTabMultiValue = otherTab.getAttribute(tabMultiAttribute).replace(/\s/g, "");
if (otherTabMultiValue == null ? void 0 : otherTabMultiValue.includes(tabMultiValue != null ? tabMultiValue : "")) {
Tab.getOrCreateInstance(otherTab).show();
}
if (tabMultiElements.value) {
for (const tabElement of tabMultiElements) {
const tabMultiConfigAttribute = tabElement.getAttribute(tabMultiAttribute).replace(/\s/g, "");
let tabMultiConfig = null;
try {
tabMultiConfig = JSON.parse(tabMultiConfigAttribute != null ? tabMultiConfigAttribute : "");
} catch (error) {
console.error(`Invalid JSON: ${tabMultiConfigAttribute}`);
return;
}
const cookieDomain = ~location.hostname.indexOf("chocolatey.org") ? "domain=chocolatey.org;" : "";
for (const key in tabMultiConfig) {
if (Object.prototype.hasOwnProperty.call(tabMultiConfig, key)) {
const value = tabMultiConfig[key];
document.cookie = `${key}=${value}; ${setCookieExpirationNever2()}path=/; ${cookieDomain}`;
tabCookies.add(key);
}
}
});
}
for (const cookieName of tabCookies) {
const cookieValue = getCookie2(cookieName);
if (cookieValue) {
for (const tabElement of tabMultiElements) {
tabElement.addEventListener("click", () => {
const tabMultiValue = tabElement.getAttribute(tabMultiAttribute).replace(/\s/g, "");
if ((tabMultiValue == null ? void 0 : tabMultiValue.includes(cookieName)) && (tabMultiValue == null ? void 0 : tabMultiValue.includes(cookieValue))) {
Tab.getOrCreateInstance(tabElement).show();
for (const otherTab of tabMultiElements) {
const otherTabMultiValue = otherTab.getAttribute(tabMultiAttribute).replace(/\s/g, "");
if (otherTabMultiValue == null ? void 0 : otherTabMultiValue.includes(tabMultiValue != null ? tabMultiValue : "")) {
Tab.getOrCreateInstance(otherTab).show();
}
}
const cookieDomain = ~location.hostname.indexOf("chocolatey.org") ? "domain=chocolatey.org;" : "";
for (const key in tabMultiConfig) {
if (Object.prototype.hasOwnProperty.call(tabMultiConfig, key)) {
const value = tabMultiConfig[key];
document.cookie = `${key}=${value}; ${setCookieExpirationNever2()}path=/; ${cookieDomain}`;
}
}
});
}
for (const cookieName of tabCookies) {
const cookieValue = getCookie2(cookieName);
if (cookieValue) {
for (const tabElement of tabMultiElements) {
const tabMultiValue = tabElement.getAttribute(tabMultiAttribute).replace(/\s/g, "");
if ((tabMultiValue == null ? void 0 : tabMultiValue.includes(cookieName)) && (tabMultiValue == null ? void 0 : tabMultiValue.includes(cookieValue))) {
Tab.getOrCreateInstance(tabElement).show();
}
}
}
}
Expand Down
Loading
Loading