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
server { | |
listen 80; | |
root /var/www/html; | |
index index.html index.htm index.php; | |
server_name localhost; | |
location / { | |
# First attempt to serve request as file, then |
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
<script> | |
export default { | |
head () { | |
return { | |
title: 'トップページ', | |
//titleTemplate: '', hide titleTemplate | |
} | |
} | |
} | |
</script> |
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
<p v-on:click="toggleMenu">menuの開閉</p> | |
<div id="navMenu" :class="{'is-active': isActive}"> | |
<menu> | |
<ul class="menu"> | |
<li><a href="#">menu1</a></li> | |
<li><a href="#">menu2</a></li> | |
<li><a href="#">menu3</a></li> | |
<li><a href="#">menu4</a></li> | |
</ul> | |
</menu> |
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
development: | |
adapter: mysql2 | |
encoding: utf8 | |
database: <%= ENV['DATABASE_DEV_NAME'] %> | |
pool: 5 | |
username: <%= ENV['DATABASE_DEV_USER'] %> | |
password: <%= ENV['DATABASE_DEV_PASSWORD'] %> | |
host: <%= ENV['DATABASE_DEV_HOST'] %> |
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
*pagesディレクトリに設置 | |
<template> | |
<v-card class="mt-4 mb-4 pa-3"> | |
<v-layout row wrap> | |
<v-flex xs4 v-for="(item,i) in data" :key="i"> | |
<v-card class="blue ma-2"> | |
<v-card-text><img :src="item.event.banner" width="100%"></v-card-text> | |
<v-card-text>{{item.event.title}}</v-card-text> | |
</v-card> | |
</v-flex> |
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
<div id="target"> | |
<select v-model="selected" v-on:change="jump"> | |
<option v-for="option in options" v-bind:value="option.value"> | |
{{ option.text }} | |
</option> | |
</select> | |
</div> |
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
<select id="target"> | |
<option value="https://www.yahoo.co.jp/">Yahoo!</option> | |
<option value="https://www.google.co.jp/">Google</option> | |
</select> |
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
Axios.get('/post_url', { | |
params: { | |
// getで指定したいパラメータを記載 | |
id: 123, | |
name: 'hoge', | |
} | |
}) | |
.then(response => { | |
//200 status header etc... | |
// console.log(response) |
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
import Vue from 'vue' | |
import Axios from 'axios' | |
import VueAxios from 'vue-axios' | |
Vue.use(VueAxios, Axios) | |
//以下コードをVue componentの中でよしなにつかってください | |
var token = 'csrf_token here' |
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
$('#selector').on('click',function(){ | |
$.ajax({ | |
url:'post/hogehoge', | |
type:'POST', | |
data:{ | |
'data1': 'hogehoge', | |
'data2': ''hogehoge, | |
} | |
}) | |
.done(function(data){ |
NewerOlder