Created
October 14, 2022 21:59
-
-
Save noche-x/4e4bad0872edf3a55bb0bc6e77831492 to your computer and use it in GitHub Desktop.
RosaWorld Website Template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Creating text | |
--- Call the function `site:text(text: string, style?: table) to draw text. | |
-- Putting custom text styles | |
--- Call 'site:text' with the second parameter ('style') with a table full of styles you want. | |
-- Text Styles | |
--- center: boolean | Centers the text. | |
--- foregroundColor: integer | Foreground color of the text. | |
--- backgroundColor: integer | Background color of the text. | |
-- Site Properties | |
--- bg: integer | Background color of the site. | |
--- fg: integer | Foreground color of the site. | |
-- Color codes can be accessed here https://user-images.githubusercontent.com/26438306/171258532-e92ad983-7928-4385-9885-3e0f63e64a59.png | |
-- Creating a website | |
--- Follow the instructions on the command 'website' on Library computers. | |
-- Site code | |
local site = ... | |
-- This will make the background white | |
site.bg = 0xf | |
-- This will make the foreground black | |
site.fg = 0x0 | |
-- This function will be called once upon site load. | |
function site:draw() | |
-- This will put 'Hello world!' on the top left of the website | |
site:text("Hello world!") | |
-- This will out 'Centered text.' on the next lines center | |
site:text("Centered text.", { center = true }) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment