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