Skip to content

Commit

Permalink
Add tktk and use it for all filler text
Browse files Browse the repository at this point in the history
  • Loading branch information
otherjoel authored and MarcKaufmann committed Oct 21, 2024
1 parent 922a5aa commit db9ac28
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 22 deletions.
24 changes: 24 additions & 0 deletions congame-doc/aux.css
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,30 @@ mark {
border-radius: 3px;
}

.tktk {
color: #7d8694;
font-style: italic;
}

.tktk:before {
content: "[";
}

.tktk:after {
content: "]";
}

abbr.margin-icon {
border-bottom: dotted orange 1px;
padding: 2px;
float: left;
margin: 0 0.25rem 0 -1.75rem;
}

abbr.margin-icon:hover {
background: #fe9;
}

.figure {
border: solid silver 1px;
}
5 changes: 3 additions & 2 deletions congame-doc/concepts.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@ or simply to keep a copy of the data.

@section{Building Studies}

Two ways to author studies, depending on whether you're running your own Congame server.
@tktk{Two ways to author studies, depending on whether you're running your own Congame server.}

@section{Web Pages}

Study steps eventually become web pages, so you may need to know a little about HTML and Markdown.
@tktk{Study steps eventually become web pages, so you may need to know a little about HTML and
Markdown.}

@section[#:tag "scribble-in-conscript"]{“Scribble Syntax” in Conscript}

Expand Down
34 changes: 17 additions & 17 deletions congame-doc/conscript-reference.scrbl
Original file line number Diff line number Diff line change
@@ -1,49 +1,44 @@
#lang scribble/manual

@(require (for-label racket/contract
conscript/base))
conscript/base)
"doc-util.rkt")

@title[#:style 'toc]{Conscript Reference}

Here you can lookup individual Conscript functions and macros to thoroughly
understand their usage.

@table-of-contents[]

@section{Core}

@defmodule[conscript/base]

@defform[(defstep ...)]{
Defines a step
@tktk{Defines a step.}
}

@defform[(defstep/study ...)]{
...
@tktk{...}
}

@deftogether[(
@defform[(defvar ...)]
@defform[(defvar* ...)])]{
Define a variable with some extra magic behind it
@tktk{Define a variable with some extra magic behind it}
}

@defform[(defview ...)]{
...
@tktk{...}
}

@defform[(defstudy ...)]{
...
}

@defform[(--> ...)]{
Mysterious arrow
}

@defform[(goto ...)]{
Considered harmful
@tktk{...}
}

@defform[(for/study ...)]{
See loops, definition of
@tktk{See loops, definition of}
}

@defform[(with-bot)]{
Expand All @@ -56,7 +51,7 @@ understand their usage.

@defproc[(preview [study study?]) void?]{

Run @racket[_study] in your browser.
@tktk{Run @racket[_study] in your browser.}

}

Expand All @@ -68,19 +63,24 @@ Run @racket[_study] in your browser.

@defform[(md ...)]{

Parses its contents as Markdown and produces equivalent HTML content.
@tktk{Parses its contents as Markdown and produces equivalent HTML content.}

}

@subsection{HTML}

@defmodule[conscript/html]

@tktk{...}

@subsection{Forms}

@defmodule[conscript/form]

@tktk{...}

@subsection{Resources}

@defmodule[conscript/resource]

@tktk{...}
9 changes: 6 additions & 3 deletions congame-doc/conscript-tutorial.scrbl
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
#lang scribble/manual

@(require (for-label racket/base
racket/contract))
@(require (for-label conscript/base
racket/contract)
"doc-util.rkt")

@title{Conscript tutorial: simple studies}

In this tutorial, we'll walk through the basics of creating some simple studies in Conscript
@tktk{In this tutorial, we'll walk through the basics of creating some simple studies in Conscript
that you can try out in your browser.

...}



12 changes: 12 additions & 0 deletions congame-doc/doc-util.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@
(alt-tag "mark")))
elems))

;; Mark filler content as placeholders for the real thing to be added later
(define (tktk . elems)
(element (style "tktk" (list (css-style-addition congame-css)
(alt-tag "span")))
`(,(icon "Content to be added later" "") ,@elems)))

(define (icon tooltip str)
(element (style "margin-icon" (list (attributes `([title ,@tooltip]))
(alt-tag "abbr")))
(list str)))

;; Style for sample terminal output
(define (terminal . args)
(compound-paragraph (style "terminal" (list (color-property (list #x66 #x33 #x99))
Expand Down Expand Up @@ -60,6 +71,7 @@
(tex-addition congame-tex)))
(decode-flow elems)))

;; For use inside `browser`
(define (mock-textbox)
(element (style "mock-textbox" (list (css-style-addition congame-css)
(alt-tag "span")))
Expand Down

0 comments on commit db9ac28

Please sign in to comment.