mirror of https://github.com/ascribe/wp-theme
embed Apiary docs in custom template
This commit is contained in:
parent
f8caec8729
commit
d7d48a47a8
|
@ -0,0 +1,8 @@
|
|||
|
||||
.apiary__content {
|
||||
background: #fff;
|
||||
|
||||
iframe {
|
||||
height: 100vh;
|
||||
}
|
||||
}
|
|
@ -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
|
@ -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)."...";
|
||||
|
||||
|
|
|
@ -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>
|
Loading…
Reference in New Issue