From 0e8112cc9743e2c1812cfc52a548902222665131 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Sat, 26 Nov 2022 01:01:15 -0300 Subject: [PATCH] CSS tweaks to make things less spaced out --- _includes/postheader.html | 2 +- _layouts/post.html | 2 +- _posts/2022-02-16-86box-v3-2.md | 2 +- _posts/2022-03-21-why-not-p3.md | 2 +- assets/css/style-print.css | 13 +++++++++++++ assets/css/style-reduced.css | 14 ++++++++++++-- assets/css/style.css | 22 ++++++++++++++++++---- assets/js/style-reduced.js | 19 ++++++++++--------- blog.md | 6 +++--- 9 files changed, 60 insertions(+), 22 deletions(-) diff --git a/_includes/postheader.html b/_includes/postheader.html index b6899fe..70c311d 100644 --- a/_includes/postheader.html +++ b/_includes/postheader.html @@ -1,4 +1,4 @@ -{% if include.post.title == page.title %}

{% else %}

{% endif %} +{% if include.post.title == page.title %}

{% else %}

{% endif %} {{ include.post.title }} {% if include.post.title == page.title %}

{% else %}

{% endif %} {{ include.post.date | date: "%B %-d, %Y" }} diff --git a/_layouts/post.html b/_layouts/post.html index e743f0a..d65074c 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -2,7 +2,7 @@ {% include header.html %}
{% include postheader.html post=page %} -

+

