Skip to content

Commit

Permalink
ロゴ周りを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
uboar committed Mar 11, 2023
1 parent 6ee7767 commit c99427b
Show file tree
Hide file tree
Showing 10 changed files with 614 additions and 518 deletions.
2 changes: 2 additions & 0 deletions packages/backend/src/server/web/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ html {
width: 64px;
height: 64px;
pointer-events: none;
background: #fff;
border-radius: 50%;
}

#splashSpinner {
Expand Down
170 changes: 87 additions & 83 deletions packages/frontend/src/pages/about.vue
Original file line number Diff line number Diff line change
@@ -1,88 +1,90 @@
<template>
<MkStickyContainer>
<template #header><MkPageHeader v-model:tab="tab" :actions="headerActions" :tabs="headerTabs"/></template>
<MkSpacer v-if="tab === 'overview'" :content-max="600" :margin-min="20">
<div class="_gaps_m">
<div class="fwhjspax" :style="{ backgroundImage: `url(${ $instance.bannerUrl })` }">
<div class="content">
<img :src="$instance.iconUrl ?? $instance.faviconUrl ?? '/favicon.ico'" alt="" class="icon"/>
<div class="name">
<b>{{ $instance.name ?? host }}</b>
<MkStickyContainer>
<template #header>
<MkPageHeader v-model:tab="tab" :actions="headerActions" :tabs="headerTabs" />
</template>
<MkSpacer v-if="tab === 'overview'" :content-max="600" :margin-min="20">
<div class="_gaps_m">
<div class="fwhjspax" :style="{ backgroundImage: `url(${$instance.bannerUrl})` }">
<div class="content">
<!-- <img :src="$instance.iconUrl ?? $instance.faviconUrl ?? '/favicon.ico'" alt="" class="icon" /> -->
<img src="https://s3.ap-northeast-1.wasabisys.com/s3.nicomedkey.cc/public/nicomedkey/logo1_w.svg" alt="" class="icon" />
</div>
</div>
</div>

<MkKeyValue>
<template #key>{{ i18n.ts.description }}</template>
<template #value><div v-html="$instance.description"></div></template>
</MkKeyValue>

<FormSection>
<div class="_gaps_m">
<MkKeyValue :copy="version">
<template #key>Misskey</template>
<template #value>{{ version }}</template>
</MkKeyValue>
<div v-html="i18n.t('poweredByMisskeyDescription', { name: $instance.name ?? host })">
</div>
<FormLink to="/about-misskey">{{ i18n.ts.aboutMisskey }}</FormLink>
</div>
</FormSection>

<FormSection>
<div class="_gaps_m">
<FormSplit>
<MkKeyValue>
<template #key>{{ i18n.ts.administrator }}</template>
<template #value>{{ $instance.maintainerName }}</template>
</MkKeyValue>
<MkKeyValue>
<template #key>{{ i18n.ts.contact }}</template>
<template #value>{{ $instance.maintainerEmail }}</template>
</MkKeyValue>
</FormSplit>
<FormLink v-if="$instance.tosUrl" :to="$instance.tosUrl" external>{{ i18n.ts.tos }}</FormLink>
</div>
</FormSection>
<MkKeyValue>
<template #key>{{ i18n.ts.description }}</template>
<template #value>
<div v-html="$instance.description"></div>
</template>
</MkKeyValue>

<FormSuspense :p="initStats">
<FormSection>
<template #label>{{ i18n.ts.statistics }}</template>
<FormSplit>
<MkKeyValue>
<template #key>{{ i18n.ts.users }}</template>
<template #value>{{ number(stats.originalUsersCount) }}</template>
</MkKeyValue>
<MkKeyValue>
<template #key>{{ i18n.ts.notes }}</template>
<template #value>{{ number(stats.originalNotesCount) }}</template>
<div class="_gaps_m">
<MkKeyValue :copy="version">
<template #key>Misskey</template>
<template #value>{{ version }}</template>
</MkKeyValue>
</FormSplit>
<div v-html="i18n.t('poweredByMisskeyDescription', { name: $instance.name ?? host })">
</div>
<FormLink to="/about-misskey">{{ i18n.ts.aboutMisskey }}</FormLink>
</div>
</FormSection>
</FormSuspense>

