-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from DemocraciaEnRed/dev/setting-stages
Dev/setting stages
- Loading branch information
Showing
61 changed files
with
3,575 additions
and
1,678 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
const express = require('express') | ||
|
||
const middlewares = require('lib/api-v2/middlewares') | ||
|
||
const api = require('lib/db-api') | ||
|
||
const utils = require('lib/utils') | ||
const expose = utils.expose | ||
|
||
const app = (module.exports = express.Router()) | ||
|
||
const goToNextRoute = (req, res, next) => next('route') | ||
|
||
app.post('/about', | ||
middlewares.users.restrict, | ||
middlewares.forums.findFromBody, | ||
goToNextRoute) | ||
|
||
app.put('/about/:id', | ||
middlewares.users.restrict, // restringe | ||
middlewares.about.findById, | ||
goToNextRoute) | ||
|
||
app.delete('/about/:id', | ||
middlewares.users.restrict, // restringe | ||
middlewares.about.findById, | ||
goToNextRoute) | ||
|
||
app.put('/about-update-order', | ||
middlewares.users.restrict, // restringe | ||
middlewares.forums.findFromBody, | ||
goToNextRoute | ||
) | ||
|
||
app.get('/about-all', (req, res, next) => { | ||
try { | ||
api.about.all(function (err, faqs) { | ||
if (err) return _handleError(err, req, res); | ||
res.status(200).json(faqs.map(expose('id question answer createdAt order'))) | ||
}) | ||
} catch (err) { | ||
next(err) | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React from 'react' | ||
|
||
|
||
|
||
const PopUp = (props) => { | ||
const { forum } = props | ||
|
||
const handleTypeForm = (event)=>{ | ||
const form = document.getElementById('typeform-full') | ||
form.classList.toggle('closed') | ||
event.stopPropagation() | ||
event.currentTarget.classList.toggle('active') | ||
} | ||
|
||
if (forum.config.mostrarFormulariosProyectistas) { | ||
return ( | ||
<div className='side-panel' > | ||
<iframe | ||
title="Embedded Typeform" | ||
id="typeform-full" | ||
frameBorder="0" | ||
src="https://form.typeform.com/to/cbSeR97L?typeform-medium=embed-snippet" | ||
className='closed' | ||
></iframe> | ||
<button onClick={handleTypeForm} className='popup-proyectista' > <span className='glyphicon glyphicon-comment'></span><span className='text-popup'> ¡Quiero ser proyectista! </span></button> | ||
</div> | ||
) | ||
} | ||
else if (forum.config.votacion) { | ||
return ( | ||
<div className='side-panel' id='side_panel'> | ||
<a href="/votacion" className='popup-proyectista' > <span className='text-popup'> ¡Quiero votar! </span></a> | ||
</div> | ||
) | ||
} | ||
else{return(null)} | ||
} | ||
|
||
|
||
export default PopUp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
|
||
.popup-proyectista{ | ||
box-sizing: border-box; | ||
position: absolute; | ||
top: 300px; | ||
width: 250px; | ||
height: 34px; | ||
padding: 0 20px; | ||
margin: 0; | ||
cursor: pointer; | ||
background: #0445AF; | ||
border-radius: 4px 4px 0px 0px; | ||
box-shadow: 0px 2px 12px rgba(0, 0, 0, 0.06), 0px 2px 4px rgba(0, 0, 0, 0.08); | ||
display: flex; | ||
align-items: center; | ||
justify-content: flex-start; | ||
transform: rotate(-90deg); | ||
transform-origin: bottom left; | ||
color: white; | ||
text-decoration: none; | ||
z-index: 9999; | ||
transition: all 1s ease-in-out | ||
border: none | ||
} | ||
.popup-proyectista.active{ | ||
right: 50px | ||
} | ||
|
||
.text-popup{ | ||
text-decoration: none; | ||
font-size: 16px; | ||
font-family: Helvetica,Arial,sans-serif; | ||
white-space: nowrap; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
width: 100%; | ||
text-align: center; | ||
-webkit-font-smoothing: antialiased; | ||
} | ||
|
||
.side-panel{ | ||
position: fixed; | ||
top: calc(50% - 250px); | ||
right: 0; | ||
transition: width 300ms ease-out; | ||
width: 0; | ||
} | ||
.side-panel > a:hover{ | ||
color: #fff | ||
} | ||
|
||
#typeform-full{ | ||
position: fixed; | ||
height: 50vh | ||
top: 50%; | ||
right: 0; | ||
max-width: 1000px | ||
transform: translate(0%, -50%); | ||
} | ||
|
||
#typeform-full.closed{ | ||
right: -100% | ||
} | ||
|
||
.popup-votacion{ | ||
box-sizing: border-box; | ||
position: absolute; | ||
top: 300px; | ||
width: 180px; | ||
height: 34px; | ||
padding: 0 20px; | ||
margin: 0; | ||
cursor: pointer; | ||
background: #0080a5; | ||
border-radius: 4px 4px 0px 0px; | ||
box-shadow: 0px 2px 12px rgba(0, 0, 0, 0.06), 0px 2px 4px rgba(0, 0, 0, 0.08); | ||
display: flex; | ||
align-items: center; | ||
justify-content: flex-start; | ||
transform: rotate(-90deg); | ||
transform-origin: bottom left; | ||
color: white!important; | ||
text-decoration: none; | ||
z-index: 9999; | ||
} | ||
|
||
|
||
.glyphicon-comment{ | ||
|
||
width: 32px; | ||
position: relative; | ||
text-align: center; | ||
transform: rotate(90deg) scale(0.75); | ||
left: -8px; | ||
} | ||
|
||
.typeForm-share{ | ||
box-sizing:border-box; | ||
position:absolute; | ||
top:300px; | ||
width:200px; | ||
height:48px; | ||
padding:0 20px; | ||
margin:0; | ||
cursor:pointer; | ||
background:#0445AF; | ||
border-radius:4px 4px 0px 0px; | ||
box-shadow:0px 2px 12px rgba(0, 0, 0, 0.06), 0px 2px 4px rgba(0, 0, 0, 0.08); | ||
display:flex; | ||
align-items:center; | ||
justify-content:flex-start; | ||
transform:rotate(-90deg); | ||
transform-origin:bottom left; | ||
color:white; | ||
text-decoration:none; | ||
z-index:9999; | ||
} | ||
|
||
.typeForm-share > span{ | ||
width:32px; | ||
position:relative; | ||
text-align:center; | ||
transform:rotate(90deg) scale(0.85); | ||
left:-8px; | ||
} | ||
|
||
.typeForm-share > span{ | ||
text-decoration:none; | ||
font-size:18px; | ||
font-family:Helvetica,Arial,sans-serif; | ||
white-space:nowrap; | ||
overflow:hidden; | ||
text-overflow:ellipsis; | ||
width:100%; | ||
text-align:center; | ||
-webkit-font-smoothing:antialiased; | ||
-moz-osx-font-smoothing:grayscale | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.