Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions docs/website/assets/css/extended/cn1-javadoc-embed.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
.post-single--api-javadoc {
max-width: min(1700px, 98vw);
}

.post-single--api-javadoc .post-description {
margin-top: 0.35rem;
}

.post-single--api-javadoc .post-meta {
display: flex;
align-items: center;
gap: 0.55rem;
margin-top: 0.7rem;
font-size: 0.95rem;
}

.cn1-api-javadoc-frame-wrap {
margin-top: 1.1rem;
border: 1px solid var(--border);
border-radius: 12px;
overflow: hidden;
background: var(--entry);
}

.cn1-api-javadoc-frame {
display: block;
width: 100%;
height: min(76vh, 1200px);
border: 0;
background: #fff;
}

@media (max-width: 900px) {
.cn1-api-javadoc-frame {
height: 72vh;
}
}
20 changes: 5 additions & 15 deletions docs/website/content/api.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
---
title: "API"
date: 2015-03-03
slug: "api"
slug: "javadoc"
layout: "api-javadoc"
description: "Codename One JavaDoc embedded in the Codename One website."
aliases:
- /api/
---

# The Codename One API

1. [Home](/)
2. Developers
3. API

The Codename One Open Source API is a vast abstraction of mobile device platforms providing rich portable functionality. It leverages the highest feature set within devices (nicknamed: highest common denominator) to provide functionality smartphone owners are accustomed to.

The API is mature and operator tested on a global scale, yet it is still rapidly evolving to meet the changing demands of the global market. You can browse the [javadoc API here](/javadoc/index.html), to get a sense of its depth and breadth.

The API includes tremendous amount of functionality including rich and infinitely customizable UI components, as well as all device features from calls to camera, GPS etc.

No API can cover all the bases all the time, which is why we provide native interfaces that allow you to embed any arbitrary operating system component or code right in the middle of any Codename One application. You can write native code in the platform specific language (Dalvik-Java for Android, Objective C for iOS etc.) and use that code to create a platform specific widget that can be embedded right into the Codename One component hierarchy without interfering with application flow.
25 changes: 25 additions & 0 deletions docs/website/layouts/_default/api-javadoc.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{- define "main" -}}
<article class="post-single post-single--api-javadoc">
<header class="post-header">
{{ partial "breadcrumbs.html" . }}
<h1 class="post-title entry-hint-parent">{{ .Title }}</h1>
<div class="post-description">
Browse the Codename One JavaDoc with the standard website navigation and theme.
</div>
<div class="post-meta">
<a href="/javadoc/_index-raw.html">Open raw JavaDoc</a>
<span>&middot;</span>
<a href="/files/javadocs.zip">Download ZIP</a>
</div>
</header>

<div class="cn1-api-javadoc-frame-wrap">
<iframe
class="cn1-api-javadoc-frame"
src="/javadoc/_index-raw.html"
title="Codename One JavaDoc"
loading="lazy">
</iframe>
</div>
</article>
{{- end -}}
5 changes: 5 additions & 0 deletions scripts/website/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ build_javadocs_for_site() {
mkdir -p "${WEBSITE_DIR}/static/javadoc" "${WEBSITE_DIR}/static/files"
cp -a "${REPO_ROOT}/CodenameOne/dist/javadoc/." "${WEBSITE_DIR}/static/javadoc/"
cp "${REPO_ROOT}/CodenameOne/javadocs.zip" "${WEBSITE_DIR}/static/files/javadocs.zip"
# Keep raw javadocs intact and reserve /javadoc/ for the Hugo themed wrapper page.
# The wrapper embeds /javadoc/_index-raw.html.
if [ -f "${WEBSITE_DIR}/static/javadoc/index.html" ]; then
mv "${WEBSITE_DIR}/static/javadoc/index.html" "${WEBSITE_DIR}/static/javadoc/_index-raw.html"
fi
}

build_developer_guide_for_site() {
Expand Down