Merge branch 'master' into sample-offers

This commit is contained in:
ntr committed 2022-11-26 17:31:14 +11:00
commit ffc023f419
7 files changed
+90 -18

No files matched your search

+1 -1
View File
@@ -19,7 +19,7 @@ import Info from './routes/info';
if (window.location.host === 'matescrates.au') LogRocket.init('yh0dy3/mcrates'); if (window.location.host === 'matescrates.au') LogRocket.init('yh0dy3/mcrates');
const Main = () => { const Main = () => {
const dispatch = useDispatch() const dispatch = useDispatch();
// i have no idea why this is needed, // i have no idea why this is needed,
// but it makes sure the user changes actually rerender // but it makes sure the user changes actually rerender
+2 -3
View File
@@ -97,9 +97,8 @@ function LoginPage({ mode }) {
return ( return (
<div class="landing"> <div class="landing">
<Login mode={mode} /> <Login mode={mode} />
<div></div> <Swirl />
<div class='text'> <div class='words'>
<Swirl />
<p>Mates Crates is a record importing service.</p> <p>Mates Crates is a record importing service.</p>
<p>We bundle orders together from thousands of online stores to reduce the cost of shipping vinyl.</p> <p>We bundle orders together from thousands of online stores to reduce the cost of shipping vinyl.</p>
<p>Based in Preston.</p> <p>Based in Preston.</p>
+2
View File
@@ -16,6 +16,8 @@ function Home() {
route('/search'); route('/search');
} }
if (!offers) return <div>loading...</div>;
return ( return (
<div class={'offers'}> <div class={'offers'}>
{offers.map(OfferGroup)} {offers.map(OfferGroup)}
+1 -2
View File
@@ -104,8 +104,7 @@ const User = () => {
<hr /> <hr />
<p>Data provided by Discogs.</p> <p>Data provided by Discogs.</p>
</div> </div>
<div /> <div class='results'>
<div>
{infoEl} {infoEl}
{results.map(Result)} {results.map(Result)}
{topEl} {topEl}
+1 -1
View File
@@ -11,7 +11,7 @@ export const userState = createSlice({
export const offersState = createSlice({ export const offersState = createSlice({
name: 'offers', name: 'offers',
initialState: [], initialState: null,
reducers: { reducers: {
set: (state, action) => action.payload set: (state, action) => action.payload
}, },
+69 -11
View File
@@ -201,7 +201,7 @@ body {
} }
main { main {
padding: 0 5% 0 5%; padding: 0 var(--spacing-double) 0 var(--spacing-double);
} }
button, [type=submit] { button, [type=submit] {
@@ -212,19 +212,27 @@ button, [type=submit] {
.landing { .landing {
display: grid; display: grid;
grid-template-columns: 1fr 0.5fr 2fr;
grid-template-columns: 1fr 2fr;
grid-gap: calc(var(--spacing-double) * 2);
grid-template-areas:
"login swirl"
"login words";
.login { .login {
grid-area: login;
button { button {
width: 100%; width: 100%;
} }
} }
.swirl { .swirl {
grid-area: swirl;
height: 15rem; height: 15rem;
} }
.text { .words {
grid-area: words;
text-align: center; text-align: center;
} }
} }
@@ -274,13 +282,18 @@ article {
.search { .search {
display: grid; display: grid;
grid-template-columns: 1fr 0.5fr 2fr; grid-template-columns: 1fr 2fr;
article { .results {
display: grid; display: grid;
padding: var(--spacing); padding-left: var(--spacing);
margin-bottom: var(--spacing); grid-gap: var(--spacing);
grid-template-columns: 1fr 4fr 1fr;
article {
display: grid;
padding: var(--spacing);
grid-template-columns: 1fr 4fr min-content;
}
} }
button { button {
@@ -300,8 +313,7 @@ article {
grid-template-columns: grid-template-columns:
1fr 1fr 1fr; 1fr 1fr 1fr;
grid-row-gap: var(--spacing); grid-gap: var(--spacing);
grid-column-gap: var(--spacing);
article { article {
display: grid; display: grid;
@@ -324,6 +336,10 @@ article {
} }
padding: var(--spacing); padding: var(--spacing);
img {
justify-self: end;
}
} }
} }
@@ -412,6 +428,7 @@ header {
.offers { .offers {
display: grid; display: grid;
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
grid-gap: var(--spacing);
.offer { .offer {
display: grid; display: grid;
@@ -422,7 +439,6 @@ header {
"lines lines"; "lines lines";
padding: var(--spacing); padding: var(--spacing);
margin: var(--spacing-half);
background: var(--background-1); background: var(--background-1);
.details { .details {
@@ -483,3 +499,45 @@ header {
margin-bottom: var(--spacing); margin-bottom: var(--spacing);
} }
@media (max-width:900px) {
.landing {
grid-template-columns: 1fr;
grid-template-areas:
"swirl"
"login"
"words";
}
.list {
grid-template-columns: 1fr;
}
.search {
grid-template-columns: 1fr;
}
.offers {
grid-template-columns: 1fr;
}
.info {
grid-template-columns: 1fr;
// is necessary for some reason
grid-template-areas:
"swirl"
"contact"
"words";
}
main {
padding: 0 var(--spacing) 0 var(--spacing);
}
}
@media (max-width:1200px) {
img {
width: 5rem;
}
}
+14
View File
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>matescrates.au - record import service</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<% preact.headEnd %>
</head>
<body>
<% preact.bodyEnd %>
</body>
</html>