Skip to content

Commit

Permalink
NGSTACK-450 removing unnecessary divs
Browse files Browse the repository at this point in the history
  • Loading branch information
Zulicek Lora committed Oct 19, 2020
1 parent 527d918 commit aed212d
Show file tree
Hide file tree
Showing 11 changed files with 211 additions and 259 deletions.
91 changes: 0 additions & 91 deletions src/AppBundle/Resources/sass/content/full/_article.scss

This file was deleted.

1 change: 0 additions & 1 deletion src/AppBundle/Resources/sass/content/full/_full.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@import 'full_page_elements';
@import 'article';
@import 'recipe';
@import 'video';
@import 'gallery';
Expand Down
64 changes: 62 additions & 2 deletions src/AppBundle/Resources/sass/content/full/_full_page_elements.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@
}
.full-page-main-tag,
.full-page-sponsored-tag {
> a,
> span {
> span, a {
display: inline-block;
font-size: .75rem;
text-transform: uppercase;
Expand All @@ -57,6 +56,56 @@
}
}

.full-page-image {
@include media-breakpoint-down(md) {
img {
width: 100%;
}
}
margin: 0;
text-align: center;
}

.full-page-tags {
@extend %clearfix;
margin: 3rem 0 0;
a {
display: inline-block;
float: left;
font-size: .75rem;
text-transform: uppercase;
letter-spacing: 1px;
font-weight: 900;
color: $gray-87;
padding: .1666666667em .8333333333em;
border: 2px solid $primary;
margin: 0 .1666666667em;
}
}

/* full page body styling */
.full-page-body {
@extend %clearfix;
padding: 4rem 4rem 2rem;
background: $body-bg;
.object-full {
margin-left: -4rem;
margin-right: -4rem;
}
.object-left > .view-type-embed {
margin-left: -4rem;
}
.object-right > .view-type-embed {
margin-right: -4rem;
}
}

.full-page-intro {
font-size: 1.3125rem;
font-style: italic;
color: $gray-54;
}

/* full page newsletter box */
.full-page-newsletter-box {
background: $primary;
Expand All @@ -74,3 +123,14 @@
}
}
}

.vf1 {
.full-page-image {
margin: 0 0 4rem;
}

.full-page-body {
padding: 0;
margin: 0 0 2rem;
}
}
2 changes: 1 addition & 1 deletion src/AppBundle/Resources/sass/content/full/_video.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
margin: 0 0 .25rem;
line-height: 1.4;
}
.info {
time {
font-size: .75rem;
font-weight: 900;
margin: 0 0 .25rem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{% block content %}
<article class="view-type view-type-{{ view_type }} ng-article vf1">
{% block article_header %}
<header class="full-page-header full-article-header">
<header class="full-page-header">
<div class="container">
{% if not content.fields.sponsored_content_disclosure.empty %}
<div class="full-page-sponsored-tag">
Expand Down Expand Up @@ -46,7 +46,7 @@
<div class="container">
{% block image %}
{% if not content.fields.image.empty or not content.fields.related_multimedia.empty %}
<div class="full-article-image">
<div class="full-page-image">
{{ render(
controller(
'ngsite.controller.parts:viewRelatedMultimediaItems', {
Expand All @@ -61,31 +61,29 @@
{% endif %}
{% endblock %}

<div class="full-article-content">

{% block body %}
<div class="full-article-body">
{% if not content.fields.full_intro.empty %}
<div class="article-intro">
{{ ng_render_field(content.fields.full_intro) }}
</div>
{% endif %}
{% block body %}
<div class="full-page-body">
{% if not content.fields.full_intro.empty %}
<div class="full-page-intro">
{{ ng_render_field(content.fields.full_intro) }}
</div>
{% endif %}

{% if not content.fields.body.empty %}
{{ ng_render_field(content.fields.body) }}
{% endif %}
{% if not content.fields.body.empty %}
{{ ng_render_field(content.fields.body) }}
{% endif %}

{% if not content.fields.tags.empty %}
<div class="full-article-tags">
{% for tag in content.fields.tags.value.tags %}
<a href="{{ path(tag) }}">{{ tag.keyword }}</a>
{% endfor %}
</div>
{% endif %}
</div>
{% endblock %}
{% if not content.fields.tags.empty %}
<div class="full-page-tags">
{% for tag in content.fields.tags.value.tags %}
<a href="{{ path(tag) }}">{{ tag.keyword }}</a>
{% endfor %}
</div>
{% endif %}
</div>
{% endblock %}

</div>
</div>
</article>
{% endblock %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@

{% block content %}
<article class="view-type view-type-{{ view_type }} ng-blog-post vf1">

{% block article_header %}
<header class="full-page-header full-article-header">
<header class="full-page-header">
<div class="container">
{% if not content.fields.sponsored_content_disclosure.empty %}
<div class="full-page-sponsored-tag">
Expand Down Expand Up @@ -46,7 +47,7 @@
<div class="container">
{% block image %}
{% if not content.fields.image.empty %}
<div class="full-article-image">
<div class="full-page-image">
{{ render(
controller(
'ngsite.controller.parts:viewRelatedMultimediaItems', {
Expand All @@ -61,31 +62,27 @@
{% endif %}
{% endblock %}

<div class="full-article-content">

{% block body %}
<div class="full-article-body">
{% if not content.fields.full_intro.empty %}
<div class="article-intro">
{{ ng_render_field(content.fields.full_intro) }}
</div>
{% endif %}

{% if not content.fields.body.empty %}
{{ ng_render_field(content.fields.body) }}
{% endif %}
{% block body %}
<div class="full-page-body">
{% if not content.fields.full_intro.empty %}
<div class="full-page-intro">
{{ ng_render_field(content.fields.full_intro) }}
</div>
{% endif %}

{% if not content.fields.tags.empty %}
<div class="full-article-tags">
{% for tag in content.fields.tags.value.tags %}
<a href="{{ path(tag) }}">{{ tag.keyword }}</a>
{% endfor %}
</div>
{% endif %}
</div>
{% endblock %}
{% if not content.fields.body.empty %}
{{ ng_render_field(content.fields.body) }}
{% endif %}

</div>
{% if not content.fields.tags.empty %}
<div class="full-page-tags">
{% for tag in content.fields.tags.value.tags %}
<a href="{{ path(tag) }}">{{ tag.keyword }}</a>
{% endfor %}
</div>
{% endif %}
</div>
{% endblock %}
</div>
</article>
{% endblock %}
Expand Down
Loading

0 comments on commit aed212d

Please sign in to comment.