-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin' into fix-event-types
- Loading branch information
Showing
26 changed files
with
243 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
name: Bau | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- "*" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
save-exact = true | ||
package-lock = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Frontend Mentor News Homepage | ||
|
||
Here is the implementation in [Bau.js](https://github.com/grucloud/bau) of the [Frontend Mentor News Homepage code challenge](https://www.frontendmentor.io/challenges/news-homepage-H6SWTa1MFl) | ||
|
||
## Workflow | ||
|
||
Install the dependencies: | ||
|
||
```sh | ||
npm install | ||
``` | ||
|
||
Start a development server: | ||
|
||
```sh | ||
npm run dev | ||
``` | ||
|
||
Build a production version: | ||
|
||
```sh | ||
npm run build | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link | ||
rel="icon" | ||
type="image/png" | ||
href="./assets/images/favicon-32x32.png" | ||
/> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>News Homepage | FrontendMentor</title> | ||
<style id="bau-css"></style> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.ts"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "frontendmentor-news-homepage", | ||
"homepage": "https://grucloud.github.io/bau/frontendmentor/news-homepage/", | ||
"private": true, | ||
"version": "0.97.0", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "tsc && vite build", | ||
"preview": "vite preview", | ||
"deploy": "gh-pages -d ../../dist" | ||
}, | ||
"devDependencies": { | ||
"gh-pages": "6.1.1", | ||
"typescript": "^5.0.2", | ||
"vite": "^5.2.11" | ||
}, | ||
"dependencies": { | ||
"@grucloud/bau": "^0.97.0", | ||
"@grucloud/bau-css": "^0.97.0", | ||
"@grucloud/bau-ui": "^0.97.0" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions
1
examples/news-homepage/public/assets/images/icon-menu-close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { createContext, type Context } from "@grucloud/bau-ui/context"; | ||
import newsHomepage from "./newsHomepage"; | ||
import "./style.css"; | ||
|
||
const context = createContext(); | ||
|
||
const app = (context: Context) => { | ||
const { bau } = context; | ||
const { main } = bau.tags; | ||
const NewsHomepage = newsHomepage(context); | ||
|
||
return function () { | ||
return main(NewsHomepage()); | ||
}; | ||
}; | ||
|
||
const App = app(context); | ||
document.getElementById("app")?.replaceChildren(App()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import { type Context } from "@grucloud/bau-ui/context"; | ||
|
||
const HEADERS = ["Home", "New", "Popular", "Trending", "Categories"]; | ||
|
||
export default function (context: Context) { | ||
const { bau, css } = context; | ||
const { article, nav, ul, li, header, h1, a } = bau.tags; | ||
|
||
const className = css` | ||
display: grid; | ||
gap: 0.5rem; | ||
margin-inline: auto; | ||
padding: 1rem; | ||
max-width: 800px; | ||
> header { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
h1 { | ||
font-size: 2rem; | ||
font-weight: 800; | ||
} | ||
} | ||
`; | ||
|
||
const Nav = () => | ||
nav( | ||
{ | ||
class: css` | ||
> ul { | ||
list-style: none; | ||
display: inline-flex; | ||
gap: 0.7rem; | ||
> li { | ||
font-size: 0.8rem; | ||
> a { | ||
text-decoration: none; | ||
color: var(--color-gray-500); | ||
&:hover { | ||
color: var(--soft-orange); | ||
} | ||
} | ||
} | ||
} | ||
`, | ||
}, | ||
ul(HEADERS.map((h) => li(a({ href: `${h}` }, h)))) | ||
); | ||
|
||
return () => { | ||
return article({ class: className }, header(h1("W."), Nav())); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400..800&display=swap"); | ||
|
||
* { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
} | ||
|
||
:root { | ||
--soft-orange: hsl(35, 77%, 62%); | ||
--soft-red: hsl(5, 85%, 63%); | ||
|
||
--off-white: hsl(36, 100%, 99%); | ||
--grayish-blue: hsl(233, 8%, 79%); | ||
--dark-grayish-blue: hsl(236, 13%, 42%); | ||
--very-dark-blue: hsl(240, 100%, 5%); | ||
|
||
--color-primary-h: 259; | ||
--color-primary-base-s: 100%; | ||
--color-primary-l: 65%; | ||
|
||
--color-neutral-h: 245; | ||
--color-neutral-base-s: 18%; | ||
--color-neutral-l: 26%; | ||
|
||
--color-danger-h: 358; | ||
--color-danger-base-s: 79%; | ||
--color-danger-l: 66%; | ||
|
||
--font-color-primary: white; | ||
--background-color: white; | ||
} | ||
|
||
body { | ||
font: 400 15px/1.5 "Inter", sans-serif; | ||
min-height: 100vh; | ||
display: grid; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/// <reference types="vite/client" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES2020", | ||
"useDefineForClassFields": true, | ||
"module": "ESNext", | ||
"lib": ["ES2020", "DOM", "DOM.Iterable"], | ||
"skipLibCheck": true, | ||
|
||
/* Bundler mode */ | ||
"moduleResolution": "bundler", | ||
"allowImportingTsExtensions": true, | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"noEmit": true, | ||
|
||
/* Linting */ | ||
"strict": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"noFallthroughCasesInSwitch": true | ||
}, | ||
"include": ["src"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { defineConfig } from "vite"; | ||
|
||
export default defineConfig(({ command, mode, ssrBuild }) => { | ||
return { | ||
base: "/bau/frontendmentor/news-homepage/", | ||
build: { outDir: "../../dist/frontendmentor/news-homepage" }, | ||
server: { | ||
open: true, | ||
}, | ||
}; | ||
}); |