Compare commits
3 commits
186d3c7a0a
...
32910d2077
Author | SHA1 | Date | |
---|---|---|---|
32910d2077 | |||
63dbfa2a0d | |||
64131e6f9c |
11 changed files with 40 additions and 24 deletions
2
app.vue
2
app.vue
|
@ -65,7 +65,7 @@ useHead({
|
||||||
<style>
|
<style>
|
||||||
html,
|
html,
|
||||||
body {
|
body {
|
||||||
font-family: var(--preferred-font);
|
font-family: var(--preferred-font), Arial, Helvetica, sans-serif;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
color: var(--text-color);
|
color: var(--text-color);
|
||||||
background: var(--optional-body-background);
|
background: var(--optional-body-background);
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<NuxtImg v-if="displayAvatar"
|
<NuxtImg v-if="displayAvatar"
|
||||||
|
id="display-avatar"
|
||||||
:src="displayAvatar"
|
:src="displayAvatar"
|
||||||
:alt="displayName" />
|
:alt="displayName" />
|
||||||
<Icon v-else
|
<Icon v-else
|
||||||
|
@ -36,4 +37,10 @@ if (user) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
#display-avatar {
|
||||||
|
border-radius: var(--pfp-radius);
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -225,7 +225,6 @@ function getDayDifference(date1: Date, date2: Date) {
|
||||||
|
|
||||||
.message-author-avatar {
|
.message-author-avatar {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-radius: 50%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.left-column {
|
.left-column {
|
||||||
|
|
|
@ -37,6 +37,5 @@ const displayName = props.user.display_name || props.user.username
|
||||||
.user-avatar {
|
.user-avatar {
|
||||||
width: 2.3em;
|
width: 2.3em;
|
||||||
height: 2.3em;
|
height: 2.3em;
|
||||||
border-radius: 50%;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -19,16 +19,16 @@
|
||||||
<div class="left-column-segment" id="left-column-middle">
|
<div class="left-column-segment" id="left-column-middle">
|
||||||
<NuxtLink v-for="guild of guilds" :href="`/servers/${guild.uuid}`">
|
<NuxtLink v-for="guild of guilds" :href="`/servers/${guild.uuid}`">
|
||||||
<NuxtImg v-if="guild.icon"
|
<NuxtImg v-if="guild.icon"
|
||||||
class="sidebar-icon"
|
class="sidebar-icon guild-icon"
|
||||||
:alt="guild.name"
|
:alt="guild.name"
|
||||||
:src="guild.icon" />
|
:src="guild.icon" />
|
||||||
<NuxtImg v-else-if="!blockedCanvas"
|
<NuxtImg v-else-if="!blockedCanvas"
|
||||||
class="sidebar-icon"
|
class="sidebar-icon guild-icon"
|
||||||
:alt="guild.name"
|
:alt="guild.name"
|
||||||
:src="generateDefaultIcon(guild.name, guild.uuid)" />
|
:src="generateDefaultIcon(guild.name, guild.uuid)" />
|
||||||
<Icon v-else name="lucide:server"
|
<Icon v-else name="lucide:server"
|
||||||
:style="`color: ${generateIrcColor(guild.uuid, 50)}`"
|
:style="`color: ${generateIrcColor(guild.uuid, 50)}`"
|
||||||
class="sidebar-icon"
|
class="sidebar-icon guild-icon"
|
||||||
:alt="guild.name" />
|
:alt="guild.name" />
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
</div>
|
</div>
|
||||||
|
@ -259,8 +259,8 @@ function createDropdown() {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
padding-left: .25em;
|
padding-left: var(--sidebar-margin);
|
||||||
padding-right: .25em;
|
padding-right: var(--sidebar-margin);
|
||||||
padding-top: .5em;
|
padding-top: .5em;
|
||||||
|
|
||||||
background: var(--optional-sidebar-background);
|
background: var(--optional-sidebar-background);
|
||||||
|
@ -281,6 +281,7 @@ function createDropdown() {
|
||||||
#left-column-middle {
|
#left-column-middle {
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
|
gap: var(--sidebar-icon-gap);
|
||||||
}
|
}
|
||||||
|
|
||||||
#middle-left-column {
|
#middle-left-column {
|
||||||
|
@ -294,12 +295,16 @@ function createDropdown() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#home-button {
|
#home-button {
|
||||||
height: var(--sidebar-width);
|
height: var(--sidebar-icon-width);
|
||||||
|
}
|
||||||
|
|
||||||
|
.guild-icon {
|
||||||
|
border-radius: var(--guild-icon-radius);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-icon {
|
.sidebar-icon {
|
||||||
width: var(--sidebar-width);
|
width: var(--sidebar-icon-width);
|
||||||
height: var(--sidebar-width);
|
height: var(--sidebar-icon-width);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-bottom-buttons {
|
.sidebar-bottom-buttons {
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
--sidebar-width: 2.5em;
|
--sidebar-width: 2.5em;
|
||||||
--standard-radius: .5em;
|
--standard-radius: .5em;
|
||||||
--button-radius: .6em;
|
--button-radius: .6em;
|
||||||
--pfp-radius: 100%;
|
--guild-icon-radius: 20%;
|
||||||
--preferred-font: "Arial, Helvetica, sans-serif";
|
--pfp-radius: 50%;
|
||||||
|
--preferred-font: Arial;
|
||||||
}
|
}
|
|
@ -19,9 +19,13 @@
|
||||||
--accent-color: #b35719;
|
--accent-color: #b35719;
|
||||||
--accent-highlighted-color: #c76a2e;
|
--accent-highlighted-color: #c76a2e;
|
||||||
|
|
||||||
--sidebar-width: 2.5em;
|
--sidebar-icon-width: 2.5em;
|
||||||
|
--sidebar-icon-gap: .25em;
|
||||||
|
--sidebar-margin: .5em;
|
||||||
|
|
||||||
--standard-radius: .5em;
|
--standard-radius: .5em;
|
||||||
--button-radius: .6em;
|
--button-radius: .6em;
|
||||||
--pfp-radius: 100%;
|
--guild-icon-radius: 15%;
|
||||||
--preferred-font: "Arial, Helvetica, sans-serif";
|
--pfp-radius: 50%;
|
||||||
|
--preferred-font: Arial;
|
||||||
}
|
}
|
|
@ -23,8 +23,8 @@
|
||||||
--sidebar-width: 2.5em;
|
--sidebar-width: 2.5em;
|
||||||
--standard-radius: .5em;
|
--standard-radius: .5em;
|
||||||
--button-radius: .6em;
|
--button-radius: .6em;
|
||||||
--pfp-radius: 100%;
|
--pfp-radius: 50%;
|
||||||
--preferred-font: "Arial, Helvetica, sans-serif";
|
--preferred-font: Arial;
|
||||||
|
|
||||||
--optional-body-background: ; /* background element for the body */
|
--optional-body-background: ; /* background element for the body */
|
||||||
--optional-chat-background: ; /* background element for the chat box */
|
--optional-chat-background: ; /* background element for the chat box */
|
||||||
|
|
|
@ -22,6 +22,6 @@
|
||||||
--sidebar-width: 2.5em;
|
--sidebar-width: 2.5em;
|
||||||
--standard-radius: .5em;
|
--standard-radius: .5em;
|
||||||
--button-radius: .6em;
|
--button-radius: .6em;
|
||||||
--pfp-radius: 100%;
|
--pfp-radius: 50%;
|
||||||
--preferred-font: "Arial, Helvetica, sans-serif";
|
--preferred-font: Arial;
|
||||||
}
|
}
|
|
@ -22,8 +22,8 @@
|
||||||
--sidebar-width: 2.5em;
|
--sidebar-width: 2.5em;
|
||||||
--standard-radius: .5em;
|
--standard-radius: .5em;
|
||||||
--button-radius: .6em;
|
--button-radius: .6em;
|
||||||
--pfp-radius: 100%;
|
--pfp-radius: 50%;
|
||||||
--preferred-font: "Arial, Helvetica, sans-serif";
|
--preferred-font: Arial;
|
||||||
|
|
||||||
/* --optional-body-background: background */
|
/* --optional-body-background: background */
|
||||||
--optional-body-background: linear-gradient(45deg, #ed222480, #ed222480, #ed222480, #ed222480, #ed222480, #ed222480, #f35b2280, #f9962180, #f5c11e80, #f1eb1b80, #f1eb1b80, #f1eb1b80, #63c72080, #0c9b4980, #21878d80, #3954a580, #61379b80, #93288e80);
|
--optional-body-background: linear-gradient(45deg, #ed222480, #ed222480, #ed222480, #ed222480, #ed222480, #ed222480, #f35b2280, #f9962180, #f5c11e80, #f1eb1b80, #f1eb1b80, #f1eb1b80, #63c72080, #0c9b4980, #21878d80, #3954a580, #61379b80, #93288e80);
|
||||||
|
|
|
@ -27,7 +27,8 @@ export default (name: string, seed: string): string => {
|
||||||
ctx.fillStyle = 'white'
|
ctx.fillStyle = 'white'
|
||||||
ctx.textAlign = 'center'
|
ctx.textAlign = 'center'
|
||||||
ctx.textBaseline = 'middle'
|
ctx.textBaseline = 'middle'
|
||||||
const preferredFont = document.documentElement.style.getPropertyValue("--preferred-font")
|
const root = document.documentElement;
|
||||||
|
const preferredFont = getComputedStyle(root).getPropertyValue("--preferred-font");
|
||||||
ctx.font = `bold 96px ${preferredFont}, Arial, Helvetica, sans-serif`
|
ctx.font = `bold 96px ${preferredFont}, Arial, Helvetica, sans-serif`
|
||||||
// 136 isn't actually centered, but it *looks* centered
|
// 136 isn't actually centered, but it *looks* centered
|
||||||
ctx.fillText(previewName, 128, 136)
|
ctx.fillText(previewName, 128, 136)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue