Revert "Added optional boxed styling for information widgets and refactored information widgets"

This commit is contained in:
shamoon 2023-06-10 23:30:44 -07:00 committed by GitHub
parent 347761fcad
commit 6b2930ab8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 854 additions and 642 deletions

View file

@ -160,7 +160,6 @@ const headerStyles = {
"m-4 mb-0 sm:m-8 sm:mb-0 rounded-md shadow-md shadow-theme-900/10 dark:shadow-theme-900/20 bg-theme-100/20 dark:bg-white/5 p-3",
underlined: "m-4 mb-0 sm:m-8 sm:mb-1 border-b-2 pb-4 border-theme-800 dark:border-theme-200/50",
clean: "m-4 mb-0 sm:m-8 sm:mb-0",
boxedWidgets: "m-4 mb-0 sm:m-8 sm:mb-0 sm:mt-1",
};
function Home({ initialSettings }) {
@ -209,7 +208,6 @@ function Home({ initialSettings }) {
searchProvider = searchProviders[searchWidget.options?.provider];
}
}
const headerStyle = initialSettings?.headerStyle || "underlined";
useEffect(() => {
function handleKeyDown(e) {
@ -258,7 +256,7 @@ function Home({ initialSettings }) {
<div
className={classNames(
"flex flex-row flex-wrap justify-between",
headerStyles[headerStyle]
headerStyles[initialSettings.headerStyle || "underlined"]
)}
>
<QuickLaunch
@ -274,14 +272,14 @@ function Home({ initialSettings }) {
{widgets
.filter((widget) => !rightAlignedWidgets.includes(widget.type))
.map((widget, i) => (
<Widget key={i} widget={widget} style={headerStyle} />
<Widget key={i} widget={widget} />
))}
<div className="m-auto sm:ml-4 flex flex-wrap grow sm:basis-auto justify-between md:justify-end">
<div className="m-auto sm:ml-2 flex flex-wrap grow sm:basis-auto justify-between md:justify-end">
{widgets
.filter((widget) => rightAlignedWidgets.includes(widget.type))
.map((widget, i) => (
<Widget key={i} widget={widget} style={headerStyle} />
<Widget key={i} widget={widget} />
))}
</div>
</>