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
fc172c54
Commit
fc172c54
authored
Mar 12, 2014
by
tady
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flow view
parent
7b595a0c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
82 additions
and
56 deletions
+82
-56
app/assets/javascripts/lib/mod-time-ago.js.coffee
+16
-0
app/views/flow/show.html.slim
+12
-3
app/views/layouts/application.html.slim
+1
-0
app/views/partials/_app_footer.html.slim
+45
-1
app/views/partials/_app_header.html.slim
+6
-50
app/views/posts/_show_fragment.html.slim
+2
-2
No files found.
app/assets/javascripts/lib/mod-time-ago.js.coffee
0 → 100644
View file @
fc172c54
# Desc
# nn分前をjsで表示する
# `.js-time-ago`クラスのついた要素の`data-time-ago-at`属性を時刻に変換
# Usage:
# <abbr class="js-time-ago" data-time-ago-at="2014-03-12 00:27:57 +0900"></abbr>
# Example:
# <abbr class="js-time-ago" data-time-ago-at="2014-03-12 00:27:57 +0900">a minute ago</abbr>
$
->
renderTimeAgo
=
->
$
(
'.js-time-ago'
).
each
->
$this
=
$
(
@
)
$this
.
text
moment
(
$this
.
data
(
'time-ago-at'
)).
fromNow
()
setInterval
(
renderTimeAgo
,
1000
*
10
)
renderTimeAgo
()
app/views/flow/show.html.slim
View file @
fc172c54
...
...
@@ -8,19 +8,28 @@
.col-xs-8
role
=
"navigation"
.list-group
-
@posts
.
each_with_index
do
|
post
,
i
|
a
.list-group-item.post-list
data-post-id
=
post
.id
href
=
"#"
=
post
.
title
a
.list-group-item.post-list
data-post-id
=
post
.id
href
=
"#"
.text-primary
#{
post
.
title
}
small
|
#{
post
.
author
.
name
}
posted
abbr
.js-time-ago
data-time-ago-at
=
post
.updated_at
|
.
-
post
.
tags
.
each
do
|
tag
|
span
.label.label-success
#
#{
tag
.
name
}
|
.col-xs-4
.panel.panel-default
.panel-heading
h2
.panel-title
この1週間で閲覧の多かった投稿
h2
.panel-title
この1週間で閲覧の多かった投稿
(調整中)
.panel-body.list-group
-
Post
.
limit
(
5
).
each_with_index
do
|
post
,
i
|
a
.list-group-item.post-list
data-post-id
=
post
.id
href
=
"#"
=
post
.
title
.panel.panel-default
.panel-heading
h2
.panel-title
最近投稿したユーザー
h2
.panel-title
最近投稿したユーザー
(調整中)
.panel-body.list-group
-
User
.
post_recently
.
limit
(
10
).
each_with_index
do
|
author
,
i
|
a
.list-group-item.post-list
data-author-id
=
author
.id
href
=
"#"
=
author
.
name
...
...
app/views/layouts/application.html.slim
View file @
fc172c54
...
...
@@ -20,6 +20,7 @@ html lang="ja"
script
src
=
"//cdnjs.cloudflare.com/ajax/libs/underscore.string/2.3.3/underscore.string.min.js"
script
src
=
"//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"
script
src
=
"//netdna.bootstrapcdn.com/bootstrap/3.0.2/js/bootstrap.min.js"
script
src
=
"//cdnjs.cloudflare.com/ajax/libs/moment.js/2.5.1/moment.min.js"
javascript:
window
.
RV
=
window
.
RV
||
{};
window
.
RV
.
AllTags
=
JSON
.
parse
(
'
#{
raw
Tag
.
all
.
pluck
(
:name
).
to_json
}
'
);
...
...
app/views/partials/_app_footer.html.slim
View file @
fc172c54
...
...
@@ -2,8 +2,12 @@ footer
.container
p
a
href
=
"https://github.com/tadyjp/rendezvous"
Github
|
|
|
a
href
=
"https://twitter.com/tady_jp"
@tady_jp
|
|
a
data-target
=
"#header-search-description"
data-toggle
=
"modal"
href
=
"#"
Search
|
|
a
href
=
"https://help.github.com/articles/github-flavored-markdown"
target
=
"_blank"
Markdown
|
a
href
=
"https://travis-ci.org/tadyjp/rendezvous"
img
src
=
"https://travis-ci.org/tadyjp/rendezvous.png"
/
...
...
@@ -16,3 +20,43 @@ footer
|
a
href
=
"https://gemnasium.com/tadyjp/rendezvous"
img
src
=
"https://gemnasium.com/tadyjp/rendezvous.png"
/
#header-search-description
.modal.fade
aria-hidden
=
"true"
aria-labelledby
=
"myModalLabel"
role
=
"dialog"
tabindex
=
"-1"
.modal-dialog
.modal-content
.modal-header
button
.close
aria-hidden
=
"true"
data-dismiss
=
"modal"
type
=
"button"
×
h4
#myModalLabel
.modal-title
Search
command
.modal-body
dl
.dl-horizontal
dt
Search
by
title
dd
pre
a
href
=
(
posts_path
(
q:
'title:ruby'
)
)
title:ruby
dt
Search
by
id
dd
pre
a
href
=
(
posts_path
(
q:
'id:123'
)
)
id:123
dt
Search
by
body
dd
pre
a
href
=
(
posts_path
(
q:
'body:ruby'
)
)
body:ruby
dt
Search
by
author
dd
pre
a
href
=
(
posts_path
(
q:
'@taro'
)
)
@taro
dt
Search
by
tag
dd
pre
a
href
=
(
posts_path
(
q:
'#ruby'
)
)
#ruby
dt
Search
by
date
dd
pre
a
href
=
(
posts_path
(
q:
'date:2013-12-16'
)
)
date:2013-12-16
dt
Search
by
title
or
body
dd
pre
a
href
=
(
posts_path
(
q:
'ruby'
)
)
ruby
.modal-footer
button
.btn.btn-default
data-dismiss
=
"modal"
type
=
"button"
Close
app/views/partials/_app_header.html.slim
View file @
fc172c54
...
...
@@ -10,13 +10,12 @@ nav.navbar.navbar-default.navbar-fixed-top role="navigation"
span
.input-group-btn
button
.btn.btn-default
data-disable-with
=
"Searching..."
type
=
"submit"
span
.glyphicon.glyphicon-search
p
#header-search-hint
.navbar-text
a
data-target
=
"#header-search-description"
data-toggle
=
"modal"
href
=
"#"
|
Search
span
.glyphicon.glyphicon-question-sign
a
href
=
"https://help.github.com/articles/github-flavored-markdown"
target
=
"_blank"
|
Markdown
span
.glyphicon.glyphicon-question-sign
ul
.nav.navbar-nav
li
a
Stock
li
.active
a
Flow
=
form_tag
(
destroy_user_session_path
,
:method
=>
:delete
,
class:
'navbar-form navbar-right'
)
do
=
submit_tag
'SignOut',
class:
'btn
btn-default'
.navbar-right
...
...
@@ -26,46 +25,3 @@ nav.navbar.navbar-default.navbar-fixed-top role="navigation"
img
height
=
"25"
src
=
current_user
.image_url
width
=
"25"
/
=
current_user
.
name
#header-search-description
.modal.fade
aria-hidden
=
"true"
aria-labelledby
=
"myModalLabel"
role
=
"dialog"
tabindex
=
"-1"
.modal-dialog
.modal-content
.modal-header
button
.close
aria-hidden
=
"true"
data-dismiss
=
"modal"
type
=
"button"
×
h4
#myModalLabel
.modal-title
Search
command
.modal-body
dl
.dl-horizontal
dt
Search
by
title
dd
pre
a
href
=
(
posts_path
(
q:
'title:ruby'
)
)
title:ruby
dt
Search
by
id
dd
pre
a
href
=
(
posts_path
(
q:
'id:123'
)
)
id:123
dt
Search
by
body
dd
pre
a
href
=
(
posts_path
(
q:
'body:ruby'
)
)
body:ruby
dt
Search
by
author
dd
pre
a
href
=
(
posts_path
(
q:
'@taro'
)
)
@taro
dt
Search
by
tag
dd
pre
a
href
=
(
posts_path
(
q:
'#ruby'
)
)
#ruby
dt
Search
by
date
dd
pre
a
href
=
(
posts_path
(
q:
'date:2013-12-16'
)
)
date:2013-12-16
dt
Search
by
title
or
body
dd
pre
a
href
=
(
posts_path
(
q:
'ruby'
)
)
ruby
.modal-footer
button
.btn.btn-default
data-dismiss
=
"modal"
type
=
"button"
Close
-
style
do
|
\#header-search-hint{
|
margin-left: 0;
|
}
app/views/posts/_show_fragment.html.slim
View file @
fc172c54
...
...
@@ -5,10 +5,10 @@
ul
.list-group
li
.list-group-item
-
@post
.
tags
.
each
do
|
tag
|
span
.label.label-
info
span
.label.label-
success
a
href
=
tag
.decorate.show_path
|
#
#{
tag
.
name
}
span
.label.label-
success
span
.label.label-
info
a
href
=
(
posts_path
(
q:
"@
#{
@post
.
author
.
name
}
"
)
)
|
@
#{
@post
.
author
.
name
}
span
.label.label-danger
...
...
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