Skip to content

Commit

Permalink
Format astro files
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Aug 10, 2022
1 parent 0c97883 commit aa77921
Show file tree
Hide file tree
Showing 6 changed files with 205 additions and 87 deletions.
5 changes: 4 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@
"singleQuote": true,
"trailingComma": "none",
"semi": false,
"plugins": ["./node_modules/prettier-plugin-svelte"]
"plugins": [
"./node_modules/prettier-plugin-svelte",
"./node_modules/prettier-plugin-astro"
]
}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
"private": true,
"type": "module",
"scripts": {
"lint": "prettier **/*.{js,ts,jsx,css,vue,svelte} --check --cache",
"format": "prettier **/*.{js,ts,jsx,css,vue,svelte} --write --cache"
"lint": "prettier **/*.{js,ts,jsx,css,md,vue,svelte,astro} --check --cache --ignore-path .gitignore",
"format": "prettier **/*.{js,ts,jsx,css,md,vue,svelte,astro} --write --cache --ignore-path .gitignore"
},
"devDependencies": {
"prettier": "^2.7.1",
"prettier-plugin-astro": "^0.4.1",
"prettier-plugin-svelte": "^2.7.0",
"svelte": "^3.49.0"
},
Expand Down
89 changes: 43 additions & 46 deletions playground/astro/src/layouts/Layout.astro
Original file line number Diff line number Diff line change
@@ -1,52 +1,49 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>whyframe astro</title>
</head>

<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>whyframe astro</title>
</head>
<body>
<slot />
<style is:global>
*,
*::before,
*::after {
box-sizing: border-box;
}

<body>
<slot />
</body>
html,
body {
font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
background-color: #efefef;
width: 100%;
height: 100%;
padding: 0;
margin: 0;
}

</html>

<style is:global>
*,
*::before,
*::after {
box-sizing: border-box;
}

html,
body {
font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
background-color: #efefef;
width: 100%;
height: 100%;
padding: 0;
margin: 0;
}
#app {
padding: 1rem;
text-align: center;
}

#app {
padding: 1rem;
text-align: center;
}

iframe[data-why] {
display: inline-block;
border: none;
box-shadow: 2.7px 3.2px 3.6px rgba(0, 0, 0, 0.024),
7.5px 8.8px 10px rgba(0, 0, 0, 0.035),
18.1px 21.1px 24.1px rgba(0, 0, 0, 0.046),
60px 70px 80px rgba(0, 0, 0, 0.07);
border-radius: 0.4rem;
width: 400px;
min-height: 200px;
max-height: 400px;
background-color: white;
margin: 0.5rem;
}
</style>
iframe[data-why] {
display: inline-block;
border: none;
box-shadow: 2.7px 3.2px 3.6px rgba(0, 0, 0, 0.024),
7.5px 8.8px 10px rgba(0, 0, 0, 0.035),
18.1px 21.1px 24.1px rgba(0, 0, 0, 0.046),
60px 70px 80px rgba(0, 0, 0, 0.07);
border-radius: 0.4rem;
width: 400px;
min-height: 200px;
max-height: 400px;
background-color: white;
margin: 0.5rem;
}
</style>
</body>
</html>
60 changes: 29 additions & 31 deletions playground/astro/src/pages/frames/basic/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,41 +9,39 @@
<body>
<div id="app"></div>
<script>
import { createApp } from 'whyframe:app-basic'

import { createApp } from 'whyframe:app-basic'

createApp(document.getElementById('app'))
</script>
createApp(document.getElementById('app'))
</script>
<style is:global>
*,
*::before,
*::after {
box-sizing: border-box;
}

html,
body,
#app {
font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
width: 100%;
height: 100%;
padding: 0;
margin: 0;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
*,
*::before,
*::after {
box-sizing: border-box;
}

body {
background-color: #efefef;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%239e9e9e' fill-opacity='0.4'%3E%3Cpath opacity='.5' d='M96 95h4v1h-4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9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9z'/%3E%3Cpath d='M6 5V0H5v5H0v1h5v94h1V6h94V5H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
html,
body,
#app {
font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
width: 100%;
height: 100%;
padding: 0;
margin: 0;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}

p {
font-weight: 500;
}
body {
background-color: #efefef;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%239e9e9e' fill-opacity='0.4'%3E%3Cpath opacity='.5' d='M96 95h4v1h-4v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9zm-1 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9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;
}
</style>
</body>
</html>
12 changes: 5 additions & 7 deletions playground/astro/src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import Layout from '../layouts/Layout.astro';
import Counter from '../components/Counter.svelte';
import Layout from '../layouts/Layout.astro'
import Counter from '../components/Counter.svelte'
const max = 10
---
Expand All @@ -9,12 +9,10 @@ const max = 10
<h1>Astro</h1>

<iframe data-why="svelte" title="Hello">
<p>Click to increment!</p>
<Counter client:load />
<p>Click to increment!</p> <Counter client:load />
</iframe>

<iframe data-why="svelte" title="World" data-why-template="basic">
<p>Do not go over {max}</p>
<Counter client:load {max} />
<p>Do not go over {max}</p> <Counter client:load {max} />
</iframe>
</Layout>
</Layout>
Loading

0 comments on commit aa77921

Please sign in to comment.