From 3d438647120d283373125b3eab4c26d28868d392 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Thu, 26 Sep 2024 14:53:10 -0400 Subject: [PATCH] ie5 --- src/public/css/ie/boxsizing.css | 1 + src/public/css/ie/ie.css | 1 + src/public/css/ie/ie5.css | 1 + src/public/css/ie/ie6.css | 1 + src/public/css/ie/ie6.scss.css | 1 + src/public/css/ie/main.css | 1 + src/scss/_variables.scss | 4 +-- src/scss/blog.scss | 7 ----- src/scss/ie/ie.scss | 49 +++++++++++++++++++++++++++++++ src/scss/ie/ie6.scss | 41 ++++++++++++++++++++++++++ src/scss/legacy.scss | 33 --------------------- src/scss/main.scss | 20 ++++++++++--- src/web/_model/blog.php | 2 +- src/web/_views/apps/blog.php | 4 +-- src/web/_views/apps/blog_post.php | 6 ++-- src/web/_views/comments.php | 2 +- src/web/_views/footer.php | 2 ++ src/web/_views/head.php | 5 +++- src/web/index.php | 5 ++++ 19 files changed, 133 insertions(+), 53 deletions(-) create mode 100644 src/public/css/ie/boxsizing.css create mode 100644 src/public/css/ie/ie.css create mode 100644 src/public/css/ie/ie5.css create mode 100644 src/public/css/ie/ie6.css create mode 100644 src/public/css/ie/ie6.scss.css create mode 100644 src/public/css/ie/main.css create mode 100644 src/scss/ie/ie.scss create mode 100644 src/scss/ie/ie6.scss delete mode 100644 src/scss/legacy.scss diff --git a/src/public/css/ie/boxsizing.css b/src/public/css/ie/boxsizing.css new file mode 100644 index 0000000..1301de2 --- /dev/null +++ b/src/public/css/ie/boxsizing.css @@ -0,0 +1 @@ +*{behavior:url(boxsizing.htc)} diff --git a/src/public/css/ie/ie.css b/src/public/css/ie/ie.css new file mode 100644 index 0000000..2ff327a --- /dev/null +++ b/src/public/css/ie/ie.css @@ -0,0 +1 @@ +#header .ie-nav{margin-left:90px}#main .col{display:block !important;width:100% !important}#main .col.left{padding-right:0 !important}#main .section .heading{background:#366199 !important}#main #post .posted,#main #writeup .posted{margin-top:16px}#main #comments #new_comment{width:400px}#main #comments #new_comment #author,#main #comments #new_comment #content{width:400px !important}#main table{behavior:url(boxsizing.htc)} diff --git a/src/public/css/ie/ie5.css b/src/public/css/ie/ie5.css new file mode 100644 index 0000000..c533312 --- /dev/null +++ b/src/public/css/ie/ie5.css @@ -0,0 +1 @@ +.ie-nav{margin-left:90px}#main .col{display:block !important;width:100% !important}#main .left{padding-right:0 !important;padding-bottom:16px}#main .right{margin-top:16px}#new_comment{width:400px}#new_comment .input{width:400px} diff --git a/src/public/css/ie/ie6.css b/src/public/css/ie/ie6.css new file mode 100644 index 0000000..e19ec4e --- /dev/null +++ b/src/public/css/ie/ie6.css @@ -0,0 +1 @@ +*{behavior:url(boxsizing.htc)}body #main .col.left{margin-bottom:16px}body #main .col.right{margin-top:16px !important}body #contact{margin-bottom:0 !important}body #footer{margin-top:16px !important} diff --git a/src/public/css/ie/ie6.scss.css b/src/public/css/ie/ie6.scss.css new file mode 100644 index 0000000..1301de2 --- /dev/null +++ b/src/public/css/ie/ie6.scss.css @@ -0,0 +1 @@ +*{behavior:url(boxsizing.htc)} diff --git a/src/public/css/ie/main.css b/src/public/css/ie/main.css new file mode 100644 index 0000000..c533312 --- /dev/null +++ b/src/public/css/ie/main.css @@ -0,0 +1 @@ +.ie-nav{margin-left:90px}#main .col{display:block !important;width:100% !important}#main .left{padding-right:0 !important;padding-bottom:16px}#main .right{margin-top:16px}#new_comment{width:400px}#new_comment .input{width:400px} diff --git a/src/scss/_variables.scss b/src/scss/_variables.scss index cfb5f0c..55627f8 100644 --- a/src/scss/_variables.scss +++ b/src/scss/_variables.scss @@ -10,8 +10,8 @@ $blue-alt: #244266; $black: #14171d; $black-alt: #242526; -$font: 'Courier New', Courier, monospace; -$header-font: 'FontStuck-Extended', monospace; +$font: 'Courier New', monospace; +$header-font: 'FontStuck-Extended', Verdana, Courier, monospace; $inner-gap: 16px; $outer-gap: 16px; diff --git a/src/scss/blog.scss b/src/scss/blog.scss index 3a59a04..415530a 100644 --- a/src/scss/blog.scss +++ b/src/scss/blog.scss @@ -5,10 +5,6 @@ padding-bottom: $inner-gap; } -#main span { - display: inline-block; -} - #post { max-width: 100%; @@ -23,9 +19,6 @@ img { margin: $inner-gap; - margin-left: auto; - margin-right: auto; - display: block; max-width: 100%; width: 400px; } diff --git a/src/scss/ie/ie.scss b/src/scss/ie/ie.scss new file mode 100644 index 0000000..bf8cc4f --- /dev/null +++ b/src/scss/ie/ie.scss @@ -0,0 +1,49 @@ +/* IE 5-7 Styles */ + +@import "../variables"; + +#header { + .ie-nav { + margin-left: 90px; + } +} + +#main { + .col { + display: block !important; + width: 100% !important; + + &.left { + padding-right: 0 !important; + } + + } + + .section { + .heading { + background: $blue !important; + } + } + + #post, + #writeup { + .posted { + margin-top: $inner-gap; + } + } + + #comments { + #new_comment { + width: 400px; + + #author, + #content { + width: 400px !important; + } + } + } + + table { + behavior: url(boxsizing.htc); + } +} diff --git a/src/scss/ie/ie6.scss b/src/scss/ie/ie6.scss new file mode 100644 index 0000000..2731e24 --- /dev/null +++ b/src/scss/ie/ie6.scss @@ -0,0 +1,41 @@ +/* IE 6 and 7 Only */ + +@import "../variables"; + +/** + * IE5 and below seem to look fine without boxsizing + * additions, its only the jump to IE5 where things seem + * to start breaking and thus this is needed + */ + +* { + behavior: url(boxsizing.htc); +} + +/** + * Fix homepage margin near footer, only caused + * by the boxsizing i think + */ +body { + #main { + .col { + + &.left { + margin-bottom: $inner-gap; + } + + &.right { + margin-top: $inner-gap !important; + } + + } + } + + #contact { + margin-bottom: 0 !important; + } + + #footer { + margin-top: $inner-gap !important; + } +} diff --git a/src/scss/legacy.scss b/src/scss/legacy.scss deleted file mode 100644 index c6198cf..0000000 --- a/src/scss/legacy.scss +++ /dev/null @@ -1,33 +0,0 @@ -/* IE 6 & 7 Styles */ - -@import "./variables"; - -#header, #footer { - behavior: url(boxsizing.htc); -} - -.ie-nav { - margin-left: 90px; -} - -#main .col { - display: block !important; - width: 100% !important; -} - -#main .left { - padding-right: 0 !important; - padding-bottom: $outer-gap; -} - -#main .right { - margin-top: $outer-gap; -} - -#new_comment { - width: 400px; - - .input { - width: 400px; - } -} diff --git a/src/scss/main.scss b/src/scss/main.scss index 3dcbf5e..cca93d8 100644 --- a/src/scss/main.scss +++ b/src/scss/main.scss @@ -82,6 +82,12 @@ html { background-size: 512px; } +.center { + display: block; + margin-left: auto !important; + margin-right: auto !important; +} + html, body, #container { @@ -94,12 +100,16 @@ body { padding: $inner-gap; min-height: 100%; - .center { + > .center { display: table; margin: 0 auto; } } +#main div.span { + padding-left: $inner-gap; +} + #header, #main, #footer, @@ -176,13 +186,15 @@ body { width: 1px; min-width: 100%; - .center { + > .center { display: block; } } - .center, #header, - #main, #footer, + body > .center, + #header, + #main, + #footer, #container { width: 100%; max-width: 100%; diff --git a/src/web/_model/blog.php b/src/web/_model/blog.php index 18a9e0e..c91bfa8 100644 --- a/src/web/_model/blog.php +++ b/src/web/_model/blog.php @@ -42,7 +42,7 @@ class Blog_model extends Model { $base = $this->get_url(''); $replace = ""; - $replace .= "\"\\2\""; + $replace .= IE_START . "\"\\2\"" . IE_END; $replace .= ""; $md = preg_replace($pattern, $replace, $md); diff --git a/src/web/_views/apps/blog.php b/src/web/_views/apps/blog.php index f64453c..78abaa7 100644 --- a/src/web/_views/apps/blog.php +++ b/src/web/_views/apps/blog.php @@ -6,8 +6,8 @@ $meta = $post['meta']; $link = $this->get_url('blog/post/' . substr($name, 0, -3)); echo '