<FormSection>
<template #label>Well-known resources</template>
<div class="_formLinks">
<FormLink :to="`/.well-known/host-meta`" external>host-meta</FormLink>
<FormLink :to="`/.well-known/host-meta.json`" external>host-meta.json</FormLink>
<FormLink :to="`/.well-known/nodeinfo`" external>nodeinfo</FormLink>
<FormLink :to="`/robots.txt`" external>robots.txt</FormLink>
<FormLink :to="`/manifest.json`" external>manifest.json</FormLink>
</div>
</FormSection>
</div>
</MkSpacer>
<MkSpacer v-else-if="tab === 'emojis'" :content-max="1000" :margin-min="20">
<XEmojis/>
</MkSpacer>
<MkSpacer v-else-if="tab === 'federation'" :content-max="1000" :margin-min="20">
<XFederation/>
</MkSpacer>
<MkSpacer v-else-if="tab === 'charts'" :content-max="1000" :margin-min="20">
<MkInstanceStats/>
</MkSpacer>
</MkStickyContainer>

<FormSection>
<div class="_gaps_m">
<FormSplit>
<MkKeyValue>
<template #key>{{ i18n.ts.administrator }}</template>
<template #value>{{ $instance.maintainerName }}</template>
</MkKeyValue>
<MkKeyValue>
<template #key>{{ i18n.ts.contact }}</template>
<template #value>{{ $instance.maintainerEmail }}</template>
</MkKeyValue>
</FormSplit>
<FormLink v-if="$instance.tosUrl" :to="$instance.tosUrl" external>{{ i18n.ts.tos }}</FormLink>
</div>
</FormSection>

<FormSuspense :p="initStats">
<FormSection>
<template #label>{{ i18n.ts.statistics }}</template>
<FormSplit>
<MkKeyValue>
<template #key>{{ i18n.ts.users }}</template>
<template #value>{{ number(stats.originalUsersCount) }}</template>
</MkKeyValue>
<MkKeyValue>
<template #key>{{ i18n.ts.notes }}</template>
<template #value>{{ number(stats.originalNotesCount) }}</template>
</MkKeyValue>
</FormSplit>
</FormSection>
</FormSuspense>

<FormSection>
<template #label>Well-known resources</template>
<div class="_formLinks">
<FormLink :to="`/.well-known/host-meta`" external>host-meta</FormLink>
<FormLink :to="`/.well-known/host-meta.json`" external>host-meta.json</FormLink>
<FormLink :to="`/.well-known/nodeinfo`" external>nodeinfo</FormLink>
<FormLink :to="`/robots.txt`" external>robots.txt</FormLink>
<FormLink :to="`/manifest.json`" external>manifest.json</FormLink>
</div>
</FormSection>
</div>
</MkSpacer>
<MkSpacer v-else-if="tab === 'emojis'" :content-max="1000" :margin-min="20">
<XEmojis />
</MkSpacer>
<MkSpacer v-else-if="tab === 'federation'" :content-max="1000" :margin-min="20">
<XFederation />
</MkSpacer>
<MkSpacer v-else-if="tab === 'charts'" :content-max="1000" :margin-min="20">
<MkInstanceStats />
</MkSpacer>
</MkStickyContainer>
</template>

