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>
|
||||
html,
|
||||
body {
|
||||
font-family: var(--preferred-font);
|
||||
font-family: var(--preferred-font), Arial, Helvetica, sans-serif;
|
||||
box-sizing: border-box;
|
||||
color: var(--text-color);
|
||||
background: var(--optional-body-background);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<template>
|
||||
<NuxtImg v-if="displayAvatar"
|
||||
id="display-avatar"
|
||||
:src="displayAvatar"
|
||||
:alt="displayName" />
|
||||
<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 {
|
||||
width: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.left-column {
|
||||
|
|
|
@ -37,6 +37,5 @@ const displayName = props.user.display_name || props.user.username
|
|||
.user-avatar {
|
||||
width: 2.3em;
|
||||
height: 2.3em;
|
||||
border-radius: 50%;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -19,16 +19,16 @@
|
|||
<div class="left-column-segment" id="left-column-middle">
|
||||
<NuxtLink v-for="guild of guilds" :href="`/servers/${guild.uuid}`">
|
||||
<NuxtImg v-if="guild.icon"
|
||||
class="sidebar-icon"
|
||||
class="sidebar-icon guild-icon"
|
||||
:alt="guild.name"
|
||||
:src="guild.icon" />
|
||||
<NuxtImg v-else-if="!blockedCanvas"
|
||||
class="sidebar-icon"
|
||||
class="sidebar-icon guild-icon"
|
||||
:alt="guild.name"
|
||||
:src="generateDefaultIcon(guild.name, guild.uuid)" />
|
||||
<Icon v-else name="lucide:server"
|
||||
:style="`color: ${generateIrcColor(guild.uuid, 50)}`"
|
||||
class="sidebar-icon"
|
||||
class="sidebar-icon guild-icon"
|
||||
:alt="guild.name" />
|
||||
</NuxtLink>
|
||||
</div>
|
||||
|
@ -259,8 +259,8 @@ function createDropdown() {
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
padding-left: .25em;
|
||||
padding-right: .25em;
|
||||
padding-left: var(--sidebar-margin);
|
||||
padding-right: var(--sidebar-margin);
|
||||
padding-top: .5em;
|
||||
|
||||
background: var(--optional-sidebar-background);
|
||||
|
@ -281,6 +281,7 @@ function createDropdown() {
|
|||
#left-column-middle {
|
||||
overflow-y: scroll;
|
||||
flex-grow: 1;
|
||||
gap: var(--sidebar-icon-gap);
|
||||
}
|
||||
|
||||
#middle-left-column {
|
||||
|
@ -294,12 +295,16 @@ function createDropdown() {
|
|||
}
|
||||
|
||||
#home-button {
|
||||
height: var(--sidebar-width);
|
||||
height: var(--sidebar-icon-width);
|
||||
}
|
||||
|
||||
.guild-icon {
|
||||
border-radius: var(--guild-icon-radius);
|
||||
}
|
||||
|
||||
.sidebar-icon {
|
||||
width: var(--sidebar-width);
|
||||
height: var(--sidebar-width);
|
||||
width: var(--sidebar-icon-width);
|
||||
height: var(--sidebar-icon-width);
|
||||
}
|
||||
|
||||
.sidebar-bottom-buttons {
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
--sidebar-width: 2.5em;
|
||||
--standard-radius: .5em;
|
||||
--button-radius: .6em;
|
||||
--pfp-radius: 100%;
|
||||
--preferred-font: "Arial, Helvetica, sans-serif";
|
||||
--guild-icon-radius: 20%;
|
||||
--pfp-radius: 50%;
|
||||
--preferred-font: Arial;
|
||||
}
|
|
@ -19,9 +19,13 @@
|
|||
--accent-color: #b35719;
|
||||
--accent-highlighted-color: #c76a2e;
|
||||
|
||||
--sidebar-width: 2.5em;
|
||||
--sidebar-icon-width: 2.5em;
|
||||
--sidebar-icon-gap: .25em;
|
||||
--sidebar-margin: .5em;
|
||||
|
||||
--standard-radius: .5em;
|
||||
--button-radius: .6em;
|
||||
--pfp-radius: 100%;
|
||||
--preferred-font: "Arial, Helvetica, sans-serif";
|
||||
--guild-icon-radius: 15%;
|
||||
--pfp-radius: 50%;
|
||||
--preferred-font: Arial;
|
||||
}
|
|
@ -23,8 +23,8 @@
|
|||
--sidebar-width: 2.5em;
|
||||
--standard-radius: .5em;
|
||||
--button-radius: .6em;
|
||||
--pfp-radius: 100%;
|
||||
--preferred-font: "Arial, Helvetica, sans-serif";
|
||||
--pfp-radius: 50%;
|
||||
--preferred-font: Arial;
|
||||
|
||||
--optional-body-background: ; /* background element for the body */
|
||||
--optional-chat-background: ; /* background element for the chat box */
|
||||
|
|
|
@ -22,6 +22,6 @@
|
|||
--sidebar-width: 2.5em;
|
||||
--standard-radius: .5em;
|
||||
--button-radius: .6em;
|
||||
--pfp-radius: 100%;
|
||||
--preferred-font: "Arial, Helvetica, sans-serif";
|
||||
--pfp-radius: 50%;
|
||||
--preferred-font: Arial;
|
||||
}
|
|
@ -22,8 +22,8 @@
|
|||
--sidebar-width: 2.5em;
|
||||
--standard-radius: .5em;
|
||||
--button-radius: .6em;
|
||||
--pfp-radius: 100%;
|
||||
--preferred-font: "Arial, Helvetica, sans-serif";
|
||||
--pfp-radius: 50%;
|
||||
--preferred-font: Arial;
|
||||
|
||||
/* --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);
|
||||
|
|
|
@ -27,7 +27,8 @@ export default (name: string, seed: string): string => {
|
|||
ctx.fillStyle = 'white'
|
||||
ctx.textAlign = 'center'
|
||||
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`
|
||||
// 136 isn't actually centered, but it *looks* centered
|
||||
ctx.fillText(previewName, 128, 136)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue