Skip to content

Commit

Permalink
issue DrupalRU#1068: Adds image style to views and less-code for even…
Browse files Browse the repository at this point in the history
…ts pages
  • Loading branch information
avakorin committed Aug 4, 2018
1 parent 00e75b8 commit f03ead6
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 14 deletions.
37 changes: 33 additions & 4 deletions profiles/drupalru/themes/druru/css/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
.image {
margin-bottom: @padding-base-vertical;
}

> * {
margin-bottom: @padding-small-vertical;

Expand All @@ -36,15 +37,19 @@
float: left;
}
}

&.image {
margin-bottom: @padding-large-vertical;
}

&.website:before {
content: "\f0c1";
}

&.address:before {
content: "\f041";
}

&.event-type {
&:before {
content: "\f05a";
Expand All @@ -53,26 +58,24 @@
display: inline;
}
}

&.date_time {
&:before {
content: "\f073";
}

a > * {
margin-right: @padding-small-horizontal;
display: inline;
}
}
}
}

.details {
margin-left: 0;
}
.image {
img {
max-width: 100%;
height: auto;
}
}

.event-type {
margin-top: 5px;
}
Expand Down
48 changes: 48 additions & 0 deletions profiles/drupalru/themes/druru/less/drupal/components/_pages.less
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,52 @@ body {
}
}
}

&.page-events {
@timeline-width: 96px;
@point-size: 13px;

.node-event {
img {
max-width: 100%;
height: auto;
}

// Temp workaround to prevent embedded videos from overlapping container
// @todo: Refactor embedding of external videos
// see https://getbootstrap.com/docs/3.3/components/#responsive-embed
iframe {
max-width: 100%;
}
}

@media @tablet {
#block-system-main {
padding-left: @grid-gutter-width*2;
margin-left: @timeline-width;
border-left: 1px solid @brand-info;
}

.event-date {
position: absolute;
left: -(@timeline-width + (@grid-gutter-width*2.5) - (@well-padding-lg-horizontal/2) + (@point-size/2)-1px);
line-height: 1.3em;
font-size: 0.5em;
color: @brand-accent;

&:after {
display: block;
content: '';
position: absolute;
width: @point-size;
height: @point-size;
border-radius: 50%;
border: 1px solid;
right: -35px;
top: .3em;
background: @body-bg;
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
.views-row {
border-bottom: 1px solid #e6e6e6;
border-top: 1px solid #fff;

&:last-child {
border-bottom: none;
}

&:first-child {
border-top: none;
}
Expand All @@ -15,6 +17,7 @@
.row-title {
float: left;
width: 90%;

> a {
text-overflow: ellipsis;
white-space: nowrap;
Expand All @@ -23,22 +26,26 @@
max-width: 100%;
float: left;
}

> sup + a {
padding-right: 3px;
max-width: 75%;
}

@media @phone {
width: 95%;
> sup + a {
max-width: 85%;
}
}

@media @tablet {
width: 97%;
> sup + a {
max-width: 93%;
}
}

@media @very-smalld {
width: 91%;
> sup + a {
Expand Down Expand Up @@ -67,4 +74,4 @@
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ $handler->display->display_options['fields']['field_event_image']['label'] = '';
$handler->display->display_options['fields']['field_event_image']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['field_event_image']['click_sort_column'] = 'fid';
$handler->display->display_options['fields']['field_event_image']['settings'] = array(
'image_style' => '',
'image_style' => 'event_teaser',
'image_link' => 'content',
);
/* Field: Content: Title */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ $handler->display->display_options['fields']['field_event_image']['label'] = '';
$handler->display->display_options['fields']['field_event_image']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['field_event_image']['click_sort_column'] = 'fid';
$handler->display->display_options['fields']['field_event_image']['settings'] = array(
'image_style' => '',
'image_style' => 'event_teaser',
'image_link' => 'content',
);
/* Field: Content: Title */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ $handler->display->display_options['fields']['field_event_image']['label'] = '';
$handler->display->display_options['fields']['field_event_image']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['field_event_image']['click_sort_column'] = 'fid';
$handler->display->display_options['fields']['field_event_image']['settings'] = array(
'image_style' => '',
'image_style' => 'event_teaser',
'image_link' => 'content',
);
/* Field: Content: Title */
Expand Down

0 comments on commit f03ead6

Please sign in to comment.