1
0
mirror of https://github.com/ascribe/wp-theme synced 2024-12-22 17:23:55 +01:00

Merge pull request #30 from ascribe/feature/apiary

embed Apiary docs in custom template
This commit is contained in:
Matthias Kretschmann 2016-01-21 17:48:10 +01:00
commit cbe2a38243
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/_team.less';
@import 'ascribe/_blog.less'; @import 'ascribe/_blog.less';
@import '_page-api.less';
@import 'vendor/print.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)) { if (empty($description)) {
$content = get_field('subtemplate')[0]['content']; if (get_field('subtemplate')) {
$content = get_field('subtemplate')[0]['content'];
}
if (!empty($content)) { if (!empty($content)) {
$description = substr(strip_tags($content),0,140)."..."; $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>