File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8484 @ trigger ' ready'
8585 @router .start ()
8686 @ hideLoading ()
87- new app.views.News () unless @doc
87+ unless @doc
88+ new app.views.News ()
89+ new app.views.Share ()
8890 @ removeEvent ' ready bootError'
8991 return
9092
Original file line number Diff line number Diff line change @@ -21,3 +21,11 @@ app.templates.notifInvalidLocation = ->
2121
2222app .templates .notifNews = (news ) ->
2323 notif ' Changelog' , app .templates .newsList (news)
24+
25+ app .templates .notifShare = ->
26+ textNotif """ Hi there! """ ,
27+ """ Like DevDocs? Help us reach more developers by sharing the link with your friends, on
28+ <a href="https://twitter.com/intent/tweet?url=http%3A%2F%2Fdevdocs.io&via=DevDocs&text=All-in-one%2C%20quickly%20searchable%20API%20docs%3A" target="_blank">Twitter</a>,
29+ <a href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fdevdocs.io" target="_blank">Facebook</a>,
30+ <a href="http://www.reddit.com/submit?url=http%3A%2F%2Fdevdocs.io&title=All-in-one%2C%20quickly%20searchable%20API%20docs&resubmit=true" target="_blank">Reddit</a>,
31+ etc.<br>Thanks :)"""
Original file line number Diff line number Diff line change 1+ # = require views/misc/notif
2+
3+ class app.views.Share extends app.views.Notif
4+ @defautOptions :
5+ autoHide : null
6+
7+ init : ->
8+ @type = ' Share'
9+ @count = app .store .get (' count' ) or 0
10+ app .store .set ' count' , ++ @count
11+ @ show () if @count is 5
12+ return
You can’t perform that action at this time.
0 commit comments