/* vim: set ts=2 sw=2 et tw=80: */ :root { --columns: 14; } @media screen and (max-width: 3000px) { :root { --columns: 13; } } @media screen and (max-width: 2800px) { :root { --columns: 12; } } @media screen and (max-width: 2600px) { :root { --columns: 11; } } @media screen and (max-width: 2400px) { :root { --columns: 10; } } @media screen and (max-width: 2200px) { :root { --columns: 9; } } @media screen and (max-width: 2000px) { :root { --columns: 8; } } @media screen and (max-width: 1800px) { :root { --columns: 7; } } @media screen and (max-width: 1600px) { :root { --columns: 6; } } @media screen and (max-width: 1400px) { :root { --columns: 5; } } @media screen and (max-width: 1200px) { :root { --columns: 4; } } @media screen and (max-width: 1000px) { :root { --columns: 3; } } @media screen and (max-width: 800px) { :root { --columns: 2; } } @media screen and (max-width: 600px) { :root { --columns: 1; } } * { font-size: 14px; } body { font-family: 'Fira Sans', sans-serif; margin: 0; display: flex; height: 100vh; max-height: 100vh; flex-direction: column; } nav { flex: 0 0; } main { flex: 1; display: flex; flex-grow: 1; min-height: 0; } #visualization { width: 15rem; padding: .25rem; border-radius: .125rem; margin-right: .5rem; background: #AAA; } #docs { flex-grow: 1; flex: 2; display: grid; grid-template-columns: repeat(var(--columns),1fr); overflow-y: auto; } .title { background: #333; color: white; text-align: center; padding: 1rem; } .title h1 { margin: 0; font-size: 1.4rem; } .searchbox { padding: 1em; background: #666; } .searchbox input { width: calc(100% - 2em); } .document { margin: .25rem; background: #CCC; border-radius: .125rem; text-align: center; max-width: calc((100vw - 16rem - 20px) / var(--columns) + 1rem); max-height: calc((100vw - 16rem - 20px) / var(--columns) + 20rem); } .document.white { background: white; height: 1rem; } .document .img_box { background: #222; padding: .5rem; padding-bottom: 0; display: inline-block; width: calc((100vw - 16rem - 20px) / var(--columns) - 3rem); height: calc((100vw - 16rem - 20px) / var(--columns) - 3rem); background-repeat: no-repeat; background-position: center center; background-size: cover; } .document .description { bottom: 0; margin-top: .5rem; max-height: 20rem; overflow-y: auto; } .document p { word-wrap: break-word; } .document h2 { font-size: 1.2rem; } .document h3 { font-size: 1.1rem; } .document img { margin: .5rem .5rem 0 .5rem; } .document h2, .document h3, .document p { margin: .25rem; };