1
0
mirror of https://github.com/ascribe/wp-theme synced 2024-12-22 09:13:38 +01:00

embed Apiary docs in custom template

This commit is contained in:
Matthias Kretschmann 2016-01-21 17:47:02 +01:00
parent f8caec8729
commit d7d48a47a8
6 changed files with 35 additions and 3 deletions

View File

@ -0,0 +1,8 @@
.apiary__content {
background: #fff;
iframe {
height: 100vh;
}
}

View File

@ -30,6 +30,8 @@
@import 'ascribe/_team.less';
@import 'ascribe/_blog.less';
@import '_page-api.less';
@import 'vendor/print.less';

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -57,7 +57,10 @@ if ( get_field('header_tagline') != '' ) {
if (empty($description)) {
$content = get_field('subtemplate')[0]['content'];
if (get_field('subtemplate')) {
$content = get_field('subtemplate')[0]['content'];
}
if (!empty($content)) {
$description = substr(strip_tags($content),0,140)."...";

19
template-apidocs.php Normal file
View File

@ -0,0 +1,19 @@
<?php
/*
Template Name: API Docs
*/
get_header();
?>
<article class="apiary__content"></article>
<script src="https://api.apiary.io/seeds/embed.js"></script>
<script>
var embed = new Apiary.Embed({
subdomain: 'ascribe',
element: '.apiary__content'
});
</script>