navbar wip
This commit is contained in:
1 parent
b91f877045
commit
6c3cac7381
7 files changed
+460
-382
No files matched your search
@@ -24,6 +24,7 @@ export default function createPg(log: Log, prisma: PrismaClient) {
|
|||||||
return prisma.want.findMany({
|
return prisma.want.findMany({
|
||||||
where: { userId: user.id },
|
where: { userId: user.id },
|
||||||
include: { _count: { select: { offers: true }} },
|
include: { _count: { select: { offers: true }} },
|
||||||
|
orderBy: { offers: { _count: 'desc' } }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+6
-6
@@ -9,7 +9,7 @@ import store, { wsState } from './store'
|
|||||||
|
|
||||||
import Nav from './components/nav';
|
import Nav from './components/nav';
|
||||||
|
|
||||||
import Offers from './routes/offers';
|
import Main from './routes/main';
|
||||||
import Acp from './routes/acp';
|
import Acp from './routes/acp';
|
||||||
import Login from './routes/login';
|
import Login from './routes/login';
|
||||||
import Search from './routes/search';
|
import Search from './routes/search';
|
||||||
@@ -18,7 +18,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 Mcrates = () => {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
|
|
||||||
// i have no idea why this is needed,
|
// i have no idea why this is needed,
|
||||||
@@ -38,10 +38,10 @@ const Main = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<main id="app">
|
<div id="mcrates">
|
||||||
<Nav />
|
<Nav />
|
||||||
<Router onChange={routeChange}>
|
<Router onChange={routeChange}>
|
||||||
<Route path="/" component={Offers} />
|
<Route path="/" component={Main} />
|
||||||
<Route path="/login" component={Login} mode="login" />
|
<Route path="/login" component={Login} mode="login" />
|
||||||
<Route path="/register" component={Login} mode="register" />
|
<Route path="/register" component={Login} mode="register" />
|
||||||
<Route path="/search" component={Search} />
|
<Route path="/search" component={Search} />
|
||||||
@@ -51,14 +51,14 @@ const Main = () => {
|
|||||||
{/* ACP */}
|
{/* ACP */}
|
||||||
<Route path="/acp" component={Acp} />
|
<Route path="/acp" component={Acp} />
|
||||||
</Router>
|
</Router>
|
||||||
</main>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const App = () => {
|
const App = () => {
|
||||||
return (
|
return (
|
||||||
<Provider store={store}>
|
<Provider store={store}>
|
||||||
<Main />
|
<Mcrates />
|
||||||
</Provider>
|
</Provider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ export default function OfferGroup(group, i) {
|
|||||||
const detailText = `${format} ${descriptions}`;
|
const detailText = `${format} ${descriptions}`;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class="offer" key={i}>
|
<div class="offer" key={i} id={group.details.id}>
|
||||||
<section>
|
<section>
|
||||||
<h3>{group.details.artists_sort} - {group.details.title} <a href={group.details.uri} target="_blank"><ExternalLink /></a></h3>
|
<h3>{group.details.artists_sort} - {group.details.title} <a href={group.details.uri} target="_blank"><ExternalLink /></a></h3>
|
||||||
<div class='alt-text details'>
|
<div class='alt-text details'>
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
import { h } from 'preact';
|
||||||
|
import { route } from 'preact-router';
|
||||||
|
import { useSelector } from 'react-redux'
|
||||||
|
|
||||||
|
import { State } from './../store';
|
||||||
|
import * as toast from './../toast';
|
||||||
|
|
||||||
|
import OfferGroup from './../components/offer.group';
|
||||||
|
|
||||||
|
const GroupNav = (want) => {
|
||||||
|
const href = want._count.offers ? `#${want.release}` : null;
|
||||||
|
return (
|
||||||
|
<div class=''>
|
||||||
|
<a href={href}>{want.data.artists_sort} - {want.data.title}</a>
|
||||||
|
<span>{want._count.offers}</span>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
function Home() {
|
||||||
|
const offers = useSelector((state: State) => state.offers);
|
||||||
|
const wants = useSelector((state: State) => state.wants);
|
||||||
|
|
||||||
|
if (offers && offers.length === 0) {
|
||||||
|
toast.info('no offers', 'You have no offers yet, search for some more items.');
|
||||||
|
route('/search');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!offers || !wants) return <div>loading...</div>;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<main >
|
||||||
|
<nav> {wants.map(GroupNav)} </nav>
|
||||||
|
<div class={'offers'}>
|
||||||
|
{offers.map(OfferGroup)}
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Home;
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
import { h } from 'preact';
|
|
||||||
import { route } from 'preact-router';
|
|
||||||
import { useSelector } from 'react-redux'
|
|
||||||
|
|
||||||
import { State } from './../store';
|
|
||||||
import * as toast from './../toast';
|
|
||||||
|
|
||||||
import OfferGroup from './../components/offer.group';
|
|
||||||
|
|
||||||
function Home() {
|
|
||||||
const offers = useSelector((state: State) => state.offers);
|
|
||||||
|
|
||||||
if (offers && offers.length === 0) {
|
|
||||||
toast.info('no offers', 'You have no offers yet, search for some more items.');
|
|
||||||
route('/search');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!offers) return <div>loading...</div>;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div class={'offers'}>
|
|
||||||
{offers.map(OfferGroup)}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Home;
|
|
||||||
+8
-348
@@ -131,6 +131,11 @@ button, input, optgroup, select, textarea {
|
|||||||
line-height:var(--base-line-height);
|
line-height:var(--base-line-height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
button, [type=submit] {
|
||||||
|
padding: var(--spacing-half);
|
||||||
|
background: var(--background-1);
|
||||||
|
}
|
||||||
|
|
||||||
input:hover, textarea:hover {
|
input:hover, textarea:hover {
|
||||||
color:var(--base-font-color);
|
color:var(--base-font-color);
|
||||||
border:var(--hover-border)
|
border:var(--hover-border)
|
||||||
@@ -194,180 +199,6 @@ p {
|
|||||||
margin:0 0 var(--spacing)
|
margin:0 0 var(--spacing)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ok actual styles
|
|
||||||
|
|
||||||
body {
|
|
||||||
padding-top: calc(var(--spacing)/2);
|
|
||||||
}
|
|
||||||
|
|
||||||
main {
|
|
||||||
padding: 0 var(--spacing-double) 0 var(--spacing-double);
|
|
||||||
}
|
|
||||||
|
|
||||||
button, [type=submit] {
|
|
||||||
padding: var(--spacing-half);
|
|
||||||
background: var(--background-1);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.landing {
|
|
||||||
display: grid;
|
|
||||||
|
|
||||||
grid-template-columns: 1fr 2fr;
|
|
||||||
grid-gap: calc(var(--spacing-double) * 2);
|
|
||||||
grid-template-areas:
|
|
||||||
"login swirl"
|
|
||||||
"login words";
|
|
||||||
|
|
||||||
.login {
|
|
||||||
grid-area: login;
|
|
||||||
button {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.swirl {
|
|
||||||
grid-area: swirl;
|
|
||||||
height: 15rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.words {
|
|
||||||
grid-area: words;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.info {
|
|
||||||
display: grid;
|
|
||||||
|
|
||||||
grid-template-areas:
|
|
||||||
"words swirl"
|
|
||||||
"words contact";
|
|
||||||
|
|
||||||
grid-template-columns: 1fr 1fr;
|
|
||||||
grid-template-rows: min-content 1fr;
|
|
||||||
|
|
||||||
section {
|
|
||||||
margin-bottom: var(--spacing);
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact {
|
|
||||||
grid-area: contact;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.words {
|
|
||||||
grid-area: words;
|
|
||||||
}
|
|
||||||
|
|
||||||
.swirl {
|
|
||||||
grid-area: swirl;
|
|
||||||
height: 15rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.alt-text, .alt {
|
|
||||||
font-family: var(--secondary-font-family);
|
|
||||||
// font-size: var(--small-font-size);
|
|
||||||
text-transform: uppercase;
|
|
||||||
}
|
|
||||||
|
|
||||||
article {
|
|
||||||
background-color: var(--background-1);
|
|
||||||
|
|
||||||
button {
|
|
||||||
border-color: var(--background-2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.search {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr 2fr;
|
|
||||||
|
|
||||||
.results {
|
|
||||||
display: grid;
|
|
||||||
padding-left: var(--spacing);
|
|
||||||
grid-gap: var(--spacing);
|
|
||||||
|
|
||||||
article {
|
|
||||||
display: grid;
|
|
||||||
padding: var(--spacing);
|
|
||||||
grid-template-columns: 1fr 4fr min-content;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
button {
|
|
||||||
margin-right: var(--spacing);
|
|
||||||
background: var(--background-2);
|
|
||||||
border-color: var(--background-1);
|
|
||||||
|
|
||||||
&.added {
|
|
||||||
background: var(--color-green);
|
|
||||||
cursor: auto;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.list {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns:
|
|
||||||
1fr 1fr 1fr;
|
|
||||||
|
|
||||||
grid-gap: var(--spacing);
|
|
||||||
|
|
||||||
article {
|
|
||||||
display: grid;
|
|
||||||
|
|
||||||
// grid-template-rows:
|
|
||||||
// 1fr min-content min-content;
|
|
||||||
|
|
||||||
grid-template-areas:
|
|
||||||
"title img"
|
|
||||||
"details details"
|
|
||||||
"remove remove";
|
|
||||||
|
|
||||||
button {
|
|
||||||
margin-top: var(--spacing-half);
|
|
||||||
grid-area: remove
|
|
||||||
}
|
|
||||||
|
|
||||||
.details {
|
|
||||||
grid-area: details;
|
|
||||||
}
|
|
||||||
|
|
||||||
padding: var(--spacing);
|
|
||||||
|
|
||||||
img {
|
|
||||||
justify-self: end;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
form {
|
|
||||||
margin-bottom: var(--spacing);
|
|
||||||
|
|
||||||
label, input {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
input, button {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
input {
|
|
||||||
padding: var(--spacing-half);
|
|
||||||
margin-bottom: var(--spacing);
|
|
||||||
}
|
|
||||||
|
|
||||||
label {
|
|
||||||
font-family: var(--secondary-font-family);
|
|
||||||
font-size: var(--small-font-size);
|
|
||||||
text-transform: uppercase;
|
|
||||||
margin-bottom: var(--spacing-half);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: var(--secondary-font-color);
|
color: var(--secondary-font-color);
|
||||||
font-family: var(--secondary-font-family);
|
font-family: var(--secondary-font-family);
|
||||||
@@ -378,181 +209,10 @@ a {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
.alt-text, .alt {
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr 1fr min-content;
|
|
||||||
padding-bottom: var(--spacing);
|
|
||||||
|
|
||||||
a {
|
|
||||||
font-size: var(--small-font-size);
|
|
||||||
margin-right: var(--spacing);
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.bundles {
|
|
||||||
flex-flow: row;
|
|
||||||
|
|
||||||
.bundle {
|
|
||||||
margin-bottom: var(--spacing-double);
|
|
||||||
|
|
||||||
section {
|
|
||||||
margin-bottom: var(--spacing);
|
|
||||||
}
|
|
||||||
|
|
||||||
.items {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(5, 1fr);
|
|
||||||
|
|
||||||
div {
|
|
||||||
margin-right: var(--spacing);
|
|
||||||
margin-bottom: var(--spacing);
|
|
||||||
|
|
||||||
display: grid;
|
|
||||||
|
|
||||||
&.bold {
|
|
||||||
font-weight: bold;
|
|
||||||
background: var(--background-2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.offers {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr 1fr;
|
|
||||||
grid-gap: var(--spacing);
|
|
||||||
|
|
||||||
.offer {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr min-content;
|
|
||||||
grid-template-rows: min-content min-content;
|
|
||||||
grid-template-areas:
|
|
||||||
"details img"
|
|
||||||
"lines lines";
|
|
||||||
|
|
||||||
padding: var(--spacing);
|
|
||||||
background: var(--background-1);
|
|
||||||
|
|
||||||
.details {
|
|
||||||
font-size: var(--small-font-size);
|
|
||||||
}
|
|
||||||
|
|
||||||
.status {
|
|
||||||
margin-top: var(--spacing-half);
|
|
||||||
}
|
|
||||||
|
|
||||||
section {
|
|
||||||
grid-area: details;
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
grid-area: img;
|
|
||||||
justify-self: end;
|
|
||||||
margin-left: var(--spacing-half);
|
|
||||||
}
|
|
||||||
|
|
||||||
.lines {
|
|
||||||
grid-area: lines;
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
column-gap: var(--spacing-half);
|
|
||||||
|
|
||||||
button {
|
|
||||||
margin-top: var(--spacing-half);
|
|
||||||
border-color: var(--background-2);
|
|
||||||
|
|
||||||
&.accepted {
|
|
||||||
background: var(--color-accepted);
|
|
||||||
}
|
|
||||||
|
|
||||||
&.confirmed {
|
|
||||||
cursor: auto;
|
|
||||||
background: var(--color-confirmed);
|
|
||||||
}
|
|
||||||
|
|
||||||
&.neg {
|
|
||||||
margin-left: var(--spacing-half);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.number {
|
|
||||||
font-family: var(--secondary-font-family);
|
font-family: var(--secondary-font-family);
|
||||||
|
// font-size: var(--small-font-size);
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
.swirl {
|
@import 'styles.less';
|
||||||
background-image: url("./../assets/swirl.fix.svg");
|
|
||||||
background-size: contain;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-position: center;
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ------------
|
|
||||||
// toasts
|
|
||||||
|
|
||||||
.iziToast {
|
|
||||||
border-radius: 0;
|
|
||||||
border-color: var(--base-border-color);
|
|
||||||
|
|
||||||
.iziToast-body {
|
|
||||||
font-family: var(--base-font-family);
|
|
||||||
font-size: var(--base-font-size);
|
|
||||||
}
|
|
||||||
|
|
||||||
.iziToast-title {
|
|
||||||
font-family: var(--secondary-font-family);
|
|
||||||
text-transform: uppercase;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,403 @@
|
|||||||
|
body {
|
||||||
|
padding-top: calc(var(--spacing)/2);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mcrates {
|
||||||
|
padding: 0 var(--spacing-double) 0 var(--spacing-double);
|
||||||
|
display: grid;
|
||||||
|
|
||||||
|
grid-template-areas:
|
||||||
|
"header header"
|
||||||
|
"main main"
|
||||||
|
"footer footer";
|
||||||
|
|
||||||
|
height: 100vh;
|
||||||
|
width: 100vw;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
grid-template-rows: min-content 1fr min-content;
|
||||||
|
}
|
||||||
|
|
||||||
|
.landing {
|
||||||
|
display: grid;
|
||||||
|
|
||||||
|
grid-template-columns: 1fr 2fr;
|
||||||
|
grid-gap: calc(var(--spacing-double) * 2);
|
||||||
|
grid-template-areas:
|
||||||
|
"login swirl"
|
||||||
|
"login words";
|
||||||
|
|
||||||
|
.login {
|
||||||
|
grid-area: login;
|
||||||
|
button {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.swirl {
|
||||||
|
grid-area: swirl;
|
||||||
|
height: 15rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.words {
|
||||||
|
grid-area: words;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
display: grid;
|
||||||
|
|
||||||
|
grid-template-areas:
|
||||||
|
"words swirl"
|
||||||
|
"words contact";
|
||||||
|
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
grid-template-rows: min-content 1fr;
|
||||||
|
|
||||||
|
section {
|
||||||
|
margin-bottom: var(--spacing);
|
||||||
|
}
|
||||||
|
|
||||||
|
.contact {
|
||||||
|
grid-area: contact;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.words {
|
||||||
|
grid-area: words;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swirl {
|
||||||
|
grid-area: swirl;
|
||||||
|
height: 15rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
article {
|
||||||
|
background-color: var(--background-1);
|
||||||
|
|
||||||
|
button {
|
||||||
|
border-color: var(--background-2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.search {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 2fr;
|
||||||
|
|
||||||
|
.results {
|
||||||
|
display: grid;
|
||||||
|
padding-left: var(--spacing);
|
||||||
|
grid-gap: var(--spacing);
|
||||||
|
|
||||||
|
article {
|
||||||
|
display: grid;
|
||||||
|
padding: var(--spacing);
|
||||||
|
grid-template-columns: 1fr 4fr min-content;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
margin-right: var(--spacing);
|
||||||
|
background: var(--background-2);
|
||||||
|
border-color: var(--background-1);
|
||||||
|
|
||||||
|
&.added {
|
||||||
|
background: var(--color-green);
|
||||||
|
cursor: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.list {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns:
|
||||||
|
1fr 1fr 1fr;
|
||||||
|
|
||||||
|
grid-gap: var(--spacing);
|
||||||
|
|
||||||
|
article {
|
||||||
|
display: grid;
|
||||||
|
|
||||||
|
grid-template-areas:
|
||||||
|
"title img"
|
||||||
|
"details details"
|
||||||
|
"remove remove";
|
||||||
|
|
||||||
|
button {
|
||||||
|
margin-top: var(--spacing-half);
|
||||||
|
grid-area: remove
|
||||||
|
}
|
||||||
|
|
||||||
|
.details {
|
||||||
|
grid-area: details;
|
||||||
|
}
|
||||||
|
|
||||||
|
padding: var(--spacing);
|
||||||
|
|
||||||
|
img {
|
||||||
|
justify-self: end;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
form {
|
||||||
|
margin-bottom: var(--spacing);
|
||||||
|
|
||||||
|
label, input {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
input, button {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
padding: var(--spacing-half);
|
||||||
|
margin-bottom: var(--spacing);
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
font-family: var(--secondary-font-family);
|
||||||
|
font-size: var(--small-font-size);
|
||||||
|
text-transform: uppercase;
|
||||||
|
margin-bottom: var(--spacing-half);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
grid-area: header;
|
||||||
|
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr min-content;
|
||||||
|
|
||||||
|
border-bottom: var(--base-border);
|
||||||
|
padding-bottom: var(--spacing-half);
|
||||||
|
margin-bottom: var(--spacing-half);
|
||||||
|
|
||||||
|
a {
|
||||||
|
font-size: var(--small-font-size);
|
||||||
|
margin-right: var(--spacing);
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
main {
|
||||||
|
grid-area: main;
|
||||||
|
|
||||||
|
display: grid;
|
||||||
|
grid-template-areas:
|
||||||
|
"nav content";
|
||||||
|
|
||||||
|
grid-template-columns:
|
||||||
|
1fr 1fr;
|
||||||
|
|
||||||
|
column-gap: var(--spacing);
|
||||||
|
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
nav {
|
||||||
|
// duck scrollbars
|
||||||
|
padding-right: var(--spacing-half);
|
||||||
|
|
||||||
|
grid-area: nav;
|
||||||
|
|
||||||
|
div {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns:
|
||||||
|
1fr min-content;
|
||||||
|
|
||||||
|
a {
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
overflow: scroll;
|
||||||
|
}
|
||||||
|
|
||||||
|
.offers {
|
||||||
|
grid-area: content;
|
||||||
|
overflow: scroll;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bundles {
|
||||||
|
flex-flow: row;
|
||||||
|
|
||||||
|
.bundle {
|
||||||
|
margin-bottom: var(--spacing-double);
|
||||||
|
|
||||||
|
section {
|
||||||
|
margin-bottom: var(--spacing);
|
||||||
|
}
|
||||||
|
|
||||||
|
.items {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(5, 1fr);
|
||||||
|
|
||||||
|
div {
|
||||||
|
margin-right: var(--spacing);
|
||||||
|
margin-bottom: var(--spacing);
|
||||||
|
|
||||||
|
display: grid;
|
||||||
|
|
||||||
|
&.bold {
|
||||||
|
font-weight: bold;
|
||||||
|
background: var(--background-2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.offers {
|
||||||
|
display: grid;
|
||||||
|
// grid-template-columns: 1fr 1fr;
|
||||||
|
grid-gap: var(--spacing);
|
||||||
|
|
||||||
|
.offer {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr min-content;
|
||||||
|
grid-template-rows: min-content min-content;
|
||||||
|
grid-template-areas:
|
||||||
|
"details img"
|
||||||
|
"lines lines";
|
||||||
|
|
||||||
|
padding: var(--spacing);
|
||||||
|
background: var(--background-1);
|
||||||
|
|
||||||
|
.details {
|
||||||
|
font-size: var(--small-font-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.status {
|
||||||
|
margin-top: var(--spacing-half);
|
||||||
|
}
|
||||||
|
|
||||||
|
section {
|
||||||
|
grid-area: details;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
grid-area: img;
|
||||||
|
justify-self: end;
|
||||||
|
margin-left: var(--spacing-half);
|
||||||
|
}
|
||||||
|
|
||||||
|
.lines {
|
||||||
|
grid-area: lines;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
column-gap: var(--spacing-half);
|
||||||
|
|
||||||
|
button {
|
||||||
|
margin-top: var(--spacing-half);
|
||||||
|
border-color: var(--background-2);
|
||||||
|
|
||||||
|
&.accepted {
|
||||||
|
background: var(--color-accepted);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.confirmed {
|
||||||
|
cursor: auto;
|
||||||
|
background: var(--color-confirmed);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.neg {
|
||||||
|
margin-left: var(--spacing-half);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.number {
|
||||||
|
font-family: var(--secondary-font-family);
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swirl {
|
||||||
|
background-image: url("./../assets/swirl.fix.svg");
|
||||||
|
background-size: contain;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
|
||||||
|
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";
|
||||||
|
}
|
||||||
|
|
||||||
|
#mcrates {
|
||||||
|
padding: 0 var(--spacing) 0 var(--spacing);
|
||||||
|
}
|
||||||
|
|
||||||
|
main {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
grid-template-rows: 1fr 3fr;
|
||||||
|
grid-gap: var(--spacing-half);
|
||||||
|
grid-template-areas:
|
||||||
|
"nav"
|
||||||
|
"content";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width:1200px) {
|
||||||
|
img {
|
||||||
|
width: 5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ------------
|
||||||
|
// toasts
|
||||||
|
|
||||||
|
.iziToast {
|
||||||
|
border-radius: 0;
|
||||||
|
border-color: var(--base-border-color);
|
||||||
|
|
||||||
|
.iziToast-body {
|
||||||
|
font-family: var(--base-font-family);
|
||||||
|
font-size: var(--base-font-size);
|
||||||
|
}
|
||||||
|
|
||||||
|
.iziToast-title {
|
||||||
|
font-family: var(--secondary-font-family);
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user