From 8ed05b4586c58039216b0d39796eef5ef536c49d Mon Sep 17 00:00:00 2001 From: Jeremy Kauffman Date: Sun, 29 Jan 2017 18:12:13 -0500 Subject: [PATCH] first steps --- controller/Controller.class.php | 1 + .../action/AcquisitionActions.class.php | 8 +- .../acquisition/credits-for-developers.php | 25 ++++ view/template/layout/basic.php | 4 +- view/template/page/quickstart.php | 120 ++++++++++++++++++ web/scss/_content.scss | 7 +- web/scss/_form.scss | 14 ++ 7 files changed, 174 insertions(+), 5 deletions(-) create mode 100644 view/template/acquisition/credits-for-developers.php create mode 100644 view/template/page/quickstart.php diff --git a/controller/Controller.class.php b/controller/Controller.class.php index b721fff2..ec62b745 100644 --- a/controller/Controller.class.php +++ b/controller/Controller.class.php @@ -88,6 +88,7 @@ class Controller $router->get(['/android', 'get-android'], 'DownloadActions::executeGet'); $router->get(['/ios', 'get-ios'], 'DownloadActions::executeGet'); $router->get('/roadmap', 'ContentActions::executeRoadmap'); + $router->get('/credits-for-developers', 'AcquisitionActions::executeCreditsForDevelopers'); $router->get(['/press-kit.zip', 'press-kit'], 'ContentActions::executePressKit'); diff --git a/controller/action/AcquisitionActions.class.php b/controller/action/AcquisitionActions.class.php index 148f5cc7..42c2e804 100644 --- a/controller/action/AcquisitionActions.class.php +++ b/controller/action/AcquisitionActions.class.php @@ -2,12 +2,13 @@ class AcquisitionActions extends Actions { + const DEVELOPER_REWARD = 250; + public static function executeThanks() { return ['acquisition/thanks']; } - public static function executeYouTubeSub() { if (!Request::isPost()) @@ -40,4 +41,9 @@ class AcquisitionActions extends Actions } return [$template]; } + + public static function executeCreditsForDevelopers() + { + return ['acquisition/credits-for-developers']; + } } \ No newline at end of file diff --git a/view/template/acquisition/credits-for-developers.php b/view/template/acquisition/credits-for-developers.php new file mode 100644 index 00000000..6df1b9e6 --- /dev/null +++ b/view/template/acquisition/credits-for-developers.php @@ -0,0 +1,25 @@ + + + + false, 'isAbsolute' => false]) ?> +
+
+

Credits For Developers

+

All developers with a GitHub account prior to 2017 are eligible for free credits.

+

To claim your credits, enter a wallet address in the form below and authenticate with GitHub.

+

+ We will store your GitHub username and email address, but nothing else. +

+
+

Receive Credits

+
+ +
+ +
+
+ +
+
+
+ \ No newline at end of file diff --git a/view/template/layout/basic.php b/view/template/layout/basic.php index 849d24b3..6a6f254d 100644 --- a/view/template/layout/basic.php +++ b/view/template/layout/basic.php @@ -47,11 +47,9 @@ - - - +
diff --git a/view/template/page/quickstart.php b/view/template/page/quickstart.php new file mode 100644 index 00000000..94cbc46b --- /dev/null +++ b/view/template/page/quickstart.php @@ -0,0 +1,120 @@ + + + + false, 'isAbsolute' => false]) ?> +
+

Quickstart

+

This step-by-step guide will have running LBRY and interacting with the API in just a few minutes.

+

This guide is for programmers and other technical users. For consumer usage of LBRY, please go here.

+

What's Covered

+
    +
  1. Installation
  2. +
  3. Running LBRY
  4. +
  5. API Basics
  6. +
  7. Credits
  8. +
  9. Start Building
  10. +
  11. Community & Issues
  12. +
+
+

1. Installation

+

The easiest way to install LBRY is to use a pre-packaged binary. We provide binaries for Windows, macOS, and Debian-based Linux.

+ + + + + + + + + + + + + + + +
macOS Linux Windows
Download DMGDownload DEBDownload MSI
+

+ If you prefer to compile from source or are not on one of the above operating systems, follow + this guide. +

+
+
+

2. Running LBRY

+

+ Launch the deamon to run as a background process: +

+

+ + lbrynet-daemon --no-launch + +

+

The first time you run the daemon, it must catch-up with most recent blockheaders. This can take several minutes.

+
+
+

3. API Basics

+

+ When running, the LBRY daemon provides a JSON-RPC server running at https://localhost:5279/lbryapi. +

+

+ It can be accessed via cURL or any other utility capable of making HTTPS GET and POST requests. +

+

+ To verify the LBRY daemon is running correctly and responding to requests, run: +

+

+ + curl --data "{ method: 'status' }" http://localhost:5279/lbryapi + +

+

+ You should receive a response like: +

+

+ + (will copy/paste once it works) + +

+

This makes it easy to interact with the LBRY API in the programming language of your choice.

+
+
+

4. Getting Credits

+

Many actions, such as publishing or purchasing paid content, require credits.

+

To receive credits, first generate a wallet address:

+

+ + curl --data "{ method: 'wallet_new_address' }" http://localhost:5279/lbryapi
+ I am a response +
+

+

Use this address to get credits in one of two ways:

+
+
+

4a) Get Credits For Free

+

+ All developers are eligible to receive free credits. + Go here to claim them. +

+
+
+

4b) Purchase Credits

+

+ Credits can be bought on a variety of exchanges. + Go here to see a full list. + After purchasing them, send them to the address generated above. +

+
+
+
+
+

6. Community & Issues

+

+ Join our Slack Channel to interact with LBRY developers and other community members. Please visit the #dev room (this is not a default channel). +

+

+ Visit our GitHub to view the source code or report issues. +

+
+
+ + \ No newline at end of file diff --git a/web/scss/_content.scss b/web/scss/_content.scss index 34016aab..2bf7c601 100644 --- a/web/scss/_content.scss +++ b/web/scss/_content.scss @@ -128,6 +128,11 @@ &:last-child { margin-bottom: $spacing-vertical / 2; } padding-left: 2em; counter-reset: li-counter; + &.table-of-contents > li + { + line-height: 2em; + &:before { top: -0.1em; } + } > li { position: relative; @@ -138,7 +143,7 @@ &:before { position: absolute; - top: -0.25em; + top: -0.35em; left: -1em; width: 0.8em; diff --git a/web/scss/_form.scss b/web/scss/_form.scss index cf455026..4754d778 100644 --- a/web/scss/_form.scss +++ b/web/scss/_form.scss @@ -21,6 +21,15 @@ form { margin-bottom: $line-height; } +form.form-inset +{ + margin-left: auto; + margin-right: auto; + background: #eee; + padding: $spacing-vertical; + max-width: 600px; +} + label[for], .label-radio { cursor: pointer; @@ -72,6 +81,11 @@ input[type="date"] { vertical-align: middle; } +input.input-wallet +{ + width: 400px; +} + textarea { height: auto; min-height: 60px;