From 4d4ee393af597b142eac17f982356d184e088759 Mon Sep 17 00:00:00 2001 From: magmaus3 Date: Thu, 10 Aug 2023 14:17:28 +0200 Subject: [PATCH] Better definition layout, page_status labels, content changes --- archetypes/BuiltinCommands.md | 19 ++++ archetypes/LuaFunctions.md | 14 +-- content/BuiltinCommands/_index.md | 8 ++ content/BuiltinCommands/level.skip.md | 19 ++++ content/LuaFunctions/mgCameraShake.md | 2 +- content/LuaFunctions/mgCommand.md | 22 +++++ content/_index.md | 5 +- content/decompiled_src/commands.txt | 67 +++++++++++++++ content/decompiled_src/functions.txt | 63 ++++++++++++++ hugo.toml | 4 + layouts/_default/baseof.html | 2 + .../{LuaFunctions.html => definition.html} | 5 ++ .../_default/{single.html => single.old.html} | 0 layouts/_default/taxonomy.html | 4 +- layouts/_default/term.html | 13 +++ layouts/partials/content_notices.html | 9 ++ layouts/partials/see_also.html | 8 ++ static/index.css | 31 ++++++- static/syntax_highlighting.css | 86 +++++++++++++++++++ 19 files changed, 367 insertions(+), 14 deletions(-) create mode 100644 archetypes/BuiltinCommands.md create mode 100644 content/BuiltinCommands/_index.md create mode 100644 content/BuiltinCommands/level.skip.md create mode 100644 content/LuaFunctions/mgCommand.md create mode 100644 content/decompiled_src/commands.txt create mode 100644 content/decompiled_src/functions.txt rename layouts/_default/{LuaFunctions.html => definition.html} (62%) rename layouts/_default/{single.html => single.old.html} (100%) create mode 100644 layouts/_default/term.html create mode 100644 layouts/partials/content_notices.html create mode 100644 layouts/partials/see_also.html create mode 100644 static/syntax_highlighting.css diff --git a/archetypes/BuiltinCommands.md b/archetypes/BuiltinCommands.md new file mode 100644 index 0000000..9b1e954 --- /dev/null +++ b/archetypes/BuiltinCommands.md @@ -0,0 +1,19 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +description: "description" +layout: "definition" +page_status: +- 'stub' +--- + +## Usage + +```txt +{{ .Name }} required, [optional] // type these in manually +``` + + diff --git a/archetypes/LuaFunctions.md b/archetypes/LuaFunctions.md index b58ce65..5d5a781 100644 --- a/archetypes/LuaFunctions.md +++ b/archetypes/LuaFunctions.md @@ -1,15 +1,15 @@ --- title: "{{ replace .Name "-" " " | title }}" -description: "{{ .Description }}" -date: {{ .Date }} -type: "lua_func" +description: "description" +layout: "definition" +page_status: +- 'stub' --- -# `{{ .Name }}` – {{ .Description }} - ## Usage - -{{ .Name }}(required, [optional]) +```lua +{{ .Name }}(required, [optional]) -- type these in manually +``` + diff --git a/content/BuiltinCommands/level.skip.md b/content/BuiltinCommands/level.skip.md new file mode 100644 index 0000000..bc3d572 --- /dev/null +++ b/content/BuiltinCommands/level.skip.md @@ -0,0 +1,19 @@ +--- +title: "level.skip" +description: "skips the level if the user has enough coins (same as pressing the skip level button)" +layout: "definition" +page_status: +- stub +--- + +## Usage + +```txt +level.skip +``` + + diff --git a/content/LuaFunctions/mgCameraShake.md b/content/LuaFunctions/mgCameraShake.md index 12d11b0..a8cf7eb 100644 --- a/content/LuaFunctions/mgCameraShake.md +++ b/content/LuaFunctions/mgCameraShake.md @@ -1,7 +1,7 @@ --- title: 'mgCameraShake' description: 'used to visually shake the camera' -layout: 'LuaFunctions' +layout: 'definition' page_status: - 'stub' --- diff --git a/content/LuaFunctions/mgCommand.md b/content/LuaFunctions/mgCommand.md new file mode 100644 index 0000000..3cf9819 --- /dev/null +++ b/content/LuaFunctions/mgCommand.md @@ -0,0 +1,22 @@ +--- +title: "mgCommand" +description: "Executes internal commands" +layout: "LuaFunctions" +page_status: +- stub +see_also: +- "/builtincommands/" +--- + +## Usage + +```lua +mgCommand(command) +``` +`command` includes both the command itself and parameters used + + diff --git a/content/_index.md b/content/_index.md index 38e159b..b800d57 100644 --- a/content/_index.md +++ b/content/_index.md @@ -1,3 +1,4 @@ -Welcome to the wiki! +# Welcome to the wiki! -It's unfinished, but hopefully it'll be! +It's unfinished, but hopefully it'll be soon! +Meanwhile you can check out the categories below: diff --git a/content/decompiled_src/commands.txt b/content/decompiled_src/commands.txt new file mode 100644 index 0000000..a4d05cd --- /dev/null +++ b/content/decompiled_src/commands.txt @@ -0,0 +1,67 @@ +audio.playBackgroundMusic +audio.playForegroundMusic +movie.start +level.restart +level.replay +level.start +level.startreplay +.motion +level.skip +game.quit +game.menu +game.leaderboards +game.achievements +game.saveConfig +game.url +game.difficulty +hud.reload +player.buy +player.buycoins +com.mediocre.grannysmith.coins1000 +com.mediocre.grannysmith.coins3000 +player.unlockall +player.restorepurchases +player.rate +player.unlockallchar +player.selectcharacter +player.ischaracteravailable +player.reset +player.adsshown +game.signin +game.signout +audio.playBackgroundMusic +audio.playForegroundMusic +movie.start +level.restart +level.replay +level.start +level.startreplay +level.skip +game.quit +game.menu +game.leaderboards +game.achievements +game.saveConfig +game.url +game.difficulty +audio.playBackgroundMusic +audio.playForegroundMusic +movie.start +level.restart +level.replay +level.start +level.startreplay +level.skip +game.quit +game.menu +game.leaderboards +game.achievements +game.saveConfig +game.url +game.difficulty +hud.reload +player.buy +player.buycoins +player.unlockall +player.restorepurchases +com.mediocre.grannysmith.unlockall3 diff --git a/content/decompiled_src/functions.txt b/content/decompiled_src/functions.txt new file mode 100644 index 0000000..6ed0f9e --- /dev/null +++ b/content/decompiled_src/functions.txt @@ -0,0 +1,63 @@ +mgCreateImage +mgCreateUi +mgCreateText +mgSetOrigo +mgSetCrop +mgRadioSelect +mgSetUiEnabled +mgSetUiModal +mgSetText +mgSetPos +mgSetRot +mgSetScale +mgSetAlpha +mgSetColor +mgGetPos +mgGetRot +mgGetScale +mgGetAlpha +mgGetColor +mgIsVisible +mgDraw +mgGet +mgSet +mgCommand +mgScriptTime +mgScriptFrame +mgFullScreenColor +mgCreateSound +mgPlaySound +mgIsTouched +mgGetLastTouch +mgGetScreenCoord +mgGetLevelInfo +mgIsCharacterAvailable +mgCreateCanvas +mgPushCanvas +mgPopCanvas +mgSetCanvasEnabled +mgSetCanvasWindow +mgSetCanvasMovable +mgGetUiSelectionCount +mgGetUiSelectionInfo +mgDrawReplay +mgGetPose +mgSetPose +mgGetVelocity +mgSetVelocity +mgSetFilter +mgSetDynamic +mgMove +mgRotate +mgGetDistanceBetweenBodies +mgGetDistanceToPoint +mgInSensor +mgBreakJoint +mgSetSensorEnabled +mgIsGrabbed +mgIsBroken +mgCreateEffect +mgParticle +mgRnd +mgParticlePoof +mgCameraShake diff --git a/hugo.toml b/hugo.toml index 6f3eaac..7f411a8 100644 --- a/hugo.toml +++ b/hugo.toml @@ -7,3 +7,7 @@ title = 'Granny Smith Technical' page_status = 'page_status' # tag = 'tags' +[markup] + [markup.highlight] + noClasses = false + style = 'github-dark' diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index d23900e..2f465ae 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -5,6 +5,8 @@ + {{ block "head" . }} + {{ end }} {{ block "main" . }} diff --git a/layouts/_default/LuaFunctions.html b/layouts/_default/definition.html similarity index 62% rename from layouts/_default/LuaFunctions.html rename to layouts/_default/definition.html index 602c5f7..37b4baa 100644 --- a/layouts/_default/LuaFunctions.html +++ b/layouts/_default/definition.html @@ -1,3 +1,6 @@ +{{ define "head" }} + +{{ end }} {{ define "main" }} {{ partial "header.html" }}
@@ -6,7 +9,9 @@ {{ .Content }}
+ {{ partial "see_also" . }} {{ partial "categories.html" }} + {{ partial "content_notices.html" . }}
{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.old.html similarity index 100% rename from layouts/_default/single.html rename to layouts/_default/single.old.html diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html index e04d88b..d0e1b3d 100644 --- a/layouts/_default/taxonomy.html +++ b/layouts/_default/taxonomy.html @@ -1,11 +1,11 @@ {{ define "main" }}
+ {{ partial "header.html" . }}

{{ .Name | lower }}

-
diff --git a/layouts/_default/term.html b/layouts/_default/term.html new file mode 100644 index 0000000..8d1fd7f --- /dev/null +++ b/layouts/_default/term.html @@ -0,0 +1,13 @@ +{{ define "main" }} +
+
+ {{ partial "header.html" . }} +

Pages marked as {{ .Type | lower }}.{{ .Name | lower }}

+ +
+
+{{ end }} diff --git a/layouts/partials/content_notices.html b/layouts/partials/content_notices.html new file mode 100644 index 0000000..bb78765 --- /dev/null +++ b/layouts/partials/content_notices.html @@ -0,0 +1,9 @@ +
+ {{ range .Params.page_status }} + {{ if eq . "stub" }} +
+ This page is a stub, you might want to expand it. +
+ {{ end }} + {{ end }} +
diff --git a/layouts/partials/see_also.html b/layouts/partials/see_also.html new file mode 100644 index 0000000..15f72c8 --- /dev/null +++ b/layouts/partials/see_also.html @@ -0,0 +1,8 @@ +
+

See also:

+ +
diff --git a/static/index.css b/static/index.css index af5265f..8996251 100644 --- a/static/index.css +++ b/static/index.css @@ -11,9 +11,14 @@ nav { box-shadow: 0px 5px 15px #121212; } -pre > code { - padding: 10px; +article { + padding: 1em; +} + +.chroma { + padding: 1em; font-size: inherit; + /* background-color: #20202a; */ } nav a { @@ -45,3 +50,25 @@ blockquote { border-left: 2px solid gray; padding-left: 1em; } + + +.content_notice > * { + padding: 1em; + border: 1px solid gray; + max-width: max-content; + border-radius: 0.5em; +} + +.content_notice .stub { + background-color: #FFFF00A0; + color: black; +} + +.content_notice .stub a { + color: inherit; + font-weight: bolder; + text-shadow: 0px 0px 2px cyan; + transition: 100ms text-shadow ease-in-out; +} .content_notice .stub a:hover { + text-shadow: 0px 0px 5px red; +} diff --git a/static/syntax_highlighting.css b/static/syntax_highlighting.css new file mode 100644 index 0000000..4e16190 --- /dev/null +++ b/static/syntax_highlighting.css @@ -0,0 +1,86 @@ +/* Background */ .bg { color: #abb2bf; background-color: #282c34; } +/* PreWrapper */ .chroma { color: #abb2bf; background-color: #282c34; } +/* Other */ .chroma .x { } +/* Error */ .chroma .err { } +/* CodeLine */ .chroma .cl { } +/* LineLink */ .chroma .lnlinks { outline: none; text-decoration: none; color: inherit } +/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } +/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; } +/* LineHighlight */ .chroma .hl { background-color: #ffffcc } +/* LineNumbersTable */ .chroma .lnt { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #55595f } +/* LineNumbers */ .chroma .ln { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #55595f } +/* Line */ .chroma .line { display: flex; } +/* Keyword */ .chroma .k { color: #c678dd } +/* KeywordConstant */ .chroma .kc { color: #e5c07b } +/* KeywordDeclaration */ .chroma .kd { color: #c678dd } +/* KeywordNamespace */ .chroma .kn { color: #c678dd } +/* KeywordPseudo */ .chroma .kp { color: #c678dd } +/* KeywordReserved */ .chroma .kr { color: #c678dd } +/* KeywordType */ .chroma .kt { color: #e5c07b } +/* Name */ .chroma .n { color: #e06c75 } +/* NameAttribute */ .chroma .na { color: #e06c75 } +/* NameBuiltin */ .chroma .nb { color: #e5c07b } +/* NameBuiltinPseudo */ .chroma .bp { color: #e06c75 } +/* NameClass */ .chroma .nc { color: #e5c07b } +/* NameConstant */ .chroma .no { color: #e06c75 } +/* NameDecorator */ .chroma .nd { color: #61afef } +/* NameEntity */ .chroma .ni { color: #e06c75 } +/* NameException */ .chroma .ne { color: #e06c75 } +/* NameFunction */ .chroma .nf { color: #61afef; font-weight: bold } +/* NameFunctionMagic */ .chroma .fm { color: #56b6c2; font-weight: bold } +/* NameLabel */ .chroma .nl { color: #e06c75 } +/* NameNamespace */ .chroma .nn { color: #e06c75 } +/* NameOther */ .chroma .nx { color: #e06c75 } +/* NameProperty */ .chroma .py { color: #e06c75 } +/* NameTag */ .chroma .nt { color: #e06c75 } +/* NameVariable */ .chroma .nv { color: #e06c75 } +/* NameVariableClass */ .chroma .vc { color: #e06c75 } +/* NameVariableGlobal */ .chroma .vg { color: #e06c75 } +/* NameVariableInstance */ .chroma .vi { color: #e06c75 } +/* NameVariableMagic */ .chroma .vm { color: #e06c75 } +/* Literal */ .chroma .l { } +/* LiteralDate */ .chroma .ld { } +/* LiteralString */ .chroma .s { color: #98c379 } +/* LiteralStringAffix */ .chroma .sa { color: #98c379 } +/* LiteralStringBacktick */ .chroma .sb { color: #98c379 } +/* LiteralStringChar */ .chroma .sc { color: #98c379 } +/* LiteralStringDelimiter */ .chroma .dl { color: #98c379 } +/* LiteralStringDoc */ .chroma .sd { color: #98c379 } +/* LiteralStringDouble */ .chroma .s2 { color: #98c379 } +/* LiteralStringEscape */ .chroma .se { color: #98c379 } +/* LiteralStringHeredoc */ .chroma .sh { color: #98c379 } +/* LiteralStringInterpol */ .chroma .si { color: #98c379 } +/* LiteralStringOther */ .chroma .sx { color: #98c379 } +/* LiteralStringRegex */ .chroma .sr { color: #98c379 } +/* LiteralStringSingle */ .chroma .s1 { color: #98c379 } +/* LiteralStringSymbol */ .chroma .ss { color: #98c379 } +/* LiteralNumber */ .chroma .m { color: #d19a66 } +/* LiteralNumberBin */ .chroma .mb { color: #d19a66 } +/* LiteralNumberFloat */ .chroma .mf { color: #d19a66 } +/* LiteralNumberHex */ .chroma .mh { color: #d19a66 } +/* LiteralNumberInteger */ .chroma .mi { color: #d19a66 } +/* LiteralNumberIntegerLong */ .chroma .il { color: #d19a66 } +/* LiteralNumberOct */ .chroma .mo { color: #d19a66 } +/* Operator */ .chroma .o { color: #56b6c2 } +/* OperatorWord */ .chroma .ow { color: #56b6c2 } +/* Punctuation */ .chroma .p { } +/* Comment */ .chroma .c { color: #7f848e } +/* CommentHashbang */ .chroma .ch { color: #7f848e } +/* CommentMultiline */ .chroma .cm { color: #7f848e } +/* CommentSingle */ .chroma .c1 { color: #7f848e } +/* CommentSpecial */ .chroma .cs { color: #7f848e } +/* CommentPreproc */ .chroma .cp { color: #7f848e } +/* CommentPreprocFile */ .chroma .cpf { color: #7f848e } +/* Generic */ .chroma .g { } +/* GenericDeleted */ .chroma .gd { } +/* GenericEmph */ .chroma .ge { } +/* GenericError */ .chroma .gr { } +/* GenericHeading */ .chroma .gh { } +/* GenericInserted */ .chroma .gi { } +/* GenericOutput */ .chroma .go { } +/* GenericPrompt */ .chroma .gp { } +/* GenericStrong */ .chroma .gs { } +/* GenericSubheading */ .chroma .gu { } +/* GenericTraceback */ .chroma .gt { } +/* GenericUnderline */ .chroma .gl { } +/* TextWhitespace */ .chroma .w { }