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:
parent
f8caec8729
commit
d7d48a47a8
8
assets/_src/less/_page-api.less
Normal file
8
assets/_src/less/_page-api.less
Normal file
@ -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';
|
||||
|
||||
|
||||
|
2
assets/dist/css/ascribe.css
vendored
2
assets/dist/css/ascribe.css
vendored
File diff suppressed because one or more lines are too long
2
assets/dist/css/ascribe.min.css
vendored
2
assets/dist/css/ascribe.min.css
vendored
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)."...";
|
||||
|
||||
|
19
template-apidocs.php
Normal file
19
template-apidocs.php
Normal 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>
|
Loading…
Reference in New Issue
Block a user