j1_template_mde 2018.4.20 → 2018.4.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_layouts/default.html +17 -12
- data/_layouts/home.html +1 -1
- data/lib/j1/version.rb +1 -1
- data/lib/j1_app.rb +17 -7
- data/lib/starter_web/Gemfile +1 -1
- data/lib/starter_web/_config.yml +1 -1
- data/lib/starter_web/_data/j1_config.yml +1 -0
- data/lib/starter_web/_rack/config.ru +27 -1
- data/lib/starter_web/_rack/dot.env +4 -3
- data/lib/starter_web/assets/images/icons/j1/scalable/j1v2.svg +1 -1
- data/lib/starter_web/assets/themes/j1/core/css/theme_extensions.css +12 -2
- data/lib/starter_web/assets/themes/j1/core/css/theme_extensions.min.css +1 -1
- data/lib/starter_web/assets/themes/j1/core/css/uno.css +41 -4
- data/lib/starter_web/assets/themes/j1/core/css/uno.min.css +1 -1
- data/lib/starter_web/assets/themes/j1/core/js/adapter/algolia.js +1 -1
- data/lib/starter_web/assets/themes/j1/core/js/template.js +7 -18
- data/lib/starter_web/assets/themes/j1/core/js/template.js.map +1 -1
- data/lib/starter_web/assets/themes/j1/core/js/template.min.js +1 -1
- data/lib/starter_web/package.json +8 -6
- data/lib/starter_web/pages/public/start/000_includes/attributes.asciidoc +40 -12
- data/lib/starter_web/pages/public/start/platform.adoc +151 -0
- data/lib/starter_web/pages/public/start/roundtrip/000_includes/attributes.asciidoc +18 -16
- data/lib/starter_web/pages/public/start/roundtrip/100_present_images.adoc +1 -1
- data/lib/starter_web/pages/public/start/roundtrip/200_cards.adoc +5 -4
- data/lib/starter_web/pages/public/start/roundtrip/300_typography.adoc +24 -27
- data/lib/starter_web/pages/public/start/roundtrip/400_icon_fonts.adoc +5 -4
- data/lib/starter_web/pages/public/start/roundtrip/500_asciidoc_extensions.adoc +3 -3
- data/lib/starter_web/pages/public/start/roundtrip/600_themes.adoc +10 -16
- data/lib/starter_web/pages/public/start/roundtrip/700_extended_modals.adoc +49 -44
- data/lib/starter_web/pages/public/start/roundtrip/800_search_engine.adoc +37 -2
- metadata +3 -10
- data/lib/j1_app/j1_auth_manager/views/_unused/iframe.erb +0 -29
- data/lib/j1_app/j1_auth_manager/views/_unused/modal_page.erb +0 -136
- data/lib/j1_app/omniauth/strategies/_unused/doumart_patreon.rb +0 -75
- data/lib/j1_app/omniauth/strategies/_unused/my_patreon.rb +0 -78
- data/lib/j1_app/omniauth/strategies/_unused/patreon.v1.rb +0 -50
- data/lib/j1_app/omniauth/strategies/_unused/patreon.v2-v1.rb +0 -82
- data/lib/j1_app/omniauth/strategies/_unused/patreon.v2.rb +0 -79
- data/lib/starter_web/pages/public/instant_search_media.adoc +0 -438
@@ -1,29 +0,0 @@
|
|
1
|
-
<!doctype html>
|
2
|
-
|
3
|
-
<html lang="en">
|
4
|
-
|
5
|
-
<head>
|
6
|
-
<meta charset="utf-8">
|
7
|
-
|
8
|
-
<title>The HTML5 Herald</title>
|
9
|
-
<meta name="description" content="The HTML5 Herald">
|
10
|
-
<meta name="author" content="SitePoint">
|
11
|
-
|
12
|
-
<!-- <link rel="stylesheet" href="css/styles.css"> -->
|
13
|
-
<style>
|
14
|
-
#if {
|
15
|
-
height: 50vh;
|
16
|
-
width: 50vw;
|
17
|
-
}
|
18
|
-
</style>
|
19
|
-
|
20
|
-
<!--[if lt IE 9]>
|
21
|
-
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
22
|
-
<![endif]-->
|
23
|
-
</head>
|
24
|
-
|
25
|
-
<body>
|
26
|
-
<iframe src="<%= @website_url %>" id="if"></iframe>
|
27
|
-
</body>
|
28
|
-
|
29
|
-
</html>
|
@@ -1,136 +0,0 @@
|
|
1
|
-
<!doctype html>
|
2
|
-
|
3
|
-
<html lang="en">
|
4
|
-
|
5
|
-
<head>
|
6
|
-
<meta charset="utf-8">
|
7
|
-
|
8
|
-
<title>Pop-up Modal</title>
|
9
|
-
<meta name="description" content="The HTML5 Herald">
|
10
|
-
<meta name="author" content="SitePoint">
|
11
|
-
|
12
|
-
<!-- <link rel="stylesheet" href="css/styles.css"> -->
|
13
|
-
<style>
|
14
|
-
#if {
|
15
|
-
height: 50vh;
|
16
|
-
width: 50vw;
|
17
|
-
}
|
18
|
-
div#speedbump {
|
19
|
-
display: none;
|
20
|
-
z-index: 9999;
|
21
|
-
position: fixed;
|
22
|
-
top: 0;
|
23
|
-
width: 100%;
|
24
|
-
background: #eeeeee;
|
25
|
-
}
|
26
|
-
#speedbump h4.modal-title {
|
27
|
-
text-align: center;
|
28
|
-
text-transform: uppercase;
|
29
|
-
color: #004795;
|
30
|
-
font-size:2.5em;
|
31
|
-
}
|
32
|
-
.modal-body p {
|
33
|
-
text-align:center;
|
34
|
-
font-size: 1em;
|
35
|
-
}
|
36
|
-
button.btn-modal:hover {
|
37
|
-
cursor: pointer;
|
38
|
-
}
|
39
|
-
button.btn-modal.btn-continue {
|
40
|
-
background-color: #8bc63e;
|
41
|
-
border: 0px;
|
42
|
-
margin: 1% 0;
|
43
|
-
}
|
44
|
-
button.btn-modal.btn-close {
|
45
|
-
background-color: inherit;
|
46
|
-
border: 1px solid #030000;
|
47
|
-
color: #030000;
|
48
|
-
font-weight: 400;
|
49
|
-
}
|
50
|
-
.modal-header .close {
|
51
|
-
font-size: 3.5em;
|
52
|
-
}
|
53
|
-
</style>
|
54
|
-
|
55
|
-
<!--[if lt IE 9]>
|
56
|
-
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
57
|
-
<![endif]-->
|
58
|
-
</head>
|
59
|
-
|
60
|
-
<body>
|
61
|
-
|
62
|
-
<div class="container">
|
63
|
-
<div class="row mt-5">
|
64
|
-
<div class="col-sm-12">
|
65
|
-
<p class="text-center">
|
66
|
-
<a href="https://www.solodev.com" class="btn btn-info btn-lg cta-open">External Link</a> <a href="#" class="btn btn-info btn-lg cta-open">Internal Link</a>
|
67
|
-
</p>
|
68
|
-
</div>
|
69
|
-
</div>
|
70
|
-
</div>
|
71
|
-
|
72
|
-
<!-- start modal-->
|
73
|
-
<div class="modal fade" id="speedbump" role="dialog">
|
74
|
-
<div class="modal-dialog">
|
75
|
-
<!-- Modal content-->
|
76
|
-
<div class="modal-content">
|
77
|
-
<div class="modal-header">
|
78
|
-
<button type="button" class="close" data-dismiss="modal">×</button>
|
79
|
-
<h4 class="modal-title">Notice</h4>
|
80
|
-
</div>
|
81
|
-
<div class="modal-body">
|
82
|
-
<p>You are now leaving our website website.</p>
|
83
|
-
</div>
|
84
|
-
<div class="modal-footer text-center">
|
85
|
-
<button type="button" title="continue" class="btn btn-modal btn-continue" data-dismiss="modal">Continue</button>
|
86
|
-
<button type="button" title="go back" class="btn btn-modal btn-close" data-dismiss="modal">Go Back</button>
|
87
|
-
</div>
|
88
|
-
</div>
|
89
|
-
|
90
|
-
</div>
|
91
|
-
</div>
|
92
|
-
<!--end modal-->
|
93
|
-
</body>
|
94
|
-
|
95
|
-
<script>
|
96
|
-
// Open external links in a popup modal notice
|
97
|
-
$(window).on('load', function(){
|
98
|
-
|
99
|
-
$.expr[":"].external = function(a) {
|
100
|
-
//var linkHref = a.hostname;
|
101
|
-
//var domainHref = location.hostname;
|
102
|
-
|
103
|
-
var linkhn = a.hostname.split('.').reverse();
|
104
|
-
var linkHref = linkhn[1] + "." + linkhn[0];
|
105
|
-
|
106
|
-
var domainhn = window.location.hostname.split('.').reverse();
|
107
|
-
var domainHref = domainhn[1] + "." + domainhn[0];
|
108
|
-
|
109
|
-
return !a.href.match(/^mailto\:/) && !a.href.match(/^tel\:/) && linkHref !== domainHref;
|
110
|
-
};
|
111
|
-
|
112
|
-
$("a:external").addClass("ext_link");
|
113
|
-
|
114
|
-
$(function() {
|
115
|
-
|
116
|
-
$('a.ext_link').click(function() {
|
117
|
-
// open a modal
|
118
|
-
$('a:external').attr('data-toggle', 'modal');
|
119
|
-
$('a:external').attr('data-target', '#speedbump');
|
120
|
-
//go to link on modal close
|
121
|
-
var url = $(this).attr('href');
|
122
|
-
$('.btn-modal.btn-continue').click(function() {
|
123
|
-
window.open(url);
|
124
|
-
$('.btn-modal.btn-continue').off();
|
125
|
-
});
|
126
|
-
$('.btn-modal.btn-close').click(function() {
|
127
|
-
$('#speedbump').modal('hide');
|
128
|
-
$('.btn-modal.btn-close').off();
|
129
|
-
});
|
130
|
-
});
|
131
|
-
|
132
|
-
});
|
133
|
-
});
|
134
|
-
</script>
|
135
|
-
|
136
|
-
</html>
|
@@ -1,75 +0,0 @@
|
|
1
|
-
require 'omniauth/strategies/oauth2'
|
2
|
-
require 'json'
|
3
|
-
|
4
|
-
module OmniAuth
|
5
|
-
module Strategies
|
6
|
-
class Patreon < OmniAuth::Strategies::OAuth2
|
7
|
-
|
8
|
-
DEFAULT_SCOPE = 'identity identity[email]'
|
9
|
-
|
10
|
-
option :name, 'patreon'
|
11
|
-
option :client_options, {
|
12
|
-
:authorize_url => '/oauth2/authorize',
|
13
|
-
:site => 'https://www.patreon.com',
|
14
|
-
:token_url => '/api/oauth2/token'
|
15
|
-
}
|
16
|
-
|
17
|
-
uid { raw_info["data"]["id"] }
|
18
|
-
|
19
|
-
info do
|
20
|
-
prune!({
|
21
|
-
:first_name => raw_info["data"]["attributes"]['first_name'],
|
22
|
-
:last_name => raw_info["data"]["attributes"]['last_name'],
|
23
|
-
:full_name => raw_info["data"]["attributes"]['full_name'],
|
24
|
-
:image_url => raw_info["data"]["attributes"]['image_url'],
|
25
|
-
:email => raw_info["data"]["attributes"]['email']
|
26
|
-
})
|
27
|
-
end
|
28
|
-
|
29
|
-
def authorize_params
|
30
|
-
super.tap do |params|
|
31
|
-
options[:authorize_options].each do |k|
|
32
|
-
params[k] = request.params[k.to_s] unless [nil, ''].include?(request.params[k.to_s])
|
33
|
-
end
|
34
|
-
params[:scope] = get_scope(params)
|
35
|
-
session['omniauth.state'] = params[:state] if params[:state]
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
extra do
|
40
|
-
hash = {}
|
41
|
-
hash['raw_info'] = raw_info unless skip_info?
|
42
|
-
prune! hash
|
43
|
-
end
|
44
|
-
|
45
|
-
def raw_info
|
46
|
-
@raw_info = MultiJson.decode(access_token.get('/api/oauth2/v2/identity', info_options).body)
|
47
|
-
end
|
48
|
-
|
49
|
-
def info_options
|
50
|
-
params = {}
|
51
|
-
params.merge!({fields: {user: (options[:info_fields] || 'full_name,email')}})
|
52
|
-
params.merge!({locale: options[:locale]}) if options[:locale]
|
53
|
-
|
54
|
-
{ params: params }
|
55
|
-
end
|
56
|
-
|
57
|
-
|
58
|
-
def callback_url
|
59
|
-
options[:redirect_uri] || full_host + script_name + callback_path
|
60
|
-
end
|
61
|
-
|
62
|
-
def get_scope(params)
|
63
|
-
raw_scope = params[:scope] || DEFAULT_SCOPE
|
64
|
-
scope_list = raw_scope.split(' ').map { |item| item.split(',') }.flatten
|
65
|
-
scope_list.join(' ')
|
66
|
-
end
|
67
|
-
def prune!(hash)
|
68
|
-
hash.delete_if do |_, value|
|
69
|
-
prune!(value) if value.is_a?(Hash)
|
70
|
-
value.nil? || (value.respond_to?(:empty?) && value.empty?)
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|
@@ -1,78 +0,0 @@
|
|
1
|
-
# require 'omniauth/strategies/oauth2'
|
2
|
-
# require 'json'
|
3
|
-
|
4
|
-
module OmniAuth
|
5
|
-
module Strategies
|
6
|
-
class Patreon < OmniAuth::Strategies::OAuth2
|
7
|
-
|
8
|
-
DEFAULT_SCOPE = 'users'
|
9
|
-
|
10
|
-
option :name, 'patreon'
|
11
|
-
option :client_options, {
|
12
|
-
:authorize_url => '/oauth2/authorize',
|
13
|
-
:site => 'https://www.patreon.com',
|
14
|
-
:token_url => '/api/oauth2/token'
|
15
|
-
}
|
16
|
-
|
17
|
-
uid { raw_info["data"]["id"] }
|
18
|
-
|
19
|
-
info do
|
20
|
-
prune!({
|
21
|
-
:first_name => raw_info["data"]["attributes"]['first_name'],
|
22
|
-
:last_name => raw_info["data"]["attributes"]['last_name'],
|
23
|
-
:full_name => raw_info["data"]["attributes"]['full_name'],
|
24
|
-
:image_url => raw_info["data"]["attributes"]['image_url'],
|
25
|
-
:email => raw_info["data"]["attributes"]['email']
|
26
|
-
})
|
27
|
-
end
|
28
|
-
|
29
|
-
def authorize_params
|
30
|
-
super.tap do |params|
|
31
|
-
options[:authorize_options].each do |k|
|
32
|
-
params[k] = request.params[k.to_s] unless [nil, ''].include?(request.params[k.to_s])
|
33
|
-
end
|
34
|
-
params[:scope] = get_scope(params)
|
35
|
-
session['omniauth.state'] = params[:state] if params[:state]
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
extra do
|
40
|
-
hash = {}
|
41
|
-
hash['raw_info'] = raw_info unless skip_info?
|
42
|
-
prune! hash
|
43
|
-
end
|
44
|
-
|
45
|
-
def raw_info
|
46
|
-
@raw_info = MultiJson.decode(access_token.get('/api/oauth2/v2/identity', info_options).body)
|
47
|
-
end
|
48
|
-
|
49
|
-
def info_options
|
50
|
-
params = {}
|
51
|
-
params.merge!({fields: {user: (options[:info_fields] || 'full_name,email')}})
|
52
|
-
params.merge!({locale: options[:locale]}) if options[:locale]
|
53
|
-
{
|
54
|
-
params: params
|
55
|
-
}
|
56
|
-
end
|
57
|
-
|
58
|
-
def callback_url
|
59
|
-
options[:redirect_uri] || full_host + script_name + callback_path
|
60
|
-
# options[:redirect_uri]
|
61
|
-
end
|
62
|
-
|
63
|
-
def get_scope(params)
|
64
|
-
raw_scope = params[:scope] || DEFAULT_SCOPE
|
65
|
-
scope_list = raw_scope.split(' ').map { |item| item.split(',') }.flatten
|
66
|
-
scope_list.join(' ')
|
67
|
-
end
|
68
|
-
|
69
|
-
def prune!(hash)
|
70
|
-
hash.delete_if do |_, value|
|
71
|
-
prune!(value) if value.is_a?(Hash)
|
72
|
-
value.nil? || (value.respond_to?(:empty?) && value.empty?)
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
|
-
end
|
77
|
-
end
|
78
|
-
end
|
@@ -1,50 +0,0 @@
|
|
1
|
-
# https://github.com/signalnerve/omniauth-patreon
|
2
|
-
|
3
|
-
require 'omniauth-oauth2'
|
4
|
-
|
5
|
-
module OmniAuth
|
6
|
-
module Strategies
|
7
|
-
class Patreon < OmniAuth::Strategies::OAuth2
|
8
|
-
|
9
|
-
option :name, 'patreon'
|
10
|
-
option :client_options,
|
11
|
-
site: 'https://www.patreon.com',
|
12
|
-
authorize_url: 'https://www.patreon.com/oauth2/authorize',
|
13
|
-
token_url: 'https://api.patreon.com/oauth2/token'
|
14
|
-
|
15
|
-
uid { raw_info['data']['id'].to_s }
|
16
|
-
|
17
|
-
info do
|
18
|
-
{
|
19
|
-
:email => raw_info['data']['attributes']['email'],
|
20
|
-
:name => raw_info['data']['attributes']['full_name'],
|
21
|
-
:nickname => raw_info['data']['attributes']['full_name'].gsub('ä','ae').gsub('ö','oe').gsub('ü','ue').gsub(' ','_').downcase,
|
22
|
-
:access_token => access_token.token,
|
23
|
-
:refresh_token => access_token.refresh_token
|
24
|
-
}
|
25
|
-
end
|
26
|
-
|
27
|
-
extra do
|
28
|
-
{ raw_info: raw_info }
|
29
|
-
end
|
30
|
-
|
31
|
-
def raw_info
|
32
|
-
@raw_info ||= begin
|
33
|
-
response = client.request(
|
34
|
-
:get, 'https://api.patreon.com/oauth2/api/current_user',
|
35
|
-
headers: {
|
36
|
-
'Authorization' => "Bearer #{access_token.token}"
|
37
|
-
},
|
38
|
-
parse: :json
|
39
|
-
)
|
40
|
-
response.parsed
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
def callback_url
|
45
|
-
full_host + script_name + callback_path
|
46
|
-
end
|
47
|
-
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
@@ -1,82 +0,0 @@
|
|
1
|
-
# https://github.com/doumart/omniauth-patreon-v2
|
2
|
-
|
3
|
-
require 'omniauth/strategies/oauth2'
|
4
|
-
require 'json'
|
5
|
-
|
6
|
-
module OmniAuth
|
7
|
-
module Strategies
|
8
|
-
class Patreon < OmniAuth::Strategies::OAuth2
|
9
|
-
|
10
|
-
DEFAULT_SCOPE = 'users pledges-to-me my-campaign'
|
11
|
-
|
12
|
-
option :name, 'patreon'
|
13
|
-
option :client_options, {
|
14
|
-
:authorize_url => '/oauth2/authorize',
|
15
|
-
:site => 'https://www.patreon.com',
|
16
|
-
:token_url => '/api/oauth2/token'
|
17
|
-
}
|
18
|
-
|
19
|
-
uid { raw_info["data"]["id"] }
|
20
|
-
|
21
|
-
info do
|
22
|
-
prune!({
|
23
|
-
:email => raw_info['data']['attributes']['email'],
|
24
|
-
:name => raw_info['data']['attributes']['full_name'],
|
25
|
-
:nickname => raw_info['data']['attributes']['full_name'].gsub('ä','ae').gsub('ö','oe').gsub('ü','ue').gsub(' ','_').downcase,
|
26
|
-
:access_token => access_token.token,
|
27
|
-
:refresh_token => access_token.refresh_token
|
28
|
-
})
|
29
|
-
end
|
30
|
-
|
31
|
-
def authorize_params
|
32
|
-
super.tap do |params|
|
33
|
-
options[:authorize_options].each do |k|
|
34
|
-
params[k] = request.params[k.to_s] unless [nil, ''].include?(request.params[k.to_s])
|
35
|
-
end
|
36
|
-
params[:scope] = get_scope(params)
|
37
|
-
session['omniauth.state'] = params[:state] if params[:state]
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
extra do
|
42
|
-
hash = {}
|
43
|
-
hash['raw_info'] = raw_info unless skip_info?
|
44
|
-
prune! hash
|
45
|
-
end
|
46
|
-
|
47
|
-
# def raw_info
|
48
|
-
# @raw_info = MultiJson.decode(access_token.get('/oauth2/api/current_user', info_options).body)
|
49
|
-
# end
|
50
|
-
|
51
|
-
def raw_info
|
52
|
-
@raw_info ||= begin
|
53
|
-
response = client.request(
|
54
|
-
:get, 'https://api.patreon.com/oauth2/api/current_user',
|
55
|
-
headers: {
|
56
|
-
'Authorization' => "Bearer #{access_token.token}"
|
57
|
-
},
|
58
|
-
parse: :json
|
59
|
-
)
|
60
|
-
response.parsed
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
def callback_url
|
65
|
-
options[:redirect_uri] || full_host + script_name + callback_path
|
66
|
-
end
|
67
|
-
|
68
|
-
def get_scope(params)
|
69
|
-
raw_scope = params[:scope] || DEFAULT_SCOPE
|
70
|
-
scope_list = raw_scope.split(' ').map { |item| item.split(',') }.flatten
|
71
|
-
scope_list.join(' ')
|
72
|
-
end
|
73
|
-
|
74
|
-
def prune!(hash)
|
75
|
-
hash.delete_if do |_, value|
|
76
|
-
prune!(value) if value.is_a?(Hash)
|
77
|
-
value.nil? || (value.respond_to?(:empty?) && value.empty?)
|
78
|
-
end
|
79
|
-
end
|
80
|
-
end
|
81
|
-
end
|
82
|
-
end
|