This commit is contained in:
koke228666 2025-06-29 16:13:09 +03:00 committed by GitHub
commit b21f15d5d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 1074 additions and 2 deletions

View file

@ -0,0 +1,72 @@
<?php
declare(strict_types=1);
namespace openvk\Web\Presenters;
use Chandler\Session\Session;
use Parsedown;
final class DevelopersPresenter extends OpenVKPresenter
{
public function renderMain(): void
{
$this->template->_template = "Developers/Main.xml";
$this->template->responseTime = round((microtime(true) - $_SERVER['REQUEST_TIME_FLOAT']) * 1000, 2);
}
public function renderStandalone(): void
{
$this->template->_template = "Developers/Standalone.xml";
}
public function noPage(): void
{
$this->template->_template = "Developers/NoPage.xml";
}
public function parseMarkdown(string $path)
{
if (!file_exists("$path")) {
$this->noPage();
return [];
}
$dataArray = array();
$lines = file($path);
if (!preg_match("%^OpenVK-KB-Heading: (.+)$%", $lines[0], $matches)) {
$heading = "Article $name";
} else {
$heading = $matches[1];
array_shift($lines);
}
$content = implode($lines);
$parser = new Parsedown();
$dataArray['heading'] = $heading;
$dataArray['content'] = $parser->text($content);
return $dataArray;
}
public function renderDevelopersBaseArticle(string $name): void
{
$lang = Session::i()->get("lang", "ru");
$base = OPENVK_ROOT . "/data/developers";
if (file_exists("$base/$name.$lang.md")) {
$file = "$base/$name.$lang.md";
} elseif (file_exists("$base/$name.md")) {
$file = "$base/$name.md";
} else {
$this->noPage();
return;
}
$parsedMd = $this->parseMarkdown($file);
$this->template->articlename = $name;
$this->template->heading = $parsedMd['heading'];
$this->template->content = $parsedMd['content'];
}
}

View file

@ -365,7 +365,7 @@
<a href="/terms" class="link">{_footer_rules}</a>
<a href="/blog" class="link">{_footer_blog}</a>
<a href="/support" class="link">{_footer_help}</a>
<a href="/dev" target="_blank" class="link">{_footer_developers}</a>
<a href="/dev" class="link">{_footer_developers}</a>
<a href="/privacy" class="link">{_footer_privacy}</a>
</div>
<p>

View file

@ -0,0 +1,57 @@
{extends "../@layout.xml"}
{block title}
{_developers_title}
{/block}
{block header}
{_developers_title}
{/block}
{block content}
{css "css/dev.css"}
<div class="knowledgeBaseArticle">{$content|noescape}</div>
<div id="dev_sidebar" class="dev_sidebar fl_r">
<div id="dev_mlist_cont">
<div id="dev_page_narrow">
<a
href="/dev/main"
class="dev_section_menu {if $articlename === 'main'} dev_mlist_sel{/if}"
>Документация</a>
<a
href="/dev/native"
class="dev_section_submenu {if $articlename === 'native'} dev_mlist_sel{/if}"
>Приложения и игры</a>
<a
href="/dev/standalone"
class="dev_section_submenu"
>Standalone/Mobile</a>
<a
href="/dev/sites"
class="dev_section_submenu {if $articlename === 'sites'} dev_mlist_sel{/if}"
>Сайты и виджеты</a>
<a
href="/dev/methods"
class="dev_section_menu {if $articlename === 'methods'} dev_mlist_sel{/if}"
>Список методов</a>
<a
href="/dev/datatypes"
class="dev_section_submenu {if $articlename === 'datatypes'} dev_mlist_sel{/if}"
>Типы данных</a>
<a
href="/dev/help"
class="dev_section_menu {if $articlename === 'help'} dev_mlist_sel{/if}"
>Поддержка</a>
<a
href="/dev/rules"
class="dev_section_submenu {if $articlename === 'rules'} dev_mlist_sel{/if}"
>Правила платформы</a>
</div>
</div>
</div>
{/block}

View file

