Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Nuxt3 project #1

Merged
merged 92 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
cfb988f
initialize project
VortexExpansion Sep 8, 2023
8c8deb2
front_nuxt_javascript
VortexExpansion Sep 8, 2023
9077a1c
refactor UI - import sass
VortexExpansion Sep 11, 2023
1e14d89
upd card view, add pages
VortexExpansion Sep 12, 2023
889e64e
refactor baseURL import
VortexExpansion Sep 12, 2023
d319703
fix drawer, deprecation warning, add .env.example
VortexExpansion Sep 15, 2023
d19397d
add meta, rmv button
VortexExpansion Sep 18, 2023
ecceabb
feat: apply login feat (wip)
yabe-diverta Sep 21, 2023
a17a146
fix: mv NuxtLayout to app.vue
yabe-diverta Sep 21, 2023
31da3c8
chore: rm app.vue
yabe-diverta Sep 21, 2023
d754a62
fix: better handling for auth
yabe-diverta Sep 22, 2023
e9760b5
chore: setup vscode conf
yabe-diverta Sep 22, 2023
80f13a9
Merge pull request #1 from VortexExpansion/feature/provide-auth
VortexExpansion Sep 22, 2023
3248987
add registration page
VortexExpansion Sep 22, 2023
ba39bd5
add myPage data
VortexExpansion Sep 24, 2023
a4536d1
fix(mypage): prevent server API call
yabe-diverta Sep 25, 2023
387f9aa
upd membership type
VortexExpansion Sep 25, 2023
b2e7cb0
fix(auth): use only client
yabe-diverta Sep 25, 2023
5b5e2ec
fix(auth,mypage): updation for user group
yabe-diverta Sep 25, 2023
24b4abc
add contact page
VortexExpansion Sep 26, 2023
d842f95
add mypage/edit ; fix ltd-news ui
VortexExpansion Sep 26, 2023
21b6a47
add mypage/delete
VortexExpansion Sep 26, 2023
4ddafe8
add reverseItems ; rmv reminder
VortexExpansion Sep 27, 2023
84410b8
minor fixes
VortexExpansion Sep 28, 2023
966a0d1
kuroco deployment
VortexExpansion Oct 3, 2023
439785c
fix deployment for all branches
VortexExpansion Oct 3, 2023
d956a71
modify build.yml for testing
VortexExpansion Oct 3, 2023
61a6424
add env to workflow
VortexExpansion Oct 3, 2023
1bda5ed
mv kuroco_front to root
VortexExpansion Oct 3, 2023
23d6d71
add ssr, fix filter reroute from news details
VortexExpansion Oct 4, 2023
6407db3
Fix SSG
VortexExpansion Oct 6, 2023
6977337
test workflow
VortexExpansion Oct 6, 2023
0f5ba70
migrate kuroco_front.json to public
VortexExpansion Oct 6, 2023
82f70f8
chore: tmp
yabe-diverta Oct 13, 2023
82851f6
fix: chore
yabe-diverta Oct 13, 2023
ea2bbbf
chore: tmp
yabe-diverta Oct 13, 2023
ad6f1a0
fix: no use width for img tag
yabe-diverta Oct 13, 2023
c633200
Revert "fix: no use width for img tag"
yabe-diverta Oct 13, 2023
a47f522
fix: no use width for img tag
yabe-diverta Oct 13, 2023
56a6a4e
fix: mypage,contact
yabe-diverta Oct 13, 2023
d804943
fix: sync profile after user status update
yabe-diverta Oct 17, 2023
b823bba
fix: right handle for user status
yabe-diverta Oct 17, 2023
523e5de
feat(reminder): add reminder
yabe-diverta Oct 17, 2023
d88876e
fix: obtain news-ltd
yabe-diverta Oct 17, 2023
362a5da
feat: add file uploader
yabe-diverta Oct 18, 2023
137011c
minor ltd-news/detail UI upd
VortexExpansion Oct 18, 2023
3816ff7
add loading indicator
VortexExpansion Oct 18, 2023
ca9a1eb
fix: use empty data post for update session
yabe-diverta Oct 18, 2023
beed859
refactor update session
VortexExpansion Oct 18, 2023
ddefae3
feat: add custom submit button
yabe-diverta Oct 18, 2023
2d3442f
feat: apply custom submit buttons to some pages
yabe-diverta Oct 18, 2023
20b0c61
refactor: rm useKurocoApi and inject baseURL & credentials onto fetch…
yabe-diverta Oct 18, 2023
f76049b
refactor(ofetch): rename, add comment
yabe-diverta Oct 18, 2023
208465d
refactor(useAuth): remove wrapper fns to show process clearly
yabe-diverta Oct 18, 2023
bc48105
chore: update TS to JS
yabe-diverta Oct 18, 2023
2c13950
build: update github actions workflow
yabe-diverta Oct 19, 2023
e5a7b63
build: fix workflow
yabe-diverta Oct 19, 2023
c769ac7
build: update workflow
yabe-diverta Oct 19, 2023
ed70df9
build: update workflow
yabe-diverta Oct 19, 2023
f218518
build: update workflow
yabe-diverta Oct 19, 2023
b3b4707
Merge pull request #3 from VortexExpansion/refactored-javascript
yabe-diverta Oct 19, 2023
19b8538
fix: detect changes of news filter wuery
yabe-diverta Oct 19, 2023
b7da4ae
feat: add preview pages
yabe-diverta Oct 19, 2023
24c2ef8
fix: replace to useFetch in serveral components
yabe-diverta Oct 19, 2023
6485305
fix: options on useFetch
yabe-diverta Oct 19, 2023
100765d
fix(preview): right handle for pfetching data
yabe-diverta Oct 19, 2023
4ee647d
fix(preview): right handle for pfetching data
yabe-diverta Oct 19, 2023
d22a2c0
fix(preview): right handle for pfetching data
yabe-diverta Oct 19, 2023
378161a
build: set works only main
yabe-diverta Oct 19, 2023
25080b8
Merge pull request #4 from VortexExpansion/refactored-javascript
yabe-diverta Oct 19, 2023
04cd27f
fix: login error handler
yabe-diverta Oct 20, 2023
52c3f9c
fix: login state
yabe-diverta Oct 20, 2023
0bd9762
fix(reminder): adjust req/res handler for using
yabe-diverta Oct 20, 2023
4e8d367
fix: right error handle for
yabe-diverta Oct 20, 2023
174b991
feat: apply submt buttons
yabe-diverta Oct 20, 2023
3f9f935
refactor: not using fnially() to simplify code
yabe-diverta Oct 20, 2023
243dd5d
Merge pull request #5 from VortexExpansion/refactored-javascript
yabe-diverta Oct 20, 2023
27b7abc
fix contact response
VortexExpansion Oct 20, 2023
087dffc
refactor: rm dotenv example
yabe-diverta Oct 27, 2023
38b9606
fix: rm extend-ofetch plugin, apply configs into each fetchers
yabe-diverta Oct 27, 2023
d9cdec9
chore: update Nuxt
yabe-diverta Oct 27, 2023
2412fc3
fix: dispose using v-bind
yabe-diverta Nov 2, 2023
0aa39fa
refactor: rm ContentPlainBody
yabe-diverta Nov 2, 2023
f269e8a
refactor: combine 2 components into 1 component
yabe-diverta Nov 2, 2023
d641521
refactor: params, syntax, ssr/client issues
yabe-diverta Nov 2, 2023
2313e80
refactor: set client-only for exclude pages
yabe-diverta Nov 2, 2023
d12fd49
fix(useAuth): handle Promise err for /profile endpoint
yabe-diverta Nov 2, 2023
cc05451
fix: set server false for fetch
yabe-diverta Nov 7, 2023
07629f0
refactor: rm some components, props
yabe-diverta Nov 7, 2023
5f7c5e7
merge: Merge remote-tracking branch 'VortexExpansion/main' into refac…
yabe-diverta Nov 7, 2023
da98ef7
fix(ltd-news/detail): disable server fetch
yabe-diverta Nov 9, 2023
9d187d2
fix: wrong merging
yabe-diverta Nov 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 103 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Build and deploy to Kuroco front
on:
push:
branches:
- main
issue_comment:
types: [created, edited]
workflow_dispatch:

