Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

placeholder loader if json does not exist #29

Merged
merged 1 commit into from
Nov 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions src/components/theme/Header/HomepageSlider.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'react-image-gallery/styles/css/image-gallery.css';

import ImageGallery from 'react-image-gallery';
import { LazyLoadImage } from 'react-lazy-load-image-component';
import { Placeholder } from 'semantic-ui-react';
import { Placeholder, Dimmer, Loader } from 'semantic-ui-react';
import { getBasePath } from '@eeacms/volto-forests-theme/helpers';

class HomepageSlider extends Component {
Expand Down Expand Up @@ -104,11 +104,14 @@ class HomepageSlider extends Component {

render() {
const slides = this.getSlides(this.props.items.slides);
const icon = this.props.items.extra.icon || '';
const text = this.props.items.extra.text || '';
const link = this.props.items.extra.link || '';
const linkText = this.props.items.extra.linkText || '';
return (
const icon = this.props.items.extra?.icon;
const text = this.props.items.extra?.text;
const link = this.props.items.extra?.link;
const linkText = this.props.items.extra?.linkText;

const hasHeaderData = this.props.items.extra ? true : false;

return hasHeaderData ? (
<div>
<div className="slider-wrapper">
<ImageGallery
Expand Down Expand Up @@ -139,6 +142,12 @@ class HomepageSlider extends Component {
</div>
</div>
</div>
) : (
<div className="loader">
<Dimmer active inverted>
<Loader />
</Dimmer>
</div>
);
}
}
Expand Down
6 changes: 6 additions & 0 deletions theme/addons/volto-addons/imagecards/carousel.overrides
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@
}
}

.loader {
position: relative;
padding: 100px;
margin-top: 200px;
}

.extra-header {
position: relative;
top: -1px;
Expand Down
24 changes: 12 additions & 12 deletions theme/site/globals/site.overrides
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ body.has-toolbar {
bottom: 0;
left: 5px;
display: flex;
color: white;
width: 99%;
color: white;

.navigation-prev {
position: absolute;
Expand All @@ -190,25 +190,25 @@ body.has-toolbar {
cursor: pointer;
}

.navigation-prev:hover{
.navigation-prev:hover {
fill: #cd4200 !important;
}

.navigation-next {
position: absolute;
bottom: 50px;
right: 0px;
bottom: 50px;
cursor: pointer;
}

.navigation-next:hover{
.navigation-next:hover {
fill: #cd4200 !important;
}

.lead-nav-wrapper{
.lead-nav-wrapper {
overflow-x: scroll;
overflow-y: hidden;
white-space:nowrap
white-space: nowrap;
}

.active-lead-nav {
Expand All @@ -219,26 +219,25 @@ body.has-toolbar {
}

.lead-navigation-item {
padding: 12px 20px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding: 12px 20px;

border: 2px solid #f7f7f5;

margin: 0 2px;

background-color: #f7f7f5;
border-radius: 3px 3px 0 0;
text-decoration: none;
text-align: center;

color: #554535;
cursor: pointer;
font-size: 16px;
font-weight: bold;
text-align: center;
text-decoration: none;

text-decoration: none;
text-overflow: ellipsis;
white-space: nowrap;

@media (max-width: @computerBreakpoint) {
height: 40px;
Expand Down Expand Up @@ -1762,6 +1761,7 @@ span.float-right {
}
}
}

.map-wrapper {
padding: 5px;
border: 1px solid @darkGreen;
Expand Down