@ -0,0 +1,92 @@
{extends "../@layout.xml"}
{block title}
{_developers_title}
{/block}
{block header}
{_developers_title}
{/block}
{block content}
{css "css/dev.css"}
<div class="dev_head">
<div class="dev_main_header">Разработка приложений</div>
<div class="dev_main_narrow">
<a
class="button"
href="/editapp?act=create"
>&nbsp;&nbsp;Создать приложение&nbsp;&nbsp;</a>
<br>
<br>
<a href="/apps?act=dev">Список моих приложений »</a>
</div>
<div class="dev_main_desc">
<b>оупэн В контакте</b> самый быстрорастущий сайт европейского интернета. Его аудитория удваивается каждые несколько месяцев, и сейчас на оупэн В контакте приходится более половины русскоязычного трафика. Если Вы хотите заниматься разработкой приложений в интернете, Вы можете приобщиться к этому успеху и получить доступ к аудитории свыше
<b>25000 (!!!)</b> пользователей.
</div>
</div>
<div class="dev_cont">
<div class="dev_main_sections">
<a href="/dev/native" class="dev_sect dev_sect_games">
<div class="dev_sect_icon"></div>
Игры и приложения ВКонтакте
</a>
<a href="/dev/standalone" class="dev_sect dev_sect_standalone">
<div class="dev_sect_icon"></div>
Mobile/Standalone приложения
</a>
<a href="/dev/sites" class="dev_sect dev_sect_widgets">
<div class="dev_sect_icon"></div>
Авторизация и виджеты для сайтов
</a>
</div>
<div class="dev_parts_list fl_l">
<a href="/dev/main" class="dev_part">
<div class="dev_part_name">Документация платформы</div>
<div class="dev_part_desc">Описание возможностей платформы ВКонтакте: процедура авторизации приложения, серверные и клиентские методы API, создание приложений и подключение сайтов.</div>
</a>
<a href="/dev/help" class="dev_part">
<div class="dev_part_name">Поддержка</div>
<div class="dev_part_desc">Разрешение вопросов, связанных с платформой: инструменты для связи со службой поддержки, попадание в каталог приложений, статус работы платформы.</div>
</a>
<a href="/dev/rules" class="dev_part">
<div class="dev_part_name">Правила платформы</div>
<div class="dev_part_desc">Правила публикации приложений на площадке ВКонтакте, размещение рекламы в приложениях, прием платежей от пользователей.</div>
</a>
<a href="/bagosi" class="dev_part">
<div class="dev_part_name">Баг-трекер</div>
<div class="dev_part_desc">Инструмент для информирования разработчиков о проблемах в API и документации платформы.</div>
</a>
</div>
<div class="dev_right_col fl_l">
<a class="dev_part dev_platform_info" href="/dev/health">
<div class="dev_info_header">Статус платформы</div>
Время ответа — <span class="dev_api_status_good">{$responseTime} ms</span><br>
Uptime — <span class="dev_api_status_good">целестора сделай%</span><br>
</a>
<div class="dev_last_news">
<div class="dev_info_header">Последние новости</div>
<div class="dev_main_widget_cont">
<ul class="notes_titles">
<li class="written">
<a href="/note1_1">
seks
</a>
<small>
только что
<span class="divide">|</span>
<a href="/note1_1">Комментарии</a>
</small>
</li>
</ul>
</div>
</div>
</div>
</div>
{/block}

View file

@ -0,0 +1,61 @@
{extends "../@layout.xml"}
{block title}
{_developers_nopage}
{/block}
{block header}
{_developers_nopage}
{/block}
{block content}
{css "css/dev.css"}
<div class="knowledgeBaseArticle" style="float: left">
<p>братишка ты что-то попутал</p>
</div>
<!-- я сделал так, чтобы можно было сделать норм 404 для девелоперов, типа рекомендуемые функции -->
<!-- или ВЫ ОШИБЛИСЬ, А МОЖЕТ ВЫ ХОТЕЛИ НАПИСАТЬ ...? ну вы поняли я надеюсь -->
<div id="dev_sidebar" class="dev_sidebar fl_r">
<div id="dev_mlist_cont">
<div id="dev_page_narrow">
<a
href="/dev/main"
class="dev_section_menu"
>Документация</a>
<a
href="/dev/native"
class="dev_section_submenu"
>Приложения и игры</a>
<a
href="/dev/standalone"
class="dev_section_submenu"
>Standalone/Mobile</a>
<a
href="/dev/sites"
class="dev_section_submenu"
>Сайты и виджеты</a>
<a
href="/dev/methods"
class="dev_section_menu"
>Список методов</a>
<a
href="/dev/datatypes"
class="dev_section_submenu"
>Типы данных</a>
<a
href="/dev/help"
class="dev_section_menu"
>Поддержка</a>
<a
href="/dev/rules"
class="dev_section_submenu"
>Правила платформы</a>
</div>
</div>
</div>
{/block}