jobs:
# for Pull Request (exclude merged)
pullreq_build:
name: Build(pullreq)
if: (github.repository == 'VortexExpansion/front_nuxt_corporate' && github.event_name == 'issue_comment' && startsWith(github.event.comment.body, '/kuroco stage') && github.event.issue.pull_request != null)
runs-on: ubuntu-latest
steps:
- name: "Get branch name and sha"
id: get_branch
run: |
PR=$(curl -H "X-Kuroco-Auth: token abd1c816e196edb0c626d44ccff524f5" https://dev-nuxt-corporate.g.kuroco.app/direct/menu/github/?pr=${{ github.event.issue.pull_request.url }})
echo "branch=$(echo $PR | jq -r '.ref')" >> $GITHUB_OUTPUT
echo "sha=$(echo $PR | jq -r '.sha')" >> $GITHUB_OUTPUT
- name: Checkout Repo
uses: actions/checkout@v3
with:
ref: ${{ steps.get_branch.outputs.branch }}
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'

- name: CI Cache
uses: actions/cache@v3
id: node_modules_cache_id
env:
cache-name: cache-node-modules
with:
path: '**/node_modules'
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.ref_name }}-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
if: ${{ steps.node_modules_cache_id.outputs.cache-hit != 'true' }}
run: npm ci

