Skip to content

Commit

Permalink
fix links and website meta
Browse files Browse the repository at this point in the history
  • Loading branch information
PgBiel committed Dec 21, 2024
1 parent e22ebd0 commit f236f87
Showing 1 changed file with 23 additions and 17 deletions.
40 changes: 23 additions & 17 deletions src/playground.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,19 @@ import snag

// Meta bits

const meta_title = "The Gleam Playground"
// const meta_title = "The Gleam Playground"

const meta_description = "A playground for the Gleam programming language. Write, run, and share Gleam code in your browser."
// const meta_description = "A playground for the Gleam programming language. Write, run, and share Gleam code in your browser."

const meta_image = "https://gleam.run/images/og-image.png"

const meta_url = "https://play.gleam.run"
// const meta_url = "https://play.gleam.run"

const meta_title = "The Glistix Playground"

const meta_description = "A playground for the Glistix compiler. Write and compile Gleam code to Nix in your browser."

const meta_url = "https://glistix.github.io/playground"

// Paths

Expand Down Expand Up @@ -287,37 +293,37 @@ fn file_error(

// Shared stylesheets paths

const css__gleam_common = "/common.css"
const css__gleam_common = "common.css"

/// Loads fonts and defines font sizes
const css_fonts = "/css/fonts.css"
const css_fonts = "css/fonts.css"

/// Derives app colors for both dark & light themes from common.css variables
const css_theme = "/css/theme.css"
const css_theme = "css/theme.css"

/// Defines layout unit variables
const css_layout = "/css/layout.css"
const css_layout = "css/layout.css"

/// Sensitive defaults for any page
const css_defaults_page = [css_fonts, css_theme, css__gleam_common, css_layout]

// Page stylesheet paths

/// Common stylesheet for all playground pages
const css_root = "/css/root.css"
const css_root = "css/root.css"

// Path to the css speciic to to lesson & main pages
const css_playground_page = "/css/pages/playground.css"
const css_playground_page = "css/pages/playground.css"

// Defines code syntax highlighting for highlightJS & CodeFlash
// based on dark / light mode and the currenly loaded color scheme
const css_syntax_highlight = "/css/code/syntax-highlight.css"
const css_syntax_highlight = "css/code/syntax-highlight.css"

// Color schemes
// TODO: add more color schemes

/// Atom One Dark & Atom One Light colors
const css_scheme_atom_one = "/css/code/color-schemes/atom-one.css"
const css_scheme_atom_one = "css/code/color-schemes/atom-one.css"

/// Sensitive defaults for any page needing to display Gleam code
/// To be used alonside defaults_page
Expand Down Expand Up @@ -359,11 +365,11 @@ fn home_page() -> Html {
// Links
html_link("shortcut icon", "https://gleam.run/images/lucy/lucy.svg"),
// Scripts
html_script(
"https://plausible.io/js/script.js",
ScriptOptions(defer: True, module: False),
[#("data-domain", "playground.gleam.run")],
),
// html_script(
// "https://plausible.io/js/script.js",
// ScriptOptions(defer: True, module: False),
// [#("data-domain", "playground.gleam.run")],
// ),
// Stylesheets
..{
list.flatten([
Expand All @@ -380,7 +386,7 @@ fn home_page() -> Html {
h("script", [#("type", "gleam"), #("id", "code")], [
htmb.dangerous_unescaped_fragment(string_builder.from_string(hello_joe)),
]),
html_script("/index.js", ScriptOptions(module: True, defer: False), []),
html_script("index.js", ScriptOptions(module: True, defer: False), []),
]

let body_content = [
Expand Down

0 comments on commit f236f87

Please sign in to comment.