mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2026-01-07 02:51:11 +00:00
This change adds a new "Related Courseware" section in the side container; this section lists links to courses and talks that are relevant to the current project page. Relevant content is fetched by the browser, with an AJAX request sent to the Pivotal Education LMS API. This API uses the Referrer HTTP header as input parameter to its content selection algorithm. Note that CORS HTTP headers are also used to allow/disallow AJAX cross domain requests.
152 lines
4.9 KiB
HTML
152 lines
4.9 KiB
HTML
<script type="text/html" id="project-documentation-widget-template">
|
|
<div class="right-pane-widget--container no-top-border project-documentation--container">
|
|
<div class="item-dropdown-widget">
|
|
<div class="item-dropdown--title">{@= name @}</div>
|
|
<div class="item--dropdown">
|
|
<div class="item--body">
|
|
<div class="item--body-title">
|
|
<div class="item--left-column">Release</div>
|
|
<div class="item--right-column">Documentation</div>
|
|
</div>
|
|
{@ _.each(releases, function(release) { @}
|
|
<div class="item--body--version">
|
|
<div class="item--left-column">
|
|
<p>{@= release.versionDisplayName @}</p>
|
|
{@ if(release.current) { @}
|
|
<div class="spring-icon spring-icon-current-version"></div>
|
|
{@ } @}
|
|
<div class="spring-icon {@= release.statusIconClass() @}"></div>
|
|
</div>
|
|
<div class="item--right-column">
|
|
<a href='{@= release.refDocUrl @}' class="docs-link reference-link">Reference</a>
|
|
<a href='{@= release.apiDocUrl @}' class="docs-link api-link">API</a>
|
|
</div>
|
|
</div>
|
|
{@ }); @}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</script>
|
|
|
|
<script type="text/html" id="project-courses-widget-template">
|
|
<h2>Related Courseware</h2>
|
|
{@ if(hasCourses) { @}
|
|
<h3 id="education">Pivotal Education</h3>
|
|
<ul>
|
|
{@ _.each(courses, function(course) { @}
|
|
<li><a href="{@= course.url @}">{@= course.name @}</a></li>
|
|
{@ }); @}
|
|
</ul>
|
|
{@ } @}
|
|
{@ if(hasTalks) { @}
|
|
<h3 id="talks">Engineering Talks</h3>
|
|
<ul>
|
|
{@ _.each(talks, function(talk) { @}
|
|
<li><a href="{@= talk.url @}">{@= talk.name @}</a></li>
|
|
{@ }); @}
|
|
</ul>
|
|
{@ } @}
|
|
</script>
|
|
|
|
<script type="text/html" id="project-download-widget-controls-template">
|
|
<div class="js-download-widget-selector">
|
|
<select class='selector selectpicker'>
|
|
{@ _.each(releases, function(release, index) { @}
|
|
<option value="{@= index @}"
|
|
data-content="
|
|
<span>{@= release.versionDisplayName @}</span>
|
|
{@ if(release.current) { @}
|
|
<div class='spring-icon spring-icon-current-version'></div>
|
|
{@ } @}
|
|
<div class='spring-icon {@= release.statusIconClass() @}'/>"
|
|
data-current="{@= release.current @}">
|
|
()
|
|
</option>
|
|
{@ }); @}
|
|
</select>
|
|
</div>
|
|
|
|
<div class="item-slider-widget js-item-slider--wrapper">
|
|
<div class="item-slider--container">
|
|
<div class="item--slider js-item--slider"></div>
|
|
<div class="item js-active js-item" data-snippet-type='maven'>
|
|
Maven
|
|
</div>
|
|
<div class="item js-item" data-snippet-type='gradle'>
|
|
Gradle
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</script>
|
|
|
|
|
|
{% if site.custom_pom_template %}
|
|
{% capture maven_pom_template %}
|
|
{% include pom.xml %}
|
|
{% endcapture %}
|
|
{% else %}
|
|
{% capture maven_pom_template %}
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>{@= groupId @}</groupId>
|
|
<artifactId>{@= artifactId @}</artifactId>
|
|
<version>{@= version @}</version>
|
|
</dependency>
|
|
</dependencies>
|
|
{% endcapture %}
|
|
{% endif %}
|
|
|
|
<script type="text/html" id="project-download-maven-widget-template">
|
|
{% highlight xml %}
|
|
{{ maven_pom_template }}
|
|
{% endhighlight %}
|
|
</script>
|
|
|
|
<script type="text/html" id="project-repository-maven-widget-template">
|
|
{% highlight xml %}
|
|
<repositories>
|
|
<repository>
|
|
<id>{@= repository.id @}</id>
|
|
<name>{@= repository.name @}</name>
|
|
<url>{@= repository.url @}</url>
|
|
<snapshots>
|
|
<enabled>{@= repository.snapshotsEnabled @}</enabled>
|
|
</snapshots>
|
|
</repository>
|
|
</repositories>
|
|
{% endhighlight %}
|
|
</script>
|
|
|
|
{% if site.custom_gradle_template %}
|
|
{% capture gradle_template %}
|
|
{% include build.gradle %}
|
|
{% endcapture %}
|
|
{% else %}
|
|
{% capture gradle_template %}
|
|
dependencies {
|
|
compile '{@= groupId @}:{@= artifactId @}:{@= version @}'
|
|
}
|
|
{% endcapture %}
|
|
{% endif %}
|
|
|
|
<script type="text/html" id="project-download-gradle-widget-template">
|
|
{% highlight groovy %}
|
|
{{ gradle_template }}
|
|
{% endhighlight %}
|
|
</script>
|
|
|
|
<script type="text/html" id="project-repository-gradle-widget-template">
|
|
{% highlight groovy %}
|
|
repositories {
|
|
maven {
|
|
url '{@= repository.url @}'
|
|
}
|
|
}
|
|
{% endhighlight %}
|
|
</script>
|
|
|
|
<script type="text/html" id="project-download-zip-widget-template">
|
|
This is a zip url
|
|
</script>
|