diff --git a/api/index.ts b/api/index.ts index 5094a43..21fa04b 100644 --- a/api/index.ts +++ b/api/index.ts @@ -29,7 +29,7 @@ async function start() { notify, } = createServices(log); - await notify.connect(); + await notify.listen(); api.listen(); } diff --git a/api/src/notify.ts b/api/src/notify.ts index f6c9bdf..4fb016b 100644 --- a/api/src/notify.ts +++ b/api/src/notify.ts @@ -45,7 +45,7 @@ export default function createNotify(log: Log, pg: Pg, events) { subscriber.notifications.on(LISTINGS_CHANNEL, handleListings); subscriber.notifications.on(WANTS_CHANNEL, handleWants); - async function connect() { + async function listen() { await subscriber.connect(); await Promise.all([ subscriber.listenTo(OFFERS_CHANNEL), @@ -55,5 +55,5 @@ export default function createNotify(log: Log, pg: Pg, events) { ]); } - return { connect }; + return { listen }; } \ No newline at end of file diff --git a/client/src/routes/main.tsx b/client/src/routes/main.tsx index 36541bf..4d22958 100644 --- a/client/src/routes/main.tsx +++ b/client/src/routes/main.tsx @@ -30,7 +30,13 @@ function Home() { return (
- +
{offers.map(OfferGroup)}
diff --git a/client/src/style/fonts.less b/client/src/style/fonts.less new file mode 100644 index 0000000..9741720 --- /dev/null +++ b/client/src/style/fonts.less @@ -0,0 +1,87 @@ +/* vietnamese */ +@font-face { + font-family: 'Barlow'; + font-style: normal; + font-weight: 400; + src: url(https://fonts.gstatic.com/s/barlow/v12/7cHpv4kjgoGqM7E_A8s52Hs.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Barlow'; + font-style: normal; + font-weight: 400; + src: url(https://fonts.gstatic.com/s/barlow/v12/7cHpv4kjgoGqM7E_Ass52Hs.woff2) format('woff2'); + unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Barlow'; + font-style: normal; + font-weight: 400; + src: url(https://fonts.gstatic.com/s/barlow/v12/7cHpv4kjgoGqM7E_DMs5.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} +/* cyrillic-ext */ +@font-face { + font-family: 'Noto Sans Mono'; + font-style: normal; + font-weight: 400; + font-stretch: 100%; + src: url(https://fonts.gstatic.com/s/notosansmono/v21/BngrUXNETWXI6LwhGYvaxZikqZqK6fBq6kPvUce2oAZcdthSBUsYck4-_FNJ09DdVXQQ.woff2) format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +/* cyrillic */ +@font-face { + font-family: 'Noto Sans Mono'; + font-style: normal; + font-weight: 400; + font-stretch: 100%; + src: url(https://fonts.gstatic.com/s/notosansmono/v21/BngrUXNETWXI6LwhGYvaxZikqZqK6fBq6kPvUce2oAZcdthSBUsYck4-_FNJ09ndVXQQ.woff2) format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +/* greek-ext */ +@font-face { + font-family: 'Noto Sans Mono'; + font-style: normal; + font-weight: 400; + font-stretch: 100%; + src: url(https://fonts.gstatic.com/s/notosansmono/v21/BngrUXNETWXI6LwhGYvaxZikqZqK6fBq6kPvUce2oAZcdthSBUsYck4-_FNJ09HdVXQQ.woff2) format('woff2'); + unicode-range: U+1F00-1FFF; +} +/* greek */ +@font-face { + font-family: 'Noto Sans Mono'; + font-style: normal; + font-weight: 400; + font-stretch: 100%; + src: url(https://fonts.gstatic.com/s/notosansmono/v21/BngrUXNETWXI6LwhGYvaxZikqZqK6fBq6kPvUce2oAZcdthSBUsYck4-_FNJ097dVXQQ.woff2) format('woff2'); + unicode-range: U+0370-03FF; +} +/* vietnamese */ +@font-face { + font-family: 'Noto Sans Mono'; + font-style: normal; + font-weight: 400; + font-stretch: 100%; + src: url(https://fonts.gstatic.com/s/notosansmono/v21/BngrUXNETWXI6LwhGYvaxZikqZqK6fBq6kPvUce2oAZcdthSBUsYck4-_FNJ09LdVXQQ.woff2) format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB; +} +/* latin-ext */ +@font-face { + font-family: 'Noto Sans Mono'; + font-style: normal; + font-weight: 400; + font-stretch: 100%; + src: url(https://fonts.gstatic.com/s/notosansmono/v21/BngrUXNETWXI6LwhGYvaxZikqZqK6fBq6kPvUce2oAZcdthSBUsYck4-_FNJ09PdVXQQ.woff2) format('woff2'); + unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Noto Sans Mono'; + font-style: normal; + font-weight: 400; + font-stretch: 100%; + src: url(https://fonts.gstatic.com/s/notosansmono/v21/BngrUXNETWXI6LwhGYvaxZikqZqK6fBq6kPvUce2oAZcdthSBUsYck4-_FNJ093dVQ.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} diff --git a/client/src/style/index.less b/client/src/style/index.less index b075e66..1e17034 100644 --- a/client/src/style/index.less +++ b/client/src/style/index.less @@ -23,32 +23,6 @@ img { height: auto; } -/* latin */ -@font-face { - font-family: 'Raleway'; - font-style: normal; - font-weight: 400; - src: url(https://fonts.gstatic.com/s/raleway/v28/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCIPrE.woff2) format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; -} - -@font-face { - font-family: 'Source Code Pro'; - font-style: normal; - font-weight: 400; - src: url(https://fonts.gstatic.com/s/sourcecodepro/v21/HI_diYsKILxRpg3hIP6sJ7fM7PqPMcMnZFqUwX28DMyQtMlrTA.woff2) format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; -} - -@font-face { - font-family: 'Noto Sans Mono'; - font-style: normal; - font-weight: 400; - font-stretch: normal; - src: url(https://fonts.gstatic.com/s/notosansmono/v20/BngrUXNETWXI6LwhGYvaxZikqZqK6fBq6kPvUce2oAZcdthSBUsYck4-_FNJ093dVQ.woff2) format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; -} - // stuff from UX laws html { color:var(--base-font-color); @@ -71,7 +45,7 @@ html { --medium-font-size: 1.777em; --large-font-size: 2.369em; --xlarge-font-size: 3.157em; - --base-font-family: 'Raleway', Arial, Sans-Serif; + --base-font-family: 'Barlow', Arial, Sans-Serif; --secondary-font-family: 'Noto Sans Mono', monospace; --base-font-color: var(--color-off-white); --secondary-font-color: var(--color-mid-grey); @@ -161,7 +135,7 @@ button, [type=button], [type=reset], [type=submit] { font-family: var(--secondary-font-family); font-size: var(--small-font-size); - font-weight: bold; + // font-weight: bold; text-transform: uppercase; &:hover { @@ -215,4 +189,5 @@ a { text-transform: uppercase; } +@import 'fonts.less'; @import 'styles.less'; diff --git a/client/src/style/styles.less b/client/src/style/styles.less index fa9c66c..9c9fd1c 100644 --- a/client/src/style/styles.less +++ b/client/src/style/styles.less @@ -211,7 +211,9 @@ main { div { display: grid; grid-template-columns: - 1fr min-content; + 1fr min-content min-content; + + column-gap: var(--spacing-half); a { white-space: nowrap; diff --git a/client/src/template.html b/client/src/template.html index ce1e78f..662c6a0 100644 --- a/client/src/template.html +++ b/client/src/template.html @@ -6,6 +6,7 @@ + <% preact.headEnd %>