Skip to content

Commit

Permalink
Merge pull request #251 from CrisTofani/master
Browse files Browse the repository at this point in the history
 Portal as a Service development fixes and Issue #250
  • Loading branch information
CrisTofani authored Jun 6, 2018
2 parents d427bd8 + a8119b3 commit 055929d
Show file tree
Hide file tree
Showing 22 changed files with 456 additions and 245 deletions.
30 changes: 28 additions & 2 deletions public/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,10 @@
.upper-header h6 {
/*margin-left:22px;*/ } }

.upper-header a{
text-decoration: underline;
}

.main-header {
height: 124px;
background-color: var(--primary);
Expand Down Expand Up @@ -579,13 +583,34 @@
.js-scrolled .logo-pub{
height: 34px;
width: 40px;
margin-top: auto;
margin-top: 0.5rem!important;
margin-bottom: auto;
}

.js-scrolled .main-header h2{
font-size: 24px;
line-height: 24px;
padding-top: 0.5rem!important;
padding-bottom: 0.5rem!important
}

.logo-pub{
height: 51px;
width: 60px
width: 60px;
margin-top: 0.25rem!important
}

.js-scrolled .logo-pub-pa{
height: 48px;
width: 29px;
margin-top: 1px;
margin-bottom: auto;
}

.logo-pub-pa{
height: 95px;
width: 58px;
margin-top:-20px
}

.js-scrolled p{
Expand All @@ -599,6 +624,7 @@
.social-button{
height: 28px;
width: 28px;
color: var(--primary)!important
}

.navi-header {
Expand Down
186 changes: 186 additions & 0 deletions public/img/DAF_pittogrammaillustrazione_FU_2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 64 additions & 0 deletions public/img/Page 1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions src/components/Footer/Public/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@ class Footer extends Component {
<div className="col-12 col-sm-3">
<h4 className="text-white font-weight-bold mb-3">Open data in Italia</h4>
<ul className="list-group list-group-flush">
<li className="list-group-item bg-footer"><a href="">Il catalogo nazionale</a></li>
<li className="list-group-item bg-footer"><a href="">Tipologie</a></li>
<li className="list-group-item bg-footer"><a href="">Qualità</a></li>
<li className="list-group-item bg-footer"><a href="#/private">Faq</a></li>
<li className="list-group-item bg-footer"><Link to={'/dataset/list'}>Il catalogo dei dataset</Link></li>
<li className="list-group-item bg-footer"><Link to={'/userstory/list'}>Le storie</Link></li>
<li className="list-group-item bg-footer"><Link to={'/notizie'}>Notizie</Link></li>
<li className="list-group-item bg-footer"><Link to={'/partecipa'}>Partecipa</Link></li>
</ul>
</div>
</div>
<div className="row">
<div className="col-12 col-sm-3">
{/* <div className="col-12 col-sm-3">
<h4 className="text-white font-weight-bold mb-3">Open data in Italia</h4>
<ul className="list-group list-group-flush">
<li className="list-group-item bg-footer"><a href="">Il catalogo nazionale</a></li>
<li className="list-group-item bg-footer"><a href="">Tipologie</a></li>
<li className="list-group-item bg-footer"><a href="">Qualità</a></li>
<li className="list-group-item bg-footer"><a href="#/private">Faq</a></li>
</ul>
</div>
</div> */}
<div className="col-12 col-sm-3">
<h4 className="text-white font-weight-bold mb-3">Seguici su</h4>
<ul className="list-group list-group-flush">
Expand Down
7 changes: 4 additions & 3 deletions src/components/Header/Home/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ return (
</div>
<div className="main-header container">
<div className="h-100 bg-primary row">
<div className="col-md-2 col-lg-1 col-sm-2 col-xs col-3 pt-2 h-auto">
<div className="float-left">
<Link to={'/'}>
<img src='./img/DAF_pittogramma_FU.svg' alt="" className="logo-pub"/>
<img src='./img/DAF_pittogramma_FU.svg' alt="" className="logo-pub mr-4"/>
{properties.domain!=='dataportal' && properties.domain!=='dataportal-private' && <img src={properties.headerLogo} alt="" className="float-right logo-pub-pa mr-2"/>}
</Link>
</div>
<div className="col-md col-lg col-sm col-xs col pt-2 h-auto">
<div className="col-md col-lg col-sm col-xs col h-auto">
<div className="row mx-0">
<Link className="text-white" to={'/'}>
<h2 className="mr-4 mb-0">{/* props.styleProps.headerSiglaTool */}<b>DAF {properties.headerSiglaTool}</b></h2>
Expand Down
14 changes: 8 additions & 6 deletions src/components/Header/Public/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,21 +125,23 @@ class Header extends Component {
var jsscrolled = this.state.js_scrolled ? 'js-scrolled': ''
var active = this.state.open?" active":""
var show = this.state.open?" show":""

return(
<div className={"app-header " + jsscrolled}>
<div className="upper-header">
<div className="container">
<h6 className="mx-5 px-1 mb-0">Agid + Team Digitale</h6>
<h6 className="mx-5 px-1 mb-0"><a className="text-white" href="https://www.agid.gov.it/">Agid</a> + <a href="https://teamdigitale.governo.it/" className="text-white">Team Digitale</a></h6>
</div>
</div>
<div className="main-header container">
<div className="h-100 bg-primary row">
<div className="col-md-2 col-lg-1 col-sm-2 col-xs col-3 pt-2 h-auto">
<div className='float-left'>
<Link to={'/'}>
<img src='./img/DAF_pittogramma_FU.svg' alt="" className="logo-pub"/>
<img src='./img/DAF_pittogramma_FU.svg' alt="" className="logo-pub mr-4"/>
{properties.domain!=='dataportal' && properties.domain!=='dataportal-private' && <img src={properties.headerLogo} alt="" className="float-right logo-pub-pa mr-2"/>}
</Link>
</div>
<div className="col-md col-lg col-sm col-xs col pt-2 h-auto">
<div className="col-md col-lg col-sm col-xs col h-auto">
<div className="row mx-0">
<Link className="text-white" to={'/'}>
<h2 className="mr-4 mb-0">{/* props.styleProps.headerSiglaTool */}<b>DAF {properties.headerSiglaTool}</b></h2>
Expand All @@ -152,8 +154,8 @@ class Header extends Component {
<div className="h-100 row">
<p className="d-sm-down-none text-white mr-3">Seguici su</p>
{/* <a className="social-button bg-white rounded-circle text-center mx-1 py-1"><i className="fab fa-facebook-f"/></a> */}
<a className="d-sm-down-none social-button bg-white rounded-circle text-center text-primary mx-1 py-1" href={properties.twitterURL}><i className="fab fa-twitter"/></a>
<a className="d-sm-down-none social-button bg-white rounded-circle text-center text-primary mx-1 py-1" href={properties.mediumURL}><i className="fab fa-medium-m"/></a>
<a className="d-sm-down-none social-button bg-white rounded-circle text-center mx-1 py-1" href={properties.twitterURL} target="_blank"><i className="fab fa-twitter"/></a>
<a className="d-sm-down-none social-button bg-white rounded-circle text-center mx-1 py-1" href={properties.mediumURL} target="_blank"><i className="fab fa-medium-m"/></a>
<div className="row col-12 px-4" style={{height: '56px'}}>
<button className={(this.state.search ? "btn-accento":"btn-header")+" h-100 btn"} style={{width: '56px'}} onClick={this.openSearch.bind(this)}><i className="fa fa-search fa-lg" /></button>
{localStorage.getItem('token')?
Expand Down
15 changes: 9 additions & 6 deletions src/components/SearchBar/SearchBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,17 @@ class SearchBar extends Component{

handleLoadDatasetClick(event) {
event.preventDefault();
const { dispatch, filter } = this.props;
const { dispatch, filter, properties } = this.props;

let newFilter = { }

if(window.location.hash.indexOf('dataset')!==-1){
var org = []
if(isPublic() && properties.domain!=='dataportal' && properties.domain!=='dataportal-private')
org.push(properties.organization)
if(window.location.hash.indexOf('search')===-1){
newFilter = {
'text': '',
'index': [],
'org': [],
'org': org,
'theme':[],
'date': "",
'status': [],
Expand All @@ -49,7 +51,7 @@ class SearchBar extends Component{
newFilter = filter?filter:{
'text': '',
'index': [],
'org': [],
'org': org,
'theme':[],
'date': "",
'status': [],
Expand Down Expand Up @@ -90,7 +92,8 @@ SearchBar.propTypes = {

function mapStateToProps(state) {
const { isFetching, results, query, filter } = state.searchReducer['search'] || { isFetching: false, results: []}
return { filter }
const { properties } = state.propertiesReducer['prop'] || {}
return { filter, properties }
}

export default connect(mapStateToProps)(SearchBar)
2 changes: 1 addition & 1 deletion src/components/Sidebar/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class Sidebar extends Component {
const { dispatch } = this.props;
let filter = {
'text': '',
'index': ['catalog_test'],
'index': ['catalog_test','ext_opendata'],
'org': [],
'theme':[],
'date': "",
Expand Down
Loading

0 comments on commit 055929d

Please sign in to comment.