diff --git a/src/index.pug b/src/index.pug index 7f2880c..cd05f30 100644 --- a/src/index.pug +++ b/src/index.pug @@ -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) @@ -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)) diff --git a/src/menu-left.pug b/src/menu-left.pug index b7e91cb..aad37e7 100644 --- a/src/menu-left.pug +++ b/src/menu-left.pug @@ -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') diff --git a/src/page-polls.pug b/src/page-polls.pug new file mode 100644 index 0000000..2caf838 --- /dev/null +++ b/src/page-polls.pug @@ -0,0 +1,2 @@ +.views-container + solid-poll(data-src=`${endpoints.polls || (endpoints.get && endpoints.get.polls)}`) \ No newline at end of file diff --git a/src/styles/index.scss b/src/styles/index.scss index 1458359..655ce6f 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -22,4 +22,5 @@ @import 'layout/user/index'; @import 'layout/events/index'; @import 'layout/dashboard/index'; + @import 'layout/polls/index'; } \ No newline at end of file diff --git a/src/styles/layout/polls/_index.scss b/src/styles/layout/polls/_index.scss new file mode 100644 index 0000000..572a53f --- /dev/null +++ b/src/styles/layout/polls/_index.scss @@ -0,0 +1 @@ +@import '_polls.scss'; \ No newline at end of file diff --git a/src/styles/layout/polls/_polls.scss b/src/styles/layout/polls/_polls.scss new file mode 100644 index 0000000..0c96298 --- /dev/null +++ b/src/styles/layout/polls/_polls.scss @@ -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; + } +} \ No newline at end of file