Skip to content

Commit

Permalink
implement custom uswds settings, increase container width from 'deskt…
Browse files Browse the repository at this point in the history
…op' to 'widescreen'
  • Loading branch information
jakewheeler committed Oct 29, 2024
1 parent 8e939d5 commit 1504bd2
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 6 deletions.
4 changes: 3 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ const nextConfig = {
basePath: '/dibbs-site',
assetPrefix: '/dibbs-site',
sassOptions: {
includePaths: [path.join(__dirname, 'styles')],
includePaths: [
path.join(__dirname, './', 'node_modules', '@uswds', 'uswds', 'packages'),
],
},
};

Expand Down
6 changes: 4 additions & 2 deletions src/app/globals.css → src/app/globals.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
@forward "uswds-settings";
@forward "uswds";


@tailwind base;
@tailwind components;
@tailwind utilities;
@import '@trussworks/react-uswds/lib/uswds.css';
@import '@trussworks/react-uswds/lib/index.css';

:root {
--background: #ffffff;
Expand Down
4 changes: 1 addition & 3 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import type { Metadata } from 'next';
import './globals.css';
import Script from 'next/script';
import Header from './components/Header';
import Footer from './components/Footer';
import USABanner from './components/UsaBanner';
import { basePath } from './utils/constants';
import './globals.scss';

export const metadata: Metadata = {
title: 'DIBBS Site',
Expand All @@ -27,7 +26,6 @@ export default function RootLayout({
<main id="main-content">{children}</main>
<Footer />
</div>
<Script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/uswds.min.js" />
</body>
</html>
);
Expand Down
21 changes: 21 additions & 0 deletions src/app/uswds-settings.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@use "uswds-core" with (
// General
$theme-show-compile-warnings: true,
$theme-show-notifications: false,
$theme-image-path: "../../../../../../dist/img",

// Color
// Component
$theme-hero-image: "../../../../dist/img/hero.jpg",
$theme-accordion-button-background-color: "blue-cool-60",

// Spacing
$theme-grid-container-max-width: "widescreen",
$theme-header-max-width: "widescreen",


// Typography
$theme-font-path: "../../../../../../dist/fonts",

// Utilities
);

0 comments on commit 1504bd2

Please sign in to comment.