From 59e8c71786fd1c154904b3fefa7d26d88f4d92d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Otterstr=C3=B6m?= Date: Fri, 8 Jul 2022 22:08:32 +0200 Subject: [PATCH] Format astro files in examples (#3862) --- examples/basics/src/components/Card.astro | 42 ++--- examples/basics/src/layouts/Layout.astro | 69 ++++---- examples/basics/src/pages/index.astro | 48 +++-- .../src/components/MainHead.astro | 17 +- .../src/components/Pagination.astro | 6 +- .../src/components/PostPreview.astro | 2 +- .../src/layouts/post.astro | 15 +- .../src/pages/about.astro | 26 +-- .../src/pages/authors/[author].astro | 25 ++- .../src/pages/index.astro | 24 +-- .../src/pages/posts/[...page].astro | 33 ++-- examples/blog/src/components/BaseHead.astro | 7 +- examples/blog/src/components/BlogHeader.astro | 9 +- examples/blog/src/components/BlogPost.astro | 13 +- examples/blog/src/components/Logo.astro | 46 ++--- examples/blog/src/layouts/BlogPost.astro | 14 +- examples/blog/src/pages/index.astro | 19 +- examples/component/demo/src/pages/index.astro | 2 +- .../packages/my-component/Button.astro | 2 +- .../packages/my-component/Heading.astro | 4 +- .../src/components/Footer/AvatarList.astro | 24 ++- .../docs/src/components/Footer/Footer.astro | 2 +- examples/docs/src/components/HeadCommon.astro | 21 ++- examples/docs/src/components/HeadSEO.astro | 13 +- .../src/components/Header/AstroLogo.astro | 9 +- .../docs/src/components/Header/Header.astro | 14 +- .../components/LeftSidebar/LeftSidebar.astro | 17 +- .../components/PageContent/PageContent.astro | 4 +- .../components/RightSidebar/MoreMenu.astro | 8 +- .../RightSidebar/RightSidebar.astro | 4 +- examples/docs/src/layouts/MainLayout.astro | 20 +-- examples/env-vars/src/pages/index.astro | 4 +- .../framework-alpine/src/pages/index.astro | 4 +- .../framework-lit/src/components/Lorem.astro | 160 +++++++++++------ examples/framework-lit/src/pages/index.astro | 10 +- .../framework-multiple/src/pages/index.astro | 16 +- .../framework-preact/src/pages/index.astro | 2 +- .../framework-react/src/pages/index.astro | 2 +- .../framework-solid/src/pages/index.astro | 2 +- .../framework-svelte/src/pages/index.astro | 2 +- examples/framework-vue/src/pages/index.astro | 2 +- .../src/components/Lorem.astro | 167 +++++++++++------- .../src/pages/foo.astro | 4 +- .../src/pages/index.astro | 75 ++++---- examples/minimal/src/pages/index.astro | 2 +- examples/non-html-pages/src/pages/index.astro | 5 +- .../portfolio/src/components/MainHead.astro | 16 +- examples/portfolio/src/layouts/project.astro | 10 +- examples/portfolio/src/pages/404.astro | 10 +- examples/portfolio/src/pages/about.astro | 42 +++-- examples/portfolio/src/pages/index.astro | 27 +-- examples/portfolio/src/pages/projects.astro | 24 ++- examples/ssr/src/components/Container.astro | 3 +- examples/ssr/src/components/Header.astro | 20 +-- .../ssr/src/components/ProductListing.astro | 27 +-- .../src/components/TextDecorationSkip.astro | 12 +- examples/ssr/src/pages/cart.astro | 77 ++++---- examples/ssr/src/pages/index.astro | 54 +++--- examples/ssr/src/pages/login.astro | 47 ++--- examples/ssr/src/pages/products/[id].astro | 69 ++++---- examples/starter/src/components/Logo.astro | 9 +- examples/starter/src/pages/index.astro | 117 ++++++------ examples/subpath/src/pages/index.astro | 4 +- .../src/layouts/main.astro | 4 +- .../src/pages/about.astro | 6 +- .../src/layouts/main.astro | 4 +- examples/with-markdown/src/layouts/main.astro | 4 +- .../with-markdown/src/pages/external.astro | 4 +- examples/with-markdown/src/pages/index.astro | 20 +-- .../with-nanostores/src/pages/index.astro | 12 +- .../src/components/Button.astro | 9 +- .../with-tailwindcss/src/pages/index.astro | 2 +- .../src/pages/index.astro | 4 +- 73 files changed, 958 insertions(+), 695 deletions(-) diff --git a/examples/basics/src/components/Card.astro b/examples/basics/src/components/Card.astro index 53b67a9da..4039d4f4f 100644 --- a/examples/basics/src/components/Card.astro +++ b/examples/basics/src/components/Card.astro @@ -1,26 +1,26 @@ --- export interface Props { - title: string, - body: string, - href: string, + title: string; + body: string; + href: string; } -const {href, title, body} = Astro.props; +const { href, title, body } = Astro.props; --- + diff --git a/examples/basics/src/pages/index.astro b/examples/basics/src/pages/index.astro index ea7401f11..cf05f0bb6 100644 --- a/examples/basics/src/pages/index.astro +++ b/examples/basics/src/pages/index.astro @@ -1,26 +1,43 @@ --- -import Layout from '../layouts/Layout.astro'; -import Card from '../components/Card.astro'; +import Layout from "../layouts/Layout.astro"; +import Card from "../components/Card.astro"; --- +

Welcome to Astro

- Check out the src/pages directory to get started.
+ Check out the src/pages directory to get started.
Code Challenge: Tweak the "Welcome to Astro" message above.

- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi quam arcu, rhoncus et dui at, volutpat viverra augue. Suspendisse placerat libero tellus, ut consequat ligula - rutrum id. Vestibulum lectus libero, viverra in lacus eget, porttitor tincidunt leo. Integer sit amet turpis et felis fringilla lacinia in id nibh. Proin vitae dapibus odio. - Mauris ornare eget urna id volutpat. Duis tellus nisi, hendrerit id sodales in, rutrum a quam. Proin tempor velit turpis, et tempor lacus sagittis in. Sed congue mauris quis nibh - posuere, nec semper lacus auctor. Morbi sit amet enim sit amet arcu ullamcorper sollicitudin. Donec dignissim posuere tincidunt. Donec ultrices quam nec orci venenatis suscipit. - Maecenas sapien quam, pretium sit amet ullamcorper at, vulputate sit amet urna. Suspendisse potenti. Integer in sapien turpis. Nulla accumsan viverra diam, quis convallis magna - finibus eget. Integer sed eros bibendum, consequat velit sit amet, tincidunt orci. Mauris varius id metus in fringilla. Vestibulum dignissim massa eget erat luctus, ac congue - mauris pellentesque. In et tempor dolor. Cras blandit congue lorem at facilisis. Aenean vel lacinia quam. Pellentesque luctus metus ut scelerisque efficitur. Mauris laoreet - sodales libero eget luctus. Proin at congue dui, a cursus risus. Pellentesque lorem sem, rhoncus fermentum arcu ut, euismod fermentum ligula. Nullam eu orci posuere, laoreet leo - in, commodo dolor. Fusce at felis elementum, commodo justo at, placerat justo. Nam feugiat scelerisque arcu, ut fermentum tellus elementum in. Sed ut vulputate ante. Morbi cursus - arcu quis odio convallis egestas. Donec vulputate vestibulum dolor eget tristique. Nullam tempor semper augue, vitae lobortis neque tempor ac. Pellentesque massa leo, congue id - ligula auctor, sollicitudin pharetra lorem. Curabitur a lacus porttitor, venenatis est quis, mattis velit. Fusce hendrerit lobortis mi ac efficitur. Mauris ornare, lorem sed - varius faucibus, nisi dui pretium urna, sit amet lacinia nibh ligula in ipsum. Phasellus gravida, metus eget ornare ultrices, dolor ipsum consectetur erat, ac aliquet eros metus - sed lectus. Nullam eleifend posuere rhoncus. Curabitur semper ligula vel ante posuere, at blandit orci accumsan. Vivamus accumsan metus in lorem laoreet, a luctus arcu tempus. - Donec posuere sollicitudin nulla at vulputate. Nulla condimentum imperdiet purus, et lobortis ligula iaculis in. Donec suscipit viverra neque, ut elementum eros lacinia ut. Fusce - at odio enim. Donec rutrum lectus sit amet est auctor, ac rhoncus lorem imperdiet. Curabitur commodo ex est, non tempus massa pulvinar nec. Sed fermentum, lectus eget ultricies - luctus, enim sem sodales quam, sed laoreet tortor sem feugiat nisi. Morbi molestie vehicula viverra. Integer accumsan mi in orci ultrices posuere. Integer mi quam, faucibus et - aliquet imperdiet, ornare ac ex. Nunc mattis molestie nisi, eu venenatis nibh vehicula at. Aliquam ut elit consectetur, finibus lorem sed, condimentum sapien. Praesent fermentum - iaculis orci, vitae tincidunt est viverra nec. Morbi semper turpis sed lectus ornare tristique. Sed congue dui ex. Maecenas orci ligula, imperdiet sit amet accumsan et, finibus a - velit. Ut vitae blandit eros. Nam gravida nec ipsum non volutpat. Integer quam metus, porttitor id ante sed, rutrum porta quam. Aenean at mattis ante. Morbi id libero eget risus - sagittis gravida. Proin consequat sapien a dignissim posuere. Ut luctus sed metus ut elementum. Mauris tincidunt condimentum risus at bibendum. Aenean a sapien justo. Morbi vel - neque in eros venenatis scelerisque vitae nec justo. Vestibulum lacinia, dui eu sollicitudin ornare, est elit vestibulum arcu, nec ultrices augue turpis in massa. Duis commodo - lectus sed est posuere, et mollis nisi dapibus. Sed id ultrices arcu. Praesent tempor sodales aliquet. Donec suscipit ipsum eu odio cursus, quis sodales metus sodales. Nunc - vestibulum massa at felis ullamcorper cursus. Pellentesque facilisis ante ut lectus vulputate vestibulum. Nullam pharetra felis ac lacus sodales, vel suscipit metus faucibus. - Donec facilisis imperdiet risus, in volutpat odio tincidunt a. Aliquam vitae leo lorem. Proin scelerisque efficitur velit, vel cursus ipsum accumsan id. Morbi nibh nulla, pretium - quis venenatis et, pharetra et sapien. Cras lobortis, massa sit amet blandit pulvinar, mi magna condimentum ex, quis commodo ipsum est quis metus. Maecenas pulvinar, leo sit amet - congue pulvinar, neque magna ultrices mi, et rhoncus massa sapien quis libero. Etiam a nunc et ipsum faucibus pretium. Nulla facilisi. Nunc nec dolor velit. In semper semper mi - non condimentum. Pellentesque vehicula volutpat odio, a semper sem porta a. In sit amet lectus rutrum, sollicitudin augue auctor, maximus quam. Mauris congue, nisl non fermentum - iaculis, leo erat interdum lorem, quis bibendum arcu eros et elit. Fusce tortor ante, gravida a arcu in, lacinia finibus ante. Phasellus facilisis lectus vitae sapien feugiat - laoreet. Curabitur ultricies libero sit amet condimentum suscipit. Duis at vestibulum mi. Suspendisse at neque augue. Duis ornare a mauris id efficitur. Suspendisse in dui nec - dolor dignissim venenatis. Curabitur a magna turpis. Aliquam at commodo tellus. In id sem interdum, suscipit felis at, mattis velit. Proin accumsan sodales felis a lacinia. - Curabitur at magna a massa varius maximus. Vestibulum in auctor ante. Donec aliquam tortor sed nulla rutrum, et egestas mi efficitur. Sed viverra quam tellus, quis vulputate - felis ultrices sed. Mauris sagittis, neque quis laoreet gravida, nisi est ultrices mi, at tempus nunc justo non dui. Suspendisse porttitor tortor nulla, eget luctus quam finibus - id. Proin sodales eros mollis tellus euismod luctus a eu mi. Quisque consectetur iaculis nibh, at mollis tellus volutpat eu. Aenean a nulla vel lectus rhoncus aliquam. Donec - vitae lacinia neque. Donec non lectus eget sem finibus ultrices vel nec felis. Proin fringilla mi a leo rhoncus aliquam sit amet quis augue. Duis congue ligula at est suscipit - fringilla. Proin aliquam erat ut consequat dapibus. Suspendisse non nisi orci. Donec ac erat vel libero egestas laoreet. Nullam felis odio, tincidunt eget eleifend a, porttitor - eu nisi. Suspendisse tristique eros at dolor scelerisque hendrerit. Etiam id dignissim lectus. Fusce lacinia metus eu risus placerat, et eleifend nunc ultrices. Ut gravida a dui - sed volutpat. Sed semper quis erat sed ornare. Pellentesque sapien sem, fermentum vel nunc at, auctor posuere nisl. Maecenas aliquet lobortis leo. Vivamus tellus urna, dignissim - consectetur sapien vitae, hendrerit varius sem. Nunc dictum tristique fermentum. Duis eu suscipit odio. Curabitur quis egestas neque. Fusce eu fringilla orci, vitae euismod - sapien. Donec sit amet iaculis urna. Phasellus maximus nisl in libero bibendum volutpat. Nulla at vehicula lorem. Phasellus varius, elit ac suscipit pretium, turpis ipsum - porttitor lectus, vitae ullamcorper orci velit ut ligula. Proin mollis, orci vel commodo auctor, sapien ipsum vulputate enim, sit amet aliquam nulla sapien ut sapien. Proin - tincidunt ex non massa aliquet, quis aliquam nulla egestas. Maecenas mollis turpis dapibus, dignissim lectus tincidunt, egestas ligula. Suspendisse in lobortis purus. Sed tellus - tellus, mollis eget tempor sed, interdum ut lectus. Nulla sed ex efficitur, porta dui cursus, tristique elit. Maecenas tincidunt tortor vitae massa laoreet ultricies. Mauris ac - elit vitae orci eleifend ornare non eu ligula. Curabitur venenatis nulla ut neque tristique, non tincidunt justo pretium. Suspendisse mattis semper dui, eget vestibulum risus - elementum sed. In consequat nisi sit amet nulla euismod, at convallis tortor tincidunt. Aliquam hendrerit venenatis risus in interdum. Duis ullamcorper imperdiet elit sit amet - blandit. Mauris placerat lacinia velit id pharetra. Nam nec iaculis dui. Etiam odio mi, fringilla in rutrum in, viverra quis tellus. Aliquam egestas mauris id nisi facilisis, in - laoreet nibh malesuada. Ut eu dui laoreet, venenatis tellus ac, feugiat mauris. Nunc in velit laoreet, venenatis tellus quis, blandit dolor. Nulla ultrices et neque id placerat. - Nulla eu interdum nulla. Aliquam molestie enim quis rutrum finibus. Nulla bibendum orci vel scelerisque posuere. Praesent quis magna molestie, luctus tortor tincidunt, gravida - neque. Quisque et ligula eget magna viverra interdum at a sapien. Mauris ornare efficitur nunc sed vulputate. Praesent laoreet mollis tincidunt. Vestibulum id arcu vulputate, - eleifend enim vel, accumsan turpis. Morbi faucibus convallis tellus, semper laoreet justo lacinia nec. Sed sodales ligula consectetur dui rhoncus, et convallis metus accumsan. - Sed ullamcorper non ex sit amet ultricies. Donec finibus nulla nec blandit porttitor. Etiam aliquam quis leo a imperdiet. Cras at lobortis est. In convallis semper enim, ac porta - ligula fringilla at. Donec augue est, facilisis et odio sit amet, viverra ullamcorper nisl. Ut porta velit nec sem lacinia, sit amet mollis magna auctor. Nulla lobortis lacinia - mauris nec sagittis. Suspendisse rutrum ex vel nisi interdum hendrerit et ut purus. Sed consectetur sodales nibh eget tempus. Aenean egestas luctus viverra. Integer fermentum - tincidunt tellus, nec rhoncus velit hendrerit vitae. Proin quis neque porttitor, scelerisque risus gravida, volutpat sem. Fusce nec ex rhoncus, tempor libero nec, pellentesque - ex. Integer quis iaculis purus. Nullam vitae imperdiet orci. Sed sit amet eros condimentum, scelerisque turpis facilisis, dignissim ante. Proin quis tristique lacus, sed sagittis - nisl. Cras pharetra ultrices purus, sed ullamcorper nisi fringilla eu. Praesent risus turpis, auctor in fringilla a, fringilla eu dolor. Phasellus auctor tristique enim, eleifend - molestie diam venenatis ut. Mauris dapibus, enim eget pharetra semper, nulla dui porttitor mi, auctor hendrerit augue nulla quis urna. Aliquam in cursus justo. + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi quam arcu, rhoncus et dui at, + volutpat viverra augue. Suspendisse placerat libero tellus, ut consequat ligula rutrum id. + Vestibulum lectus libero, viverra in lacus eget, porttitor tincidunt leo. Integer sit amet turpis + et felis fringilla lacinia in id nibh. Proin vitae dapibus odio. Mauris ornare eget urna id + volutpat. Duis tellus nisi, hendrerit id sodales in, rutrum a quam. Proin tempor velit turpis, et + tempor lacus sagittis in. Sed congue mauris quis nibh posuere, nec semper lacus auctor. Morbi sit + amet enim sit amet arcu ullamcorper sollicitudin. Donec dignissim posuere tincidunt. Donec + ultrices quam nec orci venenatis suscipit. Maecenas sapien quam, pretium sit amet ullamcorper at, + vulputate sit amet urna. Suspendisse potenti. Integer in sapien turpis. Nulla accumsan viverra + diam, quis convallis magna finibus eget. Integer sed eros bibendum, consequat velit sit amet, + tincidunt orci. Mauris varius id metus in fringilla. Vestibulum dignissim massa eget erat luctus, + ac congue mauris pellentesque. In et tempor dolor. Cras blandit congue lorem at facilisis. Aenean + vel lacinia quam. Pellentesque luctus metus ut scelerisque efficitur. Mauris laoreet sodales + libero eget luctus. Proin at congue dui, a cursus risus. Pellentesque lorem sem, rhoncus fermentum + arcu ut, euismod fermentum ligula. Nullam eu orci posuere, laoreet leo in, commodo dolor. Fusce at + felis elementum, commodo justo at, placerat justo. Nam feugiat scelerisque arcu, ut fermentum + tellus elementum in. Sed ut vulputate ante. Morbi cursus arcu quis odio convallis egestas. Donec + vulputate vestibulum dolor eget tristique. Nullam tempor semper augue, vitae lobortis neque tempor + ac. Pellentesque massa leo, congue id ligula auctor, sollicitudin pharetra lorem. Curabitur a + lacus porttitor, venenatis est quis, mattis velit. Fusce hendrerit lobortis mi ac efficitur. + Mauris ornare, lorem sed varius faucibus, nisi dui pretium urna, sit amet lacinia nibh ligula in + ipsum. Phasellus gravida, metus eget ornare ultrices, dolor ipsum consectetur erat, ac aliquet + eros metus sed lectus. Nullam eleifend posuere rhoncus. Curabitur semper ligula vel ante posuere, + at blandit orci accumsan. Vivamus accumsan metus in lorem laoreet, a luctus arcu tempus. Donec + posuere sollicitudin nulla at vulputate. Nulla condimentum imperdiet purus, et lobortis ligula + iaculis in. Donec suscipit viverra neque, ut elementum eros lacinia ut. Fusce at odio enim. Donec + rutrum lectus sit amet est auctor, ac rhoncus lorem imperdiet. Curabitur commodo ex est, non + tempus massa pulvinar nec. Sed fermentum, lectus eget ultricies luctus, enim sem sodales quam, sed + laoreet tortor sem feugiat nisi. Morbi molestie vehicula viverra. Integer accumsan mi in orci + ultrices posuere. Integer mi quam, faucibus et aliquet imperdiet, ornare ac ex. Nunc mattis + molestie nisi, eu venenatis nibh vehicula at. Aliquam ut elit consectetur, finibus lorem sed, + condimentum sapien. Praesent fermentum iaculis orci, vitae tincidunt est viverra nec. Morbi semper + turpis sed lectus ornare tristique. Sed congue dui ex. Maecenas orci ligula, imperdiet sit amet + accumsan et, finibus a velit. Ut vitae blandit eros. Nam gravida nec ipsum non volutpat. Integer + quam metus, porttitor id ante sed, rutrum porta quam. Aenean at mattis ante. Morbi id libero eget + risus sagittis gravida. Proin consequat sapien a dignissim posuere. Ut luctus sed metus ut + elementum. Mauris tincidunt condimentum risus at bibendum. Aenean a sapien justo. Morbi vel neque + in eros venenatis scelerisque vitae nec justo. Vestibulum lacinia, dui eu sollicitudin ornare, est + elit vestibulum arcu, nec ultrices augue turpis in massa. Duis commodo lectus sed est posuere, et + mollis nisi dapibus. Sed id ultrices arcu. Praesent tempor sodales aliquet. Donec suscipit ipsum + eu odio cursus, quis sodales metus sodales. Nunc vestibulum massa at felis ullamcorper cursus. + Pellentesque facilisis ante ut lectus vulputate vestibulum. Nullam pharetra felis ac lacus + sodales, vel suscipit metus faucibus. Donec facilisis imperdiet risus, in volutpat odio tincidunt + a. Aliquam vitae leo lorem. Proin scelerisque efficitur velit, vel cursus ipsum accumsan id. Morbi + nibh nulla, pretium quis venenatis et, pharetra et sapien. Cras lobortis, massa sit amet blandit + pulvinar, mi magna condimentum ex, quis commodo ipsum est quis metus. Maecenas pulvinar, leo sit + amet congue pulvinar, neque magna ultrices mi, et rhoncus massa sapien quis libero. Etiam a nunc + et ipsum faucibus pretium. Nulla facilisi. Nunc nec dolor velit. In semper semper mi non + condimentum. Pellentesque vehicula volutpat odio, a semper sem porta a. In sit amet lectus rutrum, + sollicitudin augue auctor, maximus quam. Mauris congue, nisl non fermentum iaculis, leo erat + interdum lorem, quis bibendum arcu eros et elit. Fusce tortor ante, gravida a arcu in, lacinia + finibus ante. Phasellus facilisis lectus vitae sapien feugiat laoreet. Curabitur ultricies libero + sit amet condimentum suscipit. Duis at vestibulum mi. Suspendisse at neque augue. Duis ornare a + mauris id efficitur. Suspendisse in dui nec dolor dignissim venenatis. Curabitur a magna turpis. + Aliquam at commodo tellus. In id sem interdum, suscipit felis at, mattis velit. Proin accumsan + sodales felis a lacinia. Curabitur at magna a massa varius maximus. Vestibulum in auctor ante. + Donec aliquam tortor sed nulla rutrum, et egestas mi efficitur. Sed viverra quam tellus, quis + vulputate felis ultrices sed. Mauris sagittis, neque quis laoreet gravida, nisi est ultrices mi, + at tempus nunc justo non dui. Suspendisse porttitor tortor nulla, eget luctus quam finibus id. + Proin sodales eros mollis tellus euismod luctus a eu mi. Quisque consectetur iaculis nibh, at + mollis tellus volutpat eu. Aenean a nulla vel lectus rhoncus aliquam. Donec vitae lacinia neque. + Donec non lectus eget sem finibus ultrices vel nec felis. Proin fringilla mi a leo rhoncus aliquam + sit amet quis augue. Duis congue ligula at est suscipit fringilla. Proin aliquam erat ut consequat + dapibus. Suspendisse non nisi orci. Donec ac erat vel libero egestas laoreet. Nullam felis odio, + tincidunt eget eleifend a, porttitor eu nisi. Suspendisse tristique eros at dolor scelerisque + hendrerit. Etiam id dignissim lectus. Fusce lacinia metus eu risus placerat, et eleifend nunc + ultrices. Ut gravida a dui sed volutpat. Sed semper quis erat sed ornare. Pellentesque sapien sem, + fermentum vel nunc at, auctor posuere nisl. Maecenas aliquet lobortis leo. Vivamus tellus urna, + dignissim consectetur sapien vitae, hendrerit varius sem. Nunc dictum tristique fermentum. Duis eu + suscipit odio. Curabitur quis egestas neque. Fusce eu fringilla orci, vitae euismod sapien. Donec + sit amet iaculis urna. Phasellus maximus nisl in libero bibendum volutpat. Nulla at vehicula + lorem. Phasellus varius, elit ac suscipit pretium, turpis ipsum porttitor lectus, vitae + ullamcorper orci velit ut ligula. Proin mollis, orci vel commodo auctor, sapien ipsum vulputate + enim, sit amet aliquam nulla sapien ut sapien. Proin tincidunt ex non massa aliquet, quis aliquam + nulla egestas. Maecenas mollis turpis dapibus, dignissim lectus tincidunt, egestas ligula. + Suspendisse in lobortis purus. Sed tellus tellus, mollis eget tempor sed, interdum ut lectus. + Nulla sed ex efficitur, porta dui cursus, tristique elit. Maecenas tincidunt tortor vitae massa + laoreet ultricies. Mauris ac elit vitae orci eleifend ornare non eu ligula. Curabitur venenatis + nulla ut neque tristique, non tincidunt justo pretium. Suspendisse mattis semper dui, eget + vestibulum risus elementum sed. In consequat nisi sit amet nulla euismod, at convallis tortor + tincidunt. Aliquam hendrerit venenatis risus in interdum. Duis ullamcorper imperdiet elit sit amet + blandit. Mauris placerat lacinia velit id pharetra. Nam nec iaculis dui. Etiam odio mi, fringilla + in rutrum in, viverra quis tellus. Aliquam egestas mauris id nisi facilisis, in laoreet nibh + malesuada. Ut eu dui laoreet, venenatis tellus ac, feugiat mauris. Nunc in velit laoreet, + venenatis tellus quis, blandit dolor. Nulla ultrices et neque id placerat. Nulla eu interdum + nulla. Aliquam molestie enim quis rutrum finibus. Nulla bibendum orci vel scelerisque posuere. + Praesent quis magna molestie, luctus tortor tincidunt, gravida neque. Quisque et ligula eget magna + viverra interdum at a sapien. Mauris ornare efficitur nunc sed vulputate. Praesent laoreet mollis + tincidunt. Vestibulum id arcu vulputate, eleifend enim vel, accumsan turpis. Morbi faucibus + convallis tellus, semper laoreet justo lacinia nec. Sed sodales ligula consectetur dui rhoncus, et + convallis metus accumsan. Sed ullamcorper non ex sit amet ultricies. Donec finibus nulla nec + blandit porttitor. Etiam aliquam quis leo a imperdiet. Cras at lobortis est. In convallis semper + enim, ac porta ligula fringilla at. Donec augue est, facilisis et odio sit amet, viverra + ullamcorper nisl. Ut porta velit nec sem lacinia, sit amet mollis magna auctor. Nulla lobortis + lacinia mauris nec sagittis. Suspendisse rutrum ex vel nisi interdum hendrerit et ut purus. Sed + consectetur sodales nibh eget tempus. Aenean egestas luctus viverra. Integer fermentum tincidunt + tellus, nec rhoncus velit hendrerit vitae. Proin quis neque porttitor, scelerisque risus gravida, + volutpat sem. Fusce nec ex rhoncus, tempor libero nec, pellentesque ex. Integer quis iaculis + purus. Nullam vitae imperdiet orci. Sed sit amet eros condimentum, scelerisque turpis facilisis, + dignissim ante. Proin quis tristique lacus, sed sagittis nisl. Cras pharetra ultrices purus, sed + ullamcorper nisi fringilla eu. Praesent risus turpis, auctor in fringilla a, fringilla eu dolor. + Phasellus auctor tristique enim, eleifend molestie diam venenatis ut. Mauris dapibus, enim eget + pharetra semper, nulla dui porttitor mi, auctor hendrerit augue nulla quis urna. Aliquam in cursus + justo.

diff --git a/examples/integrations-playground/src/pages/foo.astro b/examples/integrations-playground/src/pages/foo.astro index fbdd5bb1f..0e9785f14 100644 --- a/examples/integrations-playground/src/pages/foo.astro +++ b/examples/integrations-playground/src/pages/foo.astro @@ -1,6 +1,6 @@ --- // Page 2! -import Link from '../components/Link.jsx'; +import Link from "../components/Link.jsx"; --- @@ -10,6 +10,6 @@ import Link from '../components/Link.jsx'; Demo: Page 2 - + diff --git a/examples/integrations-playground/src/pages/index.astro b/examples/integrations-playground/src/pages/index.astro index 66475f3e7..f2b0d2c8a 100644 --- a/examples/integrations-playground/src/pages/index.astro +++ b/examples/integrations-playground/src/pages/index.astro @@ -1,9 +1,9 @@ --- -import Lorem from '../components/Lorem.astro'; -import Link from '../components/Link.jsx'; -import SolidCounter from '../components/SolidCounter.jsx'; -import { CalcAdd } from '../components/calc-add.js'; -import { MyCounter } from '../components/my-counter.js'; +import Lorem from "../components/Lorem.astro"; +import Link from "../components/Link.jsx"; +import SolidCounter from "../components/SolidCounter.jsx"; +import { CalcAdd } from "../components/calc-add.js"; +import { MyCounter } from "../components/my-counter.js"; --- @@ -15,39 +15,40 @@ import { MyCounter } from '../components/my-counter.js';

Test app

- Party Mode! - Colors changing = partytown is enabled -

- - - + Party Mode! + Colors changing = partytown is enabled + + + + - - + + - - + + diff --git a/examples/minimal/src/pages/index.astro b/examples/minimal/src/pages/index.astro index 346e155c4..4389d5d25 100644 --- a/examples/minimal/src/pages/index.astro +++ b/examples/minimal/src/pages/index.astro @@ -1,6 +1,6 @@ --- +--- ---- diff --git a/examples/non-html-pages/src/pages/index.astro b/examples/non-html-pages/src/pages/index.astro index 9abb797e4..b6fc1decf 100644 --- a/examples/non-html-pages/src/pages/index.astro +++ b/examples/non-html-pages/src/pages/index.astro @@ -1,4 +1,3 @@ - @@ -12,7 +11,9 @@ // can fetch them directly in the browser. const response = await fetch(`/about.json`); const data = await response.json(); - document.getElementById('result').innerHTML = `Load complete!
Built with: ${data.name}!`; + document.getElementById( + "result" + ).innerHTML = `Load complete!
Built with: ${data.name}!`; diff --git a/examples/portfolio/src/components/MainHead.astro b/examples/portfolio/src/components/MainHead.astro index 935923060..9d9bc209d 100644 --- a/examples/portfolio/src/components/MainHead.astro +++ b/examples/portfolio/src/components/MainHead.astro @@ -1,6 +1,9 @@ --- -import '../styles/global.scss'; -const { title = 'Jeanine White: Personal Site', description = 'The personal site of Jeanine White' } = Astro.props; +import "../styles/global.scss"; +const { + title = "Jeanine White: Personal Site", + description = "The personal site of Jeanine White", +} = Astro.props; --- @@ -9,6 +12,9 @@ const { title = 'Jeanine White: Personal Site', description = 'The personal site {title} - - - + + + diff --git a/examples/portfolio/src/layouts/project.astro b/examples/portfolio/src/layouts/project.astro index aba14a5ac..81d67ad39 100644 --- a/examples/portfolio/src/layouts/project.astro +++ b/examples/portfolio/src/layouts/project.astro @@ -1,13 +1,13 @@ --- -import MainHead from '../components/MainHead.astro'; -import Button from '../components/Button/index.jsx'; -import Footer from '../components/Footer/index.jsx'; -import Nav from '../components/Nav/index.jsx'; +import MainHead from "../components/MainHead.astro"; +import Button from "../components/Button/index.jsx"; +import Footer from "../components/Footer/index.jsx"; +import Nav from "../components/Nav/index.jsx"; const { content } = Astro.props; --- - + - +

diff --git a/examples/ssr/src/components/ProductListing.astro b/examples/ssr/src/components/ProductListing.astro index c0af5a34c..9a6ed0502 100644 --- a/examples/ssr/src/components/ProductListing.astro +++ b/examples/ssr/src/components/ProductListing.astro @@ -1,6 +1,7 @@ --- const { products } = Astro.props; --- + diff --git a/examples/ssr/src/components/TextDecorationSkip.astro b/examples/ssr/src/components/TextDecorationSkip.astro index b35179ea8..191119bf4 100644 --- a/examples/ssr/src/components/TextDecorationSkip.astro +++ b/examples/ssr/src/components/TextDecorationSkip.astro @@ -1,15 +1,17 @@ --- const { text } = Astro.props; -const words = text.split(' '); +const words = text.split(" "); const last = words.length - 1; --- + {words.map((word, i) => ( - {word}{i !== last && ( )} + {word} + {i !== last && } ))} diff --git a/examples/ssr/src/pages/cart.astro b/examples/ssr/src/pages/cart.astro index 3277ff2db..2214703f2 100644 --- a/examples/ssr/src/pages/cart.astro +++ b/examples/ssr/src/pages/cart.astro @@ -1,47 +1,50 @@ --- -import Header from '../components/Header.astro'; -import Container from '../components/Container.astro'; -import { getCart } from '../api'; -import { isLoggedIn } from '../models/user'; +import Header from "../components/Header.astro"; +import Container from "../components/Container.astro"; +import { getCart } from "../api"; +import { isLoggedIn } from "../models/user"; -if(!isLoggedIn(Astro.request)) { - return Astro.redirect('/'); +if (!isLoggedIn(Astro.request)) { + return Astro.redirect("/"); } // They must be logged in. -const user = { name: 'test'}; // getUser? +const user = { name: "test" }; // getUser? const cart = await getCart(Astro.request); --- - - - Cart | Online Store - - - -
- -

Cart

-

Hi { user.name }! Here are your cart items:

- - - - - - - - - {cart.items.map(item => - - - )} - -
ItemCount
{item.name}{item.count}
-
- + + + Cart | Online Store + + + +
+ + +

Cart

+

Hi {user.name}! Here are your cart items:

+ + + + + + + + + {cart.items.map((item) => ( + + + + + ))} + +
ItemCount
{item.name}{item.count}
+
+ diff --git a/examples/ssr/src/pages/index.astro b/examples/ssr/src/pages/index.astro index 8eb04ffa6..456de484c 100644 --- a/examples/ssr/src/pages/index.astro +++ b/examples/ssr/src/pages/index.astro @@ -1,36 +1,36 @@ --- -import Header from '../components/Header.astro'; -import Container from '../components/Container.astro'; -import ProductListing from '../components/ProductListing.astro'; -import { getProducts } from '../api'; -import '../styles/common.css'; +import Header from "../components/Header.astro"; +import Container from "../components/Container.astro"; +import ProductListing from "../components/ProductListing.astro"; +import { getProducts } from "../api"; +import "../styles/common.css"; const products = await getProducts(Astro.request); --- + - - Online Store - + + +
- } - - - -
- - - -

Product Listing

-
-
- + + +

Product Listing

+
+
+ diff --git a/examples/ssr/src/pages/login.astro b/examples/ssr/src/pages/login.astro index b12a82a5e..081aafedf 100644 --- a/examples/ssr/src/pages/login.astro +++ b/examples/ssr/src/pages/login.astro @@ -1,30 +1,31 @@ --- -import Header from '../components/Header.astro'; -import Container from '../components/Container.astro'; +import Header from "../components/Header.astro"; +import Container from "../components/Container.astro"; --- + - - Online Store - - - -
+ + Online Store + + + +
- -

Login

-
- - + +

Login

+ + + - - + + - - -
- + + +
+ diff --git a/examples/ssr/src/pages/products/[id].astro b/examples/ssr/src/pages/products/[id].astro index f6ac67f82..9ec934aa2 100644 --- a/examples/ssr/src/pages/products/[id].astro +++ b/examples/ssr/src/pages/products/[id].astro @@ -1,46 +1,45 @@ --- -import Header from '../../components/Header.astro'; -import Container from '../../components/Container.astro'; -import AddToCart from '../../components/AddToCart.svelte'; -import { getProduct } from '../../api'; -import '../../styles/common.css'; +import Header from "../../components/Header.astro"; +import Container from "../../components/Container.astro"; +import AddToCart from "../../components/AddToCart.svelte"; +import { getProduct } from "../../api"; +import "../../styles/common.css"; const id = Number(Astro.params.id); const product = await getProduct(Astro.request, id); --- - - {product.name} | Online Store - - - -
- - -

{product.name}

-
+ img { + width: 400px; + } + + + +
+ + +

{product.name}

+
-
- -

Description here...

-
-
- -
- +
+ +

Description here...

+
+
+
+ diff --git a/examples/starter/src/components/Logo.astro b/examples/starter/src/components/Logo.astro index 02c68c7f0..ca45ef529 100644 --- a/examples/starter/src/components/Logo.astro +++ b/examples/starter/src/components/Logo.astro @@ -1,9 +1,10 @@ --- // Export a "Props" interface to . export interface Props { - height?: number, - width?: number, + height?: number; + width?: number; } -const {height = 80, width = 60 } = Astro.props; +const { height = 80, width = 60 } = Astro.props; --- -Astro logo + +Astro logo diff --git a/examples/starter/src/pages/index.astro b/examples/starter/src/pages/index.astro index ea853b668..4ec1c38a4 100644 --- a/examples/starter/src/pages/index.astro +++ b/examples/starter/src/pages/index.astro @@ -1,74 +1,75 @@ --- -import {Content as TourContent} from '../content/Tour.md'; -import Logo from '../components/Logo.astro'; -import '../styles/global.css'; -import '../styles/home.css'; +import { Content as TourContent } from "../content/Tour.md"; +import Logo from "../components/Logo.astro"; +import "../styles/global.css"; +import "../styles/home.css"; /* ASTRO:COMPONENT_IMPORTS */ // Component Script: // You can write any JavaScript/TypeScript that you'd like here. // It will run during the build, but never in the browser. // All variables are available to use in the HTML template below. -let title = 'My Astro Site'; +let title = "My Astro Site"; // Full Astro Component Syntax: // https://docs.astro.build/core-concepts/astro-components/ --- + - - - - {title} + + + + {title} - + - - - - -
-
-
- -

Welcome to Astro

-
-
+ + + + +
+
+
+ +

Welcome to Astro

+
+
-
- - -
+
+ + +
- - -
- + +
+ diff --git a/examples/subpath/src/pages/index.astro b/examples/subpath/src/pages/index.astro index a7620accd..7ecb1f58d 100644 --- a/examples/subpath/src/pages/index.astro +++ b/examples/subpath/src/pages/index.astro @@ -1,6 +1,6 @@ --- -import '../styles/main.scss'; -import Time from '../components/Time.jsx'; +import "../styles/main.scss"; +import Time from "../components/Time.jsx"; --- diff --git a/examples/with-markdown-plugins/src/layouts/main.astro b/examples/with-markdown-plugins/src/layouts/main.astro index 854b2b425..4ab5b7888 100644 --- a/examples/with-markdown-plugins/src/layouts/main.astro +++ b/examples/with-markdown-plugins/src/layouts/main.astro @@ -1,10 +1,10 @@ --- -import '../styles/global.css'; +import "../styles/global.css"; const { content } = Astro.props; --- - + diff --git a/examples/with-markdown-plugins/src/pages/about.astro b/examples/with-markdown-plugins/src/pages/about.astro index 1115fcb8c..e533ceac8 100644 --- a/examples/with-markdown-plugins/src/pages/about.astro +++ b/examples/with-markdown-plugins/src/pages/about.astro @@ -1,9 +1,9 @@ --- -import { Markdown } from 'astro/components'; -import MainLayout from '../layouts/main.astro'; +import { Markdown } from "astro/components"; +import MainLayout from "../layouts/main.astro"; --- - + # About diff --git a/examples/with-markdown-shiki/src/layouts/main.astro b/examples/with-markdown-shiki/src/layouts/main.astro index 425f5dc08..006c4ca6c 100644 --- a/examples/with-markdown-shiki/src/layouts/main.astro +++ b/examples/with-markdown-shiki/src/layouts/main.astro @@ -1,10 +1,10 @@ --- -import '../styles/global.css'; +import "../styles/global.css"; const { content } = Astro.props; --- - + diff --git a/examples/with-markdown/src/layouts/main.astro b/examples/with-markdown/src/layouts/main.astro index 425f5dc08..006c4ca6c 100644 --- a/examples/with-markdown/src/layouts/main.astro +++ b/examples/with-markdown/src/layouts/main.astro @@ -1,10 +1,10 @@ --- -import '../styles/global.css'; +import "../styles/global.css"; const { content } = Astro.props; --- - + diff --git a/examples/with-markdown/src/pages/external.astro b/examples/with-markdown/src/pages/external.astro index 82cac13d4..395e27c71 100644 --- a/examples/with-markdown/src/pages/external.astro +++ b/examples/with-markdown/src/pages/external.astro @@ -1,6 +1,6 @@ --- -import { Markdown } from 'astro/components'; -import Layout from '../layouts/main.astro'; +import { Markdown } from "astro/components"; +import Layout from "../layouts/main.astro"; const title = `External Markdown`; const content = `Markdown *content* to render`; diff --git a/examples/with-markdown/src/pages/index.astro b/examples/with-markdown/src/pages/index.astro index e70e12f35..1cc85c16c 100644 --- a/examples/with-markdown/src/pages/index.astro +++ b/examples/with-markdown/src/pages/index.astro @@ -1,19 +1,19 @@ --- // Component Imports -import { Markdown } from 'astro/components'; -import Layout from '../layouts/main.astro'; -import ReactCounter from '../components/ReactCounter.jsx'; -import PreactCounter from '../components/PreactCounter.tsx'; -import VueCounter from '../components/VueCounter.vue'; -import SvelteCounter from '../components/SvelteCounter.svelte'; +import { Markdown } from "astro/components"; +import Layout from "../layouts/main.astro"; +import ReactCounter from "../components/ReactCounter.jsx"; +import PreactCounter from "../components/PreactCounter.tsx"; +import VueCounter from "../components/VueCounter.vue"; +import SvelteCounter from "../components/SvelteCounter.svelte"; // Component Script: // You can write any JavaScript/TypeScript that you'd like here. // It will run during the build, but never in the browser. // All variables are available to use in the HTML template below. -const title = 'Astro Markdown'; -const variable = 'content'; -const items = ['A', 'B', 'C']; +const title = "Astro Markdown"; +const variable = "content"; +const items = ["A", "B", "C"]; // Full Astro Component Syntax: // https://docs.astro.build/core-concepts/astro-components/ @@ -57,7 +57,7 @@ const items = ['A', 'B', 'C']; Should work! ```js - import Something from './another'; + import Something from "./another"; const thing = new Something(); ``` diff --git a/examples/with-nanostores/src/pages/index.astro b/examples/with-nanostores/src/pages/index.astro index ad3fb4e26..cedc0ac60 100644 --- a/examples/with-nanostores/src/pages/index.astro +++ b/examples/with-nanostores/src/pages/index.astro @@ -1,13 +1,13 @@ --- // Style Imports -import '../styles/global.css'; -import '../styles/home.css'; +import "../styles/global.css"; +import "../styles/home.css"; // Component Imports -import AdminsReact from '../components/AdminsReact.jsx'; -import AdminsSvelte from '../components/AdminsSvelte.svelte'; -import AdminsVue from '../components/AdminsVue.vue'; -import AdminsSolid from '../components/AdminsSolid.jsx'; +import AdminsReact from "../components/AdminsReact.jsx"; +import AdminsSvelte from "../components/AdminsSvelte.svelte"; +import AdminsVue from "../components/AdminsVue.vue"; +import AdminsSolid from "../components/AdminsSolid.jsx"; // Full Astro Component Syntax: // https://docs.astro.build/core-concepts/astro-components/ diff --git a/examples/with-tailwindcss/src/components/Button.astro b/examples/with-tailwindcss/src/components/Button.astro index 7d11c37ea..70962e801 100644 --- a/examples/with-tailwindcss/src/components/Button.astro +++ b/examples/with-tailwindcss/src/components/Button.astro @@ -2,11 +2,14 @@ // Click button, get confetti! // Styled by Tailwind :) --- - diff --git a/examples/with-tailwindcss/src/pages/index.astro b/examples/with-tailwindcss/src/pages/index.astro index ebccafa34..651a47fa3 100644 --- a/examples/with-tailwindcss/src/pages/index.astro +++ b/examples/with-tailwindcss/src/pages/index.astro @@ -1,6 +1,6 @@ --- // Component Imports -import Button from '../components/Button.astro'; +import Button from "../components/Button.astro"; // Full Astro Component Syntax: // https://docs.astro.build/core-concepts/astro-components/ diff --git a/examples/with-vite-plugin-pwa/src/pages/index.astro b/examples/with-vite-plugin-pwa/src/pages/index.astro index 6214033dd..94596d8df 100644 --- a/examples/with-vite-plugin-pwa/src/pages/index.astro +++ b/examples/with-vite-plugin-pwa/src/pages/index.astro @@ -11,6 +11,8 @@

Welcome to Astro

- +