Skip to content

Commit

Permalink
More cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
EreMaijala committed Sep 28, 2023
1 parent 0871e43 commit fa9c8ff
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 176 deletions.
199 changes: 63 additions & 136 deletions themes/finna2/less/finna/organisation-info.less
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,16 @@
}
}

.mobile-schedules {
font-size: 1.2em;
}

.schedules-info {
margin-bottom: 10px;
@media (max-width: @screen-sm-max) {
max-width: @organisation-info-max-w;
}
}

.mobile-schedules {
font-size: 1.2em;
}
}
}

Expand Down Expand Up @@ -301,7 +301,7 @@
h3 {
margin-top: 0;
}
.office-links {
.location-links {
margin-right: 10px;
display: inline-block;
.facebook .icon {
Expand All @@ -326,7 +326,7 @@
}
}
@media(min-width: @screen-sm) {
.office-title {
.location-basic-info {
width: 55%;
float: left;
}
Expand All @@ -348,11 +348,6 @@
}
}

.office-information-loader {
margin-top: 20px;
margin-bottom: 20px;
}

.locations-title {
&:extend(.finna-panel-default .panel-heading);
margin-bottom: 1rem;
Expand Down Expand Up @@ -533,10 +528,6 @@
.building-year, .building-name {
font-size: 0.9em;
}
.office-image {
margin-top: 10px;
margin-bottom: 10px;
}
.feed-container {
margin-bottom: 10px;
.list-feed.with-image {
Expand Down Expand Up @@ -599,13 +590,13 @@
text-transform: uppercase;
}
}
.office-row-general {
.location-row-general {
@media(min-width: @screen-sm) {
display: flex;
justify-content: space-between;
}
}
.office-col {
.location-col {
@media(min-width: @screen-sm) {
width: 32%;
float: left;
Expand Down Expand Up @@ -639,12 +630,6 @@
}
}
}
.organisation-feeds {
@media(min-width: @screen-sm) {
width: 100%;
float: right;
}
}
.accessibility-details {
.panel-body {
padding-bottom: 15px;
Expand Down Expand Up @@ -684,20 +669,6 @@
}
}
}
@media (max-width: @screen-xs-max) {
&.row {
margin-left: unset;
margin-right: unset;
}
}

.row:not(.content) h2 {
@media (max-width: @screen-xs-max) {
max-width: @organisation-info-max-w;
text-align: left;
}
text-align: center;
}
h4 {
margin: 0;
}
Expand Down Expand Up @@ -726,15 +697,6 @@
}

}
.facility-image {
@media(max-width: @screen-sm-max) {
float: left;
margin-right: 10px;
margin-bottom: 10px;
width: 100%;
max-width: 150px;
}
}
.map {
margin-top: 5px;
}
Expand All @@ -757,11 +719,17 @@
}

// *** Widget ***
@organisation-info-max-w: 400px;

.js-organisation-info-widget {
display: inline-block;
padding-bottom: 20px;
width: 100%;

.location-is-open, .location-is-closed {
font-size: 1.45em;
font-weight: bold;
margin-left: 1em;
margin-left: 1rem;
}

.btn {
Expand All @@ -777,7 +745,7 @@
height: 35px;
width: 35px;
@media(max-width: @screen-sm-max) {
clear:right;
clear: right;
margin-top: 0px;
margin-bottom: 5px;
}
Expand All @@ -798,37 +766,7 @@
clear: both;
}
}
}

// *** Widget ***
@organisation-info-max-w: 400px;

