summaryrefslogtreecommitdiff
path: root/default/_ikiwiki.scss
diff options
context:
space:
mode:
Diffstat (limited to 'default/_ikiwiki.scss')
-rw-r--r--default/_ikiwiki.scss49
1 files changed, 49 insertions, 0 deletions
diff --git a/default/_ikiwiki.scss b/default/_ikiwiki.scss
index 02ccc9d..845b6fe 100644
--- a/default/_ikiwiki.scss
+++ b/default/_ikiwiki.scss
@@ -783,6 +783,53 @@ a.openid_large_btn:focus {
}
}
+@mixin ikiwiki-mobile {
+/* mobile/small-screen-friendly layout */
+@media (max-width: 600px) {
+ .sidebar {
+ width: auto;
+ float: none;
+ margin-top: 0;
+ border: none;
+ }
+
+ /* if the mobile browser is new enough, use flex layout to shuffle
+ * the sidebar to the end */
+ .page {
+ display: -webkit-box;
+ display: -webkit-flexbox;
+ display: -webkit-flex;
+ display: -moz-box;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-box-orient: vertical;
+ -webkit-flex-direction: tb;
+ -webkit-flex-direction: column;
+ -webkit-flex-flow: column;
+ -ms-flex-direction: column;
+ flex-direction: column;
+ }
+ #pageheader {
+ -webkit-box-ordinal-group: -1;
+ -webkit-order: -1;
+ -ms-box-ordinal-group: -1;
+ -ms-flex-order: -1;
+ order: -1;
+ }
+ .sidebar, #footer {
+ -webkit-box-ordinal-group: 1;
+ -webkit-order: 1;
+ -ms-box-ordinal-group: 1;
+ -ms-flex-order: 1;
+ order: 1;
+ }
+
+ .blogform, #blogform {
+ padding: 4px 4px;
+ }
+}
+}
+
// all styles in same order as original Ikiwiki stylesheet
@mixin ikiwiki-style-legacy {
@include ikiwiki-header;
@@ -826,6 +873,7 @@ a.openid_large_btn:focus {
@include ikiwiki-plugin-openid;
@include ikiwiki-plugin-attachment;
@include ikiwiki-plugin-trail;
+ @include ikiwiki-mobile;
}
@mixin ikiwiki-site {
@@ -885,6 +933,7 @@ a.openid_large_btn:focus {
@include ikiwiki-plugin-editpage;
@include ikiwiki-plugin-attachment;
@include ikiwiki-plugin-openid;
+ @include ikiwiki-mobile;
}
@mixin ikiwiki {