all in one commit: feat: add countdown integration
fix: home nav icon spacing fix: various typos correction fix: right email texts
This commit is contained in:
parent
bac5347c65
commit
9002086180
19 changed files with 147 additions and 50 deletions
|
@ -6,34 +6,37 @@ const hoursContainer = document.getElementById('hours')
|
||||||
const minutesContainer = document.getElementById('minutes')
|
const minutesContainer = document.getElementById('minutes')
|
||||||
const secondsContainer = document.getElementById('seconds')
|
const secondsContainer = document.getElementById('seconds')
|
||||||
|
|
||||||
let target = new Date("2020-09-04 15:00:00")
|
|
||||||
|
|
||||||
let shown = false
|
let shown = false
|
||||||
|
|
||||||
|
const enableReload = window.location.pathname.indexOf('c') === -1
|
||||||
|
|
||||||
function render() {
|
function render() {
|
||||||
let current = new Date()
|
let current = new Date()
|
||||||
let difference = target - current
|
let difference = openDate - current
|
||||||
|
|
||||||
var _second = 1000,
|
var _second = 1000,
|
||||||
_minute = _second * 60,
|
_minute = _second * 60,
|
||||||
_hour = _minute * 60,
|
_hour = _minute * 60,
|
||||||
_day = _hour * 24;
|
_day = _hour * 24
|
||||||
|
|
||||||
var days = Math.floor(difference / _day),
|
var days = Math.floor(difference / _day),
|
||||||
hours = Math.floor((difference % _day) / _hour),
|
hours = Math.floor((difference % _day) / _hour),
|
||||||
minutes = Math.floor((difference % _hour) / _minute),
|
minutes = Math.floor((difference % _hour) / _minute),
|
||||||
seconds = Math.floor((difference % _minute) / _second);
|
seconds = Math.floor((difference % _minute) / _second)
|
||||||
|
|
||||||
days = (String(days).length >= 2) ? days : '0' + days;
|
days = (String(days).length >= 2) ? days : '0' + days
|
||||||
hours = (String(hours).length >= 2) ? hours : '0' + hours;
|
hours = (String(hours).length >= 2) ? hours : '0' + hours
|
||||||
minutes = (String(minutes).length >= 2) ? minutes : '0' + minutes;
|
minutes = (String(minutes).length >= 2) ? minutes : '0' + minutes
|
||||||
seconds = (String(seconds).length >= 2) ? seconds : '0' + seconds;
|
seconds = (String(seconds).length >= 2) ? seconds : '0' + seconds
|
||||||
|
|
||||||
daysContainer.textContent = days
|
if (openDate <= current && enableReload) {
|
||||||
hoursContainer.textContent = hours
|
window.location.reload(false)
|
||||||
minutesContainer.textContent = minutes
|
} else {
|
||||||
secondsContainer.textContent = seconds
|
daysContainer.textContent = days
|
||||||
|
hoursContainer.textContent = hours
|
||||||
|
minutesContainer.textContent = minutes
|
||||||
|
secondsContainer.textContent = seconds
|
||||||
|
}
|
||||||
if (!shown) {
|
if (!shown) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
countdown.style.opacity = 1
|
countdown.style.opacity = 1
|
||||||
|
|
|
@ -160,7 +160,13 @@ function enableTag(node) {
|
||||||
if (!all) {
|
if (!all) {
|
||||||
tagId = node.attributes['data-tag-id'].value
|
tagId = node.attributes['data-tag-id'].value
|
||||||
}
|
}
|
||||||
let data = organizations.filter(orga => orga.tags.filter(id => id === tagId).length > 0 || all)
|
let data = organizations
|
||||||
|
.filter(orga => orga.tags.filter(id => id === tagId).length > 0 || all)
|
||||||
|
.sort((a, b) => {
|
||||||
|
var textA = a.name.toUpperCase()
|
||||||
|
var textB = b.name.toUpperCase()
|
||||||
|
return (textA < textB) ? -1 : (textA > textB) ? 1 : 0;
|
||||||
|
})
|
||||||
renderMosaic(data)
|
renderMosaic(data)
|
||||||
node.className += ' enabled'
|
node.className += ' enabled'
|
||||||
if (currentTag !== null) {
|
if (currentTag !== null) {
|
||||||
|
@ -168,7 +174,7 @@ function enableTag(node) {
|
||||||
}
|
}
|
||||||
currentTag = node
|
currentTag = node
|
||||||
if (data === undefined || data === null || data.length <= 0) {
|
if (data === undefined || data === null || data.length <= 0) {
|
||||||
mosaicHeader.textContent = "Aucune associations listées"
|
mosaicHeader.textContent = "Aucune association listée"
|
||||||
} else if (data.length === 1) {
|
} else if (data.length === 1) {
|
||||||
mosaicHeader.textContent = "Une association listée"
|
mosaicHeader.textContent = "Une association listée"
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -103,17 +103,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-icon {
|
.nav-icon {
|
||||||
width: 3em;
|
width: 1em;
|
||||||
padding-left: .5em;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: start;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
color: #C28200;
|
color: #C28200;
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
|
margin-left: 0.25em;
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-item-content {
|
.nav-item-content {
|
||||||
|
margin-left: 1em;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -344,7 +344,7 @@ section {
|
||||||
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
transition: max-height 0.1s ease-out;
|
transition: max-height 0.1s ease-out;
|
||||||
|
text-align: justify;
|
||||||
}
|
}
|
||||||
|
|
||||||
.description-actions-container {
|
.description-actions-container {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
const countdown=document.getElementById("countdown"),counter=document.getElementById("counter"),daysContainer=document.getElementById("days"),hoursContainer=document.getElementById("hours"),minutesContainer=document.getElementById("minutes"),secondsContainer=document.getElementById("seconds");let target=new Date("2020-09-04 15:00:00"),shown=!1;function render(){let e=new Date,t=target-e;var n=Math.floor(t/864e5),o=Math.floor(t%864e5/36e5),r=Math.floor(t%36e5/6e4),d=Math.floor(t%6e4/1e3);n=String(n).length>=2?n:"0"+n,o=String(o).length>=2?o:"0"+o,r=String(r).length>=2?r:"0"+r,d=String(d).length>=2?d:"0"+d,daysContainer.textContent=n,hoursContainer.textContent=o,minutesContainer.textContent=r,secondsContainer.textContent=d,shown||setTimeout(()=>{countdown.style.opacity=1,shown=!0},300)}render(),setInterval(render,1e3);
|
const countdown=document.getElementById("countdown"),counter=document.getElementById("counter"),daysContainer=document.getElementById("days"),hoursContainer=document.getElementById("hours"),minutesContainer=document.getElementById("minutes"),secondsContainer=document.getElementById("seconds");let shown=!1;const enableReload=-1===window.location.pathname.indexOf("c");function render(){let e=new Date,n=openDate-e;var t=Math.floor(n/864e5),o=Math.floor(n%864e5/36e5),a=Math.floor(n%36e5/6e4),d=Math.floor(n%6e4/1e3);t=String(t).length>=2?t:"0"+t,o=String(o).length>=2?o:"0"+o,a=String(a).length>=2?a:"0"+a,d=String(d).length>=2?d:"0"+d,openDate<=e&&enableReload?window.location.reload(!1):(daysContainer.textContent=t,hoursContainer.textContent=o,minutesContainer.textContent=a,secondsContainer.textContent=d),shown||setTimeout(()=>{countdown.style.opacity=1,shown=!0},300)}render(),setInterval(render,1e3);
|
|
@ -1 +1 @@
|
||||||
let navOpened=!1,oldNavText="",oldNavIcon="",navEnabler=document.getElementById("nav-enabler"),navEnablerText=document.getElementById("nav-enabler-text"),navEnablerIcon=document.getElementById("nav-enabler-icon"),navContent=document.getElementById("nav-content"),mosaic=document.getElementById("mosaic"),mosaicHeader=document.getElementById("mosaic-header"),tags=[];function createEl(e=!1,n="div"){let t=document.createElement(n);return 0!=e&&(t.className=e),t}function renderNavItem(e){let n=createEl("nav-item"),t=createEl("nav-icon"),a=createEl(e.icon,"i");t.appendChild(a),n.appendChild(t);let r=createEl("nav-item-content"),l=createEl("nav-title");l.textContent=e.name,r.appendChild(l);let i=createEl("nav-access"),o=createEl("fas fa-chevron-right","i");return i.appendChild(o),r.appendChild(l),r.appendChild(i),n.appendChild(r),n}function setAttributes(e,n){for(var t in n)attr=document.createAttribute(t),attr.value=n[t],e.attributes.setNamedItem(attr)}function renderCard(e){let n=createEl("card","a"),t=createEl("card-image-container"),a=createEl("card-image");a.style=`background-image: url('${mediaBaseUrl+"/"+e.thumbnail}')`,t.appendChild(a),n.appendChild(t);let r=createEl("card-content"),l=createEl(),i=createEl("card-title-container"),o=createEl("card-title","h2");o.textContent=e.name,i.appendChild(o);let c=createEl("card-icon");if(Array.isArray(e.tags)&&e.tags.length>0){let n=tags.filter(n=>e.tags[0]===n._id)[0];c.innerHTML=n.iconHTML}i.appendChild(c),l.appendChild(i);let d=createEl("card-description");d.textContent=e.description;let s="/association/"+e.slug;return isProposed&&(s+="?version=proposed"),l.appendChild(d),r.appendChild(l),n.appendChild(r),n.href=s,n}navEnabler.onclick=async()=>{navOpened?(navEnablerText.textContent=oldNavText,navEnablerIcon.style.transform="rotate(0deg)",navContent.style.maxHeight=null):(oldNavText=navEnablerText.textContent,navEnablerText.textContent="Minimiser le menu",navEnablerIcon.style.transform="rotate(90eg)",navContent.style.maxHeight=navContent.scrollHeight+"px"),navOpened=!navOpened};let currentTag=null,currentCardContainer=null;function enableTag(e){let n="nav-all"===e.id,t="";n||(t=e.attributes["data-tag-id"].value);let a=organizations.filter(e=>e.tags.filter(e=>e===t).length>0||n);renderMosaic(a),e.className+=" enabled",null!==currentTag&&(currentTag.className=currentTag.className.replace("enabled","")),currentTag=e,null==a||a.length<=0?mosaicHeader.textContent="Aucune associations listées":1===a.length?mosaicHeader.textContent="Une association listée":mosaicHeader.textContent=a.length+" associations listées"}function posY(e){for(var n=e,t=0;n&&"body"!==n.tagName.toLowerCase();)t+=n.offsetTop,n=n.offsetParent;return t}function viewPortHeight(){var e=document.documentElement;return window.innerWidth?window.innerHeight:e&&!isNaN(e.clientHeight)?e.clientHeight:0}function scrollY(){return window.pageYOffset?window.pageYOffset:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}function isVisible(e){var n=viewPortHeight(),t=scrollY();return!(posY(e)>n+t)}let rendering=!0,page=0,elementsPerPage=5,focusPoint=null,focusElementPos=2,cardContainer=null,currentOrganizations=[],pageCount=0;function renderPage(){rendering=!0;let e=currentOrganizations.slice(page*elementsPerPage,(page+1)*elementsPerPage);e.forEach((n,t)=>{let a=renderCard(n);cardContainer.appendChild(a),t===e.length-focusElementPos&&(focusPoint=a)}),rendering=!1}function renderMosaic(e){cardContainer=createEl("card-container"),currentOrganizations=e,pageCount=Math.floor(e.length/elementsPerPage),renderPage(),null!==currentCardContainer&&mosaic.removeChild(currentCardContainer),currentCardContainer=cardContainer,mosaic.appendChild(cardContainer)}window.onscroll=()=>{null!=focusPoint&&isVisible(focusPoint)&&!rendering&&page+1<pageCount&&(page++,renderPage())},window.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll("#nav-content .nav-item").forEach(e=>{e.onclick=()=>enableTag(e),"nav-all"!==e.id&&tags.push({_id:e.attributes["data-tag-id"].value,iconHTML:e.querySelector(".nav-icon").innerHTML})}),enableTag(document.getElementById("nav-all"))});
|
let navOpened=!1,oldNavText="",oldNavIcon="",navEnabler=document.getElementById("nav-enabler"),navEnablerText=document.getElementById("nav-enabler-text"),navEnablerIcon=document.getElementById("nav-enabler-icon"),navContent=document.getElementById("nav-content"),mosaic=document.getElementById("mosaic"),mosaicHeader=document.getElementById("mosaic-header"),tags=[];function createEl(e=!1,n="div"){let t=document.createElement(n);return 0!=e&&(t.className=e),t}function renderNavItem(e){let n=createEl("nav-item"),t=createEl("nav-icon"),a=createEl(e.icon,"i");t.appendChild(a),n.appendChild(t);let r=createEl("nav-item-content"),l=createEl("nav-title");l.textContent=e.name,r.appendChild(l);let o=createEl("nav-access"),i=createEl("fas fa-chevron-right","i");return o.appendChild(i),r.appendChild(l),r.appendChild(o),n.appendChild(r),n}function setAttributes(e,n){for(var t in n)attr=document.createAttribute(t),attr.value=n[t],e.attributes.setNamedItem(attr)}function renderCard(e){let n=createEl("card","a"),t=createEl("card-image-container"),a=createEl("card-image");a.style=`background-image: url('${mediaBaseUrl+"/"+e.thumbnail}')`,t.appendChild(a),n.appendChild(t);let r=createEl("card-content"),l=createEl(),o=createEl("card-title-container"),i=createEl("card-title","h2");i.textContent=e.name,o.appendChild(i);let c=createEl("card-icon");if(Array.isArray(e.tags)&&e.tags.length>0){let n=tags.filter(n=>e.tags[0]===n._id)[0];c.innerHTML=n.iconHTML}o.appendChild(c),l.appendChild(o);let d=createEl("card-description");d.textContent=e.description;let s="/association/"+e.slug;return isProposed&&(s+="?version=proposed"),l.appendChild(d),r.appendChild(l),n.appendChild(r),n.href=s,n}navEnabler.onclick=async()=>{navOpened?(navEnablerText.textContent=oldNavText,navEnablerIcon.style.transform="rotate(0deg)",navContent.style.maxHeight=null):(oldNavText=navEnablerText.textContent,navEnablerText.textContent="Minimiser le menu",navEnablerIcon.style.transform="rotate(90eg)",navContent.style.maxHeight=navContent.scrollHeight+"px"),navOpened=!navOpened};let currentTag=null,currentCardContainer=null;function enableTag(e){let n="nav-all"===e.id,t="";n||(t=e.attributes["data-tag-id"].value);let a=organizations.filter(e=>e.tags.filter(e=>e===t).length>0||n).sort((e,n)=>{var t=e.name.toUpperCase(),a=n.name.toUpperCase();return t<a?-1:t>a?1:0});renderMosaic(a),e.className+=" enabled",null!==currentTag&&(currentTag.className=currentTag.className.replace("enabled","")),currentTag=e,null==a||a.length<=0?mosaicHeader.textContent="Aucune association listée":1===a.length?mosaicHeader.textContent="Une association listée":mosaicHeader.textContent=a.length+" associations listées"}function posY(e){for(var n=e,t=0;n&&"body"!==n.tagName.toLowerCase();)t+=n.offsetTop,n=n.offsetParent;return t}function viewPortHeight(){var e=document.documentElement;return window.innerWidth?window.innerHeight:e&&!isNaN(e.clientHeight)?e.clientHeight:0}function scrollY(){return window.pageYOffset?window.pageYOffset:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}function isVisible(e){var n=viewPortHeight(),t=scrollY();return!(posY(e)>n+t)}let rendering=!0,page=0,elementsPerPage=5,focusPoint=null,focusElementPos=2,cardContainer=null,currentOrganizations=[],pageCount=0;function renderPage(){rendering=!0;let e=currentOrganizations.slice(page*elementsPerPage,(page+1)*elementsPerPage);e.forEach((n,t)=>{let a=renderCard(n);cardContainer.appendChild(a),t===e.length-focusElementPos&&(focusPoint=a)}),rendering=!1}function renderMosaic(e){cardContainer=createEl("card-container"),currentOrganizations=e,pageCount=Math.floor(e.length/elementsPerPage),renderPage(),null!==currentCardContainer&&mosaic.removeChild(currentCardContainer),currentCardContainer=cardContainer,mosaic.appendChild(cardContainer)}window.onscroll=()=>{null!=focusPoint&&isVisible(focusPoint)&&!rendering&&page+1<pageCount&&(page++,renderPage())},window.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll("#nav-content .nav-item").forEach(e=>{e.onclick=()=>enableTag(e),"nav-all"!==e.id&&tags.push({_id:e.attributes["data-tag-id"].value,iconHTML:e.querySelector(".nav-icon").innerHTML})}),enableTag(document.getElementById("nav-all"))});
|
|
@ -1 +1 @@
|
||||||
.header{padding-bottom:1.5em;padding-top:1.5em;background-color:#d35400}.header-container{position:relative;display:flex;justify-content:space-between}.header-left{display:flex}.header-menu{position:absolute;right:0;bottom:0;display:flex;align-items:flex-end}.header-menu a{color:#fff;margin-right:1em}.header-menu a:last-of-type{margin-right:0}.header-image{margin-right:3em}.header-image img{width:7em}.header-content{display:flex;flex-direction:column;justify-content:space-between;padding-top:1em;padding-bottom:1em}.header-title{font-family:'Roboto Slab',serif;margin:0;color:#fff;font-weight:500;font-size:2.5em}.header-sub-title{margin:0;text-decoration:underline;font-weight:100;color:#ecf0f1;transition:opacity .2s}.header-sub-title:hover{opacity:.9;color:#ecf0f1}.header-description{color:#ecf0f1}.content{margin-top:1.5em;display:flex}.nav{margin-right:2em}.nav-item{width:15em;padding:1em;border-radius:4px;margin-bottom:.7em;border:3px solid rgba(255,111,10,.7);display:flex;cursor:pointer;transition:ease-in-out .1s;height:1.2em}.nav-item svg{width:.75em;height:.75em}.nav-icon{width:3em;padding-left:.5em;display:flex;justify-content:start;align-items:center;color:#c28200;font-size:1.5em;opacity:.7}.nav-item-content{display:flex;justify-content:space-between;width:100%}.nav-title{display:flex;align-items:center;opacity:.7}.nav-access{display:flex;align-items:center;color:#ff6f0a;opacity:.7}.nav-item.enabled{border-color:#ff6f0a}.nav-item.enabled .nav-access{opacity:1}.nav-item.enabled .nav-icon{opacity:1}.nav-item.enabled .nav-title{opacity:1}.nav-item:hover{transform:scale(1.05)}#nav-enabler{display:none}.mosaic{background:#fff;width:100%}.mosaic-header{width:100%;opacity:.8;text-align:right;margin-bottom:1.5em}.card-container{margin:0 auto;width:85%}.card{cursor:pointer;display:flex;border:1px solid #bdc3c7;border-radius:4px;margin-bottom:1em;box-shadow:0 0 8px 0 rgba(0,0,0,.1);overflow:hidden;text-decoration:none;transition:transform .2s ease-in-out}.card:hover{text-decoration:none}.card-image-container{border-right:1px solid #c4c4c4;display:flex;justify-content:center;align-items:center;padding:1em}.card-image{height:12em;width:12em;background-position:center;background-size:cover;transition:all .2s ease-in-out;border:0;outline:0;box-shadow:0}.card-image:hover{transform:scale(1.1)}.card-content{width:100%;padding:1.5em;display:flex;flex-direction:column;justify-content:space-between}.card-title-container{display:flex;justify-content:space-between}.card-icon{color:#c28200;opacity:.85;margin-top:-.5em;margin-right:-.5em;font-size:1.4em}.card-icon svg{width:1em;height:1em}.card-title{color:#b12008;margin:0;margin-bottom:.5em}.card-description{color:#34495e;margin:0;line-height:1.6em;position:relative}.card-link{position:absolute;right:.5em;bottom:0;margin-bottom:-.5em}@media (max-width:1350px){.card-container{width:100%}.header-left{padding-bottom:1em}}@media (max-width:1000px){.header{padding-top:1em;padding-bottom:1em}.header-container{display:block}.header-left{display:block}.header-menu{justify-content:center;position:relative;margin-top:0}.header-content{padding:0}.header-image{margin:0;text-align:center}.header-image img{width:6em}.header-sub-title{margin-top:1em;text-align:center}.header-title{text-align:center;margin-bottom:.25em}.header-description{text-align:center}.content{display:block}.nav{margin-right:0;user-select:none}#nav-enabler{display:flex}#nav-enabler-icon{transform:rotate(-90deg)}#nav-content{max-height:0;transition:max-height .1s ease-out}.nav-item{width:auto}.nav-mobile-enabler #nav-enabler-icon{transition:all .1s ease}.mosaic{position:relative;border-top:1px solid #c4c4c4;padding-top:1em}.mosaic-header{text-align:center}.card{display:block}.card-image-container{padding:0;margin:0;border-right:0;border-bottom:1px solid #c4c4c4}.card-content{width:auto}}
|
.header{padding-bottom:1.5em;padding-top:1.5em;background-color:#d35400}.header-container{position:relative;display:flex;justify-content:space-between}.header-left{display:flex}.header-menu{position:absolute;right:0;bottom:0;display:flex;align-items:flex-end}.header-menu a{color:#fff;margin-right:1em}.header-menu a:last-of-type{margin-right:0}.header-image{margin-right:3em}.header-image img{width:7em}.header-content{display:flex;flex-direction:column;justify-content:space-between;padding-top:1em;padding-bottom:1em}.header-title{font-family:'Roboto Slab',serif;margin:0;color:#fff;font-weight:500;font-size:2.5em}.header-sub-title{margin:0;text-decoration:underline;font-weight:100;color:#ecf0f1;transition:opacity .2s}.header-sub-title:hover{opacity:.9;color:#ecf0f1}.header-description{color:#ecf0f1}.content{margin-top:1.5em;display:flex}.nav{margin-right:2em}.nav-item{width:15em;padding:1em;border-radius:4px;margin-bottom:.7em;border:3px solid rgba(255,111,10,.7);display:flex;cursor:pointer;transition:ease-in-out .1s;height:1.2em}.nav-item svg{width:.75em;height:.75em}.nav-icon{width:1em;display:flex;justify-content:center;align-items:center;color:#c28200;font-size:1.5em;margin-left:.25em;opacity:.7}.nav-item-content{margin-left:1em;display:flex;justify-content:space-between;width:100%}.nav-title{display:flex;align-items:center;opacity:.7}.nav-access{display:flex;align-items:center;color:#ff6f0a;opacity:.7}.nav-item.enabled{border-color:#ff6f0a}.nav-item.enabled .nav-access{opacity:1}.nav-item.enabled .nav-icon{opacity:1}.nav-item.enabled .nav-title{opacity:1}.nav-item:hover{transform:scale(1.05)}#nav-enabler{display:none}.mosaic{background:#fff;width:100%}.mosaic-header{width:100%;opacity:.8;text-align:right;margin-bottom:1.5em}.card-container{margin:0 auto;width:85%}.card{cursor:pointer;display:flex;border:1px solid #bdc3c7;border-radius:4px;margin-bottom:1em;box-shadow:0 0 8px 0 rgba(0,0,0,.1);overflow:hidden;text-decoration:none;transition:transform .2s ease-in-out}.card:hover{text-decoration:none}.card-image-container{border-right:1px solid #c4c4c4;display:flex;justify-content:center;align-items:center;padding:1em}.card-image{height:12em;width:12em;background-position:center;background-size:cover;transition:all .2s ease-in-out;border:0;outline:0;box-shadow:0}.card-image:hover{transform:scale(1.1)}.card-content{width:100%;padding:1.5em;display:flex;flex-direction:column;justify-content:space-between}.card-title-container{display:flex;justify-content:space-between}.card-icon{color:#c28200;opacity:.85;margin-top:-.5em;margin-right:-.5em;font-size:1.4em}.card-icon svg{width:1em;height:1em}.card-title{color:#b12008;margin:0;margin-bottom:.5em}.card-description{color:#34495e;margin:0;line-height:1.6em;position:relative}.card-link{position:absolute;right:.5em;bottom:0;margin-bottom:-.5em}@media (max-width:1350px){.card-container{width:100%}.header-left{padding-bottom:1em}}@media (max-width:1000px){.header{padding-top:1em;padding-bottom:1em}.header-container{display:block}.header-left{display:block}.header-menu{justify-content:center;position:relative;margin-top:0}.header-content{padding:0}.header-image{margin:0;text-align:center}.header-image img{width:6em}.header-sub-title{margin-top:1em;text-align:center}.header-title{text-align:center;margin-bottom:.25em}.header-description{text-align:center}.content{display:block}.nav{margin-right:0;user-select:none}#nav-enabler{display:flex}#nav-enabler-icon{transform:rotate(-90deg)}#nav-content{max-height:0;transition:max-height .1s ease-out}.nav-item{width:auto}.nav-mobile-enabler #nav-enabler-icon{transition:all .1s ease}.mosaic{position:relative;border-top:1px solid #c4c4c4;padding-top:1em}.mosaic-header{text-align:center}.card{display:block}.card-image-container{padding:0;margin:0;border-right:0;border-bottom:1px solid #c4c4c4}.card-content{width:auto}}
|
File diff suppressed because one or more lines are too long
|
@ -17,6 +17,8 @@ import EmailService from './EmailService'
|
||||||
import ErrorController from './controllers/ErrorController'
|
import ErrorController from './controllers/ErrorController'
|
||||||
import { createProxyMiddleware, Filter, Options, RequestHandler } from 'http-proxy-middleware';
|
import { createProxyMiddleware, Filter, Options, RequestHandler } from 'http-proxy-middleware';
|
||||||
|
|
||||||
|
process.env.TZ = "Europe/Paris"
|
||||||
|
|
||||||
process.on('unhandledRejection', (err) => {
|
process.on('unhandledRejection', (err) => {
|
||||||
console.error(err)
|
console.error(err)
|
||||||
console.log('unhandledRejection!')
|
console.log('unhandledRejection!')
|
||||||
|
@ -58,7 +60,7 @@ let main = async () => {
|
||||||
app.use(bodyParser.json())
|
app.use(bodyParser.json())
|
||||||
|
|
||||||
app.get('/', PublicController.home)
|
app.get('/', PublicController.home)
|
||||||
app.get('/countdown', PublicController.countdown)
|
app.get('/c', PublicController.countdown)
|
||||||
app.get('/association/:slug', PublicController.organization)
|
app.get('/association/:slug', PublicController.organization)
|
||||||
app.get('/a-propos', PublicController.about)
|
app.get('/a-propos', PublicController.about)
|
||||||
app.get('/mentions-legales', PublicController.legals)
|
app.get('/mentions-legales', PublicController.legals)
|
||||||
|
|
|
@ -334,7 +334,7 @@ export default class AdminOrganizationController {
|
||||||
static sendEmailTokenUniversal(data: Document) {
|
static sendEmailTokenUniversal(data: Document) {
|
||||||
EmailService.send(
|
EmailService.send(
|
||||||
data.get('email'),
|
data.get('email'),
|
||||||
"Votre lien secret pour modifier votre association",
|
"Votre lien pour l’inscription de votre association",
|
||||||
"token",
|
"token",
|
||||||
{
|
{
|
||||||
adminName: data.get('adminName'),
|
adminName: data.get('adminName'),
|
||||||
|
|
|
@ -16,17 +16,27 @@ import MediaService from '../MediaService'
|
||||||
export default class PublicController {
|
export default class PublicController {
|
||||||
|
|
||||||
static async countdown(req: express.Request, res: express.Response) {
|
static async countdown(req: express.Request, res: express.Response) {
|
||||||
res.render('countdown.twig', {})
|
res.render('countdown.twig', {
|
||||||
|
openDate: process.env.OPEN_DATE
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
static async home(req: express.Request, res: express.Response) {
|
static async home(req: express.Request, res: express.Response) {
|
||||||
|
let isProposed = Utils.isStrUsable(req.query, 'only')
|
||||||
|
let byPass = req.query.bypass != null
|
||||||
|
let target: any = new Date(process.env.OPEN_DATE == null ? '01/01/1970 00:00' : process.env.OPEN_DATE)
|
||||||
|
let now: any = new Date()
|
||||||
|
if (!byPass && !isProposed && target > now) {
|
||||||
|
return res.render('countdown.twig', {
|
||||||
|
openDate: process.env.OPEN_DATE
|
||||||
|
})
|
||||||
|
}
|
||||||
// let client: IORedis.Redis = RedisService.getClient()
|
// let client: IORedis.Redis = RedisService.getClient()
|
||||||
// await client.set('hello', 'world')
|
// await client.set('hello', 'world')
|
||||||
// res.json({
|
// res.json({
|
||||||
// data: await client.get('hello')
|
// data: await client.get('hello')
|
||||||
// })
|
// })
|
||||||
Tag.find().then(tags => {
|
Tag.find().then(tags => {
|
||||||
let isProposed = Utils.isStrUsable(req.query, 'only')
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
if (isProposed && !mongoose.Types.ObjectId.isValid(req.query.only)) {
|
if (isProposed && !mongoose.Types.ObjectId.isValid(req.query.only)) {
|
||||||
return ErrorController.handleServerError({ stack: 'Invalid object id in only query param'}, req, res, [])
|
return ErrorController.handleServerError({ stack: 'Invalid object id in only query param'}, req, res, [])
|
||||||
|
@ -129,6 +139,31 @@ export default class PublicController {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
version.cutDescription = Utils.isStrUsable(version, 'descriptionLong') && version.descriptionLong.length > 200
|
version.cutDescription = Utils.isStrUsable(version, 'descriptionLong') && version.descriptionLong.length > 200
|
||||||
|
|
||||||
|
// TODO: Rassembler les horaires qui sont dans le même jour, uniquement pour le front
|
||||||
|
|
||||||
|
// version.schedule = version.schedule.map((s: any) => {
|
||||||
|
// let newWhens: any = []
|
||||||
|
// console.log(s)
|
||||||
|
// // s.when.foreach((w: any) => {
|
||||||
|
// // // if there is already a when with the same day add it
|
||||||
|
// // let scheduleObject: any = { from: w.from, to: w.to }
|
||||||
|
// // if (newWhens.filter((_n: any) => _n.day === w.day).length > 0) {
|
||||||
|
// // newWhens.map((newWhen: any) => {
|
||||||
|
// // if (newWhen.day === w.day) {
|
||||||
|
// // newWhen.hours.push(scheduleObject)
|
||||||
|
// // }
|
||||||
|
// // return newWhen
|
||||||
|
// // })
|
||||||
|
// // } else {
|
||||||
|
// // w.hours = [scheduleObject]
|
||||||
|
// // newWhens.push(w)
|
||||||
|
// // }
|
||||||
|
// // })
|
||||||
|
// // s.when = newWhens
|
||||||
|
// return s
|
||||||
|
// })
|
||||||
|
|
||||||
// if (version.cutDescription) {
|
// if (version.cutDescription) {
|
||||||
// version.descriptionFirstHalf = version.descriptionLong.substr(0, 200) // not gonna lie
|
// version.descriptionFirstHalf = version.descriptionLong.substr(0, 200) // not gonna lie
|
||||||
// version.descriptionSecondHalf = version.descriptionLong.substr(200)
|
// version.descriptionSecondHalf = version.descriptionLong.substr(200)
|
||||||
|
|
|
@ -1,15 +1,16 @@
|
||||||
{% extends "./base.twig" %}
|
{% extends "./base.twig" %}
|
||||||
{% block title %}A propos{% endblock %}
|
{% block title %}A propos{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div>
|
<div style="margin: 0 auto; width: 80%; text-align: justify;">
|
||||||
<p>
|
<p>
|
||||||
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Autem alias sapiente neque? Dignissimos harum blanditiis fugiat eius alias nam repudiandae, et explicabo nihil eos, quos reprehenderit nobis aperiam quibusdam ad?
|
Pour pallier à l’absence du forum des associations cette année, événement incontournable
|
||||||
|
depuis plus de 16 ans, qui rassemble plus de 60 associations et des centaines de publics,
|
||||||
|
l’Espace Condorcet Centre Social a créé pour vous et le public, un forum virtuel.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Takimata dolores sanctus lorem dolor labore dolores lorem voluptua diam ipsum, at accusam sed tempor accusam ea clita et tempor. Duo kasd eirmod at amet sed sed sanctus sit, sed kasd eos dolore amet diam nonumy est ipsum diam, lorem tempor dolore sed tempor sed eos justo no amet. Est.Lorem, ipsum dolor sit amet consectetur adipisicing elit. Autem alias sapiente neque? Dignissimos harum blanditiis fugiat eius alias nam repudiandae, et explicabo nihil eos, quos reprehenderit nobis aperiam quibusdam ad?
|
Dans un premier temps, nous réservons cet espace aux associations qui participent
|
||||||
</p>
|
habituellement au forum qui est organisé chaque année à Gaillon. Dans un second temps,
|
||||||
<p>
|
nous ouvrirons ce forum en ligne aux associations du territoire, sur le même procédé.
|
||||||
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Autem alias sapiente neque? Dignissimos harum blanditiis fugiat eius alias nam repudiandae, et explicabo nihil eos, quos reprehenderit nobis aperiam quibusdam ad?
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -57,7 +57,7 @@ Github: https://github.com/lefuturiste
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if isProposed is defined and isProposed == true %}
|
{% if isProposed is defined and isProposed == true %}
|
||||||
<div class="proposed-alert">
|
<div class="proposed-alert">
|
||||||
! Version proposé !
|
! Version proposée !
|
||||||
{# <div class="proposed-alert-content">
|
{# <div class="proposed-alert-content">
|
||||||
</div> #}
|
</div> #}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<div class="countdown" id="countdown">
|
<div class="countdown" id="countdown">
|
||||||
<div class="countdown-title-container">
|
<div class="countdown-title-container">
|
||||||
<h2 class="countdown-title">Soyez patient...</h2>
|
<h2 class="countdown-title">Soyez patient...</h2>
|
||||||
<h5 class="countdown-subtitle">Le site ouvre le 4 septembre, c'est à dire dans :</h5>
|
<h5 class="countdown-subtitle">Le site ouvre le 4 septembre à midi, c'est à dire dans :</h5>
|
||||||
</div>
|
</div>
|
||||||
<div id="counter" class="counter">
|
<div id="counter" class="counter">
|
||||||
<div class="counter-component days">
|
<div class="counter-component days">
|
||||||
|
@ -33,5 +33,8 @@
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
|
<script>
|
||||||
|
let openDate = new Date(`{{ openDate }}`)
|
||||||
|
</script>
|
||||||
<script src="/scripts/countdown.js"></script>
|
<script src="/scripts/countdown.js"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
|
@ -1,9 +1,11 @@
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Vous recevez cet email car cette adresse email a été designé comme étant celle qui doit recevoir les messages concernant l'association "{{ adminName }}" sur la platforme du Forum des associations 2020 mise en place par l'Espace Condorcet Centre Social.
|
Vous recevez ce courriel, car cette adresse email a été désignée comme étant celle qui reçoit
|
||||||
|
les messages concernant l'association "{{ adminName }}" par la plateforme du Forum virtuel
|
||||||
|
des associations 2020 mise en place par l'Espace Condorcet Centre Social.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Cet email est un message automatique, veuillez à ne pas répondre.
|
Cet email est un message automatique, veuillez ne pas répondre.
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<p>Bonjour,</p>
|
<p>Bonjour,</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Nous vous informons que les changements qui ont été soumis à vérification concernant l'association "{{ adminName }}" ne peuvent pas en l'état être publiées.
|
Nous vous informons que les changements qui ont été soumis à vérification concernant l'association "{{ adminName }}" ne peuvent pas en l'état être publiés.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -1,15 +1,45 @@
|
||||||
<p>Bonjour,</p>
|
<p>Bonjour,</p>
|
||||||
|
|
||||||
<p>
|
<p style="text-weight: bold; text-align: justify;">
|
||||||
Bienvenue ! Ceci est juste un petit email pour communiquer le lien de gestion de l'association "{{ adminName }}" dans le but de modifier les informations concernant cette association sur la platforme de espace condorcet.
|
Pour pallier à l’absence du forum des associations cette année, événement incontournable
|
||||||
|
depuis plus de 16 ans, qui rassemble plus de 60 associations et des centaines de publics,
|
||||||
|
l’Espace Condorcet Centre Social a créé pour vous et le public, un forum virtuel qui sera
|
||||||
|
opérationnel et consultable en ligne par tous dès le vendredi 4 septembre 2020.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p style="text-align: justify;">
|
||||||
|
Dans un premier temps, nous réservons cet espace aux associations qui participent
|
||||||
|
habituellement au forum qui est organisé chaque année à Gaillon. Dans un second temps,
|
||||||
|
nous ouvrirons ce forum en ligne aux associations du territoire, sur le même procédé.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p style="text-align: justify;">
|
||||||
|
Vous recevez cet email d’invitation qui va vous permettre de remplir un formulaire d’identité
|
||||||
|
complet de votre association, ce formulaire une fois vérifié, sera :
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li><b>VALIDÉ</b> : votre fiche sera visible sur le site <a href="associations.espacecondorcet.org">associations.espacecondorcet.org</a> à
|
||||||
|
l’ouverture de celui-ci</li>
|
||||||
|
<li><b>INVALIDÉ</b> : vous recevrez un retour par email vous indiquant la (les) raison(s) et/ou les
|
||||||
|
modifications à faire sur votre fiche</li>
|
||||||
|
</ul>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p style="text-align: justify;">
|
||||||
|
<b>Si vous souhaitez inscrire votre association à ce forum virtuel 2020, cliquez sur le lien ci-dessous</b> et remplissez le formulaire avec toutes vos informations :
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Vous pouvez utiliser ce lien pour vous connecter sur l'interface web permettant de modifier votre association sur la platforme : <a href="{{ link }}">{{ link }}</a>
|
<a href="{{ link }}">{{ link }}</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>Et voici votre clé: {{ token }}</p>
|
<p>Et voici votre clé: {{ token }}</p>
|
||||||
|
|
||||||
<p>Cordialement</p>
|
<p style="text-align: justify;">
|
||||||
|
Pour toutes questions et accompagnement, vous pouvez contacter l’Espace Condorcet au
|
||||||
|
02.32.77.50.80 ou par email à : <a href="mailto:elisabethfacq@espacecondorcet.org">elisabethfacq@espacecondorcet.org</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>Cordialement,</p>
|
||||||
|
|
||||||
{% include 'views/emails/delegateFooter.twig' %}
|
{% include 'views/emails/delegateFooter.twig' %}
|
||||||
|
|
|
@ -16,14 +16,14 @@
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Téléphone : 02 32 77 50 80<br>
|
Téléphone : 02 32 77 50 80<br>
|
||||||
Fax : 02 32 77 50 99
|
Fax : 02 32 77 50 99<br>
|
||||||
|
E-Mail : <a href="mailto:contact@espacecondorcet.org">contact@espacecondorcet.org</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h3>Représentant légal</h3>
|
<h3>Représentant légal</h3>
|
||||||
|
|
||||||
<p>Liliane COQUET</p>
|
<p>Liliane COQUET</p>
|
||||||
|
|
||||||
|
|
||||||
<h3>Immatriculation</h3>
|
<h3>Immatriculation</h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -125,6 +125,20 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{# {% for when in item.when %}
|
||||||
|
<div class="schedule-category-day-container">
|
||||||
|
<div class="schedule-category-day">
|
||||||
|
{{ when.day }}
|
||||||
|
</div>
|
||||||
|
<div class="schedule-category-hours">
|
||||||
|
{% for i in when.hours %}
|
||||||
|
<span>
|
||||||
|
{{ i.from }} <span class="separator">-</span> {{ i.to }}
|
||||||
|
</span>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %} #}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -356,11 +370,11 @@
|
||||||
{% block footer %}
|
{% block footer %}
|
||||||
<div class="mentions">
|
<div class="mentions">
|
||||||
<div class="advice">
|
<div class="advice">
|
||||||
Contenu rédigée par l'une des associations participant à associations.espacecondorcet.org
|
Contenu rédigé par l'une des associations participant à associations.espacecondorcet.org
|
||||||
</div>
|
</div>
|
||||||
<div class="last-update">
|
{# <div class="last-update">
|
||||||
Dernière mise à jour le {{ lastPublished }}
|
Dernière mise à jour le {{ lastPublished }}
|
||||||
</div>
|
</div> #}
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<div></div>
|
<div></div>
|
||||||
|
|
Loading…
Reference in a new issue