| @ -1,25 +1,63 @@ | |||||
| // DEBUG... COMENTAR DEPOIS | // DEBUG... COMENTAR DEPOIS | ||||
| _log.info('service called...'); | |||||
| //_log.info('service called...'); | |||||
| const astroType = _req.getString(`astroType`) | |||||
| //_log.info(astroType) | |||||
| const page = _req.getInt('page', 1) | |||||
| let offset = (page - 1) * 8 | |||||
| if (offset < 0) { | |||||
| offset = 0 | |||||
| } | |||||
| let filterWhere = "" | |||||
| const filterParams = _val.list() | |||||
| if (astroType != "" && astroType != "all") { | |||||
| filterWhere = " AND astro_type.uid = CAST(? AS UUID) "; | |||||
| filterParams.add(astroType); | |||||
| //_log.info("Params", filterParams) | |||||
| } | |||||
| const dbAstros = _db.query(` | const dbAstros = _db.query(` | ||||
| SELECT * | |||||
| SELECT | |||||
| astro.uid, | |||||
| --astro.id, | |||||
| astro.name | |||||
| --,astro_type.name AS "astro_type", | |||||
| --astro_type.id AS "astro_type_code", | |||||
| --astro.equatorial_radius, | |||||
| --astro.rotation_velocity, | |||||
| --astro.around_astro_id, | |||||
| --astro.periapsis, | |||||
| --astro.apoapsis, | |||||
| --astro.image | |||||
| FROM astro | FROM astro | ||||
| WHERE active = true | |||||
| `); | |||||
| INNER JOIN astro_type | |||||
| ON astro.type_id = astro_type.id | |||||
| WHERE | |||||
| astro.active = TRUE | |||||
| AND astro_type.active = TRUE | |||||
| ${filterWhere} | |||||
| LIMIT 8 | |||||
| OFFSET ${offset} | |||||
| `, filterParams); | |||||
| const astros = _val.list(); | |||||
| for (const astro of dbAstros) { | |||||
| const astros = _val.list() | |||||
| for (const dbAstro of dbAstros) { | |||||
| astros.add( | astros.add( | ||||
| _val.map() | _val.map() | ||||
| .set('id', astro.getString('uid')) | |||||
| .set('name', astro.getString('name')) | |||||
| .set('id', dbAstro.getString('uid')) | |||||
| .set('name', dbAstro.getString('name')) | |||||
| ) | ) | ||||
| } | } | ||||
| // DEBUG...COMENTAR DEPOIS! | // DEBUG...COMENTAR DEPOIS! | ||||
| _log.info( 'DB return...', astros ); | |||||
| //_log.info( 'Server return...', astros ); | |||||
| _out.json(astros) | _out.json(astros) | ||||
| // DEBUG...COMENTAR DEPOIS! | // DEBUG...COMENTAR DEPOIS! | ||||
| _log.info('service ended!'); | |||||
| //_log.info('service ended!'); | |||||
| @ -1,147 +1,17 @@ | |||||
| @import "../../../../styles/variables.less"; | @import "../../../../styles/variables.less"; | ||||
| .establishment-list__results { | |||||
| display: flex; | |||||
| .astro-list__filter { | |||||
| margin-top: 30px; | |||||
| margin-bottom: 30px; | |||||
| justify-content: center; | justify-content: center; | ||||
| margin-right: auto; | |||||
| margin-left: auto; | |||||
| // margin-top: 1rem; | |||||
| //width: @site-width; | |||||
| max-width: calc(@site-max-width + 16px); | |||||
| text-align: center; | |||||
| padding: 0 5px 0 5px; | |||||
| .ant-card { | |||||
| clip-path: polygon(0 3.5%, 100% 0, 100% 100%, 0% 100%); | |||||
| padding-top: 0; | |||||
| border: 2px solid @primary-color; | |||||
| border-radius: 0; | |||||
| background-color: @primary-color; | |||||
| margin-left: auto; | |||||
| margin-right: auto; | |||||
| margin-bottom: 1rem; | |||||
| color: white; | |||||
| @media only screen and (min-width: @header-mobile-width) { | |||||
| margin-left: 0; | |||||
| margin-right: 0; | |||||
| } | |||||
| .ant-card-meta-title { | |||||
| font-size: 1.5rem; | |||||
| color: white; | |||||
| font-family: Poppins; | |||||
| margin:0; | |||||
| } | |||||
| .ant-card-meta-description { | |||||
| color: white; | |||||
| } | |||||
| .shadow { | |||||
| position: relative; | |||||
| top: -25px; | |||||
| background-image: linear-gradient( | |||||
| to bottom, | |||||
| rgba(255, 0, 0, 0), | |||||
| @primary-color | |||||
| ); | |||||
| width: 100%; | |||||
| z-index: 200; | |||||
| color: transparent; | |||||
| } | |||||
| .ant-card-body { | |||||
| width: 100%; | |||||
| padding: 0; | |||||
| p { | |||||
| position: relative; | |||||
| display: flex; | |||||
| top: -10px; | |||||
| text-align: center; | |||||
| justify-content: center; | |||||
| } | |||||
| } | |||||
| img { | |||||
| clip-path: polygon(0 7%, 100% 1%, 100% 100%, 0% 100%); | |||||
| border: 2px solid @primary-color; | |||||
| border-radius: 0; | |||||
| height: 200px; | |||||
| } | |||||
| P { | |||||
| margin: 0; | |||||
| } | |||||
| .end { | |||||
| display: flex; | |||||
| justify-content: center; | |||||
| .anticon { | |||||
| color: white; | |||||
| font-size: 1.2rem; | |||||
| margin-top: 4%; | |||||
| } | |||||
| h5 { | |||||
| position: relative; | |||||
| top: 10px; | |||||
| color: white; | |||||
| margin: 0; | |||||
| } | |||||
| } | |||||
| .whats { | |||||
| display: flex; | |||||
| justify-content: center; | |||||
| .anticon { | |||||
| position: relative; | |||||
| color: rgb(52, 175, 35); | |||||
| font-size: 2rem; | |||||
| top: -5px; | |||||
| /*.span { | |||||
| }*/ | |||||
| } | |||||
| a { | |||||
| font-family: Poppins; | |||||
| color: white; | |||||
| margin-left: 5px; | |||||
| margin-right: 10px; | |||||
| margin-top: 0; | |||||
| text-decoration: none; | |||||
| } | |||||
| } | |||||
| .insta { | |||||
| display: flex; | |||||
| justify-content: center; | |||||
| .anticon { | |||||
| color: white; | |||||
| font-size: 2rem; | |||||
| background: #f09433; | |||||
| background: -moz-linear-gradient( | |||||
| 45deg, | |||||
| #f09433 0%, | |||||
| #e6683c 25%, | |||||
| #dc2743 50%, | |||||
| #cc2366 75%, | |||||
| #bc1888 100% | |||||
| ); | |||||
| background: -webkit-linear-gradient( | |||||
| 45deg, | |||||
| #f09433 0%, | |||||
| #e6683c 25%, | |||||
| #dc2743 50%, | |||||
| #cc2366 75%, | |||||
| #bc1888 100% | |||||
| ); | |||||
| .ant-btn-default { | |||||
| color: @secondary-color; | |||||
| background: @primary-color; | |||||
| } | |||||
| // filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f09433', endColorstr='#bc1888',GradientType=1 ); | |||||
| border-radius: 10px; | |||||
| height: 2rem; | |||||
| } | |||||
| h4 { | |||||
| font-family: Poppins; | |||||
| color: white; | |||||
| margin-top: 3%; | |||||
| margin-left: 5px; | |||||
| } | |||||
| } | |||||
| .ant-btn-primary { | |||||
| color: @primary-color; | |||||
| background: @secondary-color; | |||||
| } | } | ||||
| } | } | ||||
| @ -1,19 +1,19 @@ | |||||
| import React from 'react'; | import React from 'react'; | ||||
| import { useParams } from 'react-router-dom'; | |||||
| //import Cluar from '../../common/Cluar'; | |||||
| //import { useParams } from 'react-router-dom'; | |||||
| import Cluar from '../../common/Cluar'; | |||||
| import './index.less'; | import './index.less'; | ||||
| function AstroDetails() { | function AstroDetails() { | ||||
| return ( | return ( | ||||
| <main className="astro-details"> | |||||
| <div className="content astro-details"> | |||||
| <h1>Sorry...</h1> | <h1>Sorry...</h1> | ||||
| <h2> | <h2> | ||||
| {Cluar.currentLanguage().locale === 'pt' && <>Página em construção.</>} | {Cluar.currentLanguage().locale === 'pt' && <>Página em construção.</>} | ||||
| {Cluar.currentLanguage().locale === 'en' && <>Page under construction.</>} | {Cluar.currentLanguage().locale === 'en' && <>Page under construction.</>} | ||||
| </h2> | </h2> | ||||
| </main> | |||||
| </div> | |||||
| ); | ); | ||||
| }; | }; | ||||
| @ -1,18 +1,18 @@ | |||||
| import React from 'react'; | import React from 'react'; | ||||
| import Cluar from '../../common/Cluar'; | import Cluar from '../../common/Cluar'; | ||||
| import './index.less'; | import './index.less'; | ||||
| function NotFound() { | function NotFound() { | ||||
| return ( | return ( | ||||
| <main className="page--notfound"> | |||||
| <h1>404</h1> | |||||
| <h2> | |||||
| {Cluar.currentLanguage().locale === 'pt' && <>Página não encontrada.</>} | |||||
| {Cluar.currentLanguage().locale === 'en' && <>Page not found.</>} | |||||
| </h2> | |||||
| </main> | |||||
| <section className="content"> | |||||
| <div className='page--notfound'> | |||||
| <h1> | |||||
| {Cluar.currentLanguage().locale === 'pt' && <>Página não encontrada.</>} | |||||
| {Cluar.currentLanguage().locale === 'en' && <>Page not found.</>} | |||||
| </h1> | |||||
| <img src="/images/404-error-no-text.jpg"/> | |||||
| </div> | |||||
| </section> | |||||
| ); | ); | ||||
| }; | }; | ||||
| @ -1,3 +1,9 @@ | |||||
| .page--notfound { | .page--notfound { | ||||
| text-align: center; | text-align: center; | ||||
| > * { | |||||
| padding: 10px 10px; | |||||
| } | |||||
| > img { | |||||
| max-width:100%; | |||||
| } | |||||
| } | } | ||||