From 4c8ad3d0ee04f24cd7d53440aa7cb77a4944f2b9 Mon Sep 17 00:00:00 2001 From: Matt Stavola Date: Mon, 6 Oct 2025 13:52:41 -0400 Subject: [PATCH] Licensing and responsive design --- LICENSE | 21 ++ mlf-cli/Cargo.toml | 1 + mlf-codegen/Cargo.toml | 1 + mlf-diagnostics/Cargo.toml | 1 + mlf-lang/Cargo.toml | 1 + mlf-validation/Cargo.toml | 1 + mlf-wasm/Cargo.toml | 1 + website/sass/style.scss | 465 +++++++++++++++++++++--------------- website/templates/base.html | 32 +-- 9 files changed, 297 insertions(+), 227 deletions(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..dd155e7 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 MLF Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/mlf-cli/Cargo.toml b/mlf-cli/Cargo.toml index b901f3e..4623c2d 100644 --- a/mlf-cli/Cargo.toml +++ b/mlf-cli/Cargo.toml @@ -2,6 +2,7 @@ name = "mlf-cli" version = "0.1.0" edition = "2024" +license = "MIT" [[bin]] name = "mlf" diff --git a/mlf-codegen/Cargo.toml b/mlf-codegen/Cargo.toml index 969073e..63a174c 100644 --- a/mlf-codegen/Cargo.toml +++ b/mlf-codegen/Cargo.toml @@ -2,6 +2,7 @@ name = "mlf-codegen" version = "0.1.0" edition = "2024" +license = "MIT" [dependencies] mlf-lang = { path = "../mlf-lang" } diff --git a/mlf-diagnostics/Cargo.toml b/mlf-diagnostics/Cargo.toml index a373b43..9e76fa5 100644 --- a/mlf-diagnostics/Cargo.toml +++ b/mlf-diagnostics/Cargo.toml @@ -2,6 +2,7 @@ name = "mlf-diagnostics" version = "0.1.0" edition = "2024" +license = "MIT" [dependencies] mlf-lang = { path = "../mlf-lang" } diff --git a/mlf-lang/Cargo.toml b/mlf-lang/Cargo.toml index 27aa0f8..94b9978 100644 --- a/mlf-lang/Cargo.toml +++ b/mlf-lang/Cargo.toml @@ -2,6 +2,7 @@ name = "mlf-lang" version = "0.1.0" edition = "2024" +license = "MIT" [dependencies] nom = { version = "8", default-features = false, features = ["alloc"] } diff --git a/mlf-validation/Cargo.toml b/mlf-validation/Cargo.toml index 1dafda5..3db9929 100644 --- a/mlf-validation/Cargo.toml +++ b/mlf-validation/Cargo.toml @@ -2,6 +2,7 @@ name = "mlf-validation" version = "0.1.0" edition = "2024" +license = "MIT" [dependencies] mlf-lang = { path = "../mlf-lang" } diff --git a/mlf-wasm/Cargo.toml b/mlf-wasm/Cargo.toml index 2e8bff1..661d943 100644 --- a/mlf-wasm/Cargo.toml +++ b/mlf-wasm/Cargo.toml @@ -2,6 +2,7 @@ name = "mlf-wasm" version = "0.1.0" edition = "2024" +license = "MIT" [lib] crate-type = ["cdylib", "rlib"] diff --git a/website/sass/style.scss b/website/sass/style.scss index 15eda56..deb1963 100644 --- a/website/sass/style.scss +++ b/website/sass/style.scss @@ -36,6 +36,7 @@ html { height: 100%; + overflow-x: hidden; } body { @@ -47,16 +48,22 @@ body { min-height: 100%; display: flex; flex-direction: column; + overflow-x: hidden; + max-width: 100vw; } main { flex: 1; + overflow-x: hidden; + width: 100%; } .container { max-width: 980px; margin: 0 auto; padding: 0 1.5rem; + width: 100%; + box-sizing: border-box; } /* Typography */ @@ -680,201 +687,6 @@ footer { font-size: 0.875rem; } -/* Mobile menu toggle */ -.mobile-menu-toggle { - display: none; - background: none; - border: none; - color: var(--text); - font-size: 1.5rem; - cursor: pointer; - padding: 0.5rem; - line-height: 1; -} - -.mobile-menu-toggle:hover { - color: var(--accent); -} - -/* Responsive */ -@media (max-width: 768px) { - .hero h1 { - font-size: 2rem; - } - - .tagline { - font-size: 1.125rem; - } - - .code-comparison { - grid-template-columns: 1fr; - gap: 1rem; - } - - .playground-container { - grid-template-columns: 1fr; - } - - /* Mobile navigation */ - .mobile-menu-toggle { - display: block; - } - - .nav-links { - display: none; - position: absolute; - top: 100%; - left: 0; - right: 0; - background: var(--bg-elevated); - flex-direction: column; - gap: 0; - padding: 1rem 0; - border-bottom: 1px solid var(--border); - z-index: 50; - } - - .nav-links.active { - display: flex; - } - - .nav-links li { - width: 100%; - } - - .nav-links a { - display: block; - padding: 0.75rem 1.5rem; - font-size: 1rem; - } - - nav { - position: relative; - } - - .cta-buttons { - flex-direction: column; - align-items: center; - } - - .btn { - width: 100%; - max-width: 200px; - text-align: center; - } - - .doc-layout { - grid-template-columns: 1fr; - gap: 1.5rem; - } - - .doc-page { - padding: 1.5rem 0; - } - - .doc-sidebar { - position: static; - border: 1px solid var(--border); - border-radius: 0.375rem; - padding: 1rem; - margin-bottom: 1.5rem; - } - - .doc-nav h3 { - cursor: pointer; - user-select: none; - } - - .doc-nav h3::after { - content: " ▼"; - font-size: 0.75rem; - color: var(--text-muted); - } - - .doc-nav > ul { - max-height: 500px; - overflow-y: auto; - } - - .doc-nav .nav-section ul { - padding-left: 0.5rem; - } - - /* Make tables responsive */ - .doc-content table { - display: block; - overflow-x: auto; - white-space: nowrap; - } - - /* Code blocks */ - .doc-content pre { - margin-left: -1.5rem; - margin-right: -1.5rem; - border-radius: 0; - } -} - -@media (max-width: 480px) { - .container { - padding: 0 1rem; - } - - .hero { - padding: 2rem 0; - } - - .hero h1 { - font-size: 1.75rem; - } - - .nav-container { - padding: 0 1rem; - } - - .logo img { - height: 36px; - } - - textarea { - height: 300px; - } - - .doc-content { - font-size: 0.938rem; - } - - .doc-content h1 { - font-size: 1.875rem; - } - - .doc-content h2 { - font-size: 1.5rem; - } - - .doc-content h3 { - font-size: 1.25rem; - } - - .doc-content pre { - font-size: 0.813rem; - } - - .panel-header { - flex-direction: column; - align-items: flex-start; - } - - .file-path-container { - width: 100%; - } - - .tabs { - width: 100%; - justify-content: space-between; - } -} - /* Documentation pages */ .doc-page { padding: 3rem 0; @@ -892,11 +704,13 @@ footer { grid-template-columns: 250px 1fr; gap: 3rem; align-items: start; + max-width: 100%; } .doc-sidebar { position: sticky; top: 2rem; + min-width: 0; } .doc-nav h3 { @@ -966,10 +780,18 @@ footer { .doc-main { min-width: 0; + max-width: 100%; + overflow-x: hidden; } .doc-content { max-width: 720px; + overflow-x: hidden; + word-wrap: break-word; +} + +.doc-content * { + max-width: 100%; } .doc-content h1 { @@ -1070,12 +892,12 @@ footer { font-size: 0.813rem; } +/* Line numbers for code blocks */ .logo a { color: var(--accent); text-decoration: none; } -/* Line numbers for code editor */ .line-numbers { flex-shrink: 0; min-width: 3rem; @@ -1105,3 +927,254 @@ footer { overflow: auto; min-width: 0; } + +/* Responsive */ +@media (max-width: 768px) { + .hero h1 { + font-size: 2rem; + } + + .tagline { + font-size: 1.125rem; + } + + .code-comparison { + grid-template-columns: 1fr; + gap: 1rem; + } + + .playground-container { + grid-template-columns: 1fr; + } + + /* Mobile navigation */ + .nav-container { + flex-direction: column; + gap: 1rem; + align-items: flex-start; + } + + .nav-links { + width: 100%; + flex-direction: column; + gap: 0.5rem; + } + + .nav-links li { + width: 100%; + } + + .nav-links a { + display: block; + padding: 0.5rem 0; + font-size: 1rem; + } + + .cta-buttons { + flex-direction: column; + align-items: center; + } + + .btn { + width: 100%; + max-width: 200px; + text-align: center; + } + + .doc-layout { + display: flex; + flex-direction: column; + gap: 1.5rem; + width: 100%; + max-width: 100%; + } + + .doc-page { + padding: 1.5rem 0; + overflow-x: hidden; + width: 100%; + } + + .doc-page .container { + padding: 0 1rem; + } + + .doc-main { + width: 100%; + max-width: 100%; + overflow-x: hidden; + order: 2; + } + + .doc-sidebar { + position: static; + border: 1px solid var(--border); + border-radius: 0.375rem; + padding: 1rem; + margin-bottom: 0; + width: 100%; + max-width: 100%; + box-sizing: border-box; + order: 1; + } + + .doc-nav h3 { + cursor: pointer; + user-select: none; + } + + .doc-nav h3::after { + content: " ▼"; + font-size: 0.75rem; + color: var(--text-muted); + } + + .doc-nav > ul { + max-height: 500px; + overflow-y: auto; + } + + .doc-nav .nav-section ul { + padding-left: 0.5rem; + } + + /* Make content responsive */ + .doc-content { + width: 100%; + max-width: 100%; + overflow-x: hidden; + } + + .doc-content * { + max-width: 100%; + } + + .doc-content pre { + overflow-x: auto; + width: 100%; + max-width: 100%; + box-sizing: border-box; + } + + .doc-content code { + word-wrap: break-word; + overflow-wrap: break-word; + } + + .doc-content pre code { + display: block; + overflow-x: auto; + } + + /* Make tables responsive */ + .doc-content table { + display: block; + overflow-x: auto; + white-space: nowrap; + } + + /* Images */ + .doc-content img { + max-width: 100%; + height: auto; + } +} + +@media (max-width: 480px) { + .container { + padding: 0 1rem; + } + + .hero { + padding: 2rem 0; + } + + .hero h1 { + font-size: 1.75rem; + } + + .nav-container { + padding: 0 1rem; + } + + .logo img { + height: 36px; + } + + textarea { + height: 300px; + } + + .doc-page { + padding: 1rem 0; + } + + .doc-page .container { + padding: 0 0.75rem; + } + + .doc-content { + font-size: 0.938rem; + padding: 0; + width: 100%; + } + + .doc-content h1 { + font-size: 1.75rem; + word-wrap: break-word; + overflow-wrap: break-word; + } + + .doc-content h2 { + font-size: 1.375rem; + word-wrap: break-word; + overflow-wrap: break-word; + } + + .doc-content h3 { + font-size: 1.125rem; + word-wrap: break-word; + overflow-wrap: break-word; + } + + .doc-content p { + word-wrap: break-word; + overflow-wrap: break-word; + } + + .doc-content pre { + font-size: 0.75rem; + padding: 0.5rem; + margin: 1rem 0; + width: 100%; + max-width: 100%; + } + + .doc-content code { + font-size: 0.75rem; + } + + .doc-content ul, .doc-content ol { + margin-left: 1rem; + padding-right: 0.5rem; + } + + .doc-content li { + word-wrap: break-word; + overflow-wrap: break-word; + } + + .panel-header { + flex-direction: column; + align-items: flex-start; + } + + .file-path-container { + width: 100%; + } + + .tabs { + width: 100%; + justify-content: space-between; + } +} diff --git a/website/templates/base.html b/website/templates/base.html index b174aaa..1330bc0 100644 --- a/website/templates/base.html +++ b/website/templates/base.html @@ -21,10 +21,7 @@ MLF - -