.js-organisation-info-widget {
display: inline-block;
padding-bottom: 20px;

.row:not(.content) h2 {
@media (max-width: @screen-xs-max) {
max-width: @organisation-info-max-w;
text-align: left;
}
text-align: center;
}
h4 {
margin: 0;
}
.facility-image {
@media(max-width: @screen-sm-max) {
float: left;
margin-right: 10px;
margin-bottom: 10px;
width: 100%;
max-width: 150px;
}
}
.map {
margin-top: 5px;
}
.info-element {
@media (max-width: 375px) {
clear: both;
Expand All @@ -837,12 +775,6 @@
clear: both;
}
}
.schedules-info {
margin-bottom: 10px;
@media (max-width: @screen-sm-max) {
max-width: @organisation-info-max-w;
}
}
.address {
margin-top: 5px;
letter-spacing: .3px;
Expand Down Expand Up @@ -873,62 +805,57 @@
.details-col { width: 40%; }
}

.location-dropdown-container {
.js-location-dropdown {
font-weight: normal;
margin-bottom: 15px;
display: inline-block;
> span {
font-size: 15px;
display: inline-block;
margin-bottom: 10px;
}

.js-location-dropdown {
margin-bottom: 5px;
max-width: ~"-webkit-calc(100% - 70px)";
max-width: ~"-moz-calc(100% - 70px)";
max-width: ~"calc(100% - 70px)";
font-weight: normal;
margin-bottom: 15px;
display: inline-block;
> .dropdown-toggle {
color: @gray;
border: 1px solid @gray-lighter;
padding: 10px 8px;
padding-right: 20px;
border-radius: 10px;
white-space: nowrap;
font-size: 14px;
transition: background .1s linear, color .2s linear;
margin-right: 2px;
&:hover, &:active, &:focus {
text-decoration: none;
background: @gray-lighter;
color: #000;
.icon {
color: #000;
}
}
max-width: ~"calc(100% - 70px)";
> .dropdown-toggle {
width: 100%;
color: @gray;
border: 1px solid @gray-lighter;
padding: 10px 8px;
padding-right: 20px;
border-radius: 10px;
white-space: nowrap;
transition: background .1s linear, color .2s linear;
margin-right: 2px;
&:hover, &:active, &:focus {
text-decoration: none;
background: @gray-lighter;
color: #000;
.icon {
position: absolute;
margin-top: 2px;
margin-left: 4px;
color: @gray-light;
color: #000;
}
}
> .dropdown-menu {
max-height: 80vh;
overflow: auto;
margin-top: 4px;
min-width: 200px;
overflow-x: hidden;
> li {
padding: 12px 8px;
transition: background .2s linear;
color: @gray;
&:hover {
background: @gray-lighter;
cursor: pointer;
text-decoration: none;
}
.selected {
display: inline-block;
line-height: 1;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
}
.icon {
position: absolute;
margin-top: 3px;
margin-left: 4px;
color: @gray-light;
}
}
> .dropdown-menu {
max-height: 80vh;
overflow: auto;
margin-top: 4px;
min-width: 200px;
overflow-x: hidden;
> li {
padding: 12px 8px;
transition: background .2s linear;
color: @gray;
&:hover {
background: @gray-lighter;
cursor: pointer;
text-decoration: none;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- START of: finna - organisationinfo/elements/location-details.phtml -->
<div class="row location-details info-element">
<?php // Information columns ?>
<div class="office-row-general">
<div class="office-col">
<div class="location-row-general">
<div class="location-col">
<?php ob_start(); ?>
<?php $hasImages = false; ?>
<?php if ($url = $orgInfo['pictures'][0]['url'] ?? null): ?>
Expand Down Expand Up @@ -47,11 +47,11 @@
]); ?>
</div>

<div class="office-col opening-times">
<div class="location-col opening-times">
<?=$this->render('organisationinfo/elements/location/schedule.phtml')?>
</div>

<div class="office-col">
<div class="location-col">
<?=$this->render('organisationinfo/elements/location/contact-info.phtml')?>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,30 @@
return $this->render('organisationinfo/elements/helpers/time-interval.phtml', compact('opens', 'closes', 'minutes'));
};
?>
<div class="office-title">
<div class="location-basic-info">
<h3 class="location-title"><?=$this->escapeHtml($orgInfo['name'])?></h3>
<div>
<p>
<span class="office-links address"><?=$this->escapeHtml($orgInfo['address']['displayAddress'])?></span>
<span class="location-links address info-element"><?=$this->escapeHtml($orgInfo['address']['displayAddress'])?></span>
<?php if ($orgInfo['routeUrl']): ?>
<a href="<?=$this->escapeHtmlAttr($orgInfo['routeUrl'])?>" target="_blank" class="office-links route info-element"><?=$this->icon('route') ?> <?=$this->transEsc('organisation_info_route')?></a>
<a href="<?=$this->escapeHtmlAttr($orgInfo['routeUrl'])?>" target="_blank" class="location-links route info-element"><?=$this->icon('route') ?> <?=$this->transEsc('organisation_info_route')?></a>
<?php endif; ?>
</p>
<?php if ($orgInfo['homepage']): ?>
<p class="office-links office-website info-element">
<p class="location-links website info-element">
<a href="<?=$this->escapeHtmlAttr($orgInfo['homepage'])?>" target="_blank"><?=$this->icon('homepage-link') ?> <?=$this->transEsc('organisation_info_homepage')?></a></span>
</p>
<?php endif; ?>
<?php if ($orgInfo['emails'] && 'museum' === $orgInfo['type']): ?>
<?php foreach ($orgInfo['emails'] as $email): ?>
<p class="office-links email info-element">
<p class="location-links email info-element">
<a href="mailto:<?=$this->escapeHtmlAttr($email['email'])?>"><?=$this->icon('email') ?> <?=$this->escapeHtml($email['email'])?></a>
</p>
<?php endforeach; ?>
<?php endif; ?>
<?php foreach ($orgInfo['links'] as $link): ?>
<?php if (str_contains($link['name'], 'Facebook')): ?>
<p class="office-links facebook info-element">
<p class="location-links facebook info-element">
<a class="facebook aria-label="Facebook" href="<?=$this->escapeHtmlAttr($link['url'])?>" target="_blank">
<?=$this->icon('facebook') ?> <?=$this->escapeHtml($link['name'])?>
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,4 @@
</div>
</div>
</div>

<div class="office-information-loader hidden">
<p><?=$this->icon('spinner') ?> <?=$this->transEsc('loading_ellipsis')?></p>
</div>
<!-- END of: finna - organisationinfo/elements/location-selection.phtml -->
Loading

0 comments on commit fa9c8ff

Please sign in to comment.