Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. Site Bugs / Suggestions
  4. New Hom Page Layout card sizes

New Hom Page Layout card sizes

Scheduled Pinned Locked Moved Site Bugs / Suggestions
docker
17 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Graeme_GrantG Graeme_Grant

    The size of the card is incosistent and causing staggered layout - see second row. IMHO, this is not a clean look. Also, the darkened card background and borger looks a bit aged, sorry. As a suggestion, I would be more inclined to do the following:

    .homepage .timeline .container-col2 {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 0 !important;
    gap: 1rem;
    }

    then for each card:

    .homepage .timeline .container-col2>div {
    width: calc(50% - 3rem);
    padding: 16px 20px 0px !important;
    box-shadow: rgb(0 0 0 / 8%) 2px 4px 8px 2px;
    border-radius: 0.4rem;
    }

    Then push the tags to the bottom of the card so they all line up... But that is just me ... :cool:

    Graeme


    "I fear not the man who has practiced ten thousand kicks one time, but I fear the man that has practiced one kick ten thousand times!" - Bruce Lee

    C Offline
    C Offline
    Chris Maunder
    wrote on last edited by
    #2

    We've gone back and forth on this one. The big issue is that not all articles have thumbnails. Previously I had placeholders that represented the article type, but I'm so, so over that. It added no value. So the decision was made to show articles with thumbnails large than articles without - with the hope that authors would spend a moment to add a nice thumbnail. But again the issue then comes down to heading wrapping. Long headings mean more room. We can trim, or add ellipsis, but neither are great. We could place the items in a grid. That would be...OK. But there'd be odd whitespace. Or we do what we do and we have, well, odd alignment (but a fairly standard newspaper-ish style). Or we go back to 1 column and have awful whitespace. My preference is definitely for a denser layout. Background vs shadow. My true preference was neither, and I may yet remove the background shade and border. We just needed a way to delineate the items clearly. More whitespace is the better solution.

    cheers Chris Maunder

    Graeme_GrantG Richard DeemingR 2 Replies Last reply
    0
    • C Chris Maunder

      We've gone back and forth on this one. The big issue is that not all articles have thumbnails. Previously I had placeholders that represented the article type, but I'm so, so over that. It added no value. So the decision was made to show articles with thumbnails large than articles without - with the hope that authors would spend a moment to add a nice thumbnail. But again the issue then comes down to heading wrapping. Long headings mean more room. We can trim, or add ellipsis, but neither are great. We could place the items in a grid. That would be...OK. But there'd be odd whitespace. Or we do what we do and we have, well, odd alignment (but a fairly standard newspaper-ish style). Or we go back to 1 column and have awful whitespace. My preference is definitely for a denser layout. Background vs shadow. My true preference was neither, and I may yet remove the background shade and border. We just needed a way to delineate the items clearly. More whitespace is the better solution.

      cheers Chris Maunder

      Graeme_GrantG Offline
      Graeme_GrantG Offline
      Graeme_Grant
      wrote on last edited by
      #3

      Yeah, hard one ... a placeholder image for no image would be the go-to. The staggered/mason layout is not that pretty. Heading, yeah, that is a tough one. I used flex, that allows for scaling the layout easily for media breakpoints. It is also easy to place sections... Heading Image, Description, & Tag are fixed [scalable] sizes ... the Title & Descriptions are top-aligned and ellipsed are a certain number of lines. for the heading, maybe bottom aligned... Want me to mock something? As for the card edge, drop shadow is more modern. If not that, don't use border as it affects layout calculations, use outine instead.

      Graeme


      "I fear not the man who has practiced ten thousand kicks one time, but I fear the man that has practiced one kick ten thousand times!" - Bruce Lee

      “I fear not the man who has practised 10,000 kicks once, but I fear the man who has practised one kick 10,000 times.” - Bruce Lee.

      C 1 Reply Last reply
      0
      • C Chris Maunder

        We've gone back and forth on this one. The big issue is that not all articles have thumbnails. Previously I had placeholders that represented the article type, but I'm so, so over that. It added no value. So the decision was made to show articles with thumbnails large than articles without - with the hope that authors would spend a moment to add a nice thumbnail. But again the issue then comes down to heading wrapping. Long headings mean more room. We can trim, or add ellipsis, but neither are great. We could place the items in a grid. That would be...OK. But there'd be odd whitespace. Or we do what we do and we have, well, odd alignment (but a fairly standard newspaper-ish style). Or we go back to 1 column and have awful whitespace. My preference is definitely for a denser layout. Background vs shadow. My true preference was neither, and I may yet remove the background shade and border. We just needed a way to delineate the items clearly. More whitespace is the better solution.

        cheers Chris Maunder

        Richard DeemingR Offline
        Richard DeemingR Offline
        Richard Deeming
        wrote on last edited by
        #4

        Chris Maunder wrote:

        We could place the items in a grid. That would be...OK. But there'd be odd whitespace.

        Unless you used grid-auto-flow: row dense; :) grid-auto-flow - CSS: Cascading Style Sheets | MDN[^]


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

        Graeme_GrantG C 2 Replies Last reply
        0
        • Richard DeemingR Richard Deeming

          Chris Maunder wrote:

          We could place the items in a grid. That would be...OK. But there'd be odd whitespace.

          Unless you used grid-auto-flow: row dense; :) grid-auto-flow - CSS: Cascading Style Sheets | MDN[^]


          "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

          Graeme_GrantG Offline
          Graeme_GrantG Offline
          Graeme_Grant
          wrote on last edited by
          #5

          Yes, there is that too, but now we are looking at the blades of grass deep in the forest of trees... ;P Grid is my preferred over flex for a lot of things too... :-D

          Graeme


          "I fear not the man who has practiced ten thousand kicks one time, but I fear the man that has practiced one kick ten thousand times!" - Bruce Lee

          “I fear not the man who has practised 10,000 kicks once, but I fear the man who has practised one kick 10,000 times.” - Bruce Lee.

          1 Reply Last reply
          0
          • Richard DeemingR Richard Deeming

            Chris Maunder wrote:

            We could place the items in a grid. That would be...OK. But there'd be odd whitespace.

            Unless you used grid-auto-flow: row dense; :) grid-auto-flow - CSS: Cascading Style Sheets | MDN[^]


            "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

            C Offline
            C Offline
            Chris Maunder
            wrote on last edited by
            #6

            An item with a nice thumbnail next to an item without will result in a chunk of ugly whitespace. That's specifically what I was trying to avoid. Still - it's 2 seconds to play around and see how it looks.

            cheers Chris Maunder

            1 Reply Last reply
            0
            • Graeme_GrantG Graeme_Grant

              Yeah, hard one ... a placeholder image for no image would be the go-to. The staggered/mason layout is not that pretty. Heading, yeah, that is a tough one. I used flex, that allows for scaling the layout easily for media breakpoints. It is also easy to place sections... Heading Image, Description, & Tag are fixed [scalable] sizes ... the Title & Descriptions are top-aligned and ellipsed are a certain number of lines. for the heading, maybe bottom aligned... Want me to mock something? As for the card edge, drop shadow is more modern. If not that, don't use border as it affects layout calculations, use outine instead.

              Graeme


              "I fear not the man who has practiced ten thousand kicks one time, but I fear the man that has practiced one kick ten thousand times!" - Bruce Lee

              C Offline
              C Offline
              Chris Maunder
              wrote on last edited by
              #7

              I'm more than happy to take suggestions so would love to see your ideas.

              cheers Chris Maunder

              Graeme_GrantG 2 Replies Last reply
              0
              • C Chris Maunder

                I'm more than happy to take suggestions so would love to see your ideas.

                cheers Chris Maunder

                Graeme_GrantG Offline
                Graeme_GrantG Offline
                Graeme_Grant
                wrote on last edited by
                #8

                I'll try and knock something together later today...

                Graeme


                "I fear not the man who has practiced ten thousand kicks one time, but I fear the man that has practiced one kick ten thousand times!" - Bruce Lee

                “I fear not the man who has practised 10,000 kicks once, but I fear the man who has practised one kick 10,000 times.” - Bruce Lee.

                1 Reply Last reply
                0
                • C Chris Maunder

                  I'm more than happy to take suggestions so would love to see your ideas.

                  cheers Chris Maunder

                  Graeme_GrantG Offline
                  Graeme_GrantG Offline
                  Graeme_Grant
                  wrote on last edited by
                  #9

                  I took the liberty to change the layout so that changes to the html & css are minimal. Elements keep their order in the html code. Also, I have used a placeholder image where the author supplies none (sorry Fred for replacing your image :cool:). Have a look at this: I had to remove (comment out) the div wrapper around the image and text and rename a div class from text to description - see below:

                      [![](/img/missing-article-image.png)](/Articles/5338801/Build-NFT-Collection-Web3-Application-with-Hardha)
                  
                  
                  
                  
                      Use React and hardhat typescript to build a NFT contract web3 application from scratch
                  

                  Then used the following scss:

                  .homepage {
                  .timeline {
                  .message-list {
                  padding-bottom: 10px;
                  font-size: 16px !important;
                  }

                      .container-col2 {
                          display: flex;
                          flex-direction: row;
                          flex-wrap: wrap;
                          justify-content: flex-start;
                          padding: 0 !important;
                          gap: 1rem;
                  
                          >div {
                              width: calc(50% - 0.5rem);
                              padding: 16px 20px 0px !important;
                              box-shadow: rgb(0 0 0 / 8%) 2px 4px 8px 2px;
                              outline:rgb(0 0 0 / 8%) solid 1px;
                              border-radius: 0.4rem;
                              background-color: #fff;
                          }
                  
                          .content-list-item {
                              display: flex;
                              flex-direction: column;
                              align-items: stretch;
                              min-height: 100%;
                              padding-bottom: 1em;
                  
                              &.medium {
                                  margin: 0 5px 14px 0;
                  
                                  .title {
                                      flex-shrink: 0;
                                      order: 2;
                                      padding: 0;
                                      margin-top:.5em; // added extra padding
                                      font-size: 22px !important;
                                      line-height: 125%;
                                      font-weight: 500;
                  
                                      a {
                  

                  “I fear not the man who has practised 10,000 kicks once, but I fear the man who has practised one kick 10,000 times.” - Bruce Lee.

                  C 1 Reply Last reply
                  0
                  • Graeme_GrantG Graeme_Grant

                    The size of the card is incosistent and causing staggered layout - see second row. IMHO, this is not a clean look. Also, the darkened card background and borger looks a bit aged, sorry. As a suggestion, I would be more inclined to do the following:

                    .homepage .timeline .container-col2 {
                    display: flex;
                    flex-direction: row;
                    flex-wrap: wrap;
                    justify-content: flex-start;
                    padding: 0 !important;
                    gap: 1rem;
                    }

                    then for each card:

                    .homepage .timeline .container-col2>div {
                    width: calc(50% - 3rem);
                    padding: 16px 20px 0px !important;
                    box-shadow: rgb(0 0 0 / 8%) 2px 4px 8px 2px;
                    border-radius: 0.4rem;
                    }

                    Then push the tags to the bottom of the card so they all line up... But that is just me ... :cool:

                    Graeme


                    "I fear not the man who has practiced ten thousand kicks one time, but I fear the man that has practiced one kick ten thousand times!" - Bruce Lee

                    C Offline
                    C Offline
                    Chris Maunder
                    wrote on last edited by
                    #10

                    cheers Chris Maunder

                    Graeme_GrantG 2 Replies Last reply
                    0
                    • C Chris Maunder

                      cheers Chris Maunder

                      Graeme_GrantG Offline
                      Graeme_GrantG Offline
                      Graeme_Grant
                      wrote on last edited by
                      #11

                      Yeah, placeholder image is required. Moving Title to under the image also fixes ugly misalignments. It was worth a try ...

                      Graeme


                      "I fear not the man who has practiced ten thousand kicks one time, but I fear the man that has practiced one kick ten thousand times!" - Bruce Lee

                      “I fear not the man who has practised 10,000 kicks once, but I fear the man who has practised one kick 10,000 times.” - Bruce Lee.

                      1 Reply Last reply
                      0
                      • Graeme_GrantG Graeme_Grant

                        I took the liberty to change the layout so that changes to the html & css are minimal. Elements keep their order in the html code. Also, I have used a placeholder image where the author supplies none (sorry Fred for replacing your image :cool:). Have a look at this: I had to remove (comment out) the div wrapper around the image and text and rename a div class from text to description - see below:

                            [![](/img/missing-article-image.png)](/Articles/5338801/Build-NFT-Collection-Web3-Application-with-Hardha)
                        
                        
                        
                        
                            Use React and hardhat typescript to build a NFT contract web3 application from scratch
                        

                        Then used the following scss:

                        .homepage {
                        .timeline {
                        .message-list {
                        padding-bottom: 10px;
                        font-size: 16px !important;
                        }

                            .container-col2 {
                                display: flex;
                                flex-direction: row;
                                flex-wrap: wrap;
                                justify-content: flex-start;
                                padding: 0 !important;
                                gap: 1rem;
                        
                                >div {
                                    width: calc(50% - 0.5rem);
                                    padding: 16px 20px 0px !important;
                                    box-shadow: rgb(0 0 0 / 8%) 2px 4px 8px 2px;
                                    outline:rgb(0 0 0 / 8%) solid 1px;
                                    border-radius: 0.4rem;
                                    background-color: #fff;
                                }
                        
                                .content-list-item {
                                    display: flex;
                                    flex-direction: column;
                                    align-items: stretch;
                                    min-height: 100%;
                                    padding-bottom: 1em;
                        
                                    &.medium {
                                        margin: 0 5px 14px 0;
                        
                                        .title {
                                            flex-shrink: 0;
                                            order: 2;
                                            padding: 0;
                                            margin-top:.5em; // added extra padding
                                            font-size: 22px !important;
                                            line-height: 125%;
                                            font-weight: 500;
                        
                                            a {
                        
                        C Offline
                        C Offline
                        Chris Maunder
                        wrote on last edited by
                        #12

                        That's interesting. Having the image top, then the heading, avoids image mis-alignment (mostly). I'm not a fan of image placeholders (one of the reasons for this design tweak). If an author doesn't provide an image that's suitable for a thumbnail, then maybe it's just not a visual article and we should leave it at that. Sean is going through articles and adding appropriate thumbnails where it makes sense, but we're erring on the side of a light touch on this.

                        cheers Chris Maunder

                        Graeme_GrantG 1 Reply Last reply
                        0
                        • C Chris Maunder

                          That's interesting. Having the image top, then the heading, avoids image mis-alignment (mostly). I'm not a fan of image placeholders (one of the reasons for this design tweak). If an author doesn't provide an image that's suitable for a thumbnail, then maybe it's just not a visual article and we should leave it at that. Sean is going through articles and adding appropriate thumbnails where it makes sense, but we're erring on the side of a light touch on this.

                          cheers Chris Maunder

                          Graeme_GrantG Offline
                          Graeme_GrantG Offline
                          Graeme_Grant
                          wrote on last edited by
                          #13

                          Chris Maunder wrote:

                          I'm not a fan of image placeholders (one of the reasons for this design tweak).

                          I do hear you, but does throw out card alignment... I guess masonry is the only option then. As for the (mostly) Image alignment in my sample, that was due to the height: auto calulation was 266.667px... Here is the placeholder that I used, just in case you want to have a better look:

                          Graeme


                          "I fear not the man who has practiced ten thousand kicks one time, but I fear the man that has practiced one kick ten thousand times!" - Bruce Lee

                          “I fear not the man who has practised 10,000 kicks once, but I fear the man who has practised one kick 10,000 times.” - Bruce Lee.

                          C 1 Reply Last reply
                          0
                          • C Chris Maunder

                            cheers Chris Maunder

                            Graeme_GrantG Offline
                            Graeme_GrantG Offline
                            Graeme_Grant
                            wrote on last edited by
                            #14

                            Oh wow, it is live ... :omg: I gather you're going to compact the articles that have no image... I still think that the tags should be pushed to the bottom of the card and leave the gap with the description > text.

                            Graeme


                            "I fear not the man who has practiced ten thousand kicks one time, but I fear the man that has practiced one kick ten thousand times!" - Bruce Lee

                            “I fear not the man who has practised 10,000 kicks once, but I fear the man who has practised one kick 10,000 times.” - Bruce Lee.

                            1 Reply Last reply
                            0
                            • Graeme_GrantG Graeme_Grant

                              Chris Maunder wrote:

                              I'm not a fan of image placeholders (one of the reasons for this design tweak).

                              I do hear you, but does throw out card alignment... I guess masonry is the only option then. As for the (mostly) Image alignment in my sample, that was due to the height: auto calulation was 266.667px... Here is the placeholder that I used, just in case you want to have a better look:

                              Graeme


                              "I fear not the man who has practiced ten thousand kicks one time, but I fear the man that has practiced one kick ten thousand times!" - Bruce Lee

                              C Offline
                              C Offline
                              Chris Maunder
                              wrote on last edited by
                              #15

                              I was thinking about masonry but I can't help think that's probably overkill. I'm sure we can dodgy something up that will achieve a reasonable layout without the overhead

                              cheers Chris Maunder

                              1 Reply Last reply
                              0
                              • Graeme_GrantG Graeme_Grant

                                The size of the card is incosistent and causing staggered layout - see second row. IMHO, this is not a clean look. Also, the darkened card background and borger looks a bit aged, sorry. As a suggestion, I would be more inclined to do the following:

                                .homepage .timeline .container-col2 {
                                display: flex;
                                flex-direction: row;
                                flex-wrap: wrap;
                                justify-content: flex-start;
                                padding: 0 !important;
                                gap: 1rem;
                                }

                                then for each card:

                                .homepage .timeline .container-col2>div {
                                width: calc(50% - 3rem);
                                padding: 16px 20px 0px !important;
                                box-shadow: rgb(0 0 0 / 8%) 2px 4px 8px 2px;
                                border-radius: 0.4rem;
                                }

                                Then push the tags to the bottom of the card so they all line up... But that is just me ... :cool:

                                Graeme


                                "I fear not the man who has practiced ten thousand kicks one time, but I fear the man that has practiced one kick ten thousand times!" - Bruce Lee

                                C Offline
                                C Offline
                                Chris Maunder
                                wrote on last edited by
                                #16

                                While I ponder what to do about missing thumbnails, variable length titles, and whether to compact or be spacious or get Masonry to do magic, I added a complication at the bottom of the homepage feed that may be of interest to some.

                                cheers Chris Maunder

                                Graeme_GrantG 1 Reply Last reply
                                0
                                • C Chris Maunder

                                  While I ponder what to do about missing thumbnails, variable length titles, and whether to compact or be spacious or get Masonry to do magic, I added a complication at the bottom of the homepage feed that may be of interest to some.

                                  cheers Chris Maunder

                                  Graeme_GrantG Offline
                                  Graeme_GrantG Offline
                                  Graeme_Grant
                                  wrote on last edited by
                                  #17

                                  I like the swapping and remembering the choice... Would it not be better to put it at the top? Maybe as well as the bottom... As for the image, maybe a faded version of the image that I suggested. Better than a blank area while you decide...

                                  Graeme


                                  "I fear not the man who has practiced ten thousand kicks one time, but I fear the man that has practiced one kick ten thousand times!" - Bruce Lee

                                  “I fear not the man who has practised 10,000 kicks once, but I fear the man who has practised one kick 10,000 times.” - Bruce Lee.

                                  1 Reply Last reply
                                  0
                                  Reply
                                  • Reply as topic
                                  Log in to reply
                                  • Oldest to Newest
                                  • Newest to Oldest
                                  • Most Votes


                                  • Login

                                  • Don't have an account? Register

                                  • Login or register to search.
                                  • First post
                                    Last post
                                  0
                                  • Categories
                                  • Recent
                                  • Tags
                                  • Popular
                                  • World
                                  • Users
                                  • Groups