favicon, tg channel, res design, tags
@@ -103,20 +103,20 @@ export default {
|
||||
onwarn
|
||||
},
|
||||
|
||||
serviceworker: {
|
||||
input: config.serviceworker.input(),
|
||||
output: config.serviceworker.output(),
|
||||
plugins: [
|
||||
resolve(),
|
||||
replace({
|
||||
"process.browser": true,
|
||||
"process.env.NODE_ENV": JSON.stringify(mode)
|
||||
}),
|
||||
commonjs(),
|
||||
!dev && terser()
|
||||
],
|
||||
// serviceworker: {
|
||||
// input: config.serviceworker.input(),
|
||||
// output: config.serviceworker.output(),
|
||||
// plugins: [
|
||||
// resolve(),
|
||||
// replace({
|
||||
// "process.browser": true,
|
||||
// "process.env.NODE_ENV": JSON.stringify(mode)
|
||||
// }),
|
||||
// commonjs(),
|
||||
// !dev && terser()
|
||||
// ],
|
||||
|
||||
preserveEntrySignatures: false,
|
||||
onwarn
|
||||
}
|
||||
// preserveEntrySignatures: false,
|
||||
// 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.
|
||||
*/
|
||||
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 {
|
||||
text-decoration: none;
|
||||
padding: 1em 0.5em;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a class="block" aria-current="{(segment === undefined || segment === 'discussion') ? 'page' : undefined}" href=".">UniDiscuss</a></li>
|
||||
</ul>
|
||||
<Space/>
|
||||
<ul>
|
||||
<li><a aria-current="{(segment === undefined || segment === 'discussion') ? 'page' : undefined}" href=".">UniDiscuss</a></li>
|
||||
</ul>
|
||||
<Space/>
|
||||
<ul>
|
||||
<!-- <li><a aria-current="{segment === 'ask' ? 'page' : undefined}" href="ask">Ask</a></li> -->
|
||||
<li><a aria-current="{segment === 'profile' ? 'page' : undefined}" href="profile">Профиль</a></li>
|
||||
</ul>
|
||||
<li>
|
||||
<a class="flex items-center" href="https://t.me/unidiscuss" target="_blank">
|
||||
<img
|
||||
alt="File:Telegram logo.svg"
|
||||
class="mr-1"
|
||||
src="https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Telegram_alternative_logo.svg/50px-Telegram_alternative_logo.svg.png"
|
||||
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>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
}
|
||||
</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" />
|
||||
<a href="/ask">Спросить</a>
|
||||
</button>
|
||||
@@ -22,6 +22,7 @@
|
||||
<style>
|
||||
.sidebar-root {
|
||||
width: 250px;
|
||||
min-width: 250px;
|
||||
height: fit-content;
|
||||
}
|
||||
|
||||
@@ -39,7 +40,7 @@
|
||||
height="20"
|
||||
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>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
min-width: 56px;
|
||||
width: 56px;
|
||||
min-width: 25px;
|
||||
width: 25px;
|
||||
justify-content: center;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script context="module">
|
||||
import marked from 'marked'
|
||||
import Vote from "../../components/Vote.svelte";
|
||||
import HashTags from "../../components/HashTags.svelte";
|
||||
|
||||
export async function preload({ params }) {
|
||||
// the `id` parameter is available because
|
||||
@@ -48,6 +49,9 @@
|
||||
<section class="p-2">
|
||||
{@html marked(discussion.question)}
|
||||
</section>
|
||||
<section class="p-2">
|
||||
<HashTags tags={discussion.tags}/>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="my-8">
|
||||
|
||||
@@ -16,6 +16,9 @@ export default [
|
||||
name: "babdraa",
|
||||
avatar: "https://avatars3.githubusercontent.com/u/24832873?s=60&v=4"
|
||||
},
|
||||
tags: [
|
||||
'ИЭКСУ', 'ИМБТ', 'ИМИ', 'ИПТДМ', 'ИИИР', 'ГФ', 'ХТФ', 'ИДЗО', 'УИИ', 'УНИ'
|
||||
],
|
||||
question,
|
||||
createdAt: Date.now(),
|
||||
comments: [
|
||||
@@ -52,6 +55,9 @@ export default [
|
||||
name: "babdraa",
|
||||
avatar: "https://avatars3.githubusercontent.com/u/24832873?s=60&v=4"
|
||||
},
|
||||
tags: [
|
||||
'ИЭКСУ', 'ИМБТ', 'ИМИ', 'ИПТДМ', 'ИИИР', 'ГФ', 'ХТФ', 'ИДЗО', 'УИИ', 'УНИ'
|
||||
],
|
||||
question:
|
||||
question,
|
||||
createdAt: Date.now(),
|
||||
@@ -81,6 +87,9 @@ export default [
|
||||
name: "babdraa",
|
||||
avatar: "https://avatars3.githubusercontent.com/u/24832873?s=60&v=4"
|
||||
},
|
||||
tags: [
|
||||
'ИЭКСУ', 'ИМБТ', 'ИМИ', 'ИПТДМ', 'ИИИР', 'ГФ', 'ХТФ', 'ИДЗО', 'УИИ', 'УНИ'
|
||||
],
|
||||
question:
|
||||
question,
|
||||
createdAt: Date.now(),
|
||||
@@ -117,6 +126,9 @@ export default [
|
||||
name: "babdraa",
|
||||
avatar: "https://avatars3.githubusercontent.com/u/24832873?s=60&v=4"
|
||||
},
|
||||
tags: [
|
||||
'ИЭКСУ', 'ИМБТ', 'ИМИ', 'ИПТДМ', 'ИИИР', 'ГФ', 'ХТФ', 'ИДЗО', 'УИИ', 'УНИ'
|
||||
],
|
||||
question: question,
|
||||
createdAt: Date.now(),
|
||||
comments: [
|
||||
@@ -147,6 +159,9 @@ export default [
|
||||
title: "How can I get involved?",
|
||||
id: 5,
|
||||
votes: 7,
|
||||
tags: [
|
||||
'ИЭКСУ', 'ИМБТ', 'ИМИ', 'ИПТДМ', 'ИИИР', 'ГФ', 'ХТФ', 'ИДЗО', 'УИИ', 'УНИ'
|
||||
],
|
||||
author: {
|
||||
name: "living",
|
||||
avatar: "https://avatars3.githubusercontent.com/u/24832873?s=60&v=4"
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
import Vote from "../components/Vote.svelte";
|
||||
import Space from "../components/Space.svelte";
|
||||
import NewQuestion from "../components/NewQuestion.svelte";
|
||||
import HashTags from "../components/HashTags.svelte";
|
||||
|
||||
const discussions = [
|
||||
{
|
||||
@@ -125,6 +126,7 @@
|
||||
<div class="discussion-topic-author">
|
||||
<h4><a rel="prefetch" href="discussion/{discussion.id}">{discussion.title}</a></h4>
|
||||
<span>{discussion.author.name} asked 1 day ago</span>
|
||||
<HashTags tags={discussion.tags}/>
|
||||
</div>
|
||||
<Space />
|
||||
<div class="flex items-center">
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
|
||||
<link rel="stylesheet" href="global.css">
|
||||
<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`
|
||||
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 |