<script lang="ts" setup>
Expand Down Expand Up @@ -111,6 +113,8 @@ const props = withDefaults(defineProps<{
let stats = $ref(null);
let tab = $ref(props.initialTab);
const isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches;
watch($$(tab), () => {
if (tab === 'charts') {
claimAchievement('viewInstanceChart');
Expand Down Expand Up @@ -154,24 +158,24 @@ definePageMetadata(computed(() => ({
overflow: clip;
background-size: cover;
background-position: center center;
background-color: #333333;
> .content {
>.content {
overflow: hidden;
> .icon {
>.icon {
display: block;
margin: 16px auto 0 auto;
margin: 4px auto 4px auto;
height: 64px;
border-radius: 8px;
}
> .name {
>.name {
display: block;
padding: 16px;
color: #fff;
text-shadow: 0 0 8px #000;
background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}
}
}
</style>
}</style>
62 changes: 36 additions & 26 deletions packages/frontend/src/pages/admin/index.vue
Original file line number Diff line number Diff line change
@@ -1,25 +1,35 @@
<template>
<div ref="el" class="hiyeyicy" :class="{ wide: !narrow }">
<div v-if="!narrow || currentPage?.route.name == null" class="nav">
<MkSpacer :content-max="700" :margin-min="16">
<div class="lxpfedzu">
<div class="banner">
<img :src="$instance.iconUrl || '/favicon.ico'" alt="" class="icon"/>
</div>
<div ref="el" class="hiyeyicy" :class="{ wide: !narrow }">
<div v-if="!narrow || currentPage?.route.name == null" class="nav">
<MkSpacer :content-max="700" :margin-min="16">
<div class="lxpfedzu">
<div class="banner">
<!-- <img :src="$instance.iconUrl || '/favicon.ico'" alt="" class="icon"/> -->
<img src="https://s3.ap-northeast-1.wasabisys.com/s3.nicomedkey.cc/public/nicomedkey/logo1_w.svg" alt=""
class="icon" />
</div>

<MkInfo v-if="thereIsUnresolvedAbuseReport" warn class="info">{{ i18n.ts.thereIsUnresolvedAbuseReportWarning }} <MkA to="/admin/abuses" class="_link">{{ i18n.ts.check }}</MkA></MkInfo>
<MkInfo v-if="noMaintainerInformation" warn class="info">{{ i18n.ts.noMaintainerInformationWarning }} <MkA to="/admin/settings" class="_link">{{ i18n.ts.configure }}</MkA></MkInfo>
<MkInfo v-if="noBotProtection" warn class="info">{{ i18n.ts.noBotProtectionWarning }} <MkA to="/admin/security" class="_link">{{ i18n.ts.configure }}</MkA></MkInfo>
<MkInfo v-if="noEmailServer" warn class="info">{{ i18n.ts.noEmailServerWarning }} <MkA to="/admin/email-settings" class="_link">{{ i18n.ts.configure }}</MkA></MkInfo>
<MkInfo v-if="thereIsUnresolvedAbuseReport" warn class="info">{{ i18n.ts.thereIsUnresolvedAbuseReportWarning }}
<MkA to="/admin/abuses" class="_link">{{ i18n.ts.check }}</MkA>
</MkInfo>
<MkInfo v-if="noMaintainerInformation" warn class="info">{{ i18n.ts.noMaintainerInformationWarning }} <MkA
to="/admin/settings" class="_link">{{ i18n.ts.configure }}</MkA>
</MkInfo>
<MkInfo v-if="noBotProtection" warn class="info">{{ i18n.ts.noBotProtectionWarning }} <MkA to="/admin/security"
class="_link">{{ i18n.ts.configure }}</MkA>
</MkInfo>
<MkInfo v-if="noEmailServer" warn class="info">{{ i18n.ts.noEmailServerWarning }} <MkA
to="/admin/email-settings" class="_link">{{ i18n.ts.configure }}</MkA>
</MkInfo>

<MkSuperMenu :def="menuDef" :grid="currentPage?.route.name == null"></MkSuperMenu>
</div>
</MkSpacer>
</div>
<div v-if="!(narrow && currentPage?.route.name == null)" class="main">
<RouterView/>
<MkSuperMenu :def="menuDef" :grid="currentPage?.route.name == null"></MkSuperMenu>
</div>
</MkSpacer>
</div>
<div v-if="!(narrow && currentPage?.route.name == null)" class="main">
<RouterView />
</div>
</div>
</div>
</template>

<script lang="ts" setup>
Expand Down Expand Up @@ -278,7 +288,7 @@ defineExpose({
margin: 0 auto;
height: 100%;
> .nav {
>.nav {
width: 32%;
max-width: 280px;
box-sizing: border-box;
Expand All @@ -287,29 +297,29 @@ defineExpose({
height: 100%;
}
> .main {
>.main {
flex: 1;
min-width: 0;
}
}
> .nav {
>.nav {
.lxpfedzu {
> .info {
>.info {
margin: 16px 0;
}
> .banner {
>.banner {
margin: 16px;
> .icon {
>.icon {
display: block;
margin: auto;
height: 42px;
border-radius: 8px;
filter: drop-shadow(0 0 8px black);
}
}
}
}
}
</style>
}</style>
Loading

0 comments on commit c99427b

Please sign in to comment.