gameshelf / gameshelf.github.io

NOT MAINTAINED ANYMORE
https://gameshelf.github.io/
28 stars 7 forks source link

"Shelf" view of all games / Grid view #12

Closed Rvervuurt closed 6 years ago

Rvervuurt commented 6 years ago

I wrote some custom CSS to display all games in a "shelf" view.

screen shot 2018-01-05 at 14 27 58

I tried to create a pull-request, but I have no idea how (I barely use Github...), so I just paste the CSS below. All that's needed from your side, is a button that toggles the class shelf_view on table, the CSS should do the rest!

Filtering still works, btw! It's also responsive, because of ##flexbox.


table {
    transition: all .4s ease-in;
}

table.shelf_view tr th {
    display: none;
    transition: all .4s ease-in;
}

table.shelf_view tbody {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    transition: all .4s ease-in;
}

table.shelf_view tr {
    background-color: transparent !important;
    float: left;
    flex-basis: 20%;
    text-align: center;
    margin-bottom: 20px;
    transition: all .4s ease-in;
}

table.shelf_view tr td {
    border: none !important;
    text-align: center;
    width: 100%;
    display: block;
    position: relative;
    transition: all .4s ease-in;
}

table.shelf_view tr td img {
    height: 150px;
    width: auto;
    transition: all .4s ease-in;
}

table.shelf_view tr td a {
    display: block;
    transition: all .4s ease-in;
}

table.shelf_view tr td:not(:first-child) {
    display: none;
    transition: all .4s ease-in;
}
junqdu commented 6 years ago

@Rvervuurt check it out