Skip to content

Instantly share code, notes, and snippets.

View webbingstudio's full-sized avatar
🤤
Working from home

うぇびんさん webbingstudio

🤤
Working from home
View GitHub Profile
// 要素#hoge内にp要素を追加して「ほげほげ」とテキストを入れる
(function(d, t) {
d.prepend('<p></p>');
$('p', d).text(t);
})($('#hoge'), 'ほげほげ');
@webbingstudio
webbingstudio / mtapp_jquery_getUploadDate.js
Last active December 17, 2015 11:59
Movable Type: 画像アップロード時に、ファイルパスに年月日が自動で入るようにする ref: http://qiita.com/items/61a2ba312780cf192135
//ファイルアップロード時にファイルを日付で整理させる
var getUploadDate = function() {
var d = new Date();
// 年月日の取得
var month = d.getMonth() + 1;
var day = d.getDate();
var hour = d.getHours();
// 1桁を2桁に変換する
if (month < 10) {month = "0" + month;}
@webbingstudio
webbingstudio / mtapp_jquery_dashboard_tabs.js
Created May 18, 2013 23:29
Movable Type: ユーザーダッシュボードを初期状態で「ブログ」を展開させる ref: http://qiita.com/items/5c8248c16cceadc30685
if(mtappVars.screen_id == 'dashboard'){
var Tabs = $('#dashboard #favorite-blogs-tabs');
$('ul li', Tabs).eq(0).removeClass('ui-tabs-selected ui-state-active');
$('ul li', Tabs).eq(1).addClass('ui-tabs-selected ui-state-active');
Tabs = null;
var TabCont = $('#dashboard #favorite_blogs');
$('#favorite-website', TabCont).addClass('ui-tabs-hide');
$('#favorite-blog', TabCont).removeClass('ui-tabs-hide');
TabCont = null;
@webbingstudio
webbingstudio / contact_confirm.html
Created May 19, 2013 00:09
a-blog cms: メールフォームの制作(構造編) ref: http://qiita.com/items/989e1e81cfe0d1f1633d
<div class="mail-form form-confirm">
<ul class="mail-step">
<li><span class="num">1</span> お客様情報の入力<span class="sep"></span></li>
<li class="current"><strong><span class="num">2</span> 送信内容の確認</strong><span class="sep"></span></li>
<li><span class="num">3</span> 送信完了<span class="sep"></span></li>
</ul>
<p>以下の内容で送信します。よろしければ「送信する」ボタンを押してください。</p>
@webbingstudio
webbingstudio / acms_custom_field_error.html
Created May 19, 2013 00:42
a-blog cms: メールフォームの制作(入力フォーム編) ref: http://qiita.com/items/a968558bd65bf96c4606
<!-- BEGIN XXXX:validator -->
<p class="error">XXXXは必ず入力してください。</p>
<!-- END XXXX:validator -->
@webbingstudio
webbingstudio / logical_jp_acms_field.html
Created June 12, 2013 13:29
a-blog cms用テーマ「logical_jp」のヘッダロゴのカスタマイズ ref: http://qiita.com/items/07253ba74d6969438f40
・・・
<input type="hidden" name="field[]" value="blogHeaderLogo" />
<input type="hidden" name="blogHeaderLogo:extension" value="image" />
<input type="hidden" name="blogHeaderLogo@height" value="64" />
<p style="margin: 1em 0 0; padding: .5em; background: #FFF; border: 1px solid #D66;">高さ64ピクセル以上の、正方形に近い画像を用意してください。</p>
</td>
・・・
@webbingstudio
webbingstudio / cake2_form_select.php
Created July 13, 2013 19:26
Cake2: フォームヘルパーのselectのサンプル ref: http://qiita.com/webbingstudio@github/items/299b79f8001b07b85f6c
echo $this->Form->label('Model.prefecture', '都道府県');
echo $this->Form->select('Model.prefecture',
array(
'北海道' => '北海道',
'東北' => array(
'青森県' => '青森県',
'岩手県' => '岩手県',
'宮城県' => '宮城県',
'秋田県' => '秋田県',
'山形県' => '山形県',
@webbingstudio
webbingstudio / cake2_form_radio.php
Created July 13, 2013 19:29
Cake2: フォームヘルパーのradioのサンプル ref: http://qiita.com/webbingstudio@github/items/95f422fc40698cc7e016
echo '<p class="label">質問項目</p>';
echo '<span class="radio-set">';
echo $this->Form->radio('Model.form_name',
array(
'ああああ',
'いいい',
'ううううう',
'ええええ',
'おおお',
'その他'
@webbingstudio
webbingstudio / cake2_form_name_input.php
Created July 13, 2013 19:33
Cake2: フォームヘルパーの氏名入力のサンプル ref: http://qiita.com/webbingstudio@github/items/be0c3edda211a0402526
echo $this->Form->input('Model.lname',
array(
'label' => '氏名',
'placeholder' => '姓',
'class' => 'input-small',
'after' => ' ',
'div' => false,
'error'=>false
)
);
@webbingstudio
webbingstudio / Gruntfile.js
Last active December 30, 2015 23:59
package.jsonとGruntfile.jsのサンプル ref: http://qiita.com/webbingstudio@github/items/14cf012a23d114e867e1
module.exports = function(grunt) {
"use strict";
grunt.initConfig({
sass: {
dist: {
options: {
// style: 'expanded'
style: 'compressed'