Merge branch 'feature/sib-poll' into feature/resource-component

This commit is contained in:
Benoit Alessandroni 2020-08-11 17:10:55 +02:00
commit 04821836b7
6 changed files with 71 additions and 3 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,10 +75,13 @@ 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)
@ -86,7 +94,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

@ -73,6 +73,10 @@ solid-router#navbar-router(default-route='dashboard')
solid-route.menu(name='resources')
div.menu-label Ressources
div.menu-icon.icon-docs
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

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

@ -23,5 +23,6 @@
@import 'layout/events/index';
@import 'layout/resources/index';
@import 'layout/dashboard/index';
@import 'layout/polls/index';
}
@import '../../client.sample.etuc.scss';
@import '../../client.sample.etuc.scss';

View File

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

View File

@ -0,0 +1,52 @@
#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;
}
}
}
}
}
}
}
}
}
/*personnalise css on poll page*/
#pollPage{
width: 85%;
margin: auto;
solid-display.topline{
>div:first-of-type{
*[name="right"]{
etuc-display-votetags{
>div{
width: 64px;
height: 24px;
p{
font-size: 11px;
}
}
}
}
}
}
}
}