From 70316563b7378adb97a3c789cbd2d72ce7f6403d Mon Sep 17 00:00:00 2001 From: Sean Colsen Date: Thu, 16 Jan 2025 16:11:46 -0500 Subject: [PATCH 1/8] Refactor h2 styling Make it easy to use an h2 element without applying additional CSS --- mathesar_ui/src/App.svelte | 13 ++++--- .../src/components/InsetPageSection.svelte | 4 +- .../pages/admin-privacy/PrivacyPage.svelte | 7 ---- .../src/pages/home/DatabasesList.svelte | 37 +++++-------------- .../preview/ImportPreviewContent.svelte | 4 +- mathesar_ui/src/pages/record/Widgets.svelte | 4 +- .../src/pages/schema/OverviewHeader.svelte | 14 ++----- .../src/pages/user-profile/ProfilePage.svelte | 18 ++------- 8 files changed, 26 insertions(+), 75 deletions(-) diff --git a/mathesar_ui/src/App.svelte b/mathesar_ui/src/App.svelte index 721d2af7f8..5ca463d48f 100644 --- a/mathesar_ui/src/App.svelte +++ b/mathesar_ui/src/App.svelte @@ -117,11 +117,17 @@ } h1 { - margin: 0 0 1rem 0; + margin: 0 0 1.5rem 0; font-size: var(--size-ultra-large); font-weight: 500; } + h2 { + font-size: var(--size-x-large); + font-weight: 600; + margin: 0 0 1rem 0; + } + hr { margin: 0; border: 0; @@ -173,11 +179,6 @@ font-weight: bold; } - .large-bold-header { - font-size: var(--size-large); - font-weight: 600; - } - .bold-header { font-weight: 500; } diff --git a/mathesar_ui/src/components/InsetPageSection.svelte b/mathesar_ui/src/components/InsetPageSection.svelte index 384fee87d1..8c722d73df 100644 --- a/mathesar_ui/src/components/InsetPageSection.svelte +++ b/mathesar_ui/src/components/InsetPageSection.svelte @@ -1,9 +1,7 @@
- {#if $$slots.header} -
- {/if} +
diff --git a/mathesar_ui/src/pages/admin-privacy/PrivacyPage.svelte b/mathesar_ui/src/pages/admin-privacy/PrivacyPage.svelte index 1deda08a26..ea059ba212 100644 --- a/mathesar_ui/src/pages/admin-privacy/PrivacyPage.svelte +++ b/mathesar_ui/src/pages/admin-privacy/PrivacyPage.svelte @@ -74,10 +74,3 @@ - - diff --git a/mathesar_ui/src/pages/home/DatabasesList.svelte b/mathesar_ui/src/pages/home/DatabasesList.svelte index bfec82a645..a2b5bea01e 100644 --- a/mathesar_ui/src/pages/home/DatabasesList.svelte +++ b/mathesar_ui/src/pages/home/DatabasesList.svelte @@ -69,22 +69,16 @@
-
- {$_('databases')} - - - - {#if slotName === 'docsLink'} - {translatedArg} - {/if} - - - -
+

+ {$_('databases')} + + + {#if slotName === 'docsLink'} + {translatedArg} + {/if} + + +

-

- {$_('table_preview')} -

+

{$_('table_preview')}

{#if $columnsFetch.error} -

+

{$_('related_records')} @@ -70,8 +70,6 @@ h2 { padding: var(--size-small); border-bottom: 1px solid var(--slate-200); - font-weight: 600; - font-size: var(--size-large); background: var(--white); } .widgets { diff --git a/mathesar_ui/src/pages/schema/OverviewHeader.svelte b/mathesar_ui/src/pages/schema/OverviewHeader.svelte index cc27c2fb44..8207804ead 100644 --- a/mathesar_ui/src/pages/schema/OverviewHeader.svelte +++ b/mathesar_ui/src/pages/schema/OverviewHeader.svelte @@ -3,7 +3,7 @@
- {title} +

{title}

{#if $$slots.action}
@@ -20,15 +20,7 @@ padding-bottom: 0.25rem; position: relative; } - - .action-container { - position: absolute; - right: 0; - bottom: 0; - } - - .title { - font-size: var(--text-size-ultra-large); - font-weight: var(--font-weight-medium); + h2 { + margin: 0; } diff --git a/mathesar_ui/src/pages/user-profile/ProfilePage.svelte b/mathesar_ui/src/pages/user-profile/ProfilePage.svelte index aae54fa830..4a19c97574 100644 --- a/mathesar_ui/src/pages/user-profile/ProfilePage.svelte +++ b/mathesar_ui/src/pages/user-profile/ProfilePage.svelte @@ -31,9 +31,7 @@

{$_('user_profile')}

{#if userProfile} -

- {$_('account_details')} -

+

{$_('account_details')}

@@ -42,12 +40,8 @@ {#if !userProfile.isMathesarAdmin} -

- {$_('delete_account')} -

-
- {$_('delete_account_contact_admin')} -
+

{$_('delete_account')}

+
{$_('delete_account_contact_admin')}
{/if} {:else} @@ -58,9 +52,3 @@ {/if} - - From 7eb5c2eeebd9237e59e4cca590541cda9779a5cd Mon Sep 17 00:00:00 2001 From: Sean Colsen Date: Thu, 16 Jan 2025 16:12:53 -0500 Subject: [PATCH 2/8] Improve display of help bubbles Make it easy to put help bubbles anywhere and have them be consistent --- .../collapsible/Collapsible.scss | 1 - .../src/component-library/help/Help.svelte | 38 +++++++++++++++++-- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/mathesar_ui/src/component-library/collapsible/Collapsible.scss b/mathesar_ui/src/component-library/collapsible/Collapsible.scss index 2a5208b418..2512922ca0 100644 --- a/mathesar_ui/src/component-library/collapsible/Collapsible.scss +++ b/mathesar_ui/src/component-library/collapsible/Collapsible.scss @@ -14,7 +14,6 @@ padding: var(--Collapsible_trigger-padding, 0.5em); .collapsible-header-title { flex-grow: 1; - overflow: hidden; font-weight: var(--Collapsible_header-font-weight, 600); } svg { diff --git a/mathesar_ui/src/component-library/help/Help.svelte b/mathesar_ui/src/component-library/help/Help.svelte index 86cf286a4e..811b3acbf8 100644 --- a/mathesar_ui/src/component-library/help/Help.svelte +++ b/mathesar_ui/src/component-library/help/Help.svelte @@ -8,7 +8,37 @@ type $$Props = ComponentProps; - - - - + + + + + + + + + + + From 780c15a820e1786a5f9ed3a3d82a807ece24804b Mon Sep 17 00:00:00 2001 From: Sean Colsen Date: Thu, 16 Jan 2025 16:13:57 -0500 Subject: [PATCH 3/8] Refactor external URL handling --- mathesar_ui/src/components/DocsLink.svelte | 28 ++------------- mathesar_ui/src/routes/urls.ts | 40 ++++++++++++++++++---- 2 files changed, 37 insertions(+), 31 deletions(-) diff --git a/mathesar_ui/src/components/DocsLink.svelte b/mathesar_ui/src/components/DocsLink.svelte index 3582e372ae..95240c1cac 100644 --- a/mathesar_ui/src/components/DocsLink.svelte +++ b/mathesar_ui/src/components/DocsLink.svelte @@ -5,33 +5,11 @@ https://docs.mathesar.org --> - + diff --git a/mathesar_ui/src/routes/urls.ts b/mathesar_ui/src/routes/urls.ts index eb1ccf19ac..f9f5ba672b 100644 --- a/mathesar_ui/src/routes/urls.ts +++ b/mathesar_ui/src/routes/urls.ts @@ -140,10 +140,38 @@ export function getSharedExplorationPageUrl(slug: string): string { return `/shares/explorations/${slug}/`; } -export function getDocsLink(path: string): string { - return `https://docs.mathesar.org${path}`; -} - -export function getWikiLink(path: string): string { - return `https://wiki.mathesar.org${path}`; +const docsPages = { + analytics: '/analytics/', + collaborators: '/user-guide/collaborators/', + databasePermissions: '/user-guide/databases/#permissions', + databases: '/user-guide/databases/', + import: '/user-guide/importing-data/', + internalSchemas: '/user-guide/schemas/#internal', + relationships: '/user-guide/relationships/', + roles: '/user-guide/roles/', + rolesInheritance: '/user-guide/roles/#inheritance', + rolesLogin: '/user-guide/roles/#login', + schemaPermissions: '/user-guide/schemas/#permissions', + schemas: '/user-guide/schemas/', + storedRolePasswords: '/user-guide/stored-role-passwords/', + tablePermissions: '/user-guide/tables/#permissions', + userAdmin: '/user-guide/users/#admin', + userGuide: '/user-guide/', +}; + +export type DocsPage = keyof typeof docsPages; + +export function getDocsLink(page: DocsPage): string { + return `https://docs.mathesar.org${docsPages[page]}`; +} + +const marketingPages = { + community: '/community/', + donate: '/donate/', +}; + +export type MarketingPage = keyof typeof marketingPages; + +export function getMarketingLink(page: MarketingPage): string { + return `https://mathesar.org${marketingPages[page]}`; } From 9963e500f8e75d53a2263570527a4ac8fb822ed5 Mon Sep 17 00:00:00 2001 From: Sean Colsen Date: Thu, 16 Jan 2025 16:15:01 -0500 Subject: [PATCH 4/8] Improve resources content on home page --- mathesar_ui/src/i18n/languages/en/dict.json | 11 ++ mathesar_ui/src/icons/index.ts | 6 + .../src/pages/home/DatabasesList.svelte | 181 +++++++++--------- mathesar_ui/src/pages/home/HomePage.svelte | 30 ++- .../src/pages/home/ResourceCard.svelte | 38 ++++ mathesar_ui/src/pages/home/Resources.svelte | 46 +++++ mathesar_ui/src/pages/home/Welcome.svelte | 141 -------------- 7 files changed, 215 insertions(+), 238 deletions(-) create mode 100644 mathesar_ui/src/pages/home/ResourceCard.svelte create mode 100644 mathesar_ui/src/pages/home/Resources.svelte delete mode 100644 mathesar_ui/src/pages/home/Welcome.svelte diff --git a/mathesar_ui/src/i18n/languages/en/dict.json b/mathesar_ui/src/i18n/languages/en/dict.json index 54c9d99902..7993814ff3 100644 --- a/mathesar_ui/src/i18n/languages/en/dict.json +++ b/mathesar_ui/src/i18n/languages/en/dict.json @@ -60,6 +60,7 @@ "cell": "Cell", "change_password": "Change Password", "change_role": "Change Role", + "chat_with_community": "Chat With Community", "check_for_updates": "Check for Updates", "child_role_new_items_scroll_hint": "Scroll or click here to see the child role.", "child_roles": "Child Roles", @@ -105,6 +106,7 @@ "columns_to_extract": "Columns to Extract", "columns_to_move": "Columns to Move", "columns_unique_values_help": "The columns in this table that should contain unique values.", + "community": "Community", "configure_in_mathesar": "Configure in Mathesar", "configure_password": "Configure Password", "configure_value": "Configure ''{value}''", @@ -229,7 +231,10 @@ "disconnect_database_with_name": "Disconnect Database [identifier]?", "display_language": "Display Language", "display_name": "Display Name", + "documentation": "Documentation", "documentation_and_resources": "Documentation & Resources", + "donate_blurb": "Help us build and maintain Mathesar with a donation to The Mathesar Foundation, a 501(c)(3) nonprofit organization.", + "donate_to_mathesar": "Donate To Mathesar", "drop_role": "Drop Role", "drop_role_name": "Drop role [name]", "drop_role_name_question": "Drop role [name]?", @@ -331,6 +336,7 @@ "inspector": "Inspector", "internal_database": "Internal Database", "internal_schema_help": "These schemas are necessary for Mathesar to function and will automatically be installed on the database after connecting.", + "join_chat": "Join Chat", "join_community_chat": "Join Community Chat", "join_email_list": "Join Email List", "keep_first_row_as_data": "Set generic column names, keeping the first row as data", @@ -454,6 +460,7 @@ "open_record": "Open Record", "open_table_in_data_explorer": "Open this table in Data Explorer to query and analyze your data.", "open_table_record": "Open a Record from [tableName]", + "open_user_guide": "Open User Guide", "operation_requires_pg_user_have_createdb": "This operation requires the \"{username}\" PostgreSQL user to have CREATEDB privileges.", "or": "or", "overridden": "Overridden", @@ -551,6 +558,7 @@ "remove_stored_password_help": "Removing this stored password will prevent collaborators assigned to this role from accessing databases on server ''{server}''.", "removing_role_configuration_warning": "Removing this configuration will prevent collaborators assigned to this role from accessing databases on server ''{server}''.", "reset": "Reset", + "resources": "Resources", "restrict_to_unique": "Restrict to Unique", "restrict_to_unique_help": "Ensures all values in this column are unique. Ideal for IDs, usernames, and other unique identifiers.", "result": "Result", @@ -671,6 +679,7 @@ "summarize_column_with_identifier": "Summarize the [identifier] column?", "summarize_in_data_explorer": "Summarize in Data Explorer", "summarize_in_data_explorer_help": "Open a pre-configured exploration based on the current table display.", + "support_our_mission": "Support Our Mission", "sync_external_changes": "Sync External Changes", "sync_external_changes_data_help": "External changes to data (e.g. adding or editing rows) will be automatically reflected without clicking this button.", "sync_external_changes_structure_help": "If you make structural changes to the database outside Mathesar (e.g. using another tool to add a schema, table, or column), those changes will not be reflected in Mathesar until you manually sync them with this button.", @@ -773,6 +782,8 @@ "use_existing_pg_user": "Use an existing PostgreSQL user", "use_text_for_all_columns": "Use \"Text\" for all column data types", "user": "User", + "user_guide": "User Guide", + "user_guide_description": "Our User Guide covers all aspects of Mathesar, from basic usage to advanced features.", "user_name": "User name", "user_needs_create_connect_privileges": "The user needs CONNECT and CREATE privileges on the database.", "user_not_found": "User not found", diff --git a/mathesar_ui/src/icons/index.ts b/mathesar_ui/src/icons/index.ts index 1ed23649c0..9ca70efd61 100644 --- a/mathesar_ui/src/icons/index.ts +++ b/mathesar_ui/src/icons/index.ts @@ -4,6 +4,7 @@ import { faArrowRight, faArrowRightFromBracket, faBackspace, + faBook, faCalendarDay, faCalendarWeek, faCaretRight, @@ -15,6 +16,7 @@ import { faClock, faClone, faCogs, + faComments, faCopy, faDatabase, faDiagramNext, @@ -32,6 +34,7 @@ import { faGrip, faHammer, faHashtag, + faHeart, faICursor, faInfo, faKey, @@ -161,12 +164,15 @@ export const iconReinstall = { data: faRotateBack }; // // (These names should all be nouns) +export const iconCommunityChat: IconProps = { data: faComments }; export const iconConnection: IconProps = { data: faPlug }; export const iconConstraint: IconProps = { data: faKey }; export const iconConstraintUnique: IconProps = { data: faSnowflake }; export const iconDatabase: IconProps = { data: faDatabase }; export const iconDbIdentifierDelimiter: IconProps = { data: faArrowRight }; export const iconDisplayOptions: IconProps = { data: faPalette }; +export const iconDocumentation: IconProps = { data: faBook }; +export const iconDonation: IconProps = { data: faHeart }; export const iconExploration: IconProps = { data: explorationIcon }; export const iconExternalHyperlink: IconProps = { data: faUpRightFromSquare }; export const iconFiltering: IconProps = { data: faFilter }; diff --git a/mathesar_ui/src/pages/home/DatabasesList.svelte b/mathesar_ui/src/pages/home/DatabasesList.svelte index a2b5bea01e..68bb477501 100644 --- a/mathesar_ui/src/pages/home/DatabasesList.svelte +++ b/mathesar_ui/src/pages/home/DatabasesList.svelte @@ -13,7 +13,10 @@ import { databasesStore } from '@mathesar/stores/databases'; import { modal } from '@mathesar/stores/modal'; import { getUserProfileStoreFromContext } from '@mathesar/stores/userProfile'; - import { ConnectDatabaseModal } from '@mathesar/systems/databases'; + import { + ConnectDatabaseModal, + DatabasesEmptyState, + } from '@mathesar/systems/databases'; import BulkUpgradeDatabaseModal from '@mathesar/systems/databases/upgrade-database/BulkUpgradeDatabaseModal.svelte'; import UpgradeDatabaseModal from '@mathesar/systems/databases/upgrade-database/UpgradeDatabaseModal.svelte'; import { @@ -81,94 +84,98 @@

- - - {#if isMathesarAdmin} - - {/if} - - - - - {#if slotName === 'searchValue'} - {filterQuery} + {#if countDatabases} + + + {#if isMathesarAdmin} + {/if} - - - -
-
- {#if needToUpgrade !== 'none'} - -
-
-

{$_('service_upgraded_notice')}

-

- {#if needToUpgrade === 'all'} - {$_('upgrade_all_databases_notice')} - {:else if needToUpgrade === 'some'} - {$_('upgrade_some_databases_notice')} - {:else} - {assertExhaustive(needToUpgrade)} - {/if} -

-
-
- + + + + + {#if slotName === 'searchValue'} + {filterQuery} + {/if} + + + +
+
+ {#if needToUpgrade !== 'none'} + +
+
+

{$_('service_upgraded_notice')}

+

+ {#if needToUpgrade === 'all'} + {$_('upgrade_all_databases_notice')} + {:else if needToUpgrade === 'some'} + {$_('upgrade_some_databases_notice')} + {:else} + {assertExhaustive(needToUpgrade)} + {/if} +

+
+
+ +
-
- + + {/if} +
+ + {#if filteredDatabases.length} +
+ {#each filteredDatabases as database (database.id)} + upgradeDbModalController.open(d)} + /> + {/each} +
{/if}
- - {#if filteredDatabases.length} -
- {#each filteredDatabases as database (database.id)} - upgradeDbModalController.open(d)} - /> - {/each} -
- {/if} -
- + + {:else} + + {/if}
@@ -183,10 +190,6 @@ /> diff --git a/mathesar_ui/src/pages/home/ResourceCard.svelte b/mathesar_ui/src/pages/home/ResourceCard.svelte new file mode 100644 index 0000000000..06f1c38b03 --- /dev/null +++ b/mathesar_ui/src/pages/home/ResourceCard.svelte @@ -0,0 +1,38 @@ + + +
+
+
+
+ + + + +
+
+ + diff --git a/mathesar_ui/src/pages/home/Resources.svelte b/mathesar_ui/src/pages/home/Resources.svelte new file mode 100644 index 0000000000..fce07814ae --- /dev/null +++ b/mathesar_ui/src/pages/home/Resources.svelte @@ -0,0 +1,46 @@ + + +
+

{$_('resources')}

+
+ + {$_('documentation')} + {$_('user_guide_description')} + {$_('open_user_guide')} + + + + {$_('chat_with_community')} + {$_('connect_with_community_help')} + {$_('join_chat')} + + + + {$_('support_our_mission')} + {$_('donate_blurb')} + {$_('donate_to_mathesar')} + +
+
+ + diff --git a/mathesar_ui/src/pages/home/Welcome.svelte b/mathesar_ui/src/pages/home/Welcome.svelte deleted file mode 100644 index 8631a6843b..0000000000 --- a/mathesar_ui/src/pages/home/Welcome.svelte +++ /dev/null @@ -1,141 +0,0 @@ - - -
- - {$_('welcome_to_mathesar_user', { - values: { user: userProfile?.getDisplayName() }, - })} - -
- -
-
-
- {$_('databases')} -
- -
-
-
-
- {$_('documentation_and_resources')} -
- -
-
- - From ac4c1e9b87d47bab81a982b6b2ea2a6f3fd847fe Mon Sep 17 00:00:00 2001 From: Sean Colsen Date: Thu, 16 Jan 2025 16:15:13 -0500 Subject: [PATCH 5/8] Display resources in top right menu --- mathesar_ui/src/components/AppHeader.svelte | 37 +++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/mathesar_ui/src/components/AppHeader.svelte b/mathesar_ui/src/components/AppHeader.svelte index f5096ab2e6..77b06291b8 100644 --- a/mathesar_ui/src/components/AppHeader.svelte +++ b/mathesar_ui/src/components/AppHeader.svelte @@ -2,7 +2,10 @@ import { _ } from 'svelte-i18n'; import { + iconCommunityChat, iconDatabase, + iconDocumentation, + iconDonation, iconLogout, iconSettingsMajor, iconUser, @@ -12,6 +15,8 @@ LOGOUT_URL, USER_PROFILE_URL, getDatabasePageUrl, + getDocsLink, + getMarketingLink, } from '@mathesar/routes/urls'; import { databasesStore } from '@mathesar/stores/databases'; import { getReleaseDataStoreFromContext } from '@mathesar/stores/releases'; @@ -68,7 +73,9 @@ {$userProfile.getDisplayName()} + + {#if $userProfile.isMathesarAdmin} {$_('administration')} + {/if} + + {$_('resources')} + + {$_('user_guide')} + + + {$_('community')} + + + {$_('donate_to_mathesar')} + + + + {$_('log_out')} From 2ef170e42f06f89626b0175c9315f94d2767aeb1 Mon Sep 17 00:00:00 2001 From: Sean Colsen Date: Thu, 16 Jan 2025 16:15:19 -0500 Subject: [PATCH 6/8] Display donate link on upgrade page --- .../admin-update/SoftwareUpdateContent.svelte | 38 ++++++++++++++++++- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/mathesar_ui/src/pages/admin-update/SoftwareUpdateContent.svelte b/mathesar_ui/src/pages/admin-update/SoftwareUpdateContent.svelte index acb5077c9e..69459718d3 100644 --- a/mathesar_ui/src/pages/admin-update/SoftwareUpdateContent.svelte +++ b/mathesar_ui/src/pages/admin-update/SoftwareUpdateContent.svelte @@ -4,10 +4,20 @@ import Spinner from '@mathesar/component-library/spinner/Spinner.svelte'; import ErrorBox from '@mathesar/components/message-boxes/ErrorBox.svelte'; import { RichText } from '@mathesar/components/rich-text'; - import { iconRefresh } from '@mathesar/icons'; + import { + iconDonation, + iconExternalHyperlink, + iconRefresh, + } from '@mathesar/icons'; + import { getMarketingLink } from '@mathesar/routes/urls'; import type { ReleaseDataStore } from '@mathesar/stores/releases'; import { toast } from '@mathesar/stores/toast'; - import { SpinnerButton, assertExhaustive } from '@mathesar-component-library'; + import { + AnchorButton, + Icon, + SpinnerButton, + assertExhaustive, + } from '@mathesar-component-library'; import ReleaseBox from './ReleaseBox.svelte'; @@ -85,6 +95,21 @@ {/if}
+ + From 9801a9c6b285451132f3131149a7cb30eff54b24 Mon Sep 17 00:00:00 2001 From: Sean Colsen Date: Fri, 17 Jan 2025 10:05:37 -0500 Subject: [PATCH 7/8] Refactor "Resources" cards --- .../resources/CommunityResource.svelte | 13 ++++++ .../resources/DocumentationResource.svelte | 13 ++++++ .../resources/DonateResource.svelte | 13 ++++++ .../resources}/ResourceCard.svelte | 0 mathesar_ui/src/components/resources/index.ts | 3 ++ mathesar_ui/src/pages/home/HomePage.svelte | 24 +++++++++- mathesar_ui/src/pages/home/Resources.svelte | 46 ------------------- 7 files changed, 64 insertions(+), 48 deletions(-) create mode 100644 mathesar_ui/src/components/resources/CommunityResource.svelte create mode 100644 mathesar_ui/src/components/resources/DocumentationResource.svelte create mode 100644 mathesar_ui/src/components/resources/DonateResource.svelte rename mathesar_ui/src/{pages/home => components/resources}/ResourceCard.svelte (100%) create mode 100644 mathesar_ui/src/components/resources/index.ts delete mode 100644 mathesar_ui/src/pages/home/Resources.svelte diff --git a/mathesar_ui/src/components/resources/CommunityResource.svelte b/mathesar_ui/src/components/resources/CommunityResource.svelte new file mode 100644 index 0000000000..f0161b4316 --- /dev/null +++ b/mathesar_ui/src/components/resources/CommunityResource.svelte @@ -0,0 +1,13 @@ + + + + {$_('chat_with_community')} + {$_('connect_with_community_help')} + {$_('join_chat')} + diff --git a/mathesar_ui/src/components/resources/DocumentationResource.svelte b/mathesar_ui/src/components/resources/DocumentationResource.svelte new file mode 100644 index 0000000000..5cf31ccf76 --- /dev/null +++ b/mathesar_ui/src/components/resources/DocumentationResource.svelte @@ -0,0 +1,13 @@ + + + + {$_('documentation')} + {$_('user_guide_description')} + {$_('open_user_guide')} + diff --git a/mathesar_ui/src/components/resources/DonateResource.svelte b/mathesar_ui/src/components/resources/DonateResource.svelte new file mode 100644 index 0000000000..0939cc9d0c --- /dev/null +++ b/mathesar_ui/src/components/resources/DonateResource.svelte @@ -0,0 +1,13 @@ + + + + {$_('support_our_mission')} + {$_('donate_blurb')} + {$_('donate_to_mathesar')} + diff --git a/mathesar_ui/src/pages/home/ResourceCard.svelte b/mathesar_ui/src/components/resources/ResourceCard.svelte similarity index 100% rename from mathesar_ui/src/pages/home/ResourceCard.svelte rename to mathesar_ui/src/components/resources/ResourceCard.svelte diff --git a/mathesar_ui/src/components/resources/index.ts b/mathesar_ui/src/components/resources/index.ts new file mode 100644 index 0000000000..8a84e041fd --- /dev/null +++ b/mathesar_ui/src/components/resources/index.ts @@ -0,0 +1,3 @@ +export { default as DocumentationResource } from './DocumentationResource.svelte'; +export { default as CommunityResource } from './CommunityResource.svelte'; +export { default as DonateResource } from './DonateResource.svelte'; diff --git a/mathesar_ui/src/pages/home/HomePage.svelte b/mathesar_ui/src/pages/home/HomePage.svelte index feef66b459..22e089a88f 100644 --- a/mathesar_ui/src/pages/home/HomePage.svelte +++ b/mathesar_ui/src/pages/home/HomePage.svelte @@ -1,12 +1,16 @@ @@ -30,7 +34,14 @@
- +
+

{$_('resources')}

+
+ + + +
+
@@ -42,4 +53,13 @@ grid-template: auto / 1fr 20rem; } } + .cards { + display: flex; + flex-wrap: wrap; + gap: 1rem; + + & > :global(*) { + flex: 1 0 15rem; + } + } diff --git a/mathesar_ui/src/pages/home/Resources.svelte b/mathesar_ui/src/pages/home/Resources.svelte deleted file mode 100644 index fce07814ae..0000000000 --- a/mathesar_ui/src/pages/home/Resources.svelte +++ /dev/null @@ -1,46 +0,0 @@ - - -
-

{$_('resources')}

-
- - {$_('documentation')} - {$_('user_guide_description')} - {$_('open_user_guide')} - - - - {$_('chat_with_community')} - {$_('connect_with_community_help')} - {$_('join_chat')} - - - - {$_('support_our_mission')} - {$_('donate_blurb')} - {$_('donate_to_mathesar')} - -
-
- - From 792e530bd47d5c1a0a628265eed4e62c48b95758 Mon Sep 17 00:00:00 2001 From: Sean Colsen Date: Fri, 17 Jan 2025 10:09:13 -0500 Subject: [PATCH 8/8] Update resources styling --- .../components/resources/ResourceCard.svelte | 3 -- .../admin-update/SoftwareUpdateContent.svelte | 34 +++---------------- mathesar_ui/src/pages/home/HomePage.svelte | 2 +- 3 files changed, 6 insertions(+), 33 deletions(-) diff --git a/mathesar_ui/src/components/resources/ResourceCard.svelte b/mathesar_ui/src/components/resources/ResourceCard.svelte index 06f1c38b03..3d6dbae934 100644 --- a/mathesar_ui/src/components/resources/ResourceCard.svelte +++ b/mathesar_ui/src/components/resources/ResourceCard.svelte @@ -20,13 +20,10 @@ diff --git a/mathesar_ui/src/pages/home/HomePage.svelte b/mathesar_ui/src/pages/home/HomePage.svelte index 22e089a88f..e33d9b4898 100644 --- a/mathesar_ui/src/pages/home/HomePage.svelte +++ b/mathesar_ui/src/pages/home/HomePage.svelte @@ -56,7 +56,7 @@ .cards { display: flex; flex-wrap: wrap; - gap: 1rem; + gap: 2rem; & > :global(*) { flex: 1 0 15rem;