fix external links up with helper
This commit is contained in:
parent
526062b5bd
commit
c9792e5c3a
|
@ -25,6 +25,8 @@ $(document).ready ->
|
|||
content = -> $(this).find('.content')
|
||||
$('.tipster').each ->
|
||||
$(this).tooltip( title: content)
|
||||
$('.tipit').each ->
|
||||
$(this).tooltip( )
|
||||
return
|
||||
|
||||
$(document).ready ->
|
||||
|
|
|
@ -20,8 +20,22 @@ module ApplicationHelper
|
|||
registration_url(:user , ssl_hash )
|
||||
end
|
||||
|
||||
def social_link href , kind , &block
|
||||
link_to(href , {class: "social-icon social-icon-sm social-#{kind}" , target: :blank } , &block)
|
||||
def social_link kind , href , &block
|
||||
classes = "social-icon social-icon-border social-#{kind} pull-left tipit"
|
||||
options = {class: classes , :title => kind.capitalize , target: :blank }
|
||||
link_to(href , options , &block)
|
||||
end
|
||||
|
||||
def ext_link(name = nil, options = nil, html_options = nil, &block)
|
||||
target_blank = {target: "_blank"}
|
||||
if block_given?
|
||||
options ||= {}
|
||||
options = options.merge(target_blank)
|
||||
else
|
||||
html_options ||= {}
|
||||
html_options = html_options.merge(target_blank)
|
||||
end
|
||||
link_to(name, options, html_options, &block)
|
||||
end
|
||||
|
||||
def faq_sections
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
.form-actions
|
||||
%p
|
||||
By pressing submit you acknowledge the
|
||||
= link_to "Terms & Conditions," , page_path(:terms) , target: :blank
|
||||
= ext_link "Terms & Conditions," , page_path(:terms)
|
||||
the
|
||||
= link_to "Payment Policy" , page_path(:payment) , target: :blank
|
||||
= ext_link "Payment Policy" , page_path(:payment)
|
||||
and the
|
||||
= link_to "House Rules" , page_path(:rules) , target: :blank
|
||||
= ext_link "House Rules" , page_path(:rules)
|
||||
= f.button :submit , "Create Application" , class: "btn btn-primary"
|
||||
|
|
|
@ -12,6 +12,6 @@
|
|||
= f.password_field :password_confirmation, class: 'form-control'
|
||||
.accept
|
||||
By pressing 'Start' i agree to the
|
||||
=link_to "privacy policy" , page_path(:privacy) , target: :blank
|
||||
= ext_link "privacy policy" , page_path(:privacy)
|
||||
and accept the processing of my personal data accordingly
|
||||
= f.submit 'Start', :class => 'btn btn-success'
|
||||
|
|
|
@ -24,6 +24,6 @@
|
|||
= f.password_field :password_confirmation, class: 'form-control'
|
||||
.accept
|
||||
By pressing 'Start' i agree to the
|
||||
=link_to "privacy policy" , page_path(:privacy) , target: :blank
|
||||
=ext_link "privacy policy" , page_path(:privacy)
|
||||
and accept the processing of my personal data accordingly
|
||||
= f.submit 'Start', :class => 'btn btn-success'
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
%h6.letter-spacing-1 JOBS
|
||||
%ul.footer-links.list-unstyled
|
||||
%li.icon-angle-right= link_to "Teaching" , page_path(:teaching)
|
||||
%li.icon-angle-right= link_to "Marketing" , page_path(:marketingjob)
|
||||
|
||||
.footer-sign
|
||||
%h5.letter-spacing-1 Account
|
||||
|
@ -68,11 +69,11 @@
|
|||
|
||||
|
||||
.margin-top-20
|
||||
%a.social-icon.social-icon-border.social-facebook.pull-left{"data-placement" => "top", :href => "https://www.facebook.com/webdev.camp", :title => "Facebook" , target: :blank }
|
||||
=social_link( "facebook", "https://www.facebook.com/webdev.camp") do
|
||||
%i.icon-facebook
|
||||
%a.social-icon.social-icon-border.social-twitter.pull-left{"data-placement" => "top", :href => "https://twitter.com/webdev_camp", :title => "Twitter" , target: :blank }
|
||||
=social_link( "twitter", "https://twitter.com/webdev_camp") do
|
||||
%i.icon-twitter
|
||||
%a.social-icon.social-icon-border.social-instagram.pull-left{"data-placement" => "top", :href => "https://www.instagram.com/webdev.camp/", :title => "Instagram" , target: :blank }
|
||||
=social_link( "instagram", "https://www.instagram.com/webdev.camp") do
|
||||
%i.icon-instagram
|
||||
|
||||
.container-fluid
|
||||
|
@ -91,11 +92,12 @@
|
|||
%li.list-inline-item
|
||||
=link_to "House Rules" , page_path(:rules)
|
||||
|
||||
:javascript
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
var the_id = 'UA-76401513-1';
|
||||
ga('create', the_id.replace("-1" , "-3") , 'auto');
|
||||
ga('send', 'pageview');
|
||||
- if Rails.env.production?
|
||||
:javascript
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
var the_id = 'UA-76401513-1';
|
||||
ga('create', the_id.replace("-1" , "-3") , 'auto');
|
||||
ga('send', 'pageview');
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
%b Email:
|
||||
info@webdev.camp
|
||||
%li
|
||||
%a{:href => "https://gitter.im/rubyclerks/office_clerk" , target: :blank}
|
||||
= ext_link "https://gitter.im/rubyclerks/office_clerk" do
|
||||
%i.fa.icon-angle-right
|
||||
%b Gitter chat:
|
||||
web_dev_camp/info
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
- if Rails.env.production?
|
||||
:javascript
|
||||
window.__lo_site_id = 59342;
|
||||
|
||||
(function() {
|
||||
var wa = document.createElement('script'); wa.type = 'text/javascript'; wa.async = true;
|
||||
wa.src = 'https://d10lpsik1i8c69.cloudfront.net/w.js';
|
||||
|
|
|
@ -84,6 +84,6 @@
|
|||
Then you should practise coding as much as you can to build up stamina.
|
||||
%p
|
||||
And last but not least,
|
||||
=link_to "get a flight" , "http://www.momondo.com/" , target: :blank
|
||||
=ext_link "get a flight" , "http://www.momondo.com/"
|
||||
, and
|
||||
=link_to "check the weather." , "http://www.accuweather.com/en/fi/antskog/1121899/weather-forecast/1121899", target: :blank
|
||||
=ext_link "check the weather." , "http://www.accuweather.com/en/fi/antskog/1121899/weather-forecast/1121899"
|
||||
|
|
|
@ -157,7 +157,7 @@
|
|||
initial shortcomings and current standards.
|
||||
%br
|
||||
We introduce
|
||||
= link_to "Haml" , "http://haml.info/" , target: :blank
|
||||
= ext_link "Haml" , "http://haml.info/"
|
||||
as a shorter, more concise and error free way of writing correct html.
|
||||
%br
|
||||
Also you'll learn about the type of boxes and how they can be arranged, in other
|
||||
|
@ -173,7 +173,7 @@
|
|||
%br
|
||||
This is the basic distinction between content and style. Over the course you will
|
||||
learn more and more about the myriad of ways css can be used. Similar to Haml,
|
||||
=link_to "Sass" , "http://sass-lang.com/" , target: :blank
|
||||
=ext_link "Sass" , "http://sass-lang.com/"
|
||||
is a shorthand and more semantic (but equivalent) way of writing css.
|
||||
%br
|
||||
%span.tipster
|
||||
|
@ -255,7 +255,7 @@
|
|||
gives meaningful names to our styles and lets them build ourselves.
|
||||
%br
|
||||
You'll earn
|
||||
=link_to "Susy" , "http://susy.oddbird.net/" , target: :blank
|
||||
=ext_link "Susy" , "http://susy.oddbird.net/"
|
||||
and how to build your own grid system.
|
||||
%br
|
||||
%span.tipster
|
||||
|
@ -319,7 +319,7 @@
|
|||
Dom, the api for Html
|
||||
%span.content
|
||||
The Document Object Model (
|
||||
=link_to "DOM", "http://www.w3schools.com/js/js_htmldom.asp" , target: :blank
|
||||
=ext_link "DOM", "http://www.w3schools.com/js/js_htmldom.asp"
|
||||
) gives us a programmatic interface to the rendered
|
||||
content. While html describes the static structure and a transport mechanism, the dom
|
||||
gives us a way to programmatically create, update and delete arbitrary nodes.
|
||||
|
@ -356,7 +356,7 @@
|
|||
%span.content
|
||||
The sharing of code has always been very important but never as easy and efficient as
|
||||
today, with git. Even more, online sharing sites like
|
||||
=link_to "github.com", "https://github.com" , target: :blank
|
||||
=ext_link "github.com", "https://github.com"
|
||||
fuel open source community by sharing publicly and across projects.
|
||||
%br
|
||||
You'll learn the basic workflow and will practice this in your own projects.
|
||||
|
@ -395,16 +395,16 @@
|
|||
%span.content
|
||||
Going further into client side api's and cross compilation we examine languages
|
||||
that can be used instead of using JavaScript directly, specifically
|
||||
=link_to "coffee script" , "http://coffeescript.org/" , target: :blank
|
||||
= ext_link "coffee script" , "http://coffeescript.org/"
|
||||
and
|
||||
=link_to "opal" , "http://opalrb.org/" , target: :blank
|
||||
= ext_link "opal" , "http://opalrb.org/"
|
||||
%br
|
||||
We will look at evolving tools to write client side applications, like
|
||||
=link_to "volt" , "http://voltframework.com" , target: :blank
|
||||
= ext_link "volt" , "http://voltframework.com"
|
||||
,
|
||||
=link_to "clearwater" , "https://github.com/clearwater-rb/clearwater" , target: :blank
|
||||
= ext_link "clearwater" , "https://github.com/clearwater-rb/clearwater"
|
||||
and
|
||||
=link_to "webix" , "http://opalphaser.com/" , target: :blank
|
||||
= ext_link "webix" , "http://opalphaser.com/"
|
||||
You will also have an opportunity to look at pure JavaScript frameworks like
|
||||
Angular, Ember, and Backbone.
|
||||
%br
|
||||
|
@ -414,7 +414,7 @@
|
|||
%span.content
|
||||
While learning about Bootstrap, we touched on the multi-device concept and now go
|
||||
deeper into mobile first Development. You'll learn what
|
||||
=link_to "Breakpoints" , "http://breakpoint-sass.com/" , target: :blank
|
||||
= ext_link "Breakpoints" , "http://breakpoint-sass.com/"
|
||||
are and how to implement one design that can be viewed on multiple devices.
|
||||
%br
|
||||
%span.tipster
|
||||
|
@ -429,7 +429,7 @@
|
|||
strangeness by using languages that compile to JavaScript.
|
||||
%br
|
||||
You may also choose to learn a completely different language at this point, eg
|
||||
= link_to "Go" , "https://golang.org/" , target: :blank
|
||||
= ext_link "Go" , "https://golang.org/"
|
||||
%br
|
||||
%span.tipster
|
||||
%i.ico-color.ico-xxs.ico-rounded.ico-hover.fa.icon-github
|
||||
|
|
|
@ -159,7 +159,7 @@
|
|||
The answer is simple: that is not the objective of school.
|
||||
%br
|
||||
School's true lessons are well put by Taylor Gatto in
|
||||
= link_to "The seven lesson teacher" , "http://www.newciv.org/whole/schoolteacher.txt" , target: :blank
|
||||
= ext_link "The seven lesson teacher" , "http://www.newciv.org/whole/schoolteacher.txt"
|
||||
the main 6 of those lessons are repeated below.
|
||||
%row
|
||||
.col-md-2
|
||||
|
|
|
@ -105,4 +105,4 @@
|
|||
%p
|
||||
%br
|
||||
Law services provided by
|
||||
=link_to "AKG Attorneys-at-Law Ltd" , "http://www.akg.fi/pages/in-english.php" , target: :blank
|
||||
= ext_link "AKG Attorneys-at-Law Ltd" , "http://www.akg.fi/pages/in-english.php"
|
||||
|
|
|
@ -9,4 +9,4 @@
|
|||
%h1 Terms and Conditions
|
||||
%p
|
||||
Currently being formulated by
|
||||
=link_to "AKG Attorneys-at-Law Ltd" , "http://www.akg.fi/pages/in-english.php" , target: :blank
|
||||
= ext_link "AKG Attorneys-at-Law Ltd" , "http://www.akg.fi/pages/in-english.php"
|
||||
|
|
Loading…
Reference in New Issue