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

add flag & css class to control link rendering #153

Merged
merged 1 commit into from
Oct 1, 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 app/discover/gettingstarted/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const metadata: Metadata = {

export default function GettingStartedPage() {
return (
<Layout heroSmall heroTitle='Getting Started'>
<Layout heroSmall heroTitle='Getting Started' decorateLinks={true}>
<div>
<Text>
This site contains all the relevant links for finding the information you need about Oskari. The material has been divided under different user groups and customed to their needs.
Expand Down
6 changes: 4 additions & 2 deletions components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,21 @@ import Navigation from '@/components/Navigation/Navigation'
interface LayoutProps {
children: React.ReactNode
heroSmall?: boolean
heroTitle?: string
heroTitle?: string,
decorateLinks?: boolean
}

export default function Layout({
children,
heroSmall = false,
heroTitle = 'Oskari – a mapping tool that adapts to your needs',
decorateLinks = false
}: LayoutProps) {
return (
<>
<Navigation />
<Hero small={heroSmall} title={heroTitle} />
<main className='content-wrapper content-grid'>{children}</main>
<main className={`content-wrapper content-grid ${decorateLinks ? 'decorate-links' : ''}`}>{children}</main>
<Footer />
</>
)
Expand Down
10 changes: 10 additions & 0 deletions styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,16 @@ h3 {
position: relative;
}

.content-wrapper.decorate-links {
a[href]:not(.btn) {
position: relative;
text-decoration: underline;
text-decoration-color: var(--color-accent);
text-decoration-thickness: 3px;
text-underline-offset: 0.25rem;
}
}

.content-grid,
.full-width {
grid-template-columns:
Expand Down
Loading