2020-12-24 20:32:05 +02:00
< script >
2021-04-03 16:43:02 +03:00
import AddComment20 from "carbon-icons-svelte/lib/AddComment20" ;
2020-12-26 02:22:37 +02:00
import Vote from "../components/Vote.svelte" ;
import Space from "../components/Space.svelte" ;
2020-12-28 04:16:45 +02:00
import HashTags from "../components/HashTags.svelte" ;
2020-12-26 02:22:37 +02:00
2020-12-24 20:32:05 +02:00
const discussions = [
{
id : 1 ,
2021-04-03 16:43:02 +03:00
title : "How do I pass Anicimov?" ,
2020-12-24 20:32:05 +02:00
author : {
2021-04-03 16:43:02 +03:00
name : "rotimibest" ,
2020-12-24 20:32:05 +02:00
},
2021-04-03 16:43:02 +03:00
tags : [ "ибэит" , "икс" ],
2020-12-24 20:32:05 +02:00
answered : false ,
2020-12-26 02:22:37 +02:00
comments : 10 ,
votes : 10 ,
2020-12-24 20:32:05 +02:00
},
{
id : 2 ,
2021-04-03 16:43:02 +03:00
title :
"Where do I find the nearest restaurant. Where do I find the nearest restaurant?. Where do I find the nearest restaurant? Where do I find the nearest restaurant?" ,
2020-12-24 20:32:05 +02:00
author : {
2021-04-03 16:43:02 +03:00
name : "attronaldo" ,
2020-12-24 20:32:05 +02:00
},
2021-04-03 16:43:02 +03:00
tags : [ "иибрт" , "иее" ],
2020-12-24 20:32:05 +02:00
answered : false ,
2020-12-26 02:22:37 +02:00
comments : 2 ,
votes : 2 ,
2020-12-24 20:32:05 +02:00
},
{
id : 3 ,
2021-04-03 16:43:02 +03:00
title : "Who is Nikolenko?" ,
2020-12-24 20:32:05 +02:00
author : {
2021-04-03 16:43:02 +03:00
name : "donald" ,
2020-12-24 20:32:05 +02:00
},
2021-04-03 16:43:02 +03:00
tags : [ "ибэит" , "иее" , "иибрт" , "ИПИГ" ],
2020-12-24 20:32:05 +02:00
answered : false ,
2020-12-26 02:22:37 +02:00
comments : 10 ,
votes : 10 ,
2020-12-24 20:32:05 +02:00
},
{
id : 4 ,
2021-04-03 16:43:02 +03:00
title : "Archive discussion button" ,
2020-12-24 20:32:05 +02:00
author : {
2021-04-03 16:43:02 +03:00
name : "acharlesvv" ,
2020-12-24 20:32:05 +02:00
},
tags : [
2021-04-03 16:43:02 +03:00
"ИЭКСУ" ,
"ИМБТ" ,
"ИМИ" ,
"ИПТДМ" ,
"ИИИР" ,
"ГФ" ,
"ХТФ" ,
"ИДЗО" ,
"УИИ" ,
"УНИ" ,
2020-12-24 20:32:05 +02:00
],
answered : false ,
2020-12-26 02:22:37 +02:00
comments : 15 ,
votes : 15 ,
2021-04-03 16:43:02 +03:00
},
{
2020-12-26 02:22:37 +02:00
id : 1 ,
2021-04-03 16:43:02 +03:00
title : "How do I pass Anicimov?" ,
2020-12-26 02:22:37 +02:00
author : {
2021-04-03 16:43:02 +03:00
name : "rotimibest" ,
2020-12-26 02:22:37 +02:00
},
2021-04-03 16:43:02 +03:00
tags : [ "ибэит" , "икс" ],
2020-12-26 02:22:37 +02:00
answered : false ,
comments : 7 ,
votes : 7 ,
},
{
id : 2 ,
2021-04-03 16:43:02 +03:00
title : "Where do I find the nearest restaurant?" ,
2020-12-26 02:22:37 +02:00
author : {
2021-04-03 16:43:02 +03:00
name : "attronaldo" ,
2020-12-26 02:22:37 +02:00
},
2021-04-03 16:43:02 +03:00
tags : [ "иибрт" , "иее" ],
2020-12-26 02:22:37 +02:00
answered : false ,
comments : 4 ,
votes : 4 ,
},
{
id : 3 ,
2021-04-03 16:43:02 +03:00
title : "Who is Nikolenko?" ,
2020-12-26 02:22:37 +02:00
author : {
2021-04-03 16:43:02 +03:00
name : "donald" ,
2020-12-26 02:22:37 +02:00
},
2021-04-03 16:43:02 +03:00
tags : [ "ибэит" , "иее" , "иибрт" , "ИПИГ" ],
2020-12-26 02:22:37 +02:00
answered : false ,
comments : 100 ,
votes : 100 ,
},
{
id : 4 ,
2021-04-03 16:43:02 +03:00
title : "Archive discussion button" ,
2020-12-26 02:22:37 +02:00
author : {
2021-04-03 16:43:02 +03:00
name : "acharlesvv" ,
2020-12-26 02:22:37 +02:00
},
tags : [
2021-04-03 16:43:02 +03:00
"ИЭКСУ" ,
"ИМБТ" ,
"ИМИ" ,
"ИПТДМ" ,
"ИИИР" ,
"ГФ" ,
"ХТФ" ,
"ИДЗО" ,
"УИИ" ,
"УНИ" ,
2020-12-26 02:22:37 +02:00
],
answered : false ,
comments : 5 ,
votes : 5 ,
2021-04-03 16:43:02 +03:00
},
2020-12-26 02:22:37 +02:00
];
2020-12-24 20:32:05 +02:00
</ script >
< style >
2021-04-03 16:43:02 +03:00
. root {
max-width : 600 px ;
}
. root . title {
font-size : 20 px ;
margin-left : 10 px ;
}
2020-12-24 20:32:05 +02:00
. discussion-box {
2021-04-03 16:43:02 +03:00
border : 1 px solid #eaecef ;
2020-12-24 20:32:05 +02:00
display : flex ;
2020-12-26 02:22:37 +02:00
align-items : flex-start ;
2020-12-24 20:32:05 +02:00
padding : 16 px ;
2021-04-03 16:43:02 +03:00
border-radius : 10 px ;
margin : 20 px auto ;
2020-12-24 20:32:05 +02:00
}
h4 {
font-size : 16 px ;
font-weight : 900 ;
word-break : break-word ;
overflow-wrap : break-word ;
margin : 0 ;
}
2021-04-03 16:43:02 +03:00
. discussion-topic-author {
margin-right : 20 px ;
}
. discussion-topic-author span {
2020-12-24 20:32:05 +02:00
color : #586069 ;
2020-12-29 19:05:00 +02:00
font-size : 12 px ;
2021-04-03 16:43:02 +03:00
}
2020-12-24 20:32:05 +02:00
</ style >
2021-04-03 16:43:02 +03:00
< svelte:head >
< title > Unidiscuss - Help students in your university</ title >
</ svelte:head >
< div class = "root md:w-3/4 mx-auto md:mb-20 md:pr-5" >
< h4 class = "title" > Разговоры</ h4 >
{ #each discussions as discussion }
< div class = "discussion-box" >
< Vote value = { discussion . votes } / >
< 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" >
< AddComment20 />
< span >{ discussion . comments }</ span >
</ div >
</ div >
{ /each }
</ div >