CMS Development

choltzman
Participant

Displaying Articles inline.

For this page; https://community.hubspot.com/t5/Content-Design-Questions/bd-p/designers_support

 

I have some cards that are stacking, but I want them all in one row instead of being stacked. 

 

Here is my code courtesy of Andy Tran (http://codepen.io/andytran/pen/BNjymy) which i modified

 <!-- Normal Demo-->
<!--
Copyright (c) 2017 by Andy Tran (http://codepen.io/andytran/pen/BNjymy)


Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-->


    <!-- Post-->
    <div class="post-module">
      <!-- Thumbnail-->
      <div class="thumbnail">
        <div class="date">
          <div class="day">27</div>
          <div class="month">Mar</div>
        </div><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/169963/photo-1429043794791-eb8f26f44081.jpeg"/>
      </div>
      <!-- Post Content-->
      <div class="post-content">
        <div class="category">Accomodations</div>
        <div class="category2">Agenda</div>
        <h1 class="title">City Lights in Vegas</h1>
        <h2 class="sub_title">The city that never sleeps.</h2>
        <p class="description">New York, the largest city in the U.S., is an architectural marvel with plenty of historic monuments, magnificent buildings and countless dazzling skyscrapers.</p>
      </div>
    </div>

  <!-- Post-->
    <div class="post-module">
      <!-- Thumbnail-->
      <div class="thumbnail">
        <div class="date">
          <div class="day">27</div>
          <div class="month">Mar</div>
        </div><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/169963/photo-1429043794791-eb8f26f44081.jpeg"/>
      </div>
      <!-- Post Content-->
      <div class="post-content">
        <div class="category">Accomodations</div>
        <div class="category2">Agenda</div>
        <h1 class="title">City Lights in Vegas</h1>
        <h2 class="sub_title">The city that never sleeps.</h2>
        <p class="description">New York, the largest city in the U.S., is an architectural marvel with plenty of historic monuments, magnificent buildings and countless dazzling skyscrapers.</p>
      </div>
    </div>

  <!-- Post-->
    <div class="post-module">
      <!-- Thumbnail-->
      <div class="thumbnail">
        <div class="date">
          <div class="day">27</div>
          <div class="month">Mar</div>
        </div><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/169963/photo-1429043794791-eb8f26f44081.jpeg"/>
      </div>
      <!-- Post Content-->
      <div class="post-content">
        <div class="category">Accomodations</div>
        <div class="category2">Agenda</div>
        <h1 class="title">City Lights in Vegas</h1>
        <h2 class="sub_title">The city that never sleeps.</h2>
        <p class="description">New York, the largest city in the U.S., is an architectural marvel with plenty of historic monuments, magnificent buildings and countless dazzling skyscrapers.</p>
      </div>
    </div>

  <!-- Post-->
    <div class="post-module">
      <!-- Thumbnail-->
      <div class="thumbnail">
        <div class="date">
          <div class="day">27</div>
          <div class="month">Mar</div>
        </div><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/169963/photo-1429043794791-eb8f26f44081.jpeg"/>
      </div>
      <!-- Post Content-->
      <div class="post-content">
        <div class="category">Accomodations</div>
        <div class="category2">Agenda</div>
        <h1 class="title">City Lights in Vegas</h1>
        <h2 class="sub_title">The city that never sleeps.</h2>
        <p class="description">New York, the largest city in the U.S., is an architectural marvel with plenty of historic monuments, magnificent buildings and countless dazzling skyscrapers.</p>
      </div>
    </div>
  <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>

And Here is the CSS: 

/*Code-pen CSS
* Copyright (c) 2017 by Andy Tran (http://codepen.io/andytran/pen/BNjymy)
* */

$ripple: #666;
$white: #FFF;
$black: #000;

.at-button {
z-index: 10000000;
position: fixed;
right: 24px;
bottom: 24px;
background: $white;
width: 48px;
height: 48px;
padding: 12px;
border-radius: 100%;
box-sizing: border-box;
color: $ripple;
animation: at-ripple 0.6s linear infinite;

&:hover {
i {
transform: rotate(135deg);
}
}

i {
transform: rotate(-45deg);
transition: 0.3s ease;
}
}

 

@keyframes at-ripple {
0% {
box-shadow: 0 4px 10px rgba($ripple, 0.1),
0 0 0 0 rgba($ripple, 0.1),
0 0 0 5px rgba($ripple, 0.1),
0 0 0 10px rgba($ripple, 0.1);
}
100% {
box-shadow: 0 4px 10px rgba($ripple, 0.1),
0 0 0 5px rgba($ripple, 0.1),
0 0 0 10px rgba($ripple, 0.1),
0 0 0 20px rgba($ripple, 0);
}
}

/*CSS */
body {
background: #f2f2f2;
font-family: 'proxima-nova-soft', sans-serif;
font-size: 14px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.post-module {
position: relative;
z-index: 1;
display: inline-block;
background: #FFFFFF;
min-width: 270px;
height: 470px;
-webkit-box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.15);
-moz-box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.15);
box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.15);
-webkit-transition: all 0.3s linear 0s;
-moz-transition: all 0.3s linear 0s;
-ms-transition: all 0.3s linear 0s;
-o-transition: all 0.3s linear 0s;
transition: all 0.3s linear 0s;
}
.post-module:hover,
.hover {
-webkit-box-shadow: 0px 1px 35px 0px rgba(0, 0, 0, 0.3);
-moz-box-shadow: 0px 1px 35px 0px rgba(0, 0, 0, 0.3);
box-shadow: 0px 1px 35px 0px rgba(0, 0, 0, 0.3);
}
.post-module:hover .thumbnail img,
.hover .thumbnail img {
-webkit-transform: scale(1.1);
-moz-transform: scale(1.1);
transform: scale(1.1);
opacity: .6;
}
.post-module .thumbnail {
background: #000000;
height: 400px;
overflow: hidden;
}
.post-module .thumbnail .date {
position: absolute;
top: 20px;
right: 20px;
z-index: 1;
/*Circle Date colour*/
background: #1F8FCE;
width: 80px;
height: 80px;
padding: 12.5px 0;
-webkit-border-radius: 100%;
-moz-border-radius: 100%;
border-radius: 100%;
color: #FFFFFF;
font-weight: 700;
text-align: center;
-webkti-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.post-module .thumbnail .date .day {
font-size: 18px;
}
.post-module .thumbnail .date .month {
font-size: 12px;
text-transform: uppercase;
}
.post-module .thumbnail img {
display: block;
width: 120%;
-webkit-transition: all 0.3s linear 0s;
-moz-transition: all 0.3s linear 0s;
-ms-transition: all 0.3s linear 0s;
-o-transition: all 0.3s linear 0s;
transition: all 0.3s linear 0s;
}
.post-module .post-content {
position: absolute;
bottom: 0;
background: #FFFFFF;
width: 100%;
padding: 30px;
-webkti-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-transition: all 0.3s cubic-bezier(0.37, 0.75, 0.61, 1.05) 0s;
-moz-transition: all 0.3s cubic-bezier(0.37, 0.75, 0.61, 1.05) 0s;
-ms-transition: all 0.3s cubic-bezier(0.37, 0.75, 0.61, 1.05) 0s;
-o-transition: all 0.3s cubic-bezier(0.37, 0.75, 0.61, 1.05) 0s;
transition: all 0.3s cubic-bezier(0.37, 0.75, 0.61, 1.05) 0s;
}
.post-module .post-content .category {
position: absolute;
top: -34px;
left: 0;
background: #1F8FCE;
padding: 10px 15px;
color: #FFFFFF;
font-size: 14px;
font-weight: 600;
text-transform: uppercase;
}
.post-module .post-content .category2 {
position: absolute;
top: -34px;
left: 175px;
background: #1F8FCE;
padding: 10px 15px;
color: #FFFFFF;
font-size: 14px;
font-weight: 600;
text-transform: uppercase;
}
.post-module .post-content .title {
margin: 0;
padding: 0 0 10px;
color: #333333;
font-size: 26px;
font-weight: 700;
}
.post-module .post-content .sub_title {
margin: 0;
padding: 0 0 20px;
color: #1F8FCE;
font-size: 20px;
font-weight: 400;
}
.post-module .post-content .description {
display: none;
color: #666666;
font-size: 14px;
line-height: 1.8em;
}
.post-module .post-content .post-meta {
margin: 30px 0 0;
color: #999999;
}
.post-module .post-content .post-meta .timestamp {
margin: 0 16px 0 0;
}
.post-module .post-content .post-meta a {
color: #999999;
text-decoration: none;
}
.hover .post-content .description {
display: block !important;
height: auto !important;
opacity: 1 !important;
}
.container {
max-width: 800px;
min-width: 640px;
margin: 0 auto;
}
.container:before,
.container:after {
content: '';
display: block;
clear: both;
}
.container .column {
width: 50%;
padding: 0 25px;
-webkti-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
float: left;
}
.container .column .demo-title {
margin: 0 0 15px;
color: #666666;
font-size: 18px;
font-weight: bold;
text-transform: uppercase;
}
.container .info {
width: 300px;
margin: 50px auto;
text-align: center;
}
.container .info h1 {
margin: 0 0 15px;
padding: 0;
font-size: 24px;
font-weight: bold;
color: #333333;
}
.container .info span {
color: #666666;
font-size: 12px;
}
.container .info span a {
color: #000000;
text-decoration: none;
}
.container .info span .fa {
color: #e74c3c;
}

 

There is also a toggle/hover function I can't figure out how to remove without loosing the expanded state which i want to make the only state. 

 

'this is the js code for it: $(window).load(function() {
$('.post-module').hover(function() {
$(this).find('.description').stop().animate({
height: "toggle",
opacity: "toggle"
}, 300);
});
});

 

 

0 Upvotes
1 Reply 1
roisinkirby
HubSpot Product Team
HubSpot Product Team

Displaying Articles inline.

Hi @choltzman I'm sorry you didn't get the answer you were looking for here. Are you still at a roadblock? Happy to help where I can. 

0 Upvotes