- name: Generate
run: npm run generate
- name: Zip artifact for upload
run: cd ./.output/public && zip ../../dist.zip . -r
- name: Archive Production Artifact
uses: actions/upload-artifact@v3
with:
name: ${{ steps.get_branch.outputs.sha }}-${{ github.run_id }}
path: dist.zip
retention-days: 1
- name: Wait for Artifact download
run: sleep 15
- name: Webhook
uses: diverta/workflow-webhook@v2
env:
webhook_url: "https://dev-nuxt-corporate.g.kuroco.app/direct/menu/github/"
webhook_secret: "abd1c816e196edb0c626d44ccff524f5"
data: '{"single_zip":"1","domain":"dev-nuxt-corporate.g.kuroco-front.app","pr":"${{ github.event.issue.pull_request.url }}", "repository":"${{ github.repository }}", "run_id":"${{ github.run_id }}", "hash":"${{ steps.get_branch.outputs.sha }}"}'

#for Push
pushed_build:
name: Build(pushed)
if: (github.repository == 'VortexExpansion/front_nuxt_corporate' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch'))
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'

- name: CI Cache
uses: actions/cache@v3
id: node_modules_cache_id
env:
cache-name: cache-node-modules
with:
path: '**/node_modules'
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.ref_name }}-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
if: ${{ steps.node_modules_cache_id.outputs.cache-hit != 'true' }}
run: npm ci

- name: Generate
run: npm run generate
- name: Zip artifact for upload
run: cd ./.output/public && zip ../../dist.zip . -r
- name: Archive Production Artifact
uses: actions/upload-artifact@v3
with:
name: ${{ github.sha }}-${{ github.run_id }}
path: dist.zip
retention-days: 7
- name: Webhook
uses: diverta/workflow-webhook@v2
env:
webhook_url: "https://dev-nuxt-corporate.g.kuroco.app/direct/menu/github/"
webhook_secret: "abd1c816e196edb0c626d44ccff524f5"
data: '{"single_zip":"1","domain":"dev-nuxt-corporate.g.kuroco-front.app", "repository":"${{ github.repository }}", "run_id":"${{ github.run_id }}", "hash":"${{ github.sha }}"}'
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Nuxt dev/build outputs
.output
.data
.nuxt
.nitro
.cache
dist

# Node dependencies
node_modules

# Logs
logs
*.log

# Misc
.DS_Store
.fleet
.idea

