Open askpatrickw opened 5 years ago
@oliviertassinari I see you created the onepirate example. Can you suggest a path forward? I'd be happy to provide additional documentation for the next person who wants to use the example. tx!
I decided to use material-kit instead.
Links
are a wrapper around an anchor element that applies Material UI styling. The router we use is built in to Next (next/router)
Ah.. so there are other dependencies needed to make this work, but there's no package.json specific to the example.
My $.02 is these examples should be in their own repos and work independently not be based on the documentation app.
Also, there's a general comment in the docs that you can drop the themes into the sample applications, but again there are dependencies which would not be specified in the theme or the sample.
I hope that's helpful feedback.
@askpatrickw Thank you for raising the problem. You are right, we should make our "theme" better isolated!
[x] Fixed. The first issue I can find is
[ ] The link issue is a good one too! https://github.com/mui-org/material-ui/blob/6bb9231175b14d41d2255c267df0f39dd4c971fe/docs/src/pages/premium-themes/onepirate/SignIn.js#L65
[ ] We miss a README
I suggest you move themes to their own repro with folders for each theme, and you can link to other repos as well.
@oliviertassinari Thank you for working on this. Would love to have solid theme starting points
Is this done? I encounter this problem as well. I would love to use this with create-react-app.
As a beginner I would also appreciate the theme working out of the box
i want to redirect on click of product category buttons of onepirate material ui template can some help??? the code is:
function ProductCategories(props) { const { classes } = props;
const images = [
{
url: 'https://i.pinimg.com/564x/73/16/32/731632e44bdf21489d4d7632e59a8894.jpg',
title: 'GYM',
width: '33%',
},
{
url: 'https://www.safwallpapers.com/files/1524485537_Yoga-Girls-Wallpapers-For-Laptop.jpg',
title: 'Yoga',
width: '33%',
},
{
url:
'https://c1.iggcdn.com/indiegogo-media-prod-cld/image/upload/c_limit,w_695/v1537210711/dkwlqnj2sgxmdpy2mv6z.png',
title: 'Beauty Sleep ',
width: '33%',
},
{
url: 'https://images.unsplash.com/photo-1533727937480-da3a97967e95?auto=format&fit=crop&w=400&q=80',
title: 'Fitness',
width: '33%',
},
{
url:
'https://hips.hearstapps.com/hmg-prod.s3.amazonaws.com/images/afro-american-couple-doing-yoga-royalty-free-image-598708752-1548713240.jpg?crop=1.00xw:0.751xh;0,0.153xh&resize=980:*',
title: 'Meditation',
width: '33%',
},
{
url:
'https://hips.hearstapps.com/hmg-prod.s3.amazonaws.com/images/salad-mix-plate-shot-from-above-on-rustic-wooden-royalty-free-image-1018199524-1556130377.jpg',
title: 'Diet',
width: '33%',
},
{
url:
'https://mediad.publicbroadcasting.net/p/wsiu/files/styles/large/public/202004/CoronaVirusHeader-Final-3.jpg',
title: 'COVID-19',
height: '80%',
width: '99%',
},
];
return (
<Container className={classes.root} component="section">
<Typography variant="h4" marked="center" align="center" component="h2">
For all tastes and all desires
</Typography>
<div className={classes.images}>
{images.map((image) => (
<ButtonBase
key={image.title}
className={classes.imageWrapper}
style={{
width: image.width,
}}
>
<div
className={classes.imageSrc}
style={{
backgroundImage: `url(${image.url})`,
}}
/>
<div className={classes.imageBackdrop} />
<div className={classes.imageButton}>
<Typography component="h3" variant="h6" color="inherit" className={classes.imageTitle}>
{image.title}
<div className={classes.imageMarked} />
</Typography>
</div>
</ButtonBase>
))}
</div>
</Container>
);
}
ProductCategories.propTypes = { classes: PropTypes.object.isRequired, };
export default withStyles(styles)(ProductCategories);
I have same problem, as an experienced web developer learning material-ui, I would like to have a starting point to build from that works out of the box with no modification. This one, I had to track down all the static files, and still have problems with getting the markdown to generate with webpack.
Since this seems still to be an open issue, I created a version with create-react-app and added 'react-router-dom' as one of the dependencies. All credit to @oliviertassinari who created the template in the first place. Feel free to git clone https://github.com/tobiaspfuetze/material-ui-onepirate.git && cd material-ui-onepirate && npm install && npm start
Since this seems still to be an open issue, I created a version with create-react-app and added 'react-router-dom' as one of the dependencies. All credit to @oliviertassinari who created the template in the first place. Feel free to git clone https://github.com/tobiaspfuetze/material-ui-onepirate.git && cd material-ui-onepirate && npm install && npm start
Thank you a lot for making it a separated repo! It's a lot easier to work with. Small comment, would you happen to know why your version has all the button text underlined? Seems a style is missing somewhere.
FYI
I found a repository that uses the Typescript for the onepirate theme. https://github.com/rothbart/onepirate-typescript
FYI
I found a repository that uses the Typescript for the onepirate theme. https://github.com/rothbart/onepirate-typescript
this was actually super helpful and enough for it to click so I could start using this in a gatsby app. thanks.
Revisiting this in Q4 '23—it seems that these two free "premium" themes each need a package.json
and a README.md
to explain how to use them. They should "just work" after you npm install
.
The rothbart/onepirate-typescript
repo linked above is a good example, but I'd much prefer to see Vite or Next.js in place of create-react-app for these.
thanks
I'm looking through the Onepirate landing page example as a launching point and I'm not understanding how the links in AppAppBar and AppFooter are working.
The Source for the onepirate example is here: https://github.com/mui-org/material-ui/tree/master/docs/src/pages/premium-themes/onepirate
Expected: Download the example and have it work.
Observed:
I've gathered up the files not in the source directory, but I'm looking for a straight-forward way to fix the 404s.
For example this link to the terms in
./modules/views/AppFooter.js
You will note two things:
I've tried moving the Terms.js from my src into into /src/modules and putting the terms.js into src and changed the href to '/terms' but I still get 404s.
It seems as though this example is not really reusable as-is, but I'm not sure. Do I need to re-work the example using react-router-dom or is there some other more straight-forward approach I'm not seeing.
I'm dropping this into a vanilla create-react-app project and serving it up with AWS Amplify hosting.