View file

@ -0,0 +1,144 @@
{extends "../@layout.xml"}
{block title}
{_developers_title}
{/block}
{block header}
{_developers_title}
{/block}
{block content}
{css "css/dev.css"}
{script "js/al_dev.js"}
<div style="margin-left: 0px; width: 141.321px;" id="dev_steps_s">
<div class="borders">
<div class="content" style="margin-left: -2px;">
<div class="dev_step first">
<div>
<b>Developers</b><br>Where to start
</div>
</div>
<div class="dev_step">
<div>
<b>Documentation</b><br>VK API
</div>
</div>
<div class="dev_step last">
<div>
<b>Integration Examples</b><br>Consider the platform advantages
</div>
</div>
</div>
</div>
</div>
<div id="dev_steps">
<div class="dev_step first current" id="dev_step1" onclick="return dev_step(1);">
<div>
<b>Developers</b><br>Where to start
</div>
</div>
<div class="dev_step" id="dev_step2" onclick="return dev_step(2)">
<div>
<b>Documentation</b><br>VK API
</div>
</div>
<div class="dev_step last" id="dev_step3" onclick="return dev_step(3)">
<div>
<b>Integration Examples</b><br>Consider the platform advantages
</div>
</div>
</div>
<div class="dev_steps_c" id="dev_steps_c" style="height: 460px;">
<div class="content" style="margin-left: 0px;">
<div class="step" id="dev_step1_c" style="height: auto; position: static; left: auto;">
<div class="borders">
<div class="introPage">
<a href="/developers.php?id=-1_27971896&amp;s=1" class="info first apps"><span class="header">VK Flash/IFrame Applications</span>
Interactive appliation use <b>VK API</b> to deeply integrate with the site. You can use VK servers as well as any number of your own servers.
<span class="more">More »</span>
</a>
<a href="/developers.php?id=-1_37230422&amp;s=1" class="info mobile"><span class="header">Standalone/Mobile Applications</span>
These are launched in the same way as a regular program on a user's device, be it a desktop computer or a smartphone. All algorithms available to applications on the <b>VK API</b> platform work for desktop applications too.
<span class="more">More »</span>
</a>
<a href="/developers.php?id=-1_27987570&amp;s=1" class="info sites"><span class="header">Widgets and External Sites</span>
VK's lineup of <b>widgets</b> for external sites allows you to add a social aspect to your project. Also a deeper integration via <b>Open API</b> or <b>OAuth 2.0.</b> is available.
<span class="more">More »</span>
</a>
<a href="/developers.php?id=-1_12904887&s=1" class="info shops"><span class="header">Stores</span>
With the help of <b>Merchant API</b> you can connect your internet store or a VK API application to VK&#39;s payment system and gain full access to millions of potential customers.
<span class="more">More »</span>
</a>
</div>
</div>
</div>
<div class="step" id="dev_step2_c" style="position: static; left: auto; height: auto;">
<div class="borders">
<div class="introPage">
<!--4-->
<a name="Connect"></a>
<div class="wk_header">Connect</div>
<ul class="listing">
<li><span><a href="developers.php?oid=-17680044&amp;p=VK_Applications">VK Applications</a> Where to start creating Flash and IFrame applications </span></li>
<li><span><a href="developers.php?oid=-17680044&amp;p=Flash_Applications">Flash Applications</a> Interaction with API from Flash applications </span></li>
<li><span><a href="developers.php?oid=-17680044&amp;p=Using_the_Flash_Wrapper">Flash Applications with Wrapper</a> Interaction with API using the Flash wrapper </span></li>
<li><span><a href="developers.php?oid=-17680044&amp;p=IFrame_Applications">IFrame Applications</a> Interaction with API from IFrame applications </span></li>
<li><span><a href="developers.php?oid=-17680044&amp;p=Application_Interaction_with_API">Application Interaction with API</a> Calling API from an application or from an external server </span></li>
<li><span><a href="developers.php?oid=-17680044&amp;p=Authorization">Authorization</a> Authorization from Desktop and Mobile applications </span></li>
</ul>
<br>
<a name="VK API"></a>
<div class="wk_header">VK API</div>
<ul class="listing">
<li><span><a href="developers.php?oid=-17680044&amp;p=API_Method_Description">API Method Description</a> Standard API methods </span></li>
<li><span><a href="developers.php?oid=-17680044&amp;p=Advanced_API_Methods">Advanced API Methods</a> Methods for Desktop/Mobile applications </span></li>
<li><span><a href="developers.php?oid=-17680044&amp;p=Storing_Data_on_VK_Servers">Storing Data on VK Servers</a> </span></li>
<li><span><a href="developers.php?oid=-17680044&amp;p=Uploading_Files_to_the_VK_Server_Procedure">Uploading Files to the VK Server Procedure</a> </span></li>
<li><span><a href="developers.php?oid=-17680044&amp;p=Application_Localization">Application Localization</a> </span></li>
<li><span><a href="developers.php?oid=-17680044&amp;p=Ads_API">Ads API</a> <sup><b>beta</b></sup> methods for working with advertising accounts. </span></li>
</ul>
<br>
<a name="JS API"></a>
<div class="wk_header">JS API</div>
<ul class="listing">
<li><span><a href="developers.php?oid=-17680044&amp;p=IFrame_Applications">IFrame Applications</a> Calling JS API methods from IFrame applications </span></li>
<li><span><a href="developers.php?oid=-17680044&amp;p=Flash_Applications">Flash Applications</a> Calling JS API methods from Flash applications </span></li>
<li><span><a href="developers.php?oid=-17680044&amp;p=Using_the_Flash_Wrapper">Using the Flash Wrapper</a> Calling JS API methods from Flash applications using a wrapper </span></li>
</ul>
<br>
<a name="For Websites"></a>
<div class="wk_header">For Websites</div>
<ul class="listing">
<li><span><a href="developers.php?oid=-17680044&amp;p=Comments">Comments</a> Embed a universal comments block to an external website </span></li>
<li><span><a href="developers.php?oid=-17680044&amp;p=Groups">Groups</a> Embed a community block on an external website </span></li>
<li><span><a href="developers.php?oid=-17680044&amp;p=Like">Like</a> Let users "like" items on your site and share links with friends </span></li>
<li><span><a href="developers.php?oid=-17680044&amp;p=Poll">Polls</a> Poll your visitors and and let them pass the poll on to their friends </span></li>
<li><span><a href="developers.php?oid=-17680044&amp;p=Auth">Auth</a> Hassle-free authorization on your site </span></li>
<li><span><a href="developers.php?oid=-17680044&amp;p=Share">Share button</a> Let users quickly share links to your items </span></li>
<li><span><a href="developers.php?oid=-17680044&amp;p=Open_API">Open API</a> Use VK API on external websites </span></li>
</ul>
<br>
<a name="For Online Stores"></a>
<div class="wk_header">For Online Stores</div>
<ul class="listing">
<li><span><a href="developers.php?oid=-17680044&amp;p=Merchant_API">Merchant API</a> connect applications and external internet stores to the VK payment system </span></li>
</ul>
<!--ru:2438534-->
</div>
</div>
</div>
<div class="step" id="dev_step3_c" style="height: auto; position: static; left: auto;">
<div class="borders">
<div class="introPage">
<!--4--><b>VK</b> is the fastest growing site in Europe. Its audience is doubled every few months and now VK controls more than half of the traffic in Russian-speaking countries. If you would like to develop applications on the internet, you can become part of this success and gain access to an audience of more than <b>100 million</b> users. <br><br>
It is not uncommon for an <a class="wk_vk_link" href="/apps">an application</a> created within a month to be visited by millions of people daily. Every month the most popular applications bring their creators millions of dollars. If you want to become one of them, we will give you the tools for distributing and promoting applications and also will fully take on all <b>payment</b> matters, <b>traffic</b> costs and the translation of your application into <b>all languages spoken in the world</b>. <br><br>
<a href="developers.php?oid=-17680044&amp;p=Flash_Applications">VK API</a> is the most advanced platform for Flash and iFrame applications on the worldwide web. We provide a massive field for your applications (up to <b>827x4050</b> pixels), access to the left user menu, counters, on-site and <b>SMS</b> notifications, profile, photos, friends, rating and audio files of users, and much more. <br><br>
<a class="wk_vk_link" href="/apps">Applications Catalog</a> <br>
</div>
</div>
</div>
</div>
</div>
{/block}

