feature : implementing solid-poll + css customisations

This commit is contained in:
senza 2020-08-08 14:11:18 +02:00
parent 82f8575d64
commit 5a323381cc
6 changed files with 55 additions and 2 deletions

View File

@ -13,6 +13,11 @@ html(lang="en")
include dependencies.pug
if clientCSS
link(rel='stylesheet', href=`${clientCSS}`)
if endpoints.polls || (endpoints.get && endpoints.get.polls)
script(type="module" src="/lib/sib-polls-component/index.js" defer)
//- script(type="module" src="/lib/sib-event-component/sib-event.js" defer)
body
.wrapper
@ -70,11 +75,14 @@ html(lang="en")
hubl-reactivity(bind-user nested-field="circles" target-src=`${endpoints.circles || endpoints.get.circles}`)
hubl-reactivity(bind-user nested-field="circles" target-src=`${endpoints.circles || endpoints.get.circles}joinable/`)
include page-circle.pug
if endpoints.users || (endpoints.get && endpoints.get.users)
#messages(hidden).with-sidebar
include page-messages.pug
if endpoints.polls || (endpoints.get && endpoints.get.polls)
#polls(hidden).with-sidebar
include page-polls.pug
if endpoints.events || (endpoints.get && endpoints.get.events)
#events(hidden)
include page-events.pug
@ -82,7 +90,7 @@ html(lang="en")
#admin(hidden).with-sidebar
include page-admin.pug
#about.no-sidebar.with-padding
#about(hidden).no-sidebar.with-padding
include page-about.pug
if (endpoints.skills || (endpoints.get && endpoints.get.skills)) && (endpoints.uploads || (endpoints.post && endpoints.post.uploads)) && (endpoints.users || (endpoints.post && endpoints.post.users))

View File

@ -69,6 +69,11 @@ solid-router#navbar-router(default-route='dashboard')
div.menu-label Evènements
div.menu-icon.icon-calendar
div.divider
if endpoints.polls || (endpoints.get && endpoints.get.polls)
solid-route.menu(name='polls')
div.menu-label Gouvernance
div.menu-icon.icon-calendar
div.divider
if endpoints.projects || (endpoints.get && endpoints.get.projects)
div
solid-link(next='admin-project-list')

2
src/page-polls.pug Normal file
View File

@ -0,0 +1,2 @@
.views-container
solid-poll(data-src=`${endpoints.polls || (endpoints.get && endpoints.get.polls)}`)

View File

@ -22,4 +22,5 @@
@import 'layout/user/index';
@import 'layout/events/index';
@import 'layout/dashboard/index';
@import 'layout/polls/index';
}

View File

@ -0,0 +1 @@
@import '_polls.scss';

View File

@ -0,0 +1,36 @@
#polls{
h2{
text-transform: inherit;
}
/*style of poll listing*/
#pollListing{
width: 90%;
margin: auto;
.all-polls{
/*make 3 polls per line*/
div:first-of-type{
solid-display{
width: 330px;
>div:first-of-type{
*[name="body"]{
/*size of tags of poll card*/
etuc-display-votetags{
>div{
width: 64px;
height: 24px;
p{
font-size: 11px;
}
}
}
}
}
}
}
}
}
#pollPage{
width: 85%;
margin: auto;
}
}