' . $meta['name'] . '

'; - echo '' . $meta['desc'] . '
'; - echo ''; + echo '
' . $meta['desc'] . '
'; + echo '
'; } ?> diff --git a/src/web/_views/apps/blog_post.php b/src/web/_views/apps/blog_post.php index 8b45a62..1eaef9f 100644 --- a/src/web/_views/apps/blog_post.php +++ b/src/web/_views/apps/blog_post.php @@ -1,6 +1,8 @@ - : -
+
+ : + +
diff --git a/src/web/_views/comments.php b/src/web/_views/comments.php index 78cc1cb..bf30ec5 100644 --- a/src/web/_views/comments.php +++ b/src/web/_views/comments.php @@ -7,7 +7,7 @@ echo '
'; echo '

' . esc($comment['author']) . '

'; - echo '' . $date . ''; + echo '
' . $date . '
'; echo '

' . esc($comment['content']) . '

'; echo '
'; } diff --git a/src/web/_views/footer.php b/src/web/_views/footer.php index a105f61..eb0ee4c 100644 --- a/src/web/_views/footer.php +++ b/src/web/_views/footer.php @@ -33,6 +33,8 @@ diff --git a/src/web/_views/head.php b/src/web/_views/head.php index 100e4a0..e54fd1c 100644 --- a/src/web/_views/head.php +++ b/src/web/_views/head.php @@ -22,7 +22,10 @@ "> + embed_css($file); diff --git a/src/web/index.php b/src/web/index.php index 9f1aa3f..83ab9d4 100644 --- a/src/web/index.php +++ b/src/web/index.php @@ -23,6 +23,11 @@ define('WEB_ROOT', PHP_ROOT . '/web'); define('ASSET_ROOT', PHP_ROOT . '/assets'); define('PUBLIC_ROOT', PHP_ROOT . '/public'); +// ========================== VARIABLES == + +define('IE_START', ""); +define('IE_END', ""); + // ========================== BOOTSTRAP == // load all third party