Skip to content

Commit 692c469

Browse files
authored
Merge pull request #408 from magefan/6047-improve-module-blog
6047-improve-module-blog [in progress]
2 parents ea7e141 + fec9e7f commit 692c469

File tree

6 files changed

+55
-27
lines changed

6 files changed

+55
-27
lines changed

view/frontend/templates/post/view-modern.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<?php } ?>
3838

3939
<!-- block data -->
40-
<div class="post-data-wrap mb-5">
40+
<div class="post-data-wrap mb-4">
4141
<!-- post author -->
4242
<?php if ($block->authorEnabled()) { ?>
4343
<?php if ($_author = $_post->getAuthor()) { ?>
@@ -127,7 +127,7 @@
127127
</div>
128128

129129
<div class="post-bottom">
130-
<div class="post-sharing-bottom mb-4">
130+
<div class="post-sharing-bottom">
131131
<!-- Go to www.addthis.com/dashboard to customize your tools -->
132132
<div class="addthis_inline_share_toolbox" addthis:url="<?= $block->escapeUrl($_postUrl) ?>"></div>
133133
</div>

view/frontend/templates/post/view/gallery.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
data-fancybox="gallery"
2828
href="<?= $block->escapeUrl($image) ?>"
2929
rel="nofollow">
30-
<img class="gallery-image" src="<?= $block->escapeUrl($image->resize(200)) ?>" alt="" />
30+
<img class="gallery-image" src="<?= $block->escapeUrl($image->resize(200, 133)) ?>" alt="" />
3131
</a>
3232
<?php } ?>
3333
</div>

view/frontend/templates/post/view/relatedproducts.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ if ($exist = $block->getItems()->getSize()) {
3838

3939
<?php if ($type == 'related' || $type == 'upsell'): ?>
4040
<?php if ($type == 'related'): ?>
41-
<div class="block <?= $block->escapeHtml($class); ?>"
41+
<div class="mfblog-replated-products-block block <?= $block->escapeHtml($class); ?>"
4242
data-mage-init='{"relatedProducts":{"relatedCheckbox":".related.checkbox"}}'
4343
data-limit="<?= $block->escapeHtml($limit); ?>"
4444
data-shuffle="<?= $block->escapeHtml($shuffle); ?>">

view/frontend/web/css/blog-m.css

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,20 @@
4141

4242
.post-content .post-description img {margin: 15px 0;max-width: 100%;height: auto}
4343
.post-content .post-description ul,
44-
.post-content .post-description ol {list-style-position: inside;}
44+
.post-content .post-description ol {list-style-position: outside;}
45+
46+
.post-content .post-description .mfblog-contents li {display: list-item;}
47+
.post-content .post-description .mfblog-contents li li {margin-left: 15px;}
4548

4649
.post-content .post-description .post-ftimg-hld {margin: 0 0 10px 0;}
4750
.post-content .post-description .post-ftimg-hld img {width:100%; padding:0; margin:0;}
4851

52+
.post-content .post-description .mfblog-contents-toc {list-style: decimal;}
53+
.post-content .post-description .mfblog-contents-toc li {margin-bottom: 1rem;}
54+
.post-content .post-description .mfblog-contents-toc li:before {content: none;}
55+
.post-content .post-description .mfblog-contents-toc li a {display: inline;}
56+
57+
4958
/* Post Title */
5059
.post-list .post-header .post-title-holder {display: flex;align-items: center;justify-content: space-between;flex-wrap: wrap;}
5160
.post-list .post-header .post-title {margin: 0;padding: 10px 0;}
@@ -60,7 +69,7 @@
6069
.post-view .post-nextprev-hld .prev-link {float:left}
6170
.post-view .post-nextprev-hld .next-link {float:right}
6271

63-
/* Post Gallery */
72+
/* Post Gallery */
6473
.post-view .post-gallery {margin:15px 0 15px 0}
6574
.post-view .post-gallery .gallery-image-hld {margin: 0 14px 14px 0; border:1px solid #ccc; display: block; float:left}
6675
.post-view .post-gallery .gallery-image{padding: 0; margin:0; display:block}

view/frontend/web/css/blog-new.css

Lines changed: 39 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
11
/* All Widget Templates ************************************************************************************************
22
***********************************************************************************************************************/
3-
.fav-color-green {color: #4caf50;color: #28a745;}
4-
.fav-color-yellow {color: #f9c100;color: #ffc107;}
3+
body.blog-page {
4+
--color-white: #ffffff;
5+
--color-green: #28a745;
6+
--color-yellow: #ffc107;
7+
--color-blue: #4db2ec;
8+
--color-black: #222222;
9+
--color-gray: #6c757d;
10+
--color-red: #dc3545;
11+
--border-color: #d5d6da;
12+
}
13+
14+
.fav-color-green {color: #28a745;}
15+
.fav-color-yellow {color: #ffc107;}
516
.fav-color-blue {color: #4db2ec;}
617
.fav-color-black {color: #222222;}
7-
.fav-color-gray {color: #607d8b;color: #6c757d;}
8-
.fav-color-red {color: #f44336;color: #dc3545;}
18+
.fav-color-gray {color: #6c757d;}
19+
.fav-color-red {color: #dc3545;}
920

1021

1122
/* Buttons */
@@ -25,15 +36,11 @@
2536
.clearfix:after {content:"";display:table;clear:both;}
2637

2738
.post-holder {margin-bottom: 40px;border-radius: 0;}
28-
/*
29-
.fa, .fas {font-family:'FontAwesome';font-weight: 900;font-size: 48px;}
30-
button {box-shadow: none !important;}
31-
*/
32-
/** {zoom: 1;}*/
39+
3340

3441

3542
/* Blog Post List *****************************************************************************************************/
36-
.post-list {margin-top: 0px;margin-bottom: 20px;list-style: none;padding-left: 0}
43+
.post-list {margin-top: 0;margin-bottom: 20px;list-style: none;padding-left: 0}
3744
.post-list .post-item.post-holder {margin: 0 0 30px 0;padding: 0;display: block;}
3845
.post-list .post-container {display: -ms-flexbox;display: flex;}
3946

@@ -119,11 +126,10 @@ button {box-shadow: none !important;}
119126
.blog-post-view .post-featured-image {font-size: 0;margin-bottom: 20px;}
120127
/* Tags */
121128
.blog-post-view .post-tag {margin-bottom: 20px;}
122-
.blog-post-view .post-tag .post-tag-title {display: inline-block;padding: 7px 12px;border: 1px solid #222;background: #222; color: #fff;line-height: 1;margin-right: 10px;text-transform: uppercase;font-size: 11px;}
123-
.blog-post-view .post-tag .post-tags a {display: inline-block;border: 1px solid #e8e8e8;color: #222;background: #fff;padding: 7px 12px;margin-right: 10px;line-height: 1;font-weight: 600;letter-spacing: 1px;font-size: 11px;text-transform: capitalize;}
129+
.blog-post-view .post-tag .post-tag-title {display: inline-block;padding: 7px 12px;border: 1px solid #222;background: #222;color: #fff;line-height: 1;margin: 0 10px 10px 0;text-transform: uppercase;font-size: 11px;}
130+
.blog-post-view .post-tag .post-tags a {display: inline-block;border: 1px solid var(--border-color);color: #222;background: #fff;padding: 7px 12px;margin-right: 10px;line-height: 1;font-weight: 600;letter-spacing: 1px;font-size: 11px;text-transform: capitalize;}
124131
.blog-post-view .post-tag .post-tags a.current,
125-
.blog-post-view .post-tag .post-tags a:hover {text-decoration: none;opacity: .9; background: #333;color: #fff;}
126-
132+
.blog-post-view .post-tag .post-tags a:hover {text-decoration: none;opacity: .9;background: #333;color: #fff;}
127133

128134
/* Post Text */
129135
.blog-post-view .post-description {margin-bottom: 30px;}
@@ -133,20 +139,27 @@ button {box-shadow: none !important;}
133139
.post-view .post-bottom {margin-top:30px;}
134140

135141
/* Post Sharing Bottom */
136-
.post-sharing-bottom {padding: 30px 0;margin-bottom: 20px;border-top: 1px solid #d5d6da;border-bottom: 1px solid #d5d6da;}
142+
.post-sharing-bottom {padding: 30px 0;margin-bottom: 30px;border-top: 1px solid var(--border-color);border-bottom: 1px solid var(--border-color);}
137143
.post-sharing-bottom .addthis_inline_share_toolbox {text-align: center;}
138144

145+
/* Post Gallery */
146+
/*.blog-post-view .post-gallery {display: flex;flex-wrap: wrap;}*/
147+
.blog-post-view .post-gallery {display: grid;grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));grid-gap: 1rem;margin-bottom: 20px;}
148+
.blog-post-view .post-gallery .gallery-image-hld {display: inline-block;}
149+
.blog-post-view .post-gallery .gallery-image-hld img {}
150+
139151
/* Post Navigation */
140-
.blog-post-view .post-nextprev {margin-bottom: 30px;display: flex;padding: 20px 0;}
152+
.blog-post-view .post-nextprev {display: flex;padding: 20px 0;margin-bottom: 30px;border-top: 1px solid var(--border-color);border-bottom: 1px solid var(--border-color);}
141153
.blog-post-view .post-nextprev .nextprev-link {display: block;font-size: 20px;color: #222222;font-weight: 600;}
142154
.blog-post-view .post-nextprev .nextprev-link:hover {text-decoration: none;}
143155
.blog-post-view .post-nextprev .nextprev-link span {display: block;color: #bbbbbb;font-size: 14px;font-weight: normal;}
144156

145157
/* Block Related */
146158
.blog-post-view .post-bottom .block.related {margin-bottom: 0;}
147-
.mfblog-replated-posts-block.block.related .block-title {margin: 0 0 25px;padding: 5px 0;border-bottom: 1px solid #222222;line-height: 1.42857143;}
148-
.mfblog-replated-posts-block.block.related .block-title strong {border-bottom: 3px solid #222222;padding-bottom: 2px;font-weight: 400;font-size: 18px;}
159+
.blog-post-view .post-bottom .block.related .block-title {margin: 0 0 25px;padding: 5px 0;border-bottom: 1px solid #222222;line-height: 1.42857143;}
160+
.blog-post-view .post-bottom .block.related .block-title strong {border-bottom: 3px solid #222222;padding-bottom: 2px;font-weight: 400;font-size: 18px;}
149161

162+
/* Related Posts */
150163
.mfblog-replated-posts-block.block.related .post-list {display: -ms-flexbox;display: flex;-ms-flex-wrap: wrap;flex-wrap: wrap;
151164
position: relative;overflow: hidden;margin-left: -10px;margin-right: -10px;}
152165
.mfblog-replated-posts-block.block.related .post-list .post-item {-webkit-flex-direction: column;-ms-flex-direction: column;flex-direction: column;margin-bottom: 2rem !important;-ms-flex: 0 0 25%;flex: 0 0 25%;max-width: 25%;padding-left: 10px;padding-right: 10px;width: 25%; box-sizing: border-box;}
@@ -161,6 +174,10 @@ button {box-shadow: none !important;}
161174
.mfblog-replated-posts-block.block.related .post-list .post-item {flex: 0 0 50%;max-width: 50%;}
162175
}
163176

177+
/* Related Products */
178+
.mfblog-replated-products-block.block.related .block-title {margin: 0 0 25px;padding: 5px 0;border-bottom: 1px solid #222222;line-height: 1.42857143;}
179+
.mfblog-replated-products-block.block.related .block-title strong {border-bottom: 3px solid #222222;padding-bottom: 2px;font-weight: 400;font-size: 18px;}
180+
164181
/* Block Comments */
165182
.block.comments .c-count {margin: 0 0 20px;padding: 0;border-bottom: 1px solid #222222;font-weight: 400;}
166183
.block.comments .c-count strong {border-bottom: 3px solid #222222;padding-bottom: 2px;font-weight: 400;font-size: 18px;display: inline-block;}
@@ -172,19 +189,22 @@ button {box-shadow: none !important;}
172189
}
173190
/* END Post View ******************************************************************************************************/
174191

192+
175193
/* Animation Zoom */
176194
.image-wrap .animation-type-zoom {display: block;line-height: 0;overflow: hidden;position: relative;}
177195
.image-container .animation-type-zoom {-webkit-transition: transform .3s ease,opacity .3s;transition: transform .3s ease,opacity .3s;}
178196
.image-container:hover .animation-type-zoom {transform: scale3d(1.1,1.1,1); -webkit-transform: scale3d(1.1,1.1,1);}
179197

198+
199+
/* Sidebar ************************************************************************************************************/
180200
/* Block Search */
181201
.widget.blog-search {width:100%;margin-bottom: 40px;position: relative;float: right;}
182202
.widget.blog-search .block-content {margin-bottom: 0;}
183203
.widget.blog-search .block-content .form {position: relative;}
184204
.widget.blog-search label {border: 0;clip: rect(0, 0, 0, 0);height: 1px;margin: -1px;overflow: hidden;padding: 0;position: absolute;width: 1px;text-decoration: none;display: inline-block;float: right;}
185205
.widget.blog-search .control {border-top: 0;margin: 0;padding: 0;clear: both;}
186206
.widget.blog-search input {position: static;padding-right: 35px;margin: 0;left: -300%;border: 1px solid #bbbbbb;}
187-
.widget.blog-search .action.search {position: absolute;top: 0;right: 0px;bottom: 0;height: 100%;z-index: 1;display: inline-block;background: #222222;-moz-box-sizing: content-box;border: 0;box-shadow: none;line-height: inherit;margin: 0;padding: 0 10px;text-decoration: none;text-shadow: none;font-weight: 400;border-radius: 0;}
207+
.widget.blog-search .action.search {position: absolute;top: 0;right: 0;bottom: 0;height: 100%;z-index: 1;display: inline-block;background: #222222;-moz-box-sizing: content-box;border: 0;box-shadow: none;line-height: inherit;margin: 0;padding: 0 10px;text-decoration: none;text-shadow: none;font-weight: 400;border-radius: 0;}
188208
.widget.blog-search .action.search:before {-webkit-font-smoothing: antialiased;content: '';margin: 0;vertical-align: top;display: inline-block;overflow: hidden;speak: none;width: 16px;height: 32px;background: url(../images/search-icon-white.svg) no-repeat -10px -7px;background-size: 35px;opacity: 1;}
189209
.widget.blog-search .action.search > span {border: 0;clip: rect(0, 0, 0, 0);height: 1px;margin: -1px;overflow: hidden;padding: 0;position: absolute;width: 1px;}
190210
/*.blog-search .actions .action.search {background: #222222;right: 0;padding: 0 10px;border-radius: 0;}*/

view/frontend/web/css/bootstrap-4.4.1-custom-min.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/* Bootstrap v4.4.1 custom min ***************************************************************************************************/
22
/* padding */
3-
43
.p-0 {padding: 0 !important;}
54
.p-2 {padding: 0.5rem !important;}
65
.pl-2, .px-2 {padding-left: 0.5rem !important;}
@@ -32,7 +31,7 @@
3231
.mt-4, .my-4 {margin-top: 1.5rem !important;}
3332
.mb-4, .my-4 {margin-bottom: 1.5rem !important;}
3433
.mt-5, .my-5 {margin-top: 3rem !important;}
35-
.mb-5, .my-5 {margin-bottom: 5px !important;}
34+
.mb-5, .my-5 {margin-bottom: 3rem !important;}
3635
@media (min-width: 768px) {
3736
.mb-md-0 {margin-bottom: 0 !important;}
3837
.mb-md-3 {margin-bottom: 1rem !important;}

0 commit comments

Comments
 (0)