Compare commits
4 Commits
0d1e2e80eb
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| b1b5408301 | |||
| d206ed9f3e | |||
| 3da5952b87 | |||
| 28e3b5e1cf |
174
assets/scss/bergamot.scss
Normal file
174
assets/scss/bergamot.scss
Normal file
@@ -0,0 +1,174 @@
|
|||||||
|
@import "variables.scss";
|
||||||
|
@import "mixins.scss";
|
||||||
|
|
||||||
|
.bergamot-exercise {
|
||||||
|
counter-increment: bergamot-exercise;
|
||||||
|
|
||||||
|
.bergamot-root {
|
||||||
|
border: none;
|
||||||
|
padding: 0;
|
||||||
|
margin-top: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.bergamot-exercise-label {
|
||||||
|
.bergamot-exercise-number::after {
|
||||||
|
content: "Exercise " counter(bergamot-exercise);
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bergamot-button {
|
||||||
|
@include bordered-block;
|
||||||
|
padding: 0.25em;
|
||||||
|
padding-left: 1em;
|
||||||
|
padding-right: 1em;
|
||||||
|
background-color: inherit;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
transition: 0.25s;
|
||||||
|
font-family: $font-body;
|
||||||
|
@include var(color, text-color);
|
||||||
|
|
||||||
|
&.bergamot-hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feather {
|
||||||
|
margin-right: 0.5em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bergamot-play {
|
||||||
|
.feather { color: $primary-color; }
|
||||||
|
&:hover, &:focus {
|
||||||
|
.feather { color: lighten($primary-color, 20%); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bergamot-reset {
|
||||||
|
.feather { color: #0099CC; }
|
||||||
|
&:hover, &:focus {
|
||||||
|
.feather { color: lighten(#0099CC, 20%); }
|
||||||
|
}
|
||||||
|
|
||||||
|
svg {
|
||||||
|
fill: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bergamot-close {
|
||||||
|
.feather { color: tomato; }
|
||||||
|
&:hover, &:focus {
|
||||||
|
.feather { color: lighten(tomato, 20%); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bergamot-button-group {
|
||||||
|
margin-top: 1em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bergamot-root {
|
||||||
|
@include bordered-block;
|
||||||
|
padding: 1em;
|
||||||
|
|
||||||
|
.bergamot-section-heading {
|
||||||
|
margin-bottom: 0.5em;
|
||||||
|
font-family: $font-body;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 1.25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bergamot-section {
|
||||||
|
margin-bottom: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 10em;
|
||||||
|
resize: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="text"] {
|
||||||
|
width: 100%;
|
||||||
|
@include textual-input;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bergamot-rule-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bergamot-rule-list katex-expression {
|
||||||
|
margin-left: .5em;
|
||||||
|
margin-right: .5em;
|
||||||
|
flex-grow: 1;
|
||||||
|
flex-basis: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bergamot-rule-section {
|
||||||
|
.bergamot-rule-section-name {
|
||||||
|
text-align: center;
|
||||||
|
margin: 0.25em;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bergamot-proof-tree {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bergamot-error {
|
||||||
|
@include bordered-block;
|
||||||
|
padding: 0.5rem;
|
||||||
|
border-color: tomato;
|
||||||
|
background-color: rgba(tomato, 0.25);
|
||||||
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bergamot-selector {
|
||||||
|
button {
|
||||||
|
@include var(background-color, background-color);
|
||||||
|
@include var(color, text-color);
|
||||||
|
@include bordered-block;
|
||||||
|
padding: 0.5rem;
|
||||||
|
font-family: $font-body;
|
||||||
|
border-style: dotted;
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
border-color: $primary-color;
|
||||||
|
border-style: solid;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:not(:first-child) {
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
border-top-left-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:not(:last-child) {
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
|
border-top-right-radius: 0;
|
||||||
|
border-right-width: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
button.active + button {
|
||||||
|
border-left-color: $primary-color;
|
||||||
|
border-left-style: solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bergamot-no-proofs {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
47
assets/scss/writing.scss
Normal file
47
assets/scss/writing.scss
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
@import "variables.scss";
|
||||||
|
|
||||||
|
body {
|
||||||
|
background-color: #1c1e26;
|
||||||
|
--text-color: white;
|
||||||
|
font-family: $font-code;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
text-align: left;
|
||||||
|
font-family: $font-code;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1::after {
|
||||||
|
content: "(writing)";
|
||||||
|
font-size: 1rem;
|
||||||
|
margin-left: 0.5em;
|
||||||
|
position: relative;
|
||||||
|
bottom: -0.5em;
|
||||||
|
color: $primary-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav .container {
|
||||||
|
justify-content: flex-start;
|
||||||
|
|
||||||
|
a {
|
||||||
|
padding-left: 0;
|
||||||
|
margin-right: 1em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-divider {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
height: auto;
|
||||||
|
border: none;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
content: "* * *";
|
||||||
|
color: $primary-color;
|
||||||
|
font-size: 2rem;
|
||||||
|
display: block;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
27
i18n/en.toml
27
i18n/en.toml
@@ -77,3 +77,30 @@
|
|||||||
|
|
||||||
[ongoingSeries]
|
[ongoingSeries]
|
||||||
other = "Ongoing"
|
other = "Ongoing"
|
||||||
|
|
||||||
|
[nextInSeries]
|
||||||
|
other = "Next in Series"
|
||||||
|
|
||||||
|
[previousInSeries]
|
||||||
|
other = "Previous in Series"
|
||||||
|
|
||||||
|
[comingSoon]
|
||||||
|
other = "Coming soon!"
|
||||||
|
|
||||||
|
[startBergamot]
|
||||||
|
other = "Start Bergamot"
|
||||||
|
|
||||||
|
[closeBergamot]
|
||||||
|
other = "Close Bergamot"
|
||||||
|
|
||||||
|
[lineX]
|
||||||
|
other = ", line {{ . }}"
|
||||||
|
|
||||||
|
[aroundLineX]
|
||||||
|
other = ", around line {{ . }}"
|
||||||
|
|
||||||
|
[linesXThroughY]
|
||||||
|
other = ", lines {{ .from }} through {{ .to }}"
|
||||||
|
|
||||||
|
[entireFile]
|
||||||
|
other = ", entire file"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
"Languge Term": { "custom": "Bergamot Object Language" },
|
"Language Term": { "custom": "Bergamot Object Language" },
|
||||||
"Query": "query",
|
"Query": "query",
|
||||||
{{ end }}
|
{{ end }}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
{{- $comment := "" -}}
|
{{- $comment := "" -}}
|
||||||
{{- if eq .from .to -}}
|
{{- if eq .from .to -}}
|
||||||
{{- $comment = printf ", line %d" .from -}}
|
{{- $comment = i18n "lineX" .to -}}
|
||||||
{{- else if eq .from 0 -}}
|
{{- else if eq .from 0 -}}
|
||||||
{{- $comment = printf ", around line %d" .to -}}
|
{{- $comment = i18n "aroundLineX" .to -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- $comment = printf ", lines %d through %d" .from .to -}}
|
{{- $comment = i18n "linesXThroughY" . -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- return $comment -}}
|
{{- return $comment -}}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<a href="{{ .page.RelPermalink }}">
|
<a href="{{ .page.RelPermalink }}">
|
||||||
{{ if eq .direction "previous" }}{{ partial "icon.html" "chevrons-left" }}{{ end }}
|
{{ if eq .direction "previous" }}{{ partial "icon.html" "chevrons-left" }}{{ end }}
|
||||||
<div class="title-subtitle">
|
<div class="title-subtitle">
|
||||||
{{ title .direction }} in Series
|
{{ i18n (printf "%sInSeries" .direction) }}
|
||||||
<div class="title">{{ partial "nameinseries.html" (dict "page" .page) }}</div>
|
<div class="title">{{ partial "nameinseries.html" (dict "page" .page) }}</div>
|
||||||
</div>
|
</div>
|
||||||
{{ if eq .direction "next" }}{{ partial "icon.html" "chevrons-right" }}{{ end }}
|
{{ if eq .direction "next" }}{{ partial "icon.html" "chevrons-right" }}{{ end }}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
<div class="ongoing-placeholder">
|
<div class="ongoing-placeholder">
|
||||||
{{ if eq .direction "previous" }}{{ partial "icon.html" "chevrons-left" }}{{ end }}
|
{{ if eq .direction "previous" }}{{ partial "icon.html" "chevrons-left" }}{{ end }}
|
||||||
<div class="title-subtitle">
|
<div class="title-subtitle">
|
||||||
{{ title .direction }} in Series
|
{{ i18n (printf "%sInSeries" .direction) }}
|
||||||
<div class="title">Coming soon!</div>
|
<div class="title">{{ i18n "comingSoon" }}</div>
|
||||||
</div>
|
</div>
|
||||||
{{ if eq .direction "next" }}{{ partial "icon.html" "chevrons-right" }}{{ end }}
|
{{ if eq .direction "next" }}{{ partial "icon.html" "chevrons-right" }}{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
<div class="bergamot-button-group">
|
<div class="bergamot-button-group">
|
||||||
{{ if or (eq (.Get "preset") "") (eq (.Get "preset") nil) }}
|
{{ if or (eq (.Get "preset") "") (eq (.Get "preset") nil) }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<button class="bergamot-button bergamot-play" onclick='window.Bergamot.runPreset(this.parentElement, "bergamot-widget-container-{{ .Get "id" }}", "{{ .Get "preset" }}")'>{{ partial "icon.html" "play" }}Start Bergamot</button>
|
<button class="bergamot-button bergamot-play" onclick='window.Bergamot.runPreset(this.parentElement, "bergamot-widget-container-{{ .Get "id" }}", "{{ .Get "preset" }}")'>{{ partial "icon.html" "play" }}{{ i18n "startBergamot" }}</button>
|
||||||
<button class="bergamot-button bergamot-close bergamot-hidden" onclick='window.Bergamot.close(this.parentElement, "bergamot-widget-container-{{ .Get "id" }}")'>{{ partial "icon.html" "x" }}Close Bergamot</button>
|
<button class="bergamot-button bergamot-close bergamot-hidden" onclick='window.Bergamot.close(this.parentElement, "bergamot-widget-container-{{ .Get "id" }}")'>{{ partial "icon.html" "x" }}{{ i18n "closeBergamot" }}</button>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"url" $url.url
|
"url" $url.url
|
||||||
"basePath" $url.basePath
|
"basePath" $url.basePath
|
||||||
"path" (.Get 1)
|
"path" (.Get 1)
|
||||||
"comment" ", entire file"
|
"comment" (i18n "entireFile")
|
||||||
"code" (readFile (printf "code/%s" (.Get 1)))
|
"code" (readFile (printf "code/%s" (.Get 1)))
|
||||||
"language" (.Get 0)
|
"language" (.Get 0)
|
||||||
"opts" "linenos=table"
|
"opts" "linenos=table"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"url" $url.url
|
"url" $url.url
|
||||||
"basePath" $url.basePath
|
"basePath" $url.basePath
|
||||||
"path" (.Get 0)
|
"path" (.Get 0)
|
||||||
"comment" ", entire file"
|
"comment" (i18n "entireFile")
|
||||||
"content" (safeHTML (printf "<pre><code>%s</code></pre>" (htmlEscape (readFile (printf "code/%s" (.Get 0))))))
|
"content" (safeHTML (printf "<pre><code>%s</code></pre>" (htmlEscape (readFile (printf "code/%s" (.Get 0))))))
|
||||||
-}}
|
-}}
|
||||||
{{- partial "group.html" $groupconfig -}}
|
{{- partial "group.html" $groupconfig -}}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ license = "MIT"
|
|||||||
# homepage = "http://example.com/"
|
# homepage = "http://example.com/"
|
||||||
# tags = []
|
# tags = []
|
||||||
# features = []
|
# features = []
|
||||||
min_version = "0.41"
|
min_version = "0.160.1"
|
||||||
|
|
||||||
[author]
|
[author]
|
||||||
name = "Danila Fedorin"
|
name = "Danila Fedorin"
|
||||||
|
|||||||
Reference in New Issue
Block a user