Widget for code includes + sass

This commit is contained in:
johndmulhausen
2016-03-01 18:17:31 -08:00
parent 49e40dd65e
commit 1b6a08e693
5 changed files with 26 additions and 40 deletions
+9
View File
@@ -0,0 +1,9 @@
{% capture samplecode %}{% include_relative {{include.file}} %}{% endcapture %}
{% capture mysample %}
```{{include.language}}
{{ samplecode | raw | strip }}
```
{% endcapture %}
<p>&nbsp;</p>
<table class="includecode"><thead><tr><th><a href="{{include.ghlink}}"><code>{{include.file}}</code></a></th></tr></thead>
<tr><td>{{ mysample | markdownify }}</td></tr></table>
+1 -1
View File
@@ -83,7 +83,7 @@
<a href="/v1.1/">Version 1.1</a>
<a href="/v1.2/">Version 1.2</a>
</div>
<input type="text" id="search" placeholder="Search" onkeydown="if (event.keyCode==13) window.location.replace('/search/?q=' + this.value)">
<input type="text" id="search" placeholder="Search" onkeydown="if (event.keyCode==13) window.location.replace('/docs/search/?q=' + this.value)">
</div>
</section>
+14 -1
View File
@@ -699,12 +699,25 @@ section
padding: 15px
overflow-x: scroll
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code
font-family: inherit
font-size: inherit
background-color: transparent
.includecode, .includecode th, .includecode td
padding: 0px !important
.includecode th
text-align: right !important
padding: 10px !important
.includecode th a, .includecode th a code
color: white !important
background-color: transparent !important
.includecode pre
margin: 0px !important
ul li
list-style: disc
+1 -17
View File
@@ -51,23 +51,7 @@ Let's create two new namespaces to hold our work.
Use the file [`namespace-dev.json`](/docs/admin/namespacesnamespace-dev.json) which describes a development namespace:
<!-- BEGIN MUNGE: EXAMPLE namespace-dev.json -->
```json
{
"kind": "Namespace",
"apiVersion": "v1",
"metadata": {
"name": "development",
"labels": {
"name": "development"
}
}
}
```
[Download example](/docs/admin/namespacesnamespace-dev.json)
<!-- END MUNGE: EXAMPLE namespace-dev.json -->
{% include code.html language="json" file="namespace-dev.json" ghlink="https://github.com/kubernetes/kubernetes.github.io/blob/master/docs/admin/namespaces/namespace-dev.json" %}
Create the development namespace using kubectl.
+1 -21
View File
@@ -102,27 +102,7 @@ volumeMounts:
Example Redis pod definition with a persistent storage volume ([pod-redis.yaml](/docs/user-guide/walkthrough/pod-redis.yaml)):
<!-- BEGIN MUNGE: EXAMPLE pod-redis.yaml -->
```yaml
apiVersion: v1
kind: Pod
metadata:
name: redis
spec:
containers:
- name: redis
image: redis
volumeMounts:
- name: redis-persistent-storage
mountPath: /data/redis
volumes:
- name: redis-persistent-storage
emptyDir: {}
```
[Download example](/docs/user-guide/walkthrough/pod-redis.yaml)
<!-- END MUNGE: EXAMPLE pod-redis.yaml -->
{% include code.html language="yaml" file="pod-redis.yaml" ghlink="https://github.com/kubernetes/kubernetes.github.io/blob/master/docs/user-guide/walkthrough/pod-redis.yaml" %}
Notes: