diff --git a/_assets/css/_styles.scss b/_assets/css/_styles.scss
index 7b76cba..ed670d0 100644
--- a/_assets/css/_styles.scss
+++ b/_assets/css/_styles.scss
@@ -421,6 +421,10 @@ $hover-text: darken($text-color, 10%);
background: transparent url(image_path("logo-dpl.svg")) no-repeat 0 50%;
}
+ &.brand-platform-aspnet-ajax {
+ background: transparent url(image_path("logo-aspnet-ajax.svg")) no-repeat 0 50%;
+ }
+
&::before {
// preload scroll logo
content: " ";
@@ -439,6 +443,10 @@ $hover-text: darken($text-color, 10%);
&.brand-platform-dpl {
background-image: url(image_path("logo-scroll-dpl.svg"));
}
+
+ &.brand-platform-aspnet-ajax {
+ background-image: url(image_path("logo-scroll-aspnet-ajax.svg"));
+ }
}
.scroll & {
@@ -458,6 +466,10 @@ $hover-text: darken($text-color, 10%);
&.brand-platform-dpl {
background: transparent url(image_path("logo-scroll-dpl.svg")) no-repeat 0 8px;
}
+
+ &.brand-platform-aspnet-ajax {
+ background: transparent url(image_path("logo-scroll-aspnet-ajax.svg")) no-repeat 0 8px;
+ }
}
.alt-text {
@@ -1436,6 +1448,8 @@ $border-color: #d9d9d9;
.anchor-h3 {
margin: 5px 0;
font-family: $font-light;
+ font-size: 12px;
+ padding-left: 30px;
}
}
@@ -2668,6 +2682,10 @@ a.all-components {
/* API Pages */
.api-reference {
+ h1 {
+ word-break: break-all;
+ }
+
h1 + p {
margin-top: 30px;
}
@@ -2683,27 +2701,30 @@ a.all-components {
margin-bottom: 2px;
font-size: 20px;
font-weight: 500;
+ }
- code,
- .code {
- background-color: rgba(36, 137, 216, 0.8);
- color: #ffffff;
- margin-top: 3px;
- margin-left: 3px;
- padding: 3px 4px;
- font-size: 13px;
- line-height: 10px;
+ h3,
+ h4,
+ h4 ~ p {
+ code,
+ .code {
+ background-color: rgba(39, 163, 6, 0.8);
+ color: #ffffff;
+ margin-top: 3px;
+ padding: 3px 4px;
+ font-size: 13px;
+ line-height: 10px;
- a:hover,
- a:focus,
- a:active {
- color: #fff;
+ a:hover,
+ a:focus,
+ a:active {
+ color: #fff;
- &::after {
- display: none;
- }
- }
- }
+ &::after {
+ display: none;
+ }
+ }
+ }
}
h4 {
@@ -2730,9 +2751,8 @@ a.all-components {
code,
.code {
- background-color: rgba(36, 137, 216, 0.8);
+ background-color: rgba(39, 163, 6, 0.8);
color: #ffffff;
- margin-left: 3px;
padding: 1px 3px 2px;
font-size: 13px;
font-weight: 400;
diff --git a/_assets/images/logo-aspnet-ajax.svg b/_assets/images/logo-aspnet-ajax.svg
new file mode 100644
index 0000000..340368a
--- /dev/null
+++ b/_assets/images/logo-aspnet-ajax.svg
@@ -0,0 +1,61 @@
+
+
+
diff --git a/_assets/images/logo-scroll-aspnet-ajax.svg b/_assets/images/logo-scroll-aspnet-ajax.svg
new file mode 100644
index 0000000..c0b9243
--- /dev/null
+++ b/_assets/images/logo-scroll-aspnet-ajax.svg
@@ -0,0 +1,92 @@
+
+
+
diff --git a/_assets/js/code-snippet.js b/_assets/js/code-snippet.js
index e3f02e2..30dcaf4 100644
--- a/_assets/js/code-snippet.js
+++ b/_assets/js/code-snippet.js
@@ -19,7 +19,21 @@ $(function () {
getStorage().setItem(selectedLanguageKey, language);
}
- prettyPrint();
+ function mergeTabbedCodes() {
+ var tabbedCodeSelector = 'div.tabbedCode';
+ $(tabbedCodeSelector).each(function () {
+ var container = $(this);
+ var nextSibling = container.next(tabbedCodeSelector);
+ while (nextSibling.length) {
+ nextSibling.children().each(function (index, child) {
+ container.append(child);
+ });
+
+ nextSibling.remove();
+ nextSibling = container.next(tabbedCodeSelector);
+ }
+ });
+ }
/* START TabStrip logic */
@@ -32,11 +46,13 @@ $(function () {
}
};
+ mergeTabbedCodes();
+
$("div.tabbedCode").each(function () {
var container = $(this);
var langs = container.find("pre");
if (langs.length === 0) {
- //console.log("Cannot find any languages")
+ // console.log("Cannot find any languages")
return;
}
@@ -81,12 +97,14 @@ $(function () {
'ASPNET': 'html',
'XML': 'xml',
'TypeScript': 'commonjs',
- }
+ };
$("pre").each(function (index) {
var langExtension = codeSampleMapper[$(this).attr('lang')];
$(this).addClass('lang-' + langExtension).addClass("prettyprint");
});
+ prettyPrint();
+
/* END TabStrip logic */
});
diff --git a/_assets/js/related-articles.js b/_assets/js/related-articles.js
index 37ccf1b..6939af5 100644
--- a/_assets/js/related-articles.js
+++ b/_assets/js/related-articles.js
@@ -1,11 +1,13 @@
$(function () {
- var relatedArticlesMarker = $('h2#see-also');
+ var relatedArticlesMarker = $('h2#see-also, h3#see-also');
if (relatedArticlesMarker.length) {
var relatedArticlesList = relatedArticlesMarker.next('ul');
- $('#related-articles').append(relatedArticlesList.html());
-
- relatedArticlesMarker.remove();
- relatedArticlesList.remove();
+ if (relatedArticlesList.length) {
+ $('#related-articles').append(relatedArticlesList.html());
+
+ relatedArticlesMarker.remove();
+ relatedArticlesList.remove();
+ }
} else {
$('.related-articles').toggleClass('empty', true);
}
diff --git a/_assets/js/toc.js b/_assets/js/toc.js
index bc87543..4914644 100644
--- a/_assets/js/toc.js
+++ b/_assets/js/toc.js
@@ -19,7 +19,7 @@ $(function() {
var toc = $("#toc");
toc.empty();
- var headings = $("#content article > h1, #content article > h2, #content article > h3");
+ var headings = $("#content article > h1, #content article > h2, #content article.api-reference > h3");
var empty = headings.length < 2;
articleToc.toggleClass("empty", empty);
diff --git a/_common/root/test.html b/_common/root/test.html
deleted file mode 100644
index d38cab1..0000000
--- a/_common/root/test.html
+++ /dev/null
@@ -1,115 +0,0 @@
----
-layout: default
-hidden: true
----
-
-
-
-
-
diff --git a/_data/support_products.yml b/_data/support_products.yml
index 43c8ab7..a2826cd 100644
--- a/_data/support_products.yml
+++ b/_data/support_products.yml
@@ -1,4 +1,5 @@
# Products and their respective product ID
"Telerik UI for WPF" : 601
"Telerik UI for Silverlight" : 571
+"Telerik UI for ASP.NET AJAX": 561
"Kendo UI for jQuery": 949
diff --git a/_layouts/documentation.html b/_layouts/documentation.html
index d01ddcc..7fac954 100644
--- a/_layouts/documentation.html
+++ b/_layouts/documentation.html
@@ -20,7 +20,7 @@ layout: default
{% render_bread_crumbs %}
- {% if page.api_reference == true and page.position != 1 %}
+ {% if page.kind == "api" and page.position != 1 %}
{% else %}
diff --git a/_plugins/alert_generator.rb b/_plugins/alert_generator.rb
index f722a34..9988007 100644
--- a/_plugins/alert_generator.rb
+++ b/_plugins/alert_generator.rb
@@ -1,36 +1,36 @@
module Reading
class Generator < Jekyll::Generator
def generate(site)
- @site = site
+ @site = site
@converter = site.find_converter_instance(Jekyll::Converters::Markdown)
site.pages.each do |p|
- createAlert("tip", p.content)
- createAlert("important", p.content)
- createAlert("caution", p.content)
- end
+ createAlert("tip", p.content)
+ createAlert("important", p.content)
+ createAlert("caution", p.content)
+ end
end
- def createAlert(alertType, content)
- sub_string = content.scan(/(>#{alertType})(.*)/)
- if sub_string.count == 0
- ##puts "no " + alertType + "s"
- else
- sub_string.each do |s|
- block ="" + @converter.convert(s[1]) + "
"
- slugsInBlock = block.scan(/.*?(%7[Bb]%slug%20([\w-]+)%{2}7[Dd])/)
- if slugsInBlock.count > 0
- slugsInBlock.each do |slug|
- targetPage = @site.pages.find {|p| p.data['slug'] == slug[1]}
- if targetPage
- link = @site.baseurl + targetPage.url.sub('.html', '')
- block.sub!(slug[0], link)
- end
- end
- end
- content.sub!(s[0]+s[1], block)
- end
- end
- end
- end
+ def createAlert(alertType, content)
+ sub_string = content.scan(/(>#{alertType})((.|\n[\w\*\[!^<>|#])*)/)
+ if sub_string.count == 0
+ ##puts "no " + alertType + "s"
+ else
+ sub_string.each do |s|
+ block ="" + @converter.convert(s[1].gsub(/(^>)/x, "")) + "
"
+ slugsInBlock = block.scan(/.*?(%7[Bb]%slug%20([\w-]+)%{2}7[Dd])/)
+ if slugsInBlock.count > 0
+ slugsInBlock.each do |slug|
+ targetPage = @site.pages.find {|p| p.data['slug'] == slug[1]}
+ if targetPage
+ link = @site.baseurl + targetPage.url.sub('.html', '')
+ block.sub!(slug[0], link)
+ end
+ end
+ end
+ content.sub!(s[0]+s[1], block)
+ end
+ end
+ end
+ end
end
diff --git a/_plugins/caption_generator.rb b/_plugins/caption_generator.rb
new file mode 100644
index 0000000..3eb6377
--- /dev/null
+++ b/_plugins/caption_generator.rb
@@ -0,0 +1,20 @@
+module Reading
+ class CaptionGenerator < Jekyll::Generator
+ def generate(site)
+ @site = site
+ @converter = site.find_converter_instance(Jekyll::Converters::Markdown)
+ site.pages.each do |p|
+ createCaption(p.content)
+ end
+ end
+
+ def createCaption(content)
+ sub_string = content.scan(/(>caption)(.*)/)
+
+ sub_string.each do |s|
+ block ="" + @converter.convert(s[1]) + "
"
+ content.sub!(s[0]+s[1], block)
+ end
+ end
+ end
+end
diff --git a/_plugins/code_tabstrip_generator.rb b/_plugins/code_tabstrip_generator.rb
index 0bf5c2c..4ad3132 100644
--- a/_plugins/code_tabstrip_generator.rb
+++ b/_plugins/code_tabstrip_generator.rb
@@ -1,5 +1,5 @@
module Reading
- class TabbedCodeGenerator < Jekyll::Generator
+ class RegionCodeTabStripGenerator < Jekyll::Generator
def generate(site)
@headerSearchPattern = /####\s{1,}(__|\*\*)?\[?(VB|VB.NET|C#|XAML|SQL|XML)\]?\s*.*/
@snippetSearchPattern = /####\s{1,}(__|\*\*)?\[?(VB|VB.NET|C#|XAML|SQL|XML)\]?\s*.*\s*(>\n*)*{{region\s.*}}\n*\r*((?!{{endregion}}).*\n*\r*\s*)+?(>?{{endregion}})/ # gets the whole snippet portion - header + region tags + code snippet
@@ -95,7 +95,7 @@ module Reading
languageString = languageString.gsub("__", "")
languageString = languageString.gsub("**", "")
languageString = languageString.gsub("[", "")
- languageString = languageString.gsub("]", "")
+ languageString = languageString.gsub("]", "")
return languageString
end
return ""
diff --git a/_plugins/markdown_processor.rb b/_plugins/markdown_processor.rb
index 3701afc..9f5322e 100644
--- a/_plugins/markdown_processor.rb
+++ b/_plugins/markdown_processor.rb
@@ -8,7 +8,7 @@ module Jekyll
def call()
- doc.css('h1, h2').each do |heading|
+ doc.css('h1, h2, h3').each do |heading|
desc_node = heading.children.first()
if desc_node
diff --git a/_plugins/remove_inheritance_generator.rb b/_plugins/remove_inheritance_generator.rb
new file mode 100644
index 0000000..92628bb
--- /dev/null
+++ b/_plugins/remove_inheritance_generator.rb
@@ -0,0 +1,13 @@
+module Reading
+ class RemoveInheritanceGenerator < Jekyll::Generator
+ def generate(site)
+ if site.config['platform'] == "aspnet-ajax"
+ site.pages.each do |p|
+ if p.data["description"] == "Client-side API Reference"
+ p.content.sub!(/(^#[^:]*).*/, '\1')
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/_plugins/tabbedCode_generator.rb b/_plugins/tabbedCode_generator.rb
new file mode 100644
index 0000000..735aabe
--- /dev/null
+++ b/_plugins/tabbedCode_generator.rb
@@ -0,0 +1,38 @@
+module Reading
+ class TabbedCodeGenerator < Jekyll::Generator
+ def generate(site)
+ @site = site
+ @converter = site.find_converter_instance(Jekyll::Converters::Markdown)
+ site.pages.each do |p|
+ createTabbedCode(p, p.content)
+ end
+ end
+
+ def createTabbedCode(page, content)
+ tab_start = /````\w/
+ tab_end = /````\s{2,}/
+
+ first_index = content.index(tab_start)
+ last_index = first_index && content.index(tab_end, first_index)
+ indexes = []
+
+ while first_index && !indexes.include?(first_index)
+ if last_index.nil?
+ Jekyll.logger.warn "Tabbed Code Error:", "Failed to generate tabbed code in #{page.path}"
+ end
+
+ indexes.push(first_index)
+ block = encode_liquid(content[first_index..last_index + 4])
+ block = @converter.convert(block)
+ content[first_index..last_index + 4] = "" + block + "
"
+
+ first_index = content.index(tab_start, last_index)
+ last_index = first_index && content.index(tab_end, last_index + 4)
+ end
+ end
+
+ def encode_liquid(content)
+ content = content.gsub("{{", "{{ '{{' }}")
+ end
+ end
+end
diff --git a/_plugins/template_generator.rb b/_plugins/template_generator.rb
new file mode 100644
index 0000000..6a54124
--- /dev/null
+++ b/_plugins/template_generator.rb
@@ -0,0 +1,97 @@
+module Reading
+ class TemplateGenerator < Jekyll::Generator
+ priority :highest
+
+ def generate(site)
+ @site = site
+ @converter = site.find_converter_instance(Jekyll::Converters::Markdown)
+ site.pages.each do |p|
+ process_content(p, p.content)
+ end
+ end
+
+ def process_content(page, content)
+ template_regexp = /@\[template[^\]]*\]\(\/([^#]*)#([^\s]*)(\s+"([^"]*)")?\)/
+ template_match = content.match template_regexp
+
+ while template_match
+ begin
+ result = process_template(template_match)
+ content.gsub!(template_match.to_s, result)
+ template_match = content.match template_regexp
+ rescue => error
+ Jekyll.logger.warn "Error:", "Templates processing failed in #{page.path}"
+ raise error
+ end
+ end
+ end
+
+ def process_template(match)
+ file_name = match[1]
+ section_id = match[2].downcase
+ has_arguments = match[3]
+ arguments = match[4]
+
+ unless $template_hash
+ $template_hash = Hash.new
+ end
+
+ unless $template_hash[file_name]
+ read_template_file(file_name)
+ end
+
+ result = $template_hash[file_name][section_id].to_s
+
+ if(has_arguments)
+ arg_plc_start = "@{"
+ arg_plc_end = "}"
+ placeholder_regex = /#{arg_plc_start}([^#{arg_plc_end}]*)#{arg_plc_end}/
+ arguments_hash = generate_arguments_hash(arguments, arg_plc_start, arg_plc_end)
+ return result.gsub(placeholder_regex, arguments_hash).rstrip
+ end
+
+ return result.rstrip
+ end
+
+ def read_template_file(file_name)
+ $template_hash[file_name] = Hash.new
+ start_regex = /#+([^#]*)/
+ end_regex = /#+end/i
+
+ lines = File.readlines(file_name, :encoding => 'UTF-8')
+ start_recording = false
+ id = ""
+
+ lines.each do |line|
+ start_match = start_regex.match(line)
+ end_match = end_regex.match(line)
+
+ if(end_match and start_recording)
+ start_recording = false
+ id = ""
+ end
+
+ if(start_recording)
+ $template_hash[file_name][id] = $template_hash[file_name][id].to_s << line
+ end
+
+ if(start_match and !start_recording and !end_match)
+ start_recording = true
+ id = start_match[1].strip.downcase
+ $template_hash[file_name][id] = ""
+ end
+ end
+ end
+
+ def generate_arguments_hash(arguments, plc_start, plc_end)
+ args_array = arguments.split(",").collect{|x| x.strip.split(":").collect{|value| value.strip}}
+ hash_args = Hash.new
+ Hash[args_array].each {|key, value|
+ hash_key = "#{plc_start}#{key}#{plc_end}"
+ hash_args[hash_key] = value
+ }
+
+ return hash_args
+ end
+ end
+end
diff --git a/build-docs.sh b/build-docs.sh
index c4c50b9..c0af503 100644
--- a/build-docs.sh
+++ b/build-docs.sh
@@ -16,6 +16,6 @@ if [ ! -z "$2" ]
fi
rm -rf _site/ .sass-cache .jekyll-cache .asset-cache
-docker pull tmitev/docs-seed:site
-docker build -t tmitev/docs-seed:site .
-docker run --rm --env CONFIG_FILE=$config_file --env JEKYLL_COMMAND=build --env JEKYLL_EXTRA=$debug_params -t -v "/$(pwd):/app_root" -t tmitev/docs-seed:site
+docker pull progressdocs/docs-seed:site
+docker build -t progressdocs/docs-seed:site .
+docker run --rm --env CONFIG_FILE=$config_file --env JEKYLL_COMMAND=build --env JEKYLL_EXTRA=$debug_params -t -v "/$(pwd):/app_root" -t progressdocs/docs-seed:site
diff --git a/start-docs.sh b/start-docs.sh
index 59e6235..25b7198 100644
--- a/start-docs.sh
+++ b/start-docs.sh
@@ -9,6 +9,6 @@ fi
echo "Using configuration from: $config_file"
rm -rf _site/ .sass-cache .jekyll-cache .asset-cache
-docker pull tmitev/docs-seed:site
-docker build -t tmitev/docs-seed:site .
-docker run --rm -it --env CONFIG_FILE=$config_file --env JEKYLL_COMMAND="serve" --env JEKYLL_EXTRA="--watch --incremental --host 0.0.0.0" --name docs_site -t -i -v /$(pwd):/app_root -p 4000:4000 -t tmitev/docs-seed:site
+docker pull progressdocs/docs-seed:site
+docker build -t progressdocs/docs-seed:site .
+docker run --rm -it --env CONFIG_FILE=$config_file --env JEKYLL_COMMAND="serve" --env JEKYLL_EXTRA="--watch --incremental --host 0.0.0.0" --name docs_site -t -i -v /$(pwd):/app_root -p 4000:4000 -t progressdocs/docs-seed:site