diff --git a/controller/Controller.class.php b/controller/Controller.class.php index 51a95cc9..18720e49 100644 --- a/controller/Controller.class.php +++ b/controller/Controller.class.php @@ -109,6 +109,7 @@ class Controller $router->get(['/press-kit.zip', 'press-kit'], 'ContentActions::executePressKit'); + $router->get('/join-us', 'ContentActions::executeJobs'); $router->post('/postcommit', 'OpsActions::executePostCommit'); $router->post('/log-upload', 'OpsActions::executeLogUpload'); $router->get(static::CACHE_CLEAR_PATH, 'OpsActions::executeClearCache'); diff --git a/controller/action/ContentActions.class.php b/controller/action/ContentActions.class.php index 327fbc9c..d202c8da 100644 --- a/controller/action/ContentActions.class.php +++ b/controller/action/ContentActions.class.php @@ -9,12 +9,14 @@ class ContentActions extends Actions SLUG_PRESS = 'press', SLUG_BOUNTY = 'bounty', SLUG_CREDIT_REPORTS = 'credit-reports', + SLUG_JOBS = 'jobs', URL_NEWS = '/' . self::SLUG_NEWS, URL_FAQ = '/' . self::SLUG_FAQ, URL_PRESS = '/' . self::SLUG_PRESS, URL_BOUNTY = '/' . self::SLUG_BOUNTY, URL_CREDIT_REPORTS = '/' . self::SLUG_CREDIT_REPORTS, + URL_JOBS = '/' . self::SLUG_JOBS, CONTENT_DIR = ROOT_DIR . '/content', @@ -22,7 +24,8 @@ class ContentActions extends Actions VIEW_FOLDER_FAQ = self::CONTENT_DIR . '/' . self::SLUG_FAQ, VIEW_FOLDER_BOUNTY = self::CONTENT_DIR . '/' . self::SLUG_BOUNTY, VIEW_FOLDER_PRESS = self::CONTENT_DIR . '/' . self::SLUG_PRESS, - VIEW_FOLDER_CREDIT_REPORTS = self::CONTENT_DIR . '/' . self::SLUG_CREDIT_REPORTS; + VIEW_FOLDER_CREDIT_REPORTS = self::CONTENT_DIR . '/' . self::SLUG_CREDIT_REPORTS, + VIEW_FOLDER_JOBS = self::CONTENT_DIR . '/' . self::SLUG_JOBS; public static function executeHome(): array { @@ -388,4 +391,31 @@ class ContentActions extends Actions ] ]]; } + + public static function executeJobs() + { + Response::enableHttpCache(); + + $jobs = array(); + + foreach(glob(static::VIEW_FOLDER_JOBS . '/*') as $job){ + + list($metadata, $jobHTML) = View::parseMarkdown($job); + + if($metadata['status'] != 'closed') + { + array_push($jobs, $job); + } + } + return ['content/join-us', ['jobs' => $jobs]]; + } + + public static function prepareJobPartial(array $vars) + { + + list($metadata, $jobHTML) = View::parseMarkdown($vars['job']); + return $vars + ['metadata' => $metadata, 'jobHTML' => $jobHTML]; + + + } } diff --git a/view/template/content/_job.php b/view/template/content/_job.php new file mode 100644 index 00000000..fd744b79 --- /dev/null +++ b/view/template/content/_job.php @@ -0,0 +1,7 @@ +
- This position involves working directly on the LBRY blockchain, written in C++. -
-- Competence with cryptography, security, and networks is mandatory. Experience with blockchain is beneficial but not required. -
-- Blockchain work is like being a goalkeeper: good work goes under-appreciated, but mistakes are catastrophic. You must be the kind of masochist that enjoys this. -
-- The LBRY protocol consists of a set of APIs provided via a daemon. This daemon is comprised of several sub-components, and interacts with the blockchain, wallet, and other remote daemons that constitute the LBRY data network. -
-- The LBRY daemon and wallet are both written in Python, but maybe you're the one to rewrite them in Go (we're kidding) (probably). -
-Competence with security, operating systems, and networks is mandatory. Experience with peer-to-peer technology is beneficial but not required.
- -*/ ?> + + $job]) ?> +