-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[material-ui] Replace the Album template with a landing page #37557
Merged
Merged
Changes from all commits
Commits
Show all changes
116 commits
Select commit
Hold shift + click to select a range
8155d03
Increase card's size and actionArea
zanivan 93a6874
Visual tweaks on the hero section
zanivan b796ccf
Improved contrast of hero text
zanivan e419480
Padding tweak
zanivan be6e31d
Improvements on toolbar
zanivan fc6d199
Fix Hero padding on mobile breakpoint
zanivan 7ae5a4f
Merge remote-tracking branch 'upstream/master' into album-layout-revamp
zanivan 851dd92
Remove unused import
zanivan 4da7fc2
Run yarn docs:typescript:formatted
zanivan 00b824a
Add custom theme
zanivan cd87808
Add sections to Album template to make it a LP
zanivan 4bc14f9
Add more sections to the page
zanivan 84ea0a3
More tweaks
zanivan 19214a3
More design tweaks
zanivan 9198857
add toggle for theme
zanivan a75093c
Visual tweaks
zanivan c757b4b
Round of polish after feedback
zanivan c4b25f8
More polishing
zanivan c953485
Add hover styles to cards
zanivan 5085a3b
More polishing
zanivan 8db4e21
Added theme toggle
zanivan 0ac3680
Fix mode toggle
DiegoAndai 0d8f720
Add and fix dark theme
zanivan 9bbf1d9
Refine button styling
zanivan 07f7405
Remove Lorem Ipsum
zanivan 7461fbf
Refine logos
zanivan 8edb8e0
Run yarn docs:typescript:formatted
zanivan 1d14b48
Visual tweaks
zanivan 30eb904
Stray polishing
zanivan d030c03
Run yarn docs:typescript:formatted
zanivan 76ec174
Polish out the cards
zanivan e01ee49
Improve Chip contrast
zanivan 6cf221f
Merge remote-tracking branch 'upstream/master' into album-layout-revamp
zanivan 151e774
Refine the grey palette
zanivan 421a2ca
Tweaks to border colors
zanivan be20d1d
Fix hero resposiveness
zanivan 667848a
Tweak text colors
zanivan 3adc4cf
Remove Lorem Ipsum
zanivan 1ffb02f
Refine pricing cards
zanivan 04e3c44
Add logos to testimonials
zanivan 32a644c
Merge remote-tracking branch 'upstream/master' into album-layout-revamp
zanivan 5ea5cea
Refine Appbar
zanivan 4d43029
Refine appbar
zanivan 4e60c1d
Add drawer on mobile
zanivan e13f080
Spacing fixes
zanivan d7fb70e
Add hrefs to buttons
zanivan 681d818
Update imports to remove Album
zanivan 8860636
Merge remote-tracking branch 'upstream/master' into album-layout-revamp
zanivan da1b029
Refine footer
zanivan 28d9b5a
Fix eslint
zanivan de1b6aa
Fix test_types
zanivan 6825f15
First round of polishing after feedbacks
zanivan a1e628c
Merge remote-tracking branch 'upstream/master' into album-layout-revamp
zanivan 6bc459e
Second round of polishing after feedbacks
zanivan f2270e5
Third round of polishing after feedbacks
zanivan 2d6cbe9
Remove secondary color
zanivan 72e4687
More polishing
zanivan b2bd4f8
Stray polishing
zanivan b3bcd60
Fix dark mode usage
zanivan 1114e77
docs:typescript:formatted
zanivan b7fc8b0
Fix chip hover
zanivan b71db7c
Polishing out the theme
zanivan b9929b9
Attempting to fix the theme
zanivan b449f28
Merge remote-tracking branch 'upstream/master' into album-layout-revamp
zanivan fa19ecf
Fix tokens and mode toggling
DiegoAndai d709392
Tweaks to hero image and copy
zanivan c203637
Tweaks to components
zanivan ed53429
Stray tweaks and improvements
zanivan 901465d
Refine mockups
zanivan 576db73
Remove custom sx from 'features'
zanivan 4f34f70
Remove custom sx from 'highlights'
zanivan 5b461ca
Remove custom sx from 'pricing'
zanivan d774936
Alphabetize imports from FAQ
zanivan 55140e0
Alphabetize imports from Footer
zanivan 20f8859
Remove custom sx from 'hero'
zanivan e461eb6
Add default theme switch and stray fixes
zanivan 085205a
Fix to background color
zanivan ac59ee2
Merge remote-tracking branch 'upstream/master' into album-layout-revamp
zanivan 2800452
Fine-tune mockups and backgrounds
zanivan 92a9bdb
Add tooltip to hero
zanivan d5a8845
Further tweaks on mobile
zanivan b3a00bc
Updated image
zanivan c5e0379
Reorder templates and remove outdated
zanivan a893ace
docs:typescript:formatted
zanivan 1173424
Fix lint
zanivan 04cbae1
push in some mostly functional-only refinements
danilo-leal 9295750
hero section light mode
danilo-leal 1e60c60
features section light mode and other tweaks
danilo-leal 2211de8
soften the body 1 type a bit
danilo-leal 5baf5d0
testimonial section light mode
danilo-leal 21a5700
highlights light mode
danilo-leal ca3fc56
remove double-layer containers
danilo-leal 50ed505
pricing section light mode
danilo-leal 847cab4
faq and footer light mode
danilo-leal 02eaffa
spacing adjustments
danilo-leal 4ebe944
dark mode and other adjustments
danilo-leal 4d9a9e9
copywriting adjustments
danilo-leal e77bd06
color tweaks
danilo-leal 5de6d6f
nits
danilo-leal 49b0b1d
Small stray tweaks
zanivan f3c552d
Merge remote-tracking branch 'upstream/master' into album-layout-revamp
zanivan 5099dfb
Tweaks according feedbacks
zanivan e85f2b9
Merge remote-tracking branch 'upstream/master' into album-layout-revamp
zanivan 6feae56
Attempt to fix the selected toggle button
zanivan 11385a0
docs:typescript:formatted
zanivan 37bb001
Fix lint and stray tweaks
zanivan 11d46c7
skip regression test for theme file
siriwatknp aa8218e
Merge remote-tracking branch 'upstream/master' into album-layout-revamp
zanivan 4a2d63c
Merge remote-tracking branch 'upstream/master' into album-layout-revamp
zanivan 9473b30
Fix a11y issues
zanivan fd2d331
Update thumbnail
zanivan 66bd395
change and polish the imagery
danilo-leal bece0fe
adjust the toggle button
danilo-leal f2ee05e
mobile adjustments
danilo-leal d9279d9
accessibility fixes
danilo-leal 5d40a8f
fix little typos
danilo-leal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
137 changes: 0 additions & 137 deletions
137
docs/data/material/getting-started/templates/album/Album.js
This file was deleted.
Oops, something went wrong.
137 changes: 0 additions & 137 deletions
137
docs/data/material/getting-started/templates/album/Album.tsx
This file was deleted.
Oops, something went wrong.
108 changes: 108 additions & 0 deletions
108
docs/data/material/getting-started/templates/landing-page/LandingPage.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
import * as React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
|
||
import CssBaseline from '@mui/material/CssBaseline'; | ||
import Box from '@mui/material/Box'; | ||
import Divider from '@mui/material/Divider'; | ||
import { ThemeProvider, createTheme } from '@mui/material/styles'; | ||
import ToggleButton from '@mui/material/ToggleButton'; | ||
import ToggleButtonGroup from '@mui/material/ToggleButtonGroup'; | ||
import AutoAwesomeRoundedIcon from '@mui/icons-material/AutoAwesomeRounded'; | ||
import SvgMaterialDesign from 'docs/src/icons/SvgMaterialDesign'; | ||
import AppAppBar from './components/AppAppBar'; | ||
import Hero from './components/Hero'; | ||
import LogoCollection from './components/LogoCollection'; | ||
import Highlights from './components/Highlights'; | ||
import Pricing from './components/Pricing'; | ||
import Features from './components/Features'; | ||
import Testimonials from './components/Testimonials'; | ||
import FAQ from './components/FAQ'; | ||
import Footer from './components/Footer'; | ||
import getLPTheme from './getLPTheme'; | ||
|
||
const defaultTheme = createTheme({}); | ||
|
||
function ToggleCustomTheme({ showCustomTheme, toggleCustomTheme }) { | ||
return ( | ||
<Box | ||
sx={{ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
alignItems: 'center', | ||
width: '100dvw', | ||
position: 'fixed', | ||
bottom: 24, | ||
}} | ||
> | ||
<ToggleButtonGroup | ||
color="primary" | ||
exclusive | ||
value={showCustomTheme} | ||
onChange={toggleCustomTheme} | ||
aria-label="Platform" | ||
sx={{ | ||
backgroundColor: 'background.default', | ||
'& .Mui-selected': { | ||
pointerEvents: 'none', | ||
}, | ||
}} | ||
> | ||
<ToggleButton value> | ||
<AutoAwesomeRoundedIcon sx={{ fontSize: '20px', mr: 1 }} /> | ||
Custom theme | ||
</ToggleButton> | ||
<ToggleButton value={false}> | ||
<SvgMaterialDesign sx={{ fontSize: '20px', mr: 1 }} /> | ||
Material Design | ||
</ToggleButton> | ||
</ToggleButtonGroup> | ||
</Box> | ||
); | ||
} | ||
|
||
ToggleCustomTheme.propTypes = { | ||
showCustomTheme: PropTypes.shape({ | ||
valueOf: PropTypes.func.isRequired, | ||
}).isRequired, | ||
toggleCustomTheme: PropTypes.func.isRequired, | ||
}; | ||
|
||
export default function LandingPage() { | ||
const [mode, setMode] = React.useState('dark'); | ||
const [showCustomTheme, setShowCustomTheme] = React.useState(true); | ||
const LPtheme = createTheme(getLPTheme(mode)); | ||
|
||
const toggleColorMode = () => { | ||
setMode((prev) => (prev === 'dark' ? 'light' : 'dark')); | ||
}; | ||
|
||
const toggleCustomTheme = () => { | ||
setShowCustomTheme((prev) => !prev); | ||
}; | ||
|
||
return ( | ||
<ThemeProvider theme={showCustomTheme ? LPtheme : defaultTheme}> | ||
<CssBaseline /> | ||
<AppAppBar mode={mode} toggleColorMode={toggleColorMode} /> | ||
<Hero /> | ||
<Box sx={{ bgcolor: 'background.default' }}> | ||
<LogoCollection /> | ||
<Features /> | ||
<Divider /> | ||
<Testimonials /> | ||
<Divider /> | ||
<Highlights /> | ||
<Divider /> | ||
<Pricing /> | ||
<Divider /> | ||
<FAQ /> | ||
<Divider /> | ||
<Footer /> | ||
</Box> | ||
<ToggleCustomTheme | ||
showCustomTheme={showCustomTheme} | ||
toggleCustomTheme={toggleCustomTheme} | ||
/> | ||
</ThemeProvider> | ||
); | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we remove the proptypes? It's not for everyone especially people who use TypeScript.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's from
docs:typescript:formatted
, isn't it? Also, this is in thejs.
file, users who use Typescript will use the.tsx
file, won't they?Anyway, I leave the decision to you @siriwatknp :)