Skip to content

Instantly share code, notes, and snippets.

@gen-yamada
gen-yamada / toggle-menu
Created December 11, 2020 03:28
toggle-menu vue.js
<template>
<div class="header">
<p
v-for="(menu, index) in menus"
:key="menu.id"
class="header-menu"
:class="{
headermenuactive: index === tabindex,
headermenuno: index !== tabindex,
}"
@gen-yamada
gen-yamada / express mysql
Created December 11, 2020 03:18
express connect-mysql nuxt.js
const express = require("express")
const app = express()
module.exports = {
path: "/server",
handler: app,
}
app.get("/category", (req, res) => {
const mysql = require("mysql")
@gen-yamada
gen-yamada / toggle-header
Created December 11, 2020 03:12
scroll-toggle-header vue.js nuxt.js
<template>
<header class="header">
header
</header>
</template>
<script>
if (process.browser) {
var lastST = $(window).scrollTop(); //初期スクロール位置の取得
function hideGlobalNav(e) {
@gen-yamada
gen-yamada / vue-google-map
Last active December 11, 2020 03:05
vue.js nuxt.js google-map
<template>
<div class="Map-box">
<client-only>
<GmapMap
class="Map"
:center="map.center"
:zoom="map.zoom"
:options="options"
map-type-id="roadmap"
>
@gen-yamada
gen-yamada / smooth-scroll-vue
Created December 11, 2020 02:47
smooth-scroll vue.js nuxt.js
<template>
<div>
<p class="fadeInUp">
smooth-fade-in-up
</p>
</div>
</template>
<script>
export default {
mounted() {
@gen-yamada
gen-yamada / vue-google-form-ajax-autocomplete
Created December 11, 2020 02:35
vue.js nuxt.js custom-google-form ajax autocomplete-zipcode
<template>
<div>
<div>
<div>
<h2>
お問い合わせフォーム
</h2>
<p v-if="!check">
<span class="check"></span>必須項目
</p>