This commit is contained in:
Bernard Xie 2023-04-13 13:59:54 -07:00
parent 2f2f56c3ac
commit 38b9fe8e68
No known key found for this signature in database
GPG key ID: 3C3E0036CE0F892C
6 changed files with 4894 additions and 2 deletions

View file

@ -81,8 +81,8 @@ var DarkNeutral = Neutral{
N1: "#F4F6FA", N1: "#F4F6FA",
N2: "#BBBEC9", N2: "#BBBEC9",
N3: "#868A96", N3: "#868A96",
N4: "#3A3D49", N4: "#676D7D",
N5: "#676D7D", N5: "#3A3D49",
N6: "#191C28", N6: "#191C28",
N7: "#000410", N7: "#000410",
} }

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 108 KiB

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 108 KiB

View file

@ -9,6 +9,113 @@ import (
func testThemes(t *testing.T) { func testThemes(t *testing.T) {
tcs := []testCase{ tcs := []testCase{
{
name: "dark terrastruct flagship",
themeID: d2themescatalog.DarkFlagshipTerrastruct.ID,
script: `
network: {
cell tower: {
style.text-transform: capitalize
satellites: {
shape: stored_data
style.multiple: true
}
transmitter : {
style.text-transform: uppercase
}
satellites -> transmitter: SEnD {
style.text-transform: lowercase
}
satellites -> transmitter: send
satellites -> transmitter: send
}
online portal: {
ui: { shape: hexagon }
}
data processor: {
storage: {
shape: cylinder
style.multiple: true
}
}
cell tower.transmitter -> data processor.storage: phone logs
}
user: {
shape: person
width: 130
}
user -> network.cell tower: make call
user -> network.online portal.ui: access {
style.stroke-dash: 3
}
api server -> network.online portal.ui: display
api server -> logs: persist
logs: { shape: page; style.multiple: true }
network.data processor -> api server
users: {
shape: sql_table
id: int
name: string
email: string
password: string
last_login: datetime
}
products: {
shape: class
id: int
price: decimal
sku: string
name: string
}
markdown: |md
# A tale
- of
- two cities
|
code: |go
package main
import (
"fmt"
)
type City struct {
Name string
Population int
}
func tellTale(city1, city2 City) {
fmt.Printf("There were two cities, %s and %s.\n", city1.Name, city2.Name)
fmt.Printf("%s had a population of %d.\n", city1.Name, city1.Population)
fmt.Printf("%s had a population of %d.\n", city2.Name, city2.Population)
fmt.Println("Their tales were intertwined, and their people shared many adventures.")
}
func main() {
city1 := City{Name: "CityA", Population: 1000000}
city2 := City{Name: "CityB", Population: 1200000}
tellTale(city1, city2)
}
|
markdown -> code -> ex
ex: |tex
\\displaylines{x = a + b \\\\ y = b + c}
\\sum_{k=1}^{n} h_{k} \\int_{0}^{1} \\bigl(\\partial_{k} f(x_{k-1}+t h_{k} e_{k}) -\\partial_{k} f(a)\\bigr) \\,dt
|
`,
},
{ {
name: "terminal", name: "terminal",
themeID: d2themescatalog.Terminal.ID, themeID: d2themescatalog.Terminal.ID,