Skip to content

Commit

Permalink
Add SVGs to home page features section
Browse files Browse the repository at this point in the history
Signed-off-by: lucperkins <[email protected]>
  • Loading branch information
lucperkins committed Jan 7, 2019
1 parent 1bc2254 commit 7f98d3d
Show file tree
Hide file tree
Showing 10 changed files with 510 additions and 3 deletions.
6 changes: 6 additions & 0 deletions assets/sass/helpers.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
=flex
display: flex

=x-center
+flex
justify-content: center
10 changes: 9 additions & 1 deletion assets/sass/style.sass
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ $etcd-dark-blue: darken($etcd-blue, 10%)

// Bulma variable overrides
$primary: $etcd-blue
$link: darken($primary, 5%)
$link: $etcd-dark-blue
$family-sans-serif: "{{ $sansSerifFont }}", BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif
$family-code: "{{ $monospaceFont }}", monospace
$toc-item-font-size: 1.5rem
Expand All @@ -36,6 +36,8 @@ $dashboard-panel-footer-top-margin: 3rem
@import "bulma-dashboard/src/bulma-dashboard"
@import "bulma-squeezebox/bulma-squeezebox"

@import "helpers"

=logo($touch, $desktop)
+touch
width: $touch
Expand Down Expand Up @@ -66,3 +68,9 @@ $dashboard-panel-footer-top-margin: 3rem

.main
flex: 1

.is-home-svg
+x-center

svg
height: 7.5rem
3 changes: 3 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,17 @@ github = "https://github.com/etcd-io/etcd"

[[params.features]]
title = "Simple interface"
svg = "interface"
description = "Read and write values using standard HTTP tools, such as curl"

[[params.features]]
title = "Key-value storage"
svg = "kv"
description = "Store data in hierarchically organized directories, as in a standard filesystem"

[[params.features]]
title = "Watch for changes"
svg = "watch"
description = "Watch specific keys or directories for changes and react to changes in values"

[[params.fonts]]
Expand Down
5 changes: 5 additions & 0 deletions layouts/partials/home/features.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

<div class="columns is-variable is-8">
{{ range $features }}
{{ $svg := printf "static/img/%s.svg" .svg }}
<div class="column">
<p class="title is-size-3 is-size-4-mobile is-spaced has-text-weight-light">
{{ .title }}
Expand All @@ -17,6 +18,10 @@
<p class="subtitle">
{{ .description | markdownify }}
</p>

<div class="is-home-svg">
{{ $svg | readFile | safeHTML }}
</div>
</div>
{{ end }}
</div>
Expand Down
2 changes: 2 additions & 0 deletions layouts/shortcodes/svg.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{{ $path := .Get 0 }}
{{ $path | readFile | safeHTML }}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"Target":"css/style.b900ac2b6c4c6297dc6c1fe08e134bfb65c3f624403a6406de889fe435c899c9.css","MediaType":"text/css","Data":{"Integrity":"sha256-uQCsK2xMYpfcbB/gjhNL+2XD9iRAOmQG3oif5DXImck="}}
{"Target":"css/style.fbdc66f6142c9f43f0d036b05b94e29d9d51ff474905f830652934ea7785a065.css","MediaType":"text/css","Data":{"Integrity":"sha256-+9xm9hQsn0Pw0DawW5TinZ1R/0dJBfgwZSk06neFoGU="}}
41 changes: 41 additions & 0 deletions static/img/interface.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 7f98d3d

Please sign in to comment.