From 1990a0a536cb0e2cedc144d299f838d0e370b78b Mon Sep 17 00:00:00 2001 From: Christian Bundy Date: Mon, 24 Jun 2019 12:10:02 -0700 Subject: [PATCH] Refactor avatar style to use border-radius --- index.js | 1 + views/layout.html | 108 +++++++++++++++++++++++----------------------- 2 files changed, 56 insertions(+), 53 deletions(-) diff --git a/index.js b/index.js index 5b965a7..8cc786a 100644 --- a/index.js +++ b/index.js @@ -37,6 +37,7 @@ async function home (ctx) { limit: 32 } ) + const rawMsgs = await new Promise((resolve, reject) => { pull( msgSource, diff --git a/views/layout.html b/views/layout.html index 5f71b79..d1ce532 100644 --- a/views/layout.html +++ b/views/layout.html @@ -18,64 +18,66 @@ align-items: center; justify-content: center; } -/* https://www.desmos.com/calculator/3elcf5cwhn */ - h1 { font-size: 150%; } - h2 { font-size: 128%; } - h3 { font-size: 120%; } - h4 { font-size: 116%; } - h5 { font-size: 113%; } - h6 { font-size: 111%; } - h1 { - margin-bottom: 0.5em; - border-bottom: 1px solid #0000001a; - } + /* https://www.desmos.com/calculator/3elcf5cwhn */ + h1 { font-size: 150%; } + h2 { font-size: 128%; } + h3 { font-size: 120%; } + h4 { font-size: 116%; } + h5 { font-size: 113%; } + h6 { font-size: 111%; } - .message pre { - overflow-x: scroll; - } + h1 { + margin-bottom: 0.5em; + border-bottom: 1px solid #0000001a; + } - .message code { - color: hsl(330, 75%, 50%) - } + .message pre { + overflow-x: scroll; + } - @media screen { - html { - min-height: 100%; - background: hsl(240, 100%, 99%); - } - body { - max-width: 40rem; - padding: 1.5rem; - } - } + .message code { + color: hsl(330, 75%, 50%) + } - .message { - background: #fff; - padding: 1.5rem; - margin: 2rem 0; - border-radius: 2px; - border: 1px solid #ddd; - - } - .message > header { - height: 1.5rem; - display: flex; - } - .message > header > .avatar { - width: 1.5rem; - height: 1.5rem; - } - .message > header > .text > .author { - margin-left: 0.5rem; - font-weight: bold; - } - .message > footer > a { - color: #888; - margin-right: 0.5rem; - text-decoration: none; - font-weight: bold; - } + @media screen { + html { + min-height: 100%; + background: hsl(240, 100%, 99%); + } + body { + max-width: 40rem; + padding: 1.5rem; + } + } + + .message { + background: #fff; + padding: 1.5rem; + margin: 2rem 0; + border-radius: 2px; + border: 1px solid #ddd; + + } + .message > header { + height: 1.5rem; + display: flex; + } + .message > header > .avatar { + width: 1.5rem; + height: 1.5rem; + border-radius: 2px; + } + .message > header > .text > .author { + margin-left: 0.5rem; + font-weight: bold; + } + .message > footer > a { + color: #888; + margin-right: 0.5rem; + text-decoration: none; + font-weight: bold; + }