diff --git a/components/Header.vue b/components/Header.vue
index db936a0c..e99f6c0d 100644
--- a/components/Header.vue
+++ b/components/Header.vue
@@ -2,9 +2,9 @@
-
+
-
+
title
@@ -21,8 +21,7 @@
-
- title
+ title
@@ -116,10 +115,9 @@
-
+
-
- title
+ title
@@ -433,6 +431,9 @@
height: $header-height;
padding-top: 1.2rem;
+ &.nav-header {
+ padding-top: 0.6rem;
+ }
margin-top: 3px;
&:first-child, &:last-child {
@@ -449,6 +450,7 @@
h1 {
text-decoration: none;
+ margin-bottom: .5em;
.higher {
position: relative;
top: -0.1em;
diff --git a/components/Logo.vue b/components/Logo.vue
new file mode 100644
index 00000000..5bd73375
--- /dev/null
+++ b/components/Logo.vue
@@ -0,0 +1,94 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/locale/pl/blog/manifest.md b/locale/pl/blog/manifest.md
index 6f11e5b4..4d3548ee 100644
--- a/locale/pl/blog/manifest.md
+++ b/locale/pl/blog/manifest.md
@@ -46,7 +46,7 @@ i robi to wymuszając w takich przypadkach jeden z dwóch rodzajów gramatycznyc
Dla wielu z nas jest to przykre, pogłębiające dysforię płciową,
i wręcz zmusza nas do kłamania w niemal każdym zdaniu na temat naszej własnej płci.
-Dlatego jako społeczność pracujemy nas tworzeniem i popularyzowaniem [pomysłów](/)
+Dlatego jako społeczność pracujemy nas tworzeniem i popularyzowaniem [pomysłów](/zaimki)
na uczynienie języka bardziej inkluzywnym, a mniej binarnym
i mniej poddanym [męskiej dominacji językowej](https://pl.wikipedia.org/wiki/M%C4%99ska_dominacja_j%C4%99zykowa).
diff --git a/nuxt.config.js b/nuxt.config.js
index fa918e39..7a523739 100644
--- a/nuxt.config.js
+++ b/nuxt.config.js
@@ -14,6 +14,7 @@ const title = translations.title;
const description = translations.description;
const banner = process.env.BASE_URL + '/api/banner/zaimki.png';
const colour = '#C71585';
+const logo = fs.readFileSync(__dirname + '/static/logo/logo.svg').toString('utf-8').replace('/>', 'fill="currentColor"/>');
process.env.LOCALE = locale;
if (process.env.ENV) {
@@ -110,7 +111,7 @@ export default {
{ hid: 'twitter:image', property: 'twitter:image', content: banner },
],
link: [
- { rel: 'icon', type: 'image/svg', href: '/favicon.svg' }
+ { rel: 'icon', type: 'image/svg', href: '/logo/logo-primary.svg' }
],
},
css: [],
@@ -178,6 +179,7 @@ export default {
STATS_FILE: process.env.STATS_FILE,
HCAPTCHA_SITEKEY: process.env.HCAPTCHA_SITEKEY,
ALL_LOCALES_URLS: process.env.ALL_LOCALES_URLS,
+ LOGO: logo,
},
serverMiddleware: ['~/server/no-ssr.js', '~/server/index.js'],
axios: {
diff --git a/routes/calendar.vue b/routes/calendar.vue
index 664d6dd2..6e946fbf 100644
--- a/routes/calendar.vue
+++ b/routes/calendar.vue
@@ -1,5 +1,5 @@
-
+
@@ -9,7 +9,7 @@
-
+
domain/{{ config.calendar.route }}
diff --git a/routes/calendarDay.vue b/routes/calendarDay.vue
index 379bed14..73de1a21 100644
--- a/routes/calendarDay.vue
+++ b/routes/calendarDay.vue
@@ -10,7 +10,7 @@
-
+
domain/{{ config.calendar.route }}
diff --git a/routes/profileCard.vue b/routes/profileCard.vue
index c8d55db1..57dc98be 100644
--- a/routes/profileCard.vue
+++ b/routes/profileCard.vue
@@ -2,7 +2,7 @@
-
+
domain/@{{user.username}}
diff --git a/server/routes/banner.js b/server/routes/banner.js
index f950c84f..c1d0fc89 100644
--- a/server/routes/banner.js
+++ b/server/routes/banner.js
@@ -47,12 +47,14 @@ router.get('/banner/:pronounName*.png', handleErrorAsync(async (req, res) => {
const bg = await loadImage('static/bg.png');
context.drawImage(bg, 0, 0, width, height);
+ const logo = await loadImage('static/logo/logo.svg');
+ const logoPrimary = await loadImage('static/logo/logo-primary.svg');
+
const fallback = async _ => {
- const logo = await loadImage('node_modules/@fortawesome/fontawesome-pro/svgs/light/tags.svg');
leftRatio = 5;
- context.drawImage(logo, width / leftRatio - imageSize / 2, height / 2 - imageSize / 1.25 / 2, imageSize, imageSize / 1.25);
+ context.drawImage(logo, width / leftRatio - imageSize / 2, height / 2 - imageSize / 2, imageSize, imageSize);
context.font = `regular ${translations.title.length < 10 ? 120 : translations.title.length < 14 ? 80 : 72}pt '${fontName}'`;
- context.fillText(translations.title, width / leftRatio + imageSize / 1.5, height / 2 + (translations.title.length < 10 ? 48 : translations.title.length < 14 ? 24 : 24));
+ context.fillText(translations.title, width / leftRatio + imageSize / 1.5, height / 2 + (translations.title.length < 10 ? 48 : translations.title.length < 14 ? 32 : 24));
}
if (pronounName.startsWith('@')) {
@@ -69,12 +71,10 @@ router.get('/banner/:pronounName*.png', handleErrorAsync(async (req, res) => {
context.font = `regular 48pt '${fontName}'`
context.fillText('@' + user.username, width / leftRatio + imageSize, height / 2)
- const logo = await loadImage('static/favicon.svg');
-
context.font = `regular 24pt '${fontName}'`
context.fillStyle = '#C71585';
const logoSize = 24 * 1.25;
- context.drawImage(logo, width / leftRatio + imageSize, height / 2 + logoSize - 4, logoSize, logoSize / 1.25)
+ context.drawImage(logoPrimary, width / leftRatio + imageSize, height / 2 + logoSize - 8, logoSize, logoSize)
context.fillText(translations.title, width / leftRatio + imageSize + 36, height / 2 + 48);
return canvas.toBuffer(mime);
@@ -85,14 +85,12 @@ router.get('/banner/:pronounName*.png', handleErrorAsync(async (req, res) => {
pronounName,
);
- const logo = await loadImage('node_modules/@fortawesome/fontawesome-pro/svgs/light/tags.svg');
-
- if (pronounName === 'zaimki' || (!pronoun && pronounName !== global.config.pronouns.any)) {
+ if (pronounName === 'zaimki' || (!pronoun && pronounName !== global.config.pronouns.any && (!global.config.pronouns || pronounName !== global.config.pronouns.mirror))) {
await fallback();
return canvas.toBuffer(mime);
}
- context.drawImage(logo, width / leftRatio - imageSize / 2, height / 2 - imageSize / 1.25 / 2, imageSize, imageSize / 1.25)
+ context.drawImage(logo, width / leftRatio - imageSize / 2, height / 2 - imageSize / 2, imageSize, imageSize)
context.font = `regular 48pt '${fontName}'`;
context.fillText(translations.pronouns.intro + ':', width / leftRatio + imageSize / 1.5, height / 2 - 36)
diff --git a/src/helpers.js b/src/helpers.js
index 410db164..6bc04575 100644
--- a/src/helpers.js
+++ b/src/helpers.js
@@ -229,3 +229,32 @@ const escapeChars = {
};
export const escapeHtml = (text) => text.replace(/[&<>"]/g, tag => escapeChars[tag] || tag);
+
+export class ImmutableArray extends Array {
+ sorted(a, b) {
+ return new ImmutableArray(...[...this].sort(a, b));
+ }
+
+ randomElement() {
+ return this[Math.floor(Math.random() * this.length)];
+ }
+
+ groupBy(m) {
+ const keys = {}
+ const grouped = new ImmutableArray();
+ for (let el of this) {
+ const key = m(el);
+ if (!keys.hasOwnProperty(key)) {
+ keys[key] = grouped.length;
+ grouped.push([key, new ImmutableArray()]);
+ }
+ grouped[keys[key]][1].push(el);
+ }
+
+ return grouped;
+ }
+
+ indexOrFallback(index, fallback) {
+ return this.length > index ? this[index] : fallback;
+ }
+}
diff --git a/static/favicon.svg b/static/favicon.svg
deleted file mode 100644
index ddc1a4d9..00000000
--- a/static/favicon.svg
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/static/icon.png b/static/icon.png
deleted file mode 100644
index 882ad10a..00000000
Binary files a/static/icon.png and /dev/null differ
diff --git a/static/logo.png b/static/logo.png
deleted file mode 100644
index c05a92dc..00000000
Binary files a/static/logo.png and /dev/null differ
diff --git a/static/logo/logo-primary.svg b/static/logo/logo-primary.svg
new file mode 100644
index 00000000..60719a58
--- /dev/null
+++ b/static/logo/logo-primary.svg
@@ -0,0 +1 @@
+
diff --git a/static/logo/logo.svg b/static/logo/logo.svg
new file mode 100644
index 00000000..3cf30dca
--- /dev/null
+++ b/static/logo/logo.svg
@@ -0,0 +1 @@
+