Init implementing the design Add a primary header Change erb to slim
Tom Rutgers
committed Aug 17, 2018
commit 0bba960b6ee02fde18d5e6db51ab4a6b39920bc7
Showing 11
changed files with
78 additions
and 39 deletions
data/shared/site.yml
+6
-0
| @@ | @@ -0,0 +1,6 @@ |
| + | navigation: |
| + | - {label: 'Home', path: '/'} |
| + | - {label: 'Story', path: '/story/'} |
| + | - {label: 'Products', path: '/products/'} |
| + | - {label: 'News', path: '/news/'} |
| + | - {label: 'Contact', path: '/contact/'} |
| \ No newline at end of file | |
source/admin/config.yml
+2
-2
| @@ | @@ -2,8 +2,8 @@ backend: |
| name: git-gateway | |
| branch: master | |
| - | media_folder: source/images |
| - | public_folder: /images |
| + | media_folder: source/images/uploads |
| + | public_folder: /images/uploads |
| #publish_mode: editorial_workflow #optional, enables publishing workflow | |
source/images/coffee.jpg
+0
-0
source/images/logo.svg
+1
-0
| @@ | @@ -0,0 +1 @@ |
| + | <svg viewBox="0 0 109 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:figma="http://www.figma.com/figma/ns"><title>Logo</title><g transform="translate(-1470)" figma:type="canvas"><g style="mix-blend-mode:normal" figma:type="vector" transform="translate(1470)" fill="#f40"><use xlink:href="#b" style="mix-blend-mode:normal"/><use xlink:href="#c" style="mix-blend-mode:normal"/><use xlink:href="#d" style="mix-blend-mode:normal"/><use xlink:href="#e" style="mix-blend-mode:normal"/><use xlink:href="#f" style="mix-blend-mode:normal"/></g></g><defs><path id="b" d="M22.735 23.171c.283.323.053.829-.376.829h-5.907c-.285 0-.556-.121-.745-.333l-9.414-10.526v10.36c0 .276-.224.5-.5.5h-5.293c-.276 0-.5-.224-.5-.5v-23c0-.276.224-.5.5-.5h5.293c.276 0 .5.224.5.5v9.815l9.141-9.99c.19-.207.457-.325.738-.325h5.762c.437 0 .664.521.366.841l-9.851 10.563 10.287 11.767z"/><path id="c" d="M45.991 24c-.199 0-.38-.118-.459-.301l-2.024-4.669h-10.67l-2.024 4.669c-.079.183-.259.301-.459.301h-5.212c-.366 0-.608-.381-.453-.712l10.782-23c.082-.176.259-.288.453-.288h4.358c.194 0 .37.112.453.287l10.815 23c.156.332-.086.713-.452.713h-5.108zm-11.135-9.668h6.635l-3.317-7.694-3.317 7.694z"/><path id="d" d="M55.525 24c-.276 0-.5-.224-.5-.5v-23c0-.276.224-.5.5-.5h5.293c.276 0 .5.224.5.5v18.428h9.759c.276 0 .5.224.5.5v4.072c0 .276-.224.5-.5.5h-15.552z"/><path id="e" d="M75.279.5c0-.276.224-.5.5-.5h9.315c2.667 0 4.959.477 6.874 1.43 1.938.953 3.42 2.338 4.446 4.153 1.026 1.793 1.539 3.926 1.539 6.4 0 2.496-.513 4.652-1.539 6.468-1.003 1.793-2.474 3.166-4.412 4.119-1.915.953-4.218 1.43-6.908 1.43h-9.315c-.276 0-.5-.224-.5-.5v-23zm9.37 18.462c2.371 0 4.138-.579 5.301-1.736 1.163-1.157 1.744-2.905 1.744-5.242 0-2.338-.581-4.074-1.744-5.209-1.163-1.157-2.93-1.736-5.301-1.736h-3.078v13.923h3.078z"/><path id="f" d="M102.913 24c-.276 0-.5-.224-.5-.5v-23c0-.276.224-.5.5-.5h5.293c.276 0 .5.224.5.5v23c0 .276-.224.5-.5.5h-5.293z"/></defs></svg> |
source/index.html.erb
+0
-20
| @@ | @@ -1,20 +0,0 @@ |
| - | --- |
| - | title: Home - Middleman + Netlify CMS Example |
| - | --- |
| - | <section class="hero-homepage"> |
| - | <h1>Welcome</h1> |
| - | </section> |
| - | |
| - | <section class="posts-homepage"> |
| - | <div class="container"> |
| - | <h1>News</h1> |
| - | <% blog.articles.each do |article| %> |
| - | <div class="row"> |
| - | <article class="post col-xs-12"> |
| - | <h1><%= article.title %></h1> |
| - | </article> |
| - | </div> |
| - | <%end%> |
| - | |
| - | </div> |
| - | </section> |
| \ No newline at end of file | |
source/index.html.slim
+3
-0
| @@ | @@ -0,0 +1,3 @@ |
| + | --- |
| + | title: Home - Middleman + Netlify CMS Example |
| + | --- |
| \ No newline at end of file | |
source/layouts/layout.erb
+0
-17
| @@ | @@ -1,17 +0,0 @@ |
| - | <!doctype html> |
| - | <html> |
| - | <head> |
| - | <meta charset="utf-8"> |
| - | <meta http-equiv="x-ua-compatible" content="ie=edge"> |
| - | <meta name="viewport" |
| - | content="width=device-width, initial-scale=1, shrink-to-fit=no"> |
| - | <!-- Use the title from a page's frontmatter if it has one --> |
| - | <title><%= current_page.data.title || "Middleman" %></title> |
| - | <%= stylesheet_link_tag "all" %> |
| - | <%= javascript_include_tag "main" %> |
| - | <script script src="https://identity.netlify.com/v1/netlify-identity-widget.js" type="text/javascript"></script> |
| - | </head> |
| - | <body> |
| - | <%= yield %> |
| - | </body> |
| - | </html> |
source/layouts/layout.slim
+20
-0
| @@ | @@ -0,0 +1,20 @@ |
| + | doctype html |
| + | html |
| + | head |
| + | meta content=("text/html; charset=UTF-8") http-equiv="Content-Type" |
| + | meta charset="utf-8" |
| + | meta content="ie=edge" http-equiv="x-ua-compatible" |
| + | meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport" |
| + | |
| + | // Use the title from a page's frontmatter if it has one |
| + | title= current_page.data.title || "Middleman" |
| + | |
| + | = stylesheet_link_tag "all" |
| + | = javascript_include_tag "main" |
| + | // Include netlify identity widget for user registration |
| + | script src="https://identity.netlify.com/v1/netlify-identity-widget.js" type="text/javascript" |
| + | body |
| + | = partial 'partials/shared/header-primary' |
| + | |
| + | .main-content |
| + | = yield |
source/partials/shared/_header-primary.slim
+10
-0
| @@ | @@ -0,0 +1,10 @@ |
| + | .header-primary |
| + | .logo |
| + | = link_to '/' |
| + | = image_tag 'logo.svg', alt: 'Kaldi' |
| + | |
| + | .navigation |
| + | ul |
| + | - data.shared.site.navigation.each do | nav_item | |
| + | li |
| + | = link_to nav_item.label, nav_item.path |
| \ No newline at end of file | |
source/stylesheets/demo/shared/_header-primary.scss
+33
-0
| @@ | @@ -0,0 +1,33 @@ |
| + | .header-primary { |
| + | position: absolute; |
| + | width: 100%; |
| + | height: 80px; |
| + | top: 0; |
| + | z-index: 999; |
| + | |
| + | .logo { |
| + | width: 173px; |
| + | height: 80px; |
| + | a { |
| + | display: block; |
| + | padding: 26px 30px; |
| + | } |
| + | } |
| + | |
| + | .navigation { |
| + | position: absolute; |
| + | top: 33px; |
| + | right: 15px; |
| + | li { |
| + | display: inline-block; |
| + | margin: 0 15px; |
| + | } |
| + | a { |
| + | font-weight: 700; |
| + | color: $text-color; |
| + | &.active, &:hover, &:focus{ |
| + | color: $primary-color; |
| + | } |
| + | } |
| + | } |
| + | } |
| \ No newline at end of file | |
source/stylesheets/demo/shared/_main-content.scss
+3
-0
| @@ | @@ -0,0 +1,3 @@ |
| + | .main-content { |
| + | margin-top: 80px; |
| + | } |
| \ No newline at end of file | |