From d4c4541414912f1ed3ddd41e442e19c30d063519 Mon Sep 17 00:00:00 2001 From: EvilMuffinHa Date: Sun, 8 May 2022 15:43:25 -0400 Subject: [PATCH] mobile fixes: better scaling --- content/theme.md | 2 +- templates/index.html | 26 +++++++++++++++++++------- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/content/theme.md b/content/theme.md index 42bdd96..7bed13f 100644 --- a/content/theme.md +++ b/content/theme.md @@ -41,7 +41,7 @@ taxonomies = [ ## Customization This theme requires a menu option. Set the `menu` field in `extra`. -```toml +```toml,linenos menu = [ { name = "blog", url = "$BASE_URL" }, { name = "tags", url = "$BASE_URL/tags" }, diff --git a/templates/index.html b/templates/index.html index 2af6ae0..903d0c9 100644 --- a/templates/index.html +++ b/templates/index.html @@ -7,6 +7,7 @@ {%- block title %}{{ config.title }}{% endblock title -%} + @@ -54,10 +55,7 @@ align-items: center; align-content: center; flex-direction: column; - text-size-adjust: none; - -webkit-text-size-adjust: none; - -moz-text-size-adjust: none; - -ms-text-size-adjust: none; + max-height: 1000000000px; } .main { @@ -66,6 +64,10 @@ align-items: center; flex-direction: column; justify-content: center; + text-size-adjust: auto !important; + -webkit-text-size-adjust: auto !important; + -moz-text-size-adjust: auto !important; + -ms-text-size-adjust: auto!important; } @media only screen and (max-width: 992px) { @@ -95,6 +97,17 @@ {% endif -%} } + @media only screen and (max-width: 768px) { + .header { + padding-right: 1rem; + margin-top: 3rem; + } + + .header_title { + margin: auto; + } + } + .menu_inner { list-style: none; margin: 0; @@ -105,7 +118,6 @@ padding-left: 0.3rem; display: flex; flex-wrap: wrap; - text-size-adjust: none; } .menu_list { @@ -187,8 +199,6 @@ .post_contents pre { padding: 12px; overflow: auto; - white-space: pre-wrap; - word-wrap: break-word; } .post_contents pre[data-linenos] { @@ -197,6 +207,8 @@ .post_contents pre table td { padding: 0; + padding-right: 3px; + padding-left: 3px; } .post_contents pre table td:nth-of-type(1) {