Skip to content

Commit

Permalink
introduce eslint and prettier and GHA checks (#21)
Browse files Browse the repository at this point in the history
* introduce eslint and prettier

* add GHA CI

* run prettier again
  • Loading branch information
brenzi authored May 7, 2024
1 parent cdde0b4 commit 2109079
Show file tree
Hide file tree
Showing 60 changed files with 4,257 additions and 2,067 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Generate Check

on:
pull_request:
branches:
- master

jobs:
generate:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "20"

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Run Generate
run: yarn generate
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
needs: build
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github_pages environment
environment:
name: github_pages
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Prettier Check

on:
pull_request:
branches:
- master

jobs:
prettier:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "20"

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Run Prettier
run: yarn prettier --check .
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.

## Note
The `@encointer/worker-api` uses the browser's built-in `webcrypto` api. This library is only available in secure
secure contexts. Hence, in local development you must use `localhost`. `webcrypto` is undefined on `127.0.0.1` and

The `@encointer/worker-api` uses the browser's built-in `webcrypto` api. This library is only available in secure
secure contexts. Hence, in local development you must use `localhost`. `webcrypto` is undefined on `127.0.0.1` and
`0.0.0.0`.

## Setup
Expand Down
8 changes: 4 additions & 4 deletions app.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { defineAppConfig } from '#imports'
import { defineAppConfig } from "#imports";

export default defineAppConfig({
title: 'Integritee',
title: "Integritee",
theme: {
colors: {
primary: '#ff0000',
primary: "#ff0000",
},
},
})
});
37 changes: 19 additions & 18 deletions app.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
git<script setup lang="ts">
import { defineAsyncComponent } from 'vue'
import { useAsyncData } from '#imports'
import Footer from '@/components/Footer'
var exports = {};
const Header = defineAsyncComponent(() => import('@/components/Header'))
git
<script setup lang="ts">
import { defineAsyncComponent } from "vue";
import { useAsyncData } from "#imports";
import Footer from "@/components/Footer";
const exports = {};
const Header = defineAsyncComponent(() => import("@/components/Header"));
</script>

<template>
Expand Down Expand Up @@ -51,11 +52,11 @@ const Header = defineAsyncComponent(() => import('@/components/Header'))
.top-lines {
position: absolute;
right: -152px;
top: 436px;
width: 1061px;
transform: rotate(-159.84deg);
z-index: -1;
right: -152px;
top: 436px;
width: 1061px;
transform: rotate(-159.84deg);
z-index: -1;
@include lg {
width: 1417px;
Expand Down Expand Up @@ -87,11 +88,11 @@ const Header = defineAsyncComponent(() => import('@/components/Header'))
.bottom-lines {
position: absolute;
left: -198px;
top: -1858px;
width: 936px;
transform: rotate(159.84deg) scale(-1, 1);
z-index: -1;
left: -198px;
top: -1858px;
width: 936px;
transform: rotate(159.84deg) scale(-1, 1);
z-index: -1;
@include lg {
width: 1023px;
Expand All @@ -113,7 +114,7 @@ const Header = defineAsyncComponent(() => import('@/components/Header'))
}
.cookie-wrapper {
font-family: 'Inter';
font-family: "Inter";
.cookieControl__BarContainer {
border-radius: 24px;
background: rgba(81, 81, 81, 0.25);
Expand Down
2 changes: 1 addition & 1 deletion assets/css/main.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@tailwind utilities;
36 changes: 19 additions & 17 deletions assets/scss/_fonts.scss
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
@font-face {
font-family: 'Inter';
src: url('@/assets/fonts/Inter-Regular.woff2') format('woff2'),
url('@/assets/fonts/Inter-Regular.woff') format('woff');
font-weight: 400;
font-style: normal;
font-family: "Inter";
src:
url("@/assets/fonts/Inter-Regular.woff2") format("woff2"),
url("@/assets/fonts/Inter-Regular.woff") format("woff");
font-weight: 400;
font-style: normal;
}

@font-face {
font-family: 'Inter';
src: url('@/assets/fonts/Inter-Medium.woff2') format('woff2'),
url('@/assets/fonts/Inter-Medium.woff') format('woff');
font-weight: 500;
font-style: normal;
font-family: "Inter";
src:
url("@/assets/fonts/Inter-Medium.woff2") format("woff2"),
url("@/assets/fonts/Inter-Medium.woff") format("woff");
font-weight: 500;
font-style: normal;
}


@font-face {
font-family: 'WhyteInktrap';
src: url('@/assets/fonts/WhyteInktrap-Medium.woff2') format('woff2'),
url('@/assets/fonts/WhyteInktrap-Medium.woff') format('woff');
font-weight: 500;
font-style: normal;
}
font-family: "WhyteInktrap";
src:
url("@/assets/fonts/WhyteInktrap-Medium.woff2") format("woff2"),
url("@/assets/fonts/WhyteInktrap-Medium.woff") format("woff");
font-weight: 500;
font-style: normal;
}
41 changes: 20 additions & 21 deletions assets/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $sm_pSm: 0.875em;
// Default Paragraph .paragraph_medium
$pDef: 1.125em;
$md_pDef: 1em;
$sm_pDef: .875em;
$sm_pDef: 0.875em;

// Large paragraph .paragraph_large
$pLg: 1.5em;
Expand All @@ -28,10 +28,10 @@ $tLg: 4.5em;
$md_tLg: 3.375em;
$sm_tLg: 2.5em;

$ltBlue: #5B92FF;
$gray: #88888C;
$ltBlue: #5b92ff;
$gray: #88888c;
$alphaGray: rgba(255, 255, 255, 0.2);
$darkBlue: #11111A;
$darkBlue: #11111a;

// Breakpoints
$lg: 1366px;
Expand All @@ -41,32 +41,31 @@ $sm: 840px;
$xsm: 420px;

@mixin lg {
@media screen and (max-width: $lg) {
@content;
}
@media screen and (max-width: $lg) {
@content;
}
}

@mixin slg {
@media screen and (max-width: $slg) {
@content;
}
@media screen and (max-width: $slg) {
@content;
}
}

@mixin md {
@media screen and (max-width: $md) {
@content;
}
@media screen and (max-width: $md) {
@content;
}
}


@mixin sm {
@media screen and (max-width: $sm) {
@content;
}
@media screen and (max-width: $sm) {
@content;
}
}

@mixin xsm {
@media screen and (max-width: $xsm) {
@content;
}
}
@media screen and (max-width: $xsm) {
@content;
}
}
Loading

0 comments on commit 2109079

Please sign in to comment.