favicon, tg channel, res design, tags
@@ -103,20 +103,20 @@ export default {
|
|||||||
onwarn
|
onwarn
|
||||||
},
|
},
|
||||||
|
|
||||||
serviceworker: {
|
// serviceworker: {
|
||||||
input: config.serviceworker.input(),
|
// input: config.serviceworker.input(),
|
||||||
output: config.serviceworker.output(),
|
// output: config.serviceworker.output(),
|
||||||
plugins: [
|
// plugins: [
|
||||||
resolve(),
|
// resolve(),
|
||||||
replace({
|
// replace({
|
||||||
"process.browser": true,
|
// "process.browser": true,
|
||||||
"process.env.NODE_ENV": JSON.stringify(mode)
|
// "process.env.NODE_ENV": JSON.stringify(mode)
|
||||||
}),
|
// }),
|
||||||
commonjs(),
|
// commonjs(),
|
||||||
!dev && terser()
|
// !dev && terser()
|
||||||
],
|
// ],
|
||||||
|
|
||||||
preserveEntrySignatures: false,
|
// preserveEntrySignatures: false,
|
||||||
onwarn
|
// onwarn
|
||||||
}
|
// }
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ self.addEventListener('activate', event => {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch the asset from the network and store it in the cache.
|
* Fetch the asset from the network and store it in the cache.
|
||||||
* Fall back to the cache if the user is offline.
|
* Fall back to the cache if the user is offline.
|
||||||
*/
|
*/
|
||||||
async function fetchAndCache(request) {
|
async function fetchAndCache(request) {
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<script>
|
||||||
|
export let tags = [];
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="break-all">
|
||||||
|
{#each tags as tag}
|
||||||
|
<a class="text-blue-700 mr-5 text-sm" href="?filter={tag}">#{tag.toLowerCase()}</a>
|
||||||
|
{/each}
|
||||||
|
</div>
|
||||||
@@ -46,17 +46,31 @@
|
|||||||
a {
|
a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
padding: 1em 0.5em;
|
padding: 1em 0.5em;
|
||||||
display: block;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
|
<ul>
|
||||||
|
<li><a class="block" aria-current="{(segment === undefined || segment === 'discussion') ? 'page' : undefined}" href=".">UniDiscuss</a></li>
|
||||||
|
</ul>
|
||||||
|
<Space/>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a aria-current="{(segment === undefined || segment === 'discussion') ? 'page' : undefined}" href=".">UniDiscuss</a></li>
|
<li>
|
||||||
</ul>
|
<a class="flex items-center" href="https://t.me/unidiscuss" target="_blank">
|
||||||
<Space/>
|
<img
|
||||||
<ul>
|
alt="File:Telegram logo.svg"
|
||||||
<!-- <li><a aria-current="{segment === 'ask' ? 'page' : undefined}" href="ask">Ask</a></li> -->
|
class="mr-1"
|
||||||
<li><a aria-current="{segment === 'profile' ? 'page' : undefined}" href="profile">Профиль</a></li>
|
src="https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Telegram_alternative_logo.svg/50px-Telegram_alternative_logo.svg.png"
|
||||||
</ul>
|
decoding="async"
|
||||||
|
width="25"
|
||||||
|
height="25"
|
||||||
|
srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Telegram_alternative_logo.svg/50px-Telegram_alternative_logo.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/8/82/Telegram_logo.svg/1024px-Telegram_logo.svg.png 2x"
|
||||||
|
data-file-width="25"
|
||||||
|
data-file-height="25"
|
||||||
|
>
|
||||||
|
<span>Канал</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li><a class="block" aria-current="{segment === 'profile' ? 'page' : undefined}" href="profile">Войти</a></li>
|
||||||
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<button class="root bg-blue-600 hover:bg-blue-900 text-white font-bold py-2 px-4 rounded inline-flex items-center float-right">
|
<button class="root bg-blue-700 hover:bg-blue-900 text-white font-bold py-2 px-4 rounded inline-flex items-center float-right">
|
||||||
<AddComment20 class="fill-current w-4 h-4 mr-2" />
|
<AddComment20 class="fill-current w-4 h-4 mr-2" />
|
||||||
<a href="/ask">Спросить</a>
|
<a href="/ask">Спросить</a>
|
||||||
</button>
|
</button>
|
||||||
@@ -22,6 +22,7 @@
|
|||||||
<style>
|
<style>
|
||||||
.sidebar-root {
|
.sidebar-root {
|
||||||
width: 250px;
|
width: 250px;
|
||||||
|
min-width: 250px;
|
||||||
height: fit-content;
|
height: fit-content;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,7 +40,7 @@
|
|||||||
height="20"
|
height="20"
|
||||||
alt="@jamesmosier"
|
alt="@jamesmosier"
|
||||||
>
|
>
|
||||||
<span class="hover:text-blue-600 hover:underline">{contributor.name}</span>
|
<span class="hover:text-blue-700 hover:underline">{contributor.name}</span>
|
||||||
</a>
|
</a>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -16,8 +16,8 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
min-width: 56px;
|
min-width: 25px;
|
||||||
width: 56px;
|
width: 25px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<script context="module">
|
<script context="module">
|
||||||
import marked from 'marked'
|
import marked from 'marked'
|
||||||
import Vote from "../../components/Vote.svelte";
|
import Vote from "../../components/Vote.svelte";
|
||||||
|
import HashTags from "../../components/HashTags.svelte";
|
||||||
|
|
||||||
export async function preload({ params }) {
|
export async function preload({ params }) {
|
||||||
// the `id` parameter is available because
|
// the `id` parameter is available because
|
||||||
@@ -48,6 +49,9 @@
|
|||||||
<section class="p-2">
|
<section class="p-2">
|
||||||
{@html marked(discussion.question)}
|
{@html marked(discussion.question)}
|
||||||
</section>
|
</section>
|
||||||
|
<section class="p-2">
|
||||||
|
<HashTags tags={discussion.tags}/>
|
||||||
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="my-8">
|
<div class="my-8">
|
||||||
|
|||||||
@@ -16,6 +16,9 @@ export default [
|
|||||||
name: "babdraa",
|
name: "babdraa",
|
||||||
avatar: "https://avatars3.githubusercontent.com/u/24832873?s=60&v=4"
|
avatar: "https://avatars3.githubusercontent.com/u/24832873?s=60&v=4"
|
||||||
},
|
},
|
||||||
|
tags: [
|
||||||
|
'ИЭКСУ', 'ИМБТ', 'ИМИ', 'ИПТДМ', 'ИИИР', 'ГФ', 'ХТФ', 'ИДЗО', 'УИИ', 'УНИ'
|
||||||
|
],
|
||||||
question,
|
question,
|
||||||
createdAt: Date.now(),
|
createdAt: Date.now(),
|
||||||
comments: [
|
comments: [
|
||||||
@@ -52,6 +55,9 @@ export default [
|
|||||||
name: "babdraa",
|
name: "babdraa",
|
||||||
avatar: "https://avatars3.githubusercontent.com/u/24832873?s=60&v=4"
|
avatar: "https://avatars3.githubusercontent.com/u/24832873?s=60&v=4"
|
||||||
},
|
},
|
||||||
|
tags: [
|
||||||
|
'ИЭКСУ', 'ИМБТ', 'ИМИ', 'ИПТДМ', 'ИИИР', 'ГФ', 'ХТФ', 'ИДЗО', 'УИИ', 'УНИ'
|
||||||
|
],
|
||||||
question:
|
question:
|
||||||
question,
|
question,
|
||||||
createdAt: Date.now(),
|
createdAt: Date.now(),
|
||||||
@@ -81,6 +87,9 @@ export default [
|
|||||||
name: "babdraa",
|
name: "babdraa",
|
||||||
avatar: "https://avatars3.githubusercontent.com/u/24832873?s=60&v=4"
|
avatar: "https://avatars3.githubusercontent.com/u/24832873?s=60&v=4"
|
||||||
},
|
},
|
||||||
|
tags: [
|
||||||
|
'ИЭКСУ', 'ИМБТ', 'ИМИ', 'ИПТДМ', 'ИИИР', 'ГФ', 'ХТФ', 'ИДЗО', 'УИИ', 'УНИ'
|
||||||
|
],
|
||||||
question:
|
question:
|
||||||
question,
|
question,
|
||||||
createdAt: Date.now(),
|
createdAt: Date.now(),
|
||||||
@@ -117,6 +126,9 @@ export default [
|
|||||||
name: "babdraa",
|
name: "babdraa",
|
||||||
avatar: "https://avatars3.githubusercontent.com/u/24832873?s=60&v=4"
|
avatar: "https://avatars3.githubusercontent.com/u/24832873?s=60&v=4"
|
||||||
},
|
},
|
||||||
|
tags: [
|
||||||
|
'ИЭКСУ', 'ИМБТ', 'ИМИ', 'ИПТДМ', 'ИИИР', 'ГФ', 'ХТФ', 'ИДЗО', 'УИИ', 'УНИ'
|
||||||
|
],
|
||||||
question: question,
|
question: question,
|
||||||
createdAt: Date.now(),
|
createdAt: Date.now(),
|
||||||
comments: [
|
comments: [
|
||||||
@@ -147,6 +159,9 @@ export default [
|
|||||||
title: "How can I get involved?",
|
title: "How can I get involved?",
|
||||||
id: 5,
|
id: 5,
|
||||||
votes: 7,
|
votes: 7,
|
||||||
|
tags: [
|
||||||
|
'ИЭКСУ', 'ИМБТ', 'ИМИ', 'ИПТДМ', 'ИИИР', 'ГФ', 'ХТФ', 'ИДЗО', 'УИИ', 'УНИ'
|
||||||
|
],
|
||||||
author: {
|
author: {
|
||||||
name: "living",
|
name: "living",
|
||||||
avatar: "https://avatars3.githubusercontent.com/u/24832873?s=60&v=4"
|
avatar: "https://avatars3.githubusercontent.com/u/24832873?s=60&v=4"
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
import Vote from "../components/Vote.svelte";
|
import Vote from "../components/Vote.svelte";
|
||||||
import Space from "../components/Space.svelte";
|
import Space from "../components/Space.svelte";
|
||||||
import NewQuestion from "../components/NewQuestion.svelte";
|
import NewQuestion from "../components/NewQuestion.svelte";
|
||||||
|
import HashTags from "../components/HashTags.svelte";
|
||||||
|
|
||||||
const discussions = [
|
const discussions = [
|
||||||
{
|
{
|
||||||
@@ -125,6 +126,7 @@
|
|||||||
<div class="discussion-topic-author">
|
<div class="discussion-topic-author">
|
||||||
<h4><a rel="prefetch" href="discussion/{discussion.id}">{discussion.title}</a></h4>
|
<h4><a rel="prefetch" href="discussion/{discussion.id}">{discussion.title}</a></h4>
|
||||||
<span>{discussion.author.name} asked 1 day ago</span>
|
<span>{discussion.author.name} asked 1 day ago</span>
|
||||||
|
<HashTags tags={discussion.tags}/>
|
||||||
</div>
|
</div>
|
||||||
<Space />
|
<Space />
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
|
|||||||
@@ -9,7 +9,8 @@
|
|||||||
|
|
||||||
<link rel="stylesheet" href="global.css">
|
<link rel="stylesheet" href="global.css">
|
||||||
<link rel="manifest" href="manifest.json" crossorigin="use-credentials">
|
<link rel="manifest" href="manifest.json" crossorigin="use-credentials">
|
||||||
<link rel="icon" type="image/png" href="favicon.png">
|
<link rel="icon" type="image/png" href="favicon.ico">
|
||||||
|
<link rel="icon" type="image/png" sizes="32x32" href="/logo-32.png">
|
||||||
|
|
||||||
<!-- Sapper creates a <script> tag containing `src/client.js`
|
<!-- Sapper creates a <script> tag containing `src/client.js`
|
||||||
and anything else it needs to hydrate the app and
|
and anything else it needs to hydrate the app and
|
||||||
|
|||||||
|
After Width: | Height: | Size: 7.5 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 24 KiB |