Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
rendezvous
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VeNtura
rendezvous
Commits
dafa8d78
Commit
dafa8d78
authored
Nov 06, 2014
by
tady
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
5cf43780
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
117 additions
and
37 deletions
+117
-37
.gitignore
+2
-0
Gemfile.lock
+11
-11
app/assets/javascripts/modules/mod-form-resizes.js.coffee
+26
-0
app/assets/stylesheets/body-padding.css.scss
+1
-2
app/assets/stylesheets/lib/mod-md-editor.css.scss
+2
-2
app/assets/stylesheets/posts.css.scss
+8
-0
app/controllers/posts_controller.rb
+3
-1
app/views/layouts/application.html.slim
+2
-0
app/views/layouts/edit.html.slim
+32
-0
app/views/posts/_form.html.slim
+30
-21
No files found.
.gitignore
View file @
dafa8d78
...
...
@@ -31,3 +31,5 @@
.env
!.env.sample
*.zip
Gemfile.lock
View file @
dafa8d78
GIT
remote: git://github.com/amatsuda/kaminari.git
revision: b
1281e21452486b49911e8616fce885b0ea46730
revision: b
206d89922378dcf6f1f7a6247ce1d5f6f1534ad
specs:
kaminari (1.0.0.alpha)
actionpack (>= 3.0.0)
...
...
@@ -175,7 +175,7 @@ GEM
github-markdown (0.6.7)
gmail_xoauth (0.4.1)
oauth (>= 0.3.6)
guard (2.
7
.1)
guard (2.
8
.1)
formatador (>= 0.2.4)
listen (~> 2.7)
lumberjack (~> 1.0)
...
...
@@ -184,7 +184,7 @@ GEM
guard-rspec (4.3.1)
guard (~> 2.1)
rspec (>= 2.14, < 4.0)
guard-rubocop (1.
1
.0)
guard-rubocop (1.
2
.0)
guard (~> 2.0)
rubocop (~> 0.20)
guard-teaspoon (0.8.0)
...
...
@@ -199,7 +199,7 @@ GEM
htmlentities (4.3.2)
http-cookie (1.0.2)
domain_name (~> 0.5)
httparty (0.13.
1
)
httparty (0.13.
2
)
json (~> 1.8)
multi_xml (>= 0.5.2)
i18n (0.6.11)
...
...
@@ -213,7 +213,7 @@ GEM
jwt (0.1.11)
multi_json (>= 1.5)
kgio (2.9.2)
launchy (2.4.
2
)
launchy (2.4.
3
)
addressable (~> 2.3)
libv8 (3.16.14.7)
listen (2.7.11)
...
...
@@ -221,7 +221,7 @@ GEM
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
lumberjack (1.0.9)
mail (2.6.
1
)
mail (2.6.
3
)
mime-types (>= 1.16, < 3)
mechanize (2.7.3)
domain_name (~> 0.5, >= 0.5.1)
...
...
@@ -234,7 +234,7 @@ GEM
webrobots (>= 0.0.9, < 0.2)
method_source (0.8.2)
mime-types (2.4.3)
mini_portile (0.6.
0
)
mini_portile (0.6.
1
)
minitest (5.4.2)
multi_json (1.10.1)
multi_xml (0.5.5)
...
...
@@ -248,8 +248,8 @@ GEM
net-ssh (2.9.1)
netrc (0.8.0)
newrelic_rpm (3.9.6.257)
nokogiri (1.6.
3.1
)
mini_portile (
=
0.6.0)
nokogiri (1.6.
4
)
mini_portile (
~>
0.6.0)
ntlm-http (0.1.1)
oauth (0.4.7)
oauth2 (0.9.3)
...
...
@@ -273,7 +273,7 @@ GEM
paper_trail (3.0.6)
activerecord (>= 3.0, < 5.0)
activesupport (>= 3.0, < 5.0)
parser (2.2.0.pre.
6
)
parser (2.2.0.pre.
7
)
ast (>= 1.1, < 3.0)
slop (~> 3.4, >= 3.4.5)
poltergeist (1.5.1)
...
...
@@ -363,7 +363,7 @@ GEM
powerpack (~> 0.0.6)
rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.4)
ruby-progressbar (1.
6.1
)
ruby-progressbar (1.
7.0
)
sass (3.4.7)
sdoc (0.4.1)
json (~> 1.7, >= 1.7.7)
...
...
app/assets/javascripts/modules/mod-form-resizes.js.coffee
0 → 100644
View file @
dafa8d78
# Desc
# フォームサイズの調整を自動で行う
# Usage:
#
# Example:
#
$
.
extend
mod_form_resizer
:
(
options
)
->
settings
=
$editor
:
null
,
$preview
:
null
,
height_offset
:
0
,
settings
=
$
.
extend
settings
,
options
$window
=
$
(
window
)
adjust
=
->
h
=
$window
.
height
()
settings
.
$editor
.
css
(
'height'
,
h
-
settings
.
height_offset
)
settings
.
$preview
.
css
(
'height'
,
h
-
settings
.
height_offset
)
adjust
()
$window
.
on
'resize'
,
->
adjust
()
app/assets/stylesheets/body-padding.css.scss
View file @
dafa8d78
body
{
.body-padding
{
padding-top
:
70px
;
}
app/assets/stylesheets/lib/mod-md-editor.css.scss
View file @
dafa8d78
...
...
@@ -15,13 +15,13 @@
.mod-mdEditor-textarea
{
width
:
100%
;
min-height
:
4
00px
;
min-height
:
1
00px
;
font-size
:
12pt
;
padding
:
3px
;
tab-size
:
2
;
}
.mod-mdEditor-preview
{
min-height
:
4
00px
;
min-height
:
1
00px
;
}
app/assets/stylesheets/posts.css.scss
View file @
dafa8d78
...
...
@@ -62,6 +62,14 @@
#save_button
{
margin-bottom
:
10px
;
}
table
{
width
:
100%
;
}
td
{
width
:
50%
;
}
}
input
,
...
...
app/controllers/posts_controller.rb
View file @
dafa8d78
...
...
@@ -19,12 +19,13 @@ class PostsController < ApplicationController
# GET /posts/new
def
new
@post
=
Post
.
new
(
title:
'新しい投稿'
)
render
layout:
'edit'
end
def
fork
@post
=
set_post
.
generate_fork
(
current_user
)
@post
.
tags
.
destroy
Tag
.
find_by
(
name:
'template'
)
render
action:
'new'
render
layout:
'edit'
,
action:
'new'
end
def
mail
...
...
@@ -43,6 +44,7 @@ class PostsController < ApplicationController
# GET /posts/1/edit
def
edit
render
layout:
'edit'
end
# POST /posts
...
...
app/views/layouts/application.html.slim
View file @
dafa8d78
...
...
@@ -16,6 +16,8 @@ html lang="ja"
=
render_style
=
csrf_meta_tags
body
class
=
"rails-#{params[:controller]}-#{params[:action]}"
.body-padding
=
render
partial:
'partials/header_notifications'
-
if
params
[
:controller
]
!=
'welcome'
=
render
partial:
'partials/app_header'
...
...
app/views/layouts/edit.html.slim
0 → 100644
View file @
dafa8d78
doctype
html
=
render
partial:
'partials/rendezvous'
html
lang
=
"ja"
head
title
Rendezvous
meta
content
=
"width=device-width, initial-scale=1.0"
name
=
"viewport"
/
link
href
=
"//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"
rel
=
"stylesheet"
/
link
href
=
"//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css"
rel
=
"stylesheet"
/
link
href
=
"//cdnjs.cloudflare.com/ajax/libs/fullcalendar/1.6.4/fullcalendar.css"
rel
=
"stylesheet"
/
link
href
=
"//cdnjs.cloudflare.com/ajax/libs/fullcalendar/1.6.4/fullcalendar.print.css"
rel
=
"stylesheet"
/
link
href
=
"//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css"
rel
=
"stylesheet"
=
favicon_link_tag
'favicon.ico'
script
src
=
"//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"
=
render
partial:
'partials/google_analytics'
=
stylesheet_link_tag
"application"
,
media:
"all"
=
render_style
=
csrf_meta_tags
body
class
=
"rails-#{params[:controller]}-#{params[:action]}"
.container-fluid.container-main
#yield
=
yield
script
src
=
"//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.6.0/underscore-min.js"
script
src
=
"//cdnjs.cloudflare.com/ajax/libs/underscore.string/2.3.3/underscore.string.min.js"
script
src
=
"//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"
script
src
=
"//cdnjs.cloudflare.com/ajax/libs/moment.js/2.5.1/moment.min.js"
script
src
=
"//cdnjs.cloudflare.com/ajax/libs/fullcalendar/1.6.4/fullcalendar.min.js"
javascript:
window
.
RV
=
window
.
RV
||
{};
window
.
RV
.
AllTags
=
JSON
.
parse
(
'
#{
raw
Tag
.
all
.
pluck
(
:name
).
to_json
}
'
);
hr
/
=
javascript_include_tag
"application"
=
yield
:footer_js
app/views/posts/_form.html.slim
View file @
dafa8d78
...
...
@@ -22,19 +22,19 @@
=
hidden_field
:post
,
:tags
,
class:
'mod-mdEditor-tags'
,
style:
'width:300px'
,
value:
@post
.
tags
.
map
{
|
_tag
|
_tag
.
name
}.
join
(
','
)
.col-xs-3
p
.actions
=
f
.
submit
class:
'btn btn-lg js-disable-confirm-unload'
,
id:
'save_button'
p
.actions
=
f
.
check_box
:is_draft
=
f
.
label
:is_draft
,
" 下書き保存"
.
html_safe
p
.actions
=
f
.
date_select
:specified_date
br
/
.row
#progress-wrapper
.alert.alert-warning.fade.in
style
=
"display:none;"
span
.progress-title
|
Uploading files...
#progress
style
=
"height:20px;"
.progress-bar.progress-bar-success.progress-bar-striped.active
role
=
"progressbar"
aria-valuemin
=
"0"
aria-valuemax
=
"100"
style
=
"width: 0%;"
|
0%
.row
.col-xs-6
table
tr
td
.panel.panel-default
.panel-heading
.btn-toolbar
role
=
"toolbar"
...
...
@@ -59,23 +59,24 @@
|
Upload
.panel-body.panel-body-nopadding
=
f
.
text_area
:body
,
class:
'mod-mdEditor-textarea'
,
placehoder:
'type your text....'
p
.actions
=
f
.
submit
class:
'btn btn-lg js-disable-confirm-unload'
,
id:
'save_button'
p
.actions
=
f
.
check_box
:is_draft
=
f
.
label
:is_draft
,
"下書き保存"
p
.actions
=
f
.
date_select
:specified_date
=
f
.
text_area
:body
,
class:
'mod-mdEditor-textarea editor-box'
,
placehoder:
'type your text....'
.col-xs-6
td
.panel.preview-wrapper
.panel-heading
h5
Preview
-
入力した内容がここに表示されます
.panel-body
span
Preview
-
入力した内容がここに表示されます
.panel-body.preview-box
.box-text
.text-box.body.viewer.github.mod-mdEditor-preview
.row
#progress-wrapper
.alert.alert-warning.fade.in
style
=
"display:none;"
span
.progress-title
|
Uploading files...
#progress
style
=
"height:20px;"
.progress-bar.progress-bar-success.progress-bar-striped.active
role
=
"progressbar"
aria-valuemin
=
"0"
aria-valuemax
=
"100"
style
=
"width: 0%;"
|
0%
input
#fileupload
data-url
=
"/apis/file_receiver"
multiple
=
""
name
=
"files[]"
style
=
"display:none"
type
=
"file"
/
-
content_for
:footer_js
do
...
...
@@ -91,6 +92,13 @@ input#fileupload data-url="/apis/file_receiver" multiple="" name="files[]" style
$progressBar
:
$
(
'#progress .progress-bar'
)
});
// フォームサイズ調整
$
.
mod_form_resizer
({
$editor
:
$
(
'.editor-box'
),
$preview
:
$
(
'.preview-box'
),
height_offset
:
250
})
// Display upload dialog.
$
(
'#uploadButton'
).
on
(
'click'
,
function
(){
$
(
'input#fileupload'
).
trigger
(
'click'
);
...
...
@@ -147,3 +155,4 @@ input#fileupload data-url="/apis/file_receiver" multiple="" name="files[]" style
.textcomplete-wrapper
{
width
:
100%
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment