aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2018-11-24 06:21:25 +0000
committers-ol <s-ol@users.noreply.github.com>2018-11-24 06:23:01 +0000
commitea951ff325c0237c1c5e2c670aa6830e9dc04c60 (patch)
treebc97e41b79dedc6a9d4d0751c3b820e166d4979a
parentadd blog post assets (diff)
downloadmmm-ea951ff325c0237c1c5e2c670aa6830e9dc04c60.tar.gz
mmm-ea951ff325c0237c1c5e2c670aa6830e9dc04c60.zip
align markdown code styling
-rw-r--r--mmm/mmmfs/conversion.moon13
-rw-r--r--root/blog/automating_my_rice/mmm$tpl -> text$markdown.md5
-rw-r--r--scss/_browser.scss7
-rw-r--r--scss/_content.scss51
-rw-r--r--scss/main.scss32
5 files changed, 68 insertions, 40 deletions
diff --git a/mmm/mmmfs/conversion.moon b/mmm/mmmfs/conversion.moon
index e25a523..4f0eb0c 100644
--- a/mmm/mmmfs/conversion.moon
+++ b/mmm/mmmfs/conversion.moon
@@ -60,6 +60,19 @@ converts = {
out: '%1',
transform: loadwith load or loadstring
},
+ {
+ inp: 'mmm/tpl -> (.+)',
+ out: '%1',
+ transform: (source, fileder) ->
+ source\gsub '{{(.-)}}', (expr) ->
+ path, facet = expr\match '^([%w-_/]*)%+(.*)'
+ assert path, "couldn't match TPL expression '#{expr}'"
+
+ target = fileder\walk "#{fileder.path}/#{path}"
+ assert target, "couldn't resolve rpath '#{path}' relative to #{fileder}"
+
+ target\gett facet
+ }
}
if MODE == 'SERVER'
diff --git a/root/blog/automating_my_rice/mmm$tpl -> text$markdown.md b/root/blog/automating_my_rice/mmm$tpl -> text$markdown.md
index 16083ff..80c3516 100644
--- a/root/blog/automating_my_rice/mmm$tpl -> text$markdown.md
+++ b/root/blog/automating_my_rice/mmm$tpl -> text$markdown.md
@@ -21,7 +21,7 @@ The script is pretty straightforward:
kill $dmenupid
done
-So here are all my current themes (click to view seperately)::
+So here are all my current themes:
[![cavetree][cavetree]][cavetree]
[![akira][akira]][akira]
@@ -37,7 +37,8 @@ So here are all my current themes (click to view seperately)::
The wallpaper for the last one is intended to be tiled, not stretched, but that currently requries a manual change in my i3 config:
[![dark][dark]][dark]
-I am thinking about implementing this as a Themer feature, but it will require it's own *presentation* plugin type so everyone can choose their own commands, bars, and waiting time,
+I am thinking about implementing this as a Themer feature, but it would require it's own *presentation* plugin type,
+so everyone can choose their own commands, bars, and waiting time.
You can find more information about [Themer on the github page][themer], along with all my [config files][dotfiles].
diff --git a/scss/_browser.scss b/scss/_browser.scss
index 9845ff3..8a04752 100644
--- a/scss/_browser.scss
+++ b/scss/_browser.scss
@@ -79,10 +79,3 @@
}
}
}
-
-.content {
- img, video {
- max-width: 100%;
- max-height: 100%;
- }
-}
diff --git a/scss/_content.scss b/scss/_content.scss
new file mode 100644
index 0000000..b3468bd
--- /dev/null
+++ b/scss/_content.scss
@@ -0,0 +1,51 @@
+.content {
+ img, video, pre > code {
+ display: block;
+ max-width: 100%;
+ max-height: 100%;
+
+ padding: 0 2em;
+ box-sizing: border-box;
+ }
+
+ pre > code {
+ @include left-border;
+ border-color: $gray-dark;
+
+ display: block;
+ border-radius: 6px;
+ margin: 0 2em;
+ padding: 1em;
+ white-space: pre-wrap;
+ overflow-x: auto;
+
+ background: #1d1f21;
+ color: #c5c8c6;
+ }
+
+ pre.dual-code {
+ display: flex;
+ justify-content: space-between;
+ padding: 0 2rem;
+
+ > code {
+ @include right-border(0.3rem);
+
+ flex: 1;
+ margin: 0;
+ }
+
+ > code + code {
+ @include left-border(0.3rem);
+ }
+ }
+
+ .example, .well {
+ @include left-border;
+
+ margin: 1rem 2rem;
+ padding: 1rem;
+ background: $gray-bright;
+ border-color: $gray-neutral;
+ }
+}
diff --git a/scss/main.scss b/scss/main.scss
index fe67631..c1e9d38 100644
--- a/scss/main.scss
+++ b/scss/main.scss
@@ -4,35 +4,5 @@
@import 'header';
@import 'footer';
@import 'browser';
+@import 'content';
@import 'canvasapp';
-
-pre > code.hljs {
- @include left-border;
- border-color: $gray-dark;
-}
-
-pre.dual-code {
- display: flex;
- justify-content: space-between;
- padding: 0 2rem;
-
- > code.hljs {
- @include right-border(0.3rem);
-
- flex: 1;
- margin: 0;
- }
-
- > code.hljs + code.hljs {
- @include left-border(0.3rem);
- }
-}
-
-.example, .well {
- @include left-border;
-
- margin: 1rem 2rem;
- padding: 1rem;
- background: $gray-bright;
- border-color: $gray-neutral;
-}