Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added new-docs/assets/pyret-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 18 additions & 36 deletions new-docs/index.poly.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,23 @@

◊title[#:version (number->string ◊VERSION)]{Pyret}

◊nested{This document has detailed information on the Pyret grammar and the
behavior of its expression forms and built-in libraries, along with many
examples and some longer descriptions of language design choices. If you want
to do something in a program and you can't find how in this document, feel free
to post a message on the
◊link["https://groups.google.com/forum/#!forum/pyret-discuss" "Pyret discussion
list"], and we'll be happy to help.}

◊nested{If you want to learn about (or teach!) programming and computer science
using Pyret, check out ◊link["https://dcic-world.org" "A Data Centric Introduction to Computing"], which is a textbook on programming starting with
Pyret.}

◊nested{Previous release notes documents have useful information on major
updates over time.}

◊ul[
◊li{◊hyperlink["https://www.pyret.org/release-notes/2025.html"]{Summer 2025}}
◊li{◊hyperlink["https://www.pyret.org/release-notes/summer-2021.html"]{Summer 2021}}
◊li{◊hyperlink["https://www.pyret.org/release-notes/summer-2020.html"]{Summer 2020}}
◊li{◊hyperlink["https://groups.google.com/g/pyret-discuss/c/kUr3iIYsheE/m/Z7FTW9ZcEwAJ"]{Fall 2017}}
◊li{◊hyperlink["https://groups.google.com/g/pyret-discuss/c/n4yAxubXHyY/m/EJr0yMlwAAAJ"]{Fall 2016}}
◊li{◊hyperlink["https://groups.google.com/g/pyret-discuss/c/i1qMU_YP9Tw/m/j67PlQx0CQAJ"]{Summer 2016}}
◊li{◊hyperlink["https://www.pyret.org/release-notes/v0.5.html"]{Summer 2014}}
]

◊include-section{getting-started.poly.pm}

◊include-section{language-concepts.poly.pm}

◊include-section{libraries.poly.pm}

◊include-section{style-guide.poly.pm}

◊include-section{internal.poly.pm}

◊include-section{glossary.poly.pm}
◊landing-hero{
◊h1[#:class "landing-h1"]{Pyret Documentation}
◊landing-description{This document has detailed information on the Pyret grammar and the behavior of its expression forms and built-in libraries, along with many examples and some longer descriptions of language design choices. If you want to do something in a program and you can't find how in this document, feel free to post a message on the ◊link["https://groups.google.com/forum/#!forum/pyret-discuss" "Pyret discussion list"], and we'll be happy to help.

If you want to learn about (or teach!) programming and computer science using Pyret, check out ◊link["https://dcic-world.org" "A Data Centric Introduction to Computing"], which is a textbook on programming starting with Pyret.}
◊landing-searchbar[]
◊landing-btn["getting-started.html"]{Get Started}}

◊landing-releases{
◊h3[#:class "landing-releases-heading"]{Previous release notes documents:}
◊landing-release-links{
◊hyperlink["https://www.pyret.org/release-notes/2025.html"]{Summer 2025}
◊hyperlink["https://www.pyret.org/release-notes/summer-2021.html"]{Summer 2021}
◊hyperlink["https://www.pyret.org/release-notes/summer-2020.html"]{Summer 2020}
◊hyperlink["https://groups.google.com/g/pyret-discuss/c/kUr3iIYsheE/m/Z7FTW9ZcEwAJ"]{Fall 2017}
◊hyperlink["https://groups.google.com/g/pyret-discuss/c/n4yAxubXHyY/m/EJr0yMlwAAAJ"]{Fall 2016}
◊hyperlink["https://groups.google.com/g/pyret-discuss/c/i1qMU_YP9Tw/m/j67PlQx0CQAJ"]{Summer 2016}
◊hyperlink["https://www.pyret.org/release-notes/v0.5.html"]{Summer 2014}}}

◊pollen-postlude[]
45 changes: 45 additions & 0 deletions new-docs/pyret-docs.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,21 @@
(define (append-gen-docs . desc)
"")

(define (section-number-css here-html)
(define p (page-section-prefix here-html))
(if (not p)
""
(let ([pd (string-append p ".")])
(string-append
".container { counter-reset: h2c 0; }\n"
".container h1::before { content: \"" p " \"; }\n"
".container h2 { counter-increment: h2c; counter-reset: h3c 0; }\n"
".container h2::before { content: \"" pd "\" counter(h2c) \" \"; }\n"
".container h3 { counter-increment: h3c; counter-reset: h4c 0; }\n"
".container h3::before { content: \"" pd "\" counter(h2c) \".\" counter(h3c) \" \"; }\n"
".container h4 { counter-increment: h4c; }\n"
".container h4::before { content: \"" pd "\" counter(h2c) \".\" counter(h3c) \".\" counter(h4c) \" \"; }\n"))))

(define (add-paras info)
; (printf "### add-paras ~s\n" info)
; (printf "### first info = ~s\n" (car info))
Expand Down Expand Up @@ -415,3 +430,33 @@

(define (rbrace)
`(span () "}"))

;; Landing page components

(define (landing-hero . elems)
`(div ([class "landing-hero"]) ,@elems))

(define (landing-description . elems)
`(div ([class "landing-description"]) ,@elems))

(define (landing-searchbar)
`(div ([class "landing-searchbar"])
(div ([class "landing-searchbar-inner"])
(span ([class "material-symbols-rounded search-icon"]) "search")
(input ([class "landing-searchbox"]
[id "landing-searchbox"]
[type "text"]
[tabindex "1"]
[placeholder "Search..."]
[title "Enter a search string to search the manuals"]
[onkeypress "return DoSearchKey(event, this, '9.1', '');"])))))

(define (landing-btn url . elems)
`(div ([class "landing-btn-wrapper"])
(a ([class "landing-btn"] [href ,url]) ,@elems)))

(define (landing-releases . elems)
`(div ([class "landing-releases"]) ,@elems))

(define (landing-release-links . elems)
`(div ([class "landing-release-links"]) ,@elems))
Loading