diff --git a/web/landing/assets/app.js b/web/landing/assets/app.js index f1de28be0..63d203b2f 100644 --- a/web/landing/assets/app.js +++ b/web/landing/assets/app.js @@ -1,6 +1,4 @@ import '@fontsource-variable/cabin/index.min.css'; -import 'highlight.js/styles/github-dark.min.css'; import '@oddbird/popover-polyfill'; import './bootstrap.js'; import 'htmx.org' -import 'clipboard' diff --git a/web/landing/assets/controllers/clipboard_controller.js b/web/landing/assets/controllers/clipboard_controller.js index 7474526fa..a0ff3b10b 100644 --- a/web/landing/assets/controllers/clipboard_controller.js +++ b/web/landing/assets/controllers/clipboard_controller.js @@ -1,6 +1,7 @@ import {Controller} from '@hotwired/stimulus'; import ClipboardJS from 'clipboard'; +/* stimulusFetch: 'lazy' */ export default class extends Controller { connect() diff --git a/web/landing/assets/controllers/syntax_highlight_controller.js b/web/landing/assets/controllers/syntax_highlight_controller.js index ff536a238..470733f4b 100644 --- a/web/landing/assets/controllers/syntax_highlight_controller.js +++ b/web/landing/assets/controllers/syntax_highlight_controller.js @@ -1,10 +1,12 @@ import {Controller} from '@hotwired/stimulus'; -import hljs from 'highlight.js/lib/core'; +import 'highlight.js/styles/github-dark.min.css'; import php from 'highlight.js/lib/languages/php'; +import hljs from 'highlight.js/lib/core'; +/* stimulusFetch: 'lazy' */ export default class extends Controller { - static afterLoad(identifier, application) + initialize() { hljs.registerLanguage('php', php); } diff --git a/web/landing/assets/images/icons/flow.svg b/web/landing/assets/images/icons/flow.svg new file mode 100644 index 000000000..292552ce7 --- /dev/null +++ b/web/landing/assets/images/icons/flow.svg @@ -0,0 +1,11 @@ + + \ No newline at end of file diff --git a/web/landing/assets/images/icons/tools.svg b/web/landing/assets/images/icons/tools.svg new file mode 100644 index 000000000..614d6621a --- /dev/null +++ b/web/landing/assets/images/icons/tools.svg @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/web/landing/assets/styles/app.css b/web/landing/assets/styles/app.css index e09db6850..e57188ccf 100644 --- a/web/landing/assets/styles/app.css +++ b/web/landing/assets/styles/app.css @@ -3,7 +3,7 @@ @tailwind utilities; body { - font-family: "Cabin Variable", sans-serif; + font-family: "Cabin Variable", system-ui; } .unset { diff --git a/web/landing/src/Flow/Website/Controller/DefaultController.php b/web/landing/src/Flow/Website/Controller/DefaultController.php index e1de61ce8..0aa38bb2b 100644 --- a/web/landing/src/Flow/Website/Controller/DefaultController.php +++ b/web/landing/src/Flow/Website/Controller/DefaultController.php @@ -25,7 +25,7 @@ public function example(string $topic, string $example) : Response $examples = $this->examples->examples($currentTopic); $currentExample = $example; - return $this->render('main/index.html.twig', [ + return $this->render('example/index.html.twig', [ 'contributors' => $this->github->contributors(), 'topics' => $topics, 'examples' => $examples, @@ -38,13 +38,19 @@ public function example(string $topic, string $example) : Response #[Route('/', name: 'main')] public function main() : Response { +// TODO: uncomment and remove below code when frontpage features will be available +// return $this->render('main/index.html.twig', [ +// 'contributors' => $this->github->contributors(), +// 'topics' => $this->examples->topics(), +// ]); + $topics = $this->examples->topics(); $currentTopic = \current($topics); $examples = $this->examples->examples($currentTopic); $currentExample = \current($examples); - return $this->render('main/index.html.twig', [ + return $this->render('example/index.html.twig', [ 'contributors' => $this->github->contributors(), 'topics' => $topics, 'examples' => $examples, @@ -63,7 +69,7 @@ public function topic(string $topic) : Response $examples = $this->examples->examples($currentTopic); $currentExample = \current($examples); - return $this->render('main/index.html.twig', [ + return $this->render('example/index.html.twig', [ 'contributors' => $this->github->contributors(), 'topics' => $topics, 'examples' => $examples, diff --git a/web/landing/templates/base.html.twig b/web/landing/templates/base.html.twig index 719797c6b..21f245335 100644 --- a/web/landing/templates/base.html.twig +++ b/web/landing/templates/base.html.twig @@ -12,6 +12,8 @@ + + {% block stylesheets %} {% endblock %} @@ -30,38 +32,38 @@