diff --git a/resources/src/scss/codehilite.scss b/resources/src/scss/codehilite.scss index d13a18f3..1f4925f6 100644 --- a/resources/src/scss/codehilite.scss +++ b/resources/src/scss/codehilite.scss @@ -2,7 +2,6 @@ .codehilite { background: #ffffff; - border-radius: 3px; } .codehilite .c { diff --git a/resources/src/scss/discourse.scss b/resources/src/scss/discourse.scss index e2a23166..f4c4a874 100644 --- a/resources/src/scss/discourse.scss +++ b/resources/src/scss/discourse.scss @@ -36,7 +36,7 @@ position: fixed; top: 0; z-index: 1000; - background-color: #3c4c68; + background-color: $osc-color; box-shadow: 0 2px 4px -1px rgba(0,0,0,0.25); } diff --git a/resources/src/scss/mobile.scss b/resources/src/scss/mobile.scss new file mode 100644 index 00000000..1a54d9ba --- /dev/null +++ b/resources/src/scss/mobile.scss @@ -0,0 +1,29 @@ +@media (max-width:840px) { + #menu { + flex-direction: column; + position: fixed; + align-items: center; + justify-content: center; + top: 4em; + right: 0; + margin: 0; + background: $osc-color; + border-bottom-left-radius: 3px; + box-shadow: 0 2px 4px -1px rgba(0,0,0,0.25); + + > * { + flex:1; + padding: 8px; + display: block; + width: 100%; + text-align: center; + } + input { + text-align: center; + margin: 0; + } + &.show { + display: flex!important; + } + } +} diff --git a/resources/src/scss/styles.scss b/resources/src/scss/styles.scss index ba458192..626e2dc1 100644 --- a/resources/src/scss/styles.scss +++ b/resources/src/scss/styles.scss @@ -1,6 +1,9 @@ +$osc-color: #3c4c68; + $primary-color: rgb(75, 143, 210); $font-size: 0.6rem; @import "node_modules/spectre.css/src/spectre"; +@import "node_modules/spectre.css/src/icons"; @import "admonition"; @import "codehilite"; @@ -51,6 +54,9 @@ pre, code { padding-bottom: 0; } +#logo { + flex-shrink: 0; +} #main { padding-top: 6.5em; @@ -75,18 +81,21 @@ pre, code { line-height: 1 } .col-right { - flex: 1 + flex: 1; + min-width: 0; } .codehilite { background-color: #fafafa; color: #37474f; line-height: 1em; - max-width: 100% + overflow-x: auto; + border-radius: 3px; + margin-bottom: 1.2rem; + padding: 12px; } .codehilite pre { - padding: 12px; white-space: pre; font-feature-settings: "kern"; font-family: $mono-font-family; @@ -179,3 +188,5 @@ h1:first-child { padding:6px 12px; margin-right: 10px; } + +@import 'mobile'; diff --git a/resources/theme/base.html b/resources/theme/base.html index bb570869..09e11d04 100644 --- a/resources/theme/base.html +++ b/resources/theme/base.html @@ -19,10 +19,11 @@