View file

@ -57,3 +57,4 @@ services:
- openvk\Web\Models\Repositories\Faves
- openvk\Web\Presenters\MaintenancePresenter
- openvk\Web\Presenters\NoSpamPresenter
- openvk\Web\Presenters\DevelopersPresenter

View file

@ -408,7 +408,15 @@ routes:
- url: "/humans.txt"
handler: "About->humansTxt"
- url: "/dev"
handler: "About->dev"
handler: "Developers->Main"
- url: "/dev/"
handler: "Developers->Main"
- url: "/dev/standalone"
handler: "Developers->Standalone"
- url: "/developers.php"
handler: "Developers->Standalone"
- url: "/dev/{text}"
handler: "Developers->DevelopersBaseArticle"
- url: "/iapi/getPhotosFromPost/{num}_{num}"
handler: "InternalAPI->getPhotosFromPost"
- url: "/iapi/getPostTemplate/{num}_{num}"

416
Web/static/css/dev.css Normal file
View file

@ -0,0 +1,416 @@
.fl_r {
float: right;
}
.fl_l {
float: left;
}
.dev_parts_list {
width: 378px;
padding: 0;
}
.dev_part {
display: block;
padding: 15px 20px;
}
.dev_part:hover {
text-decoration: none;
background: #F7F7F7;
}
.dev_part_name {
display: block;
padding-bottom: 8px;
color: #4d7199;
font-weight: bold;
font-size: 1.2em;
}
.dev_part_desc {
color: #808080;
}
.dev_platform_info {
margin-top: 20px;
width: 200px;
padding: 15px 16px;
}
.dev_info_header {
display: block;
color: #4d7199;
font-weight: bold;
font-size: 1.2em;
border-bottom: 1px solid #DAE2E8;
margin-bottom: 8px;
}
.dev_api_status_good {
color: #038A07;
font-weight: bold;
}
.dev_api_status_bad {
color: #8A0307;
font-weight: bold;
}
.dev_last_news {
padding: 14px 16px 20px 16px;
width: 200px;
}
.dev_main_widget_cont {
height: 242px;
overflow: hidden;
}
.dev_head {
padding: 20px 10px 80px 40px;
background: #edf1f5;
-webkit-box-shadow: inset 0 -4px 2px -2px rgba(0,0,0,0.03);
-moz-box-shadow: inset 0 -4px 2px -2px rgba(0,0,0,0.03);
box-shadow: inset 0 -4px 2px -2px rgba(0,0,0,0.03);
margin: -10px -7px 0px -10px;
}
.dev_main_header {
color: #5c7b9b;
font-weight: bold;
font-size: 1.3em;
}
.dev_main_desc {
margin-top: 15px;
line-height: 160%;
max-width: 400px
}
.dev_main_narrow {
float: right;
width: 180px;
height: 100px;
padding: 35px 38px 0px 38px;
text-align: center;
}
.dev_sect {
display: block;
width: 168px;
height: 142px;
padding: 10px;
background: #f7f9fb;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
position: absolute;
-webkit-box-shadow: 0px 1px 5px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0px 1px 5px rgba(0, 0, 0, 0.2);
box-shadow: 0px 1px 5px rgba(0, 0, 0, 0.2);
color: #5c7b9b;
text-align: center;
font-weight: bold;
font-size: 1.2em;
line-height: 160%;
-webkit-transition: all 200ms ease-out;
-moz-transition: all 200ms ease-out;
-o-transition: all 200ms ease-out;
transition: all 200ms ease-out;
}
.dev_sect:hover {
text-decoration: none;
background: #fafafc;
margin-top: -8px;
-webkit-box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.15);
-moz-box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.15);
box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.15);
}
.dev_main_sections {
padding-top: 20px;
padding-bottom: 25px;
height: 150px;
}
.dev_sect_games {
}
.dev_sect_standalone {
margin-left: 209px;
}
.dev_sect_widgets {
margin-left: 419px;
}
.dev_sect_icon {
width: 95px;
height: 83px;
margin: 8px 35px 10px;
background: url('/assets/packages/static/openvk/img/dev/dev_icons.png') no-repeat;
}
.dev_sect_standalone .dev_sect_icon {
background-position: 0px -82px;
}
.dev_sect_widgets .dev_sect_icon {
background-position: 0px -163px;
}
#dev_steps_s .content {
padding: 0;
}
.dev_cont {
margin-top: -70px;
}
#dev_steps {
height: 48px;
background-color: #F7F7F7;
border-color: #DAE2E8;
border-style: solid;
border-width: 1px 0;
width: 520px;
}
#dev_steps_s {
border: 1px solid #3B6798;
margin-left: 152px;
margin-top: -1px;
padding-right: 2px;
width: 141px;
position: absolute;
color: #ffffff;
text-shadow: 0 1px 1px #35587E;
}
#dev_steps_s .dev_step,
#dev_steps_s .dev_step.first {
border: none;
}
#dev_steps_s .borders {
background-color: #6D8FB3;
border-color: #7E9CBC #5C82AB #5C82AB;
border-right: 1px solid #5C82AB;
border-style: solid;
border-width: 1px;
height: 48px;
overflow: hidden;
position: relative;
width: 100%;
}
#dev_steps_s .content {
padding: 0;
}
#dev_steps .dev_step {
border-left: 1px solid #FFFFFF;
cursor: pointer;
float: left;
}
#dev_steps .dev_step.first,
#dev_steps .dev_step.first div {
border-color: #F7F7F7;
}
.dev_step div {
float: left;
height: 41px;
padding: 7px 0 0 22px;
width: 120px;
font-size: 10px;
}
#dev_steps .dev_step div {
border-left: 1px solid #EAEAEA;
padding: 7px 0 0 20px;
}
.dev_step div b {
font-size: 11px;
line-height: 18px;
}
.dev_step.last div {
width: 200px;
}
.dev_steps_c {
width: 600px;
margin-top: 10px;
overflow: hidden;
border: 1px solid #FFFFFF;
}
.content {
width: 2000px;
}
.step {
width: 587px;
margin-right: 13px;
height: 500px;
float: left;
}
.introPage .info {
display: block;
border-bottom: 1px solid #d9d9d9;
padding: 15px 0px 20px 70px;
height: 80px;
color: #333333;
}
.introPage .info:focus {
outline: none;
}
.introPage .info.first {
padding: 0px 0px 20px 70px;
}
.introPage .info:hover {
text-decoration: none;
}
.introPage .info .header {
display: block;
font-weight: bold;
margin-bottom: 3px;
color: #2B587A;
}
.introPage .info .more {
display: block;
margin-top: 6px;
color: #2B587A;
}
.introPage .info.apps {
background: url('/assets/packages/static/openvk/img/dev/dev_apps.png') 0px 6px no-repeat;
}
.introPage .info.sites {
background: url('/assets/packages/static/openvk/img/dev/dev_sites.png') 0px 21px no-repeat;
}
.introPage .info.mobile {
background: url('/assets/packages/static/openvk/img/dev/dev_mobile.png') 0px 21px no-repeat;
}
.introPage .info.shops {
background: url('/assets/packages/static/openvk/img/dev/dev_shops.png') 0px 21px no-repeat;
border-bottom: none;
}
.wk_header,
.dev_page_cont .wk_header {
border-bottom: none;
font-size: 1.2em;
}
.introPage .listing {
padding-left: 14px;
}
.listing span {
font-size: 11px;
font-weight: normal;
}
.listing span.bold {
font-weight: bold;
}
h3 {
border-bottom: 1px solid #B9C4DA;
font-size: 12px;
color: #45688E;
margin-bottom: 0px;
font-weight: bold;
padding-bottom: 2px;
}
.dev_sidebar {
margin: 5px 5px 5px 5px;
background: #F0F2F4;
width: 156px;
padding: 0px 10px 10px 10px;
}
.dev_section_menu, .dev_section_submenu {
display: block;
padding: 4px 8px 5px 8px;
overflow: hidden;
text-overflow: ellipsis;
}
.dev_section_menu {
margin-top: 10px;
font-weight: bold;
}
.dev_section_menu:hover, .dev_section_submenu:hover {
text-decoration: none;
background: #E0E5E9;
}
.dev_section_submenu {
padding-left: 20px;
}
.dev_mlist_sel {
background: #5e82a8;
color: #FFFFFF;
}
.dev_mlist_sel:hover {
background: #5e82a8;
}
.knowledgeBaseArticle {
float: left;
width: 424px;
max-width: 424px;
}
.knowledgeBaseArticle img {
max-width: 424px;
}
pre {
padding: 10px;
border-left: 9px solid #C9D8DF;
border-bottom: 2px solid #EBEFF2;
background-color: #F5F7F8;
margin: 10px 0px 0px 0px;
}
h1 {
margin: 0px;
padding: 0px;
font-size: 14px; }
h1 a { color: white; text-decoration: none; }
h1 a:hover { color: white; text-decoration: underline; }
h1 em { font-style: normal; border-bottom: solid 1px #DAE1E8; }
h2 {
font-size: 11px;
margin: 0px;
padding: 0px; }
h6 { border-bottom: 1px solid #DAE1E8;
color: #36638E;
margin:0px; padding:0px;
font-size: 14px;
padding-bottom: 5px; }
h3 {
color: #444;
font-size: 11px;
font-weight: normal;
margin: 0px;
padding: 0px; }
h4 {
color: #36638E;
font-size: 11px;
margin: 0px 0px 6px 8px;}
h4 .edit { display: inline; margin-left: 8px; }
h4 .edit a { color: lightgrey; }
h4 .edit a:hover { color: #36638E; }
h5 {
color: #36638E;
font-size: 11px;
margin: 0px 0px 6px 8px; }
h5 .edit { display: inline; margin-left: 8px; }
h5 .edit a { color: lightgrey; }
h5 .edit a:hover { color: #36638E; }
h3 {
border-bottom:1px solid #B9C4DA;
font-size: 12px;
color:#45688E;
margin-bottom: 0px;
font-weight: bold;
padding-bottom:2px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

147
Web/static/js/al_dev.js Normal file
View file

@ -0,0 +1,147 @@
var nav = null;
function init_dev_steps(step) {
this.step = step;
this.moving = false;
this.steps_glass = document.getElementById('dev_steps_s');
this.steps_glass_c = this.steps_glass.querySelector('.content');
this.steps_wrap = document.getElementById('dev_steps_c');
this.steps_content = this.steps_wrap.querySelector('.content');
this.easeInOut = function(t, b, c, d) {
t /= d/2;
if (t < 1) return c/2*t*t + b;
t--;
return -c/2 * (t*(t-2) - 1) + b;
};
this.move = function(toStep) {
var self = this;
if (toStep === this.step || this.moving) return;
this.moving = true;
var startGlass = (this.step - 1) * 140;
var startContent = (1 - this.step) * 600;
var startHeight = this.steps_wrap.offsetHeight;
var endGlass = (toStep - 1) * 140;
var endContent = (1 - toStep) * 600;
var targetNode = document.getElementById('dev_step' + toStep + '_c');
targetNode.style.position = 'absolute';
targetNode.style.left = '-5000px';
var endHeight = targetNode.querySelector('.borders').offsetHeight + 12;
targetNode.style.position = 'static';
targetNode.style.left = 'auto';
for (var i = 1; i <= 3; i++) {
var stepEl = document.getElementById('dev_step' + i + '_c');
stepEl.style.height = 'auto';
stepEl.style.position = 'static';
stepEl.style.left = 'auto';
}
var duration = 400;
var startTime = Date.now();
var startGlassWidth = (this.step === 3) ? 236 : 141;
var endGlassWidth = (toStep === 3) ? 236 : 141;
function animate() {
var elapsed = Date.now() - startTime;
var progress = Math.min(elapsed / duration, 1);
var easedProgress = self.easeInOut(progress, 0, 1, 1);
var currentGlass = startGlass + (endGlass - startGlass) * easedProgress;
var currentContent = startContent + (endContent - startContent) * easedProgress;
var currentHeight = startHeight + (endHeight - startHeight) * easedProgress;
var currentGlassWidth = startGlassWidth + (endGlassWidth - startGlassWidth) * easedProgress;
self.steps_glass.style.marginLeft = currentGlass + 'px';
self.steps_glass_c.style.marginLeft = (-currentGlass - 2) + 'px';
self.steps_content.style.marginLeft = currentContent + 'px';
self.steps_wrap.style.height = currentHeight + 'px';
self.steps_glass.style.width = currentGlassWidth + 'px';
if (progress < 1) {
requestAnimationFrame(animate);
} else {
self.step = toStep;
self.moving = false;
if (window.history && window.history.replaceState) {
window.history.replaceState(null, null, '#devstep' + toStep);
} else {
location.hash = 'devstep' + toStep;
}
}
}
requestAnimationFrame(animate);
};
this.steps_wrap.style.height = 'auto';
var initialHeight = document.getElementById('dev_step' + this.step + '_c').querySelector('.borders').offsetHeight + 12;
this.steps_wrap.style.height = initialHeight + 'px';
this.steps_glass.style.marginLeft = ((this.step - 1) * 140) + 'px';
this.steps_glass_c.style.marginLeft = (-(this.step - 1) * 140 - 2) + 'px';
this.steps_content.style.marginLeft = ((1 - this.step) * 600) + 'px';
this.steps_glass.style.width = (this.step === 3 ? 236 : 141) + 'px';
this.steps_glass.style.display = 'block';
this.steps_content.style.display = 'block';
for (var i = 1; i <= 3; i++) {
var stepElement = document.getElementById('dev_step' + i + '_c');
stepElement.style.height = 'auto';
stepElement.style.position = 'static';
stepElement.style.left = 'auto';
}
}
function dev_step(toStep) {
if (nav) {
nav.move(toStep);
}
return false;
}
function onDomReady(callback) {
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', callback);
} else {
callback();
}
}
window.prevSection = false;
function slideSection(obj, directly) {
if (!directly) obj = obj.parentNode.children[1];
if (window.prevSection && window.prevSection !== obj) {
window.prevSection.style.display = 'none';
}
window.prevSection = obj;
obj.style.display = obj.style.display === 'none' ? 'block' : 'none';
}
onDomReady(function() {
var step = 1;
var hash = location.hash;
var match = hash.match(/devstep(\d)/);
if (match) {
var hashStep = parseInt(match[1]);
if (hashStep >= 1 && hashStep <= 3) {
nav = new init_dev_steps(hashStep);
dev_step(hashStep);
}
} else {
nav = new init_dev_steps(1);
}
});

View file

@ -0,0 +1 @@
datatypes fallback

1
data/developers/help.md Normal file
View file

@ -0,0 +1 @@
help fallback

68
data/developers/main.md Normal file

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
methods fallback

View file

@ -0,0 +1 @@
native fallback

1
data/developers/rules.md Normal file
View file

@ -0,0 +1 @@
rules fallback

1
data/developers/sites.md Normal file
View file

@ -0,0 +1 @@
sites fallback