{{ content }}
{% include footer.html %} diff --git a/_posts/2022-02-16-86box-v3-2.md b/_posts/2022-02-16-86box-v3-2.md index 5588ab7..efb81e0 100644 --- a/_posts/2022-02-16-86box-v3-2.md +++ b/_posts/2022-02-16-86box-v3-2.md @@ -40,7 +40,7 @@ The **Windows version** will remain on the existing Win32 user interface for now ### User interface * Added a **toolbar** with quick commands as well as emulation status -* Added translations: 🇵🇱 **Polish** by [Fanta-Shokata](https://github.com/Fanta-Shokata), 🇺🇦 **Ukrainian** by **Олександр#9368** and [Danik2343](https://github.com/Danik2343) +* Added translations: 🇵🇱 **Polish** by [Fanta-Shokata](https://github.com/Fanta-Shokata), 🇺🇦 **Ukrainian** by **Олександр#9368** and [Danik2343](https://github.com/Danik2343) * Added **API** for graceful shutdown without confirmation (WM_SHUTDOWN/0x8893 with WPARAM=1) * Changed **file selection windows** to pause emulation while they're open * Changed **title bar** to only contain the emulated machine name and 86Box version (emulation speed and mouse status are now on the toolbar) diff --git a/_posts/2022-03-21-why-not-p3.md b/_posts/2022-03-21-why-not-p3.md index 5a08601..e6a83df 100644 --- a/_posts/2022-03-21-why-not-p3.md +++ b/_posts/2022-03-21-why-not-p3.md @@ -1,7 +1,7 @@ --- layout: post title: "Why Not Pentium III?" -description: "When does 'preservation' in emulation become impractical?" +description: "When does “preservation” in emulation become impractical?" authors: ["richardg867"] image: "/assets/images/whynotp3/hero.png" --- diff --git a/assets/css/style-print.css b/assets/css/style-print.css index 3dd5cf5..2b9e99a 100644 --- a/assets/css/style-print.css +++ b/assets/css/style-print.css @@ -36,6 +36,9 @@ a, a:visited { } /* Blog */ +p, ul, ol { + margin: 0.65em 0; +} .image { text-align: center; } @@ -56,6 +59,16 @@ hr { border-color: #808080; width: 100%; } +h1.blogpost, h2, h3 { + margin-bottom: 0.5em; +} +h2.bloglist { + margin: 0.5em 0.33em 0 0; + margin-bottom: 0.33em; +} +span.emoji { + font-family: Tweemoji Mozilla; /* work around Windows' lack of flags where supported (Firefox) */ +} table { border: 1px solid #808080; } diff --git a/assets/css/style-reduced.css b/assets/css/style-reduced.css index 599829d..f01d872 100644 --- a/assets/css/style-reduced.css +++ b/assets/css/style-reduced.css @@ -23,11 +23,11 @@ img { } img#icon, img#logo { height: 70px; - margin-right: 20pt; + margin-right: 18pt; } a.navlink { font-size: 15pt; - margin: 6pt; + margin: 4pt; } nav { /* requires JS on IE6 */ display: inline; @@ -93,6 +93,16 @@ hr { border-color: #808080; width: 100%; } +h1.blogpost, h2, h3 { + margin-bottom: 0.5em; +} +h2.bloglist { + margin: 0.5em 0.33em 0 0; + margin-bottom: 0.33em; +} +p.blogspacer { + margin-bottom: 0.5em; +} span.emoji { display: none; } diff --git a/assets/css/style.css b/assets/css/style.css index fdefee4..ba6e78b 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -39,7 +39,7 @@ body { body > header { /* background-color: #8ca0ff; */ grid-area: head; - padding: 30pt 30pt; + padding: 28pt 28pt; } img#icon { max-height: 75px; @@ -52,10 +52,10 @@ body > nav { align-items: center; justify-content: right; font-size: 15pt; - padding: 30pt 30pt; + padding: 28pt 28pt; } body > nav > a { - margin: 0 20pt; + margin: 0 15pt; } @media (max-width: 768px) { body > header { @@ -150,6 +150,9 @@ div#socialold { } /* Blog */ +p, ul, ol { + margin: 0.65em 0; +} .image { text-align: center; } @@ -173,12 +176,23 @@ div.imagecaption { display: inline; } div.imagecaption > p { - margin: 0px; + margin-top: 0.5em; + margin-bottom: 0px; } hr { border-color: #808080; width: 100%; } +h1.blogpost, h2, h3 { + margin-bottom: 0.5em; +} +h2.bloglist { + margin: 0.5em 0.33em 0 0; + margin-bottom: 0.33em; +} +p.blogspacer { + margin-bottom: 0.5em; +} span.emoji { font-family: Tweemoji Mozilla; /* work around Windows' lack of flags where supported (Firefox) */ } diff --git a/assets/js/style-reduced.js b/assets/js/style-reduced.js index 63b9680..6c5e51b 100644 --- a/assets/js/style-reduced.js +++ b/assets/js/style-reduced.js @@ -6,14 +6,14 @@ function getNaturalWidth(img) { if (img.naturalWidth) { return img.naturalWidth; } else { - /* Cache images through src to avoid memory waste. */ - var img2 = imgCache[img.src]; - if (!img2) { - img2 = new Image(); - img2.src = img.src; - imgCache[img.src] = img2; + /* Cache images by src to avoid wasting memory. */ + var imgObj = imgCache[img.src]; + if (!imgObj) { + imgObj = new Image(); + imgObj.src = img.src; + imgCache[img.src] = imgObj; } - return img2.width; + return imgObj.width; } } @@ -34,7 +34,8 @@ function fixPngs() { /* Fix icon and logo. */ for (var i = 0; i < Math.min(2, document.images.length); i++) { var img = document.images[i]; - img.style.paddingRight = 0; /* padding counts as space for AlphaImageLoader so swap it for margin */ + var oldpad = img.style.paddingRight; /* padding counts as space for AlphaImageLoader so swap it for margin */ + img.style.paddingRight = 0; var oldsrc = img.src; var oldw = img.clientWidth; var oldh = img.clientHeight; @@ -42,7 +43,7 @@ function fixPngs() { img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + oldsrc + "', sizingMethod='scale')"; img.style.width = oldw + 'px'; img.style.height = oldh + 'px'; - img.style.marginRight = '20pt'; + img.style.marginRight = oldpad; } } if (document.all && /MSIE (5\.5|6)/.test(navigator.userAgent)) diff --git a/blog.md b/blog.md index a75a821..375ca0b 100644 --- a/blog.md +++ b/blog.md @@ -6,12 +6,12 @@ title: "Blog" # The 86Box Blog {% for post in site.posts %} -
+
{% include postheader.html post=post %}

{{ post.description }}

+
{% if forloop.last %} {% else %} -
+
{% endif %} -
{% endfor %}