Skip to content

Commit

Permalink
hero tailwind styling
Browse files Browse the repository at this point in the history
  • Loading branch information
devilkiller-ag committed Feb 9, 2024
1 parent bda3953 commit a957e26
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/Header/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
import Link from '@docusaurus/Link';

export default function Header() {
const headerBackClasses = `${styles.header_back} ${styles.section_padding}`;
const tagLine = `${styles.section_padding}`;
const customButtonClasses = `button button--lg ${styles.customButtonStyle}`;

return (
<div className={headerBackClasses}>
<div className={`bg-gradient-blue flex flex-col lg:flex-row hero-clip p-12 pr-28 pb-24 pl-28 md:p-16 lg:p-12`}>
<div className={styles.header_content}>
<ThemedImage
alt="Supported By Logo"
Expand Down
33 changes: 33 additions & 0 deletions src/components/Header/index_old.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import React from 'react';
import UptaneCubes from '@site/static/img/uptane_hero_img.svg';
import styles from './styles.module.css';
import ThemedImage from '@theme/ThemedImage';
import useBaseUrl from '@docusaurus/useBaseUrl';
import Link from '@docusaurus/Link';

export default function Header() {
const headerBackClasses = `${styles.header_back} ${styles.section_padding}`;
const customButtonClasses = `button button--lg ${styles.customButtonStyle}`;

return (
<div className={headerBackClasses}>
<div className={styles.header_content}>
<ThemedImage
alt="Supported By Logo"
width="300px"
sources={{
light: useBaseUrl('/img/uptaneLogoHero.svg'),
dark: useBaseUrl('/img/uptaneLogoHero.svg'),
}}
/>
<h3>A Secure Software Update Framework for Automobiles</h3>
<div className={styles.header_content_buttons}>
<Link to="/learn-more/getting-started" className={customButtonClasses}>Learn More</Link>
</div>
</div>
<div className={styles.header_image}>
<UptaneCubes title="uptane Cubes" width="100%" />
</div>
</div>
);
}
2 changes: 1 addition & 1 deletion src/components/Header/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
line-height: 60px;
}

.header_back h3 {
.tag-line {
font-size: 25px;
}

Expand Down
6 changes: 6 additions & 0 deletions src/css/custom_tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,12 @@ a {
@apply font-content;
}

@layer utilities {
.hero-clip {
clip-path: polygon(0 0, 100% 0, 100% calc(100% - 75px), 0 100%);
}
}

.button.button--secondary {
color: var(--ifm-color-primary);
}
Expand Down
3 changes: 3 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ module.exports = {
'max-sm': {'max': '489px'},
'max-md': {'max': '649px'},
},
backgroundImage: {
'gradient-blue': 'linear-gradient(130deg, #0C64D6 0%, rgba(12, 100, 214, 0.87) 0%, rgba(12, 100, 214, 0.78) 47.69%, rgba(12, 100, 214, 0.62) 99.61%, rgba(12, 100, 214, 0.00) 100%)',
},
},
},
plugins: [],
Expand Down

0 comments on commit a957e26

Please sign in to comment.