# Local env files
.env
.env.*
!.env.example
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
shamefully-hoist=true
strict-peer-dependencies=false
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["vue.volar"]
}
65 changes: 63 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,63 @@
# front_nuxt_corporate
コーポレートサイト向けテンプレート
# Nuxt 3 Minimal Starter

Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.

## Setup

Make sure to install the dependencies:

```bash
# npm
npm install

# pnpm
pnpm install

# yarn
yarn install
```

## Development Server

Start the development server on `http://localhost:3000`:

```bash
# npm
npm run dev

# pnpm
pnpm run dev

# yarn
yarn dev
```

## Production

Build the application for production:

```bash
# npm
npm run build

# pnpm
pnpm run build

# yarn
yarn build
```

Locally preview production build:

```bash
# npm
npm run preview

# pnpm
pnpm run preview

# yarn
yarn preview
```

Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
12 changes: 12 additions & 0 deletions app.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<template>
<NuxtLayout>
<div>
<NuxtLoadingIndicator />
<NuxtPage />
</div>
</NuxtLayout>
</template>

<script setup>
await useAuth().profile();
</script>
Binary file added assets/image/600x400.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/image/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/image/top-hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/image/top-service.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions assets/scss/_variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
:root {
--color-base: #222;
--color-primary: #2C7BE5;
--color-primary-dark: #2569c3;
--color-error: #E63757;
--color-success: #21a68d;
--color-border: #c9ced6;
--color-white: #FFFFFF;
--color-light-gray: #e4e9f2;
--color-gray: #62718C;
--color-dark-gray: #2e3538;
--font-size-base: 1.6rem;
--font-size-h1: 2.2em;
--font-size-h1-sp: 1.8em;
--font-size-h2: 1.8em;
--font-size-h2-sp: 1.6em;
--font-size-h3: 1.4em;
--font-size-h3-sp: 1.3em;
--font-size-h4: 1.2em;
--font-size-h4-sp: 1.1em;
--font-size-small: .9em;
--font-size-x-small: .85em ;
--font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic Pro', Meiryo, 'MS UI Gothic', Helvetica, Arial, sans-serif;
--font-en: 'Secular One', sans-serif;
--border-radius: 4px;
--border-radius-large: calc( var(--border-radius) * 2 );
--spacing: 1em;
--spacing-small: calc( var(--spacing) / 2 );
--spacing-large: calc( var(--spacing) * 2 );
--spacing-vertical-pc: 80px;
--spacing-horizontal-pc: 40px;
--spacing-vertical-sp: 40px;
--spacing-horizontal-sp: 20px;
--transition-seconds: 0.2s;
--header-height-pc: 80px;
--header-height-sp: 60px;
}
104 changes: 104 additions & 0 deletions assets/scss/foundation/_common.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
/********************************************
Common
********************************************/
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&family=Secular+One&display=swap');
*,
*:after,
*:before {
box-sizing: border-box;
}

h1,
h2,
h3,
h4,
h5,
h6 {
line-height: 1;
font-weight: normal;
margin: 0;
padding: 0;
}

dd,
dl,
dt,
label,
ul {
padding: 0;
margin: 0;
}

li {
list-style: none;
}

a {
font-family: var(--font-family);
text-decoration: none;
color: inherit;

&:hover {
cursor: pointer;
}
}

img {
vertical-align: top;
max-width: 100%;
}

html {
font-size: 62.5%;
}

body,
html {
width: 100%;
height: 100%;
}

body {
display: flex;
flex-direction: column;
min-height: 100vh;
color: var(--color-base);
font-size: var(--font-size-base);
font-family: var(--font-family);
}

button,
input,
optgroup,
select,
textarea {
color: var(--color-base);
font-size: var(--font-size-base);
font-family: var(--font-family);
}
::placeholder {
color: #aaa;
}

button,
input[type="button"],
input[type="submit"] {
border: none;
}

iframe {
vertical-align: top;
}

table {
border: 1px solid var(--color-border);
border-collapse: collapse;
th,
td {
padding: var(--spacing);
border: 1px solid var(--color-border);
}
th {
background-color: var(--color-light-gray);
}
}
Loading