Skip to content

Commit

Permalink
fixing default look of template
Browse files Browse the repository at this point in the history
  • Loading branch information
mansona committed Dec 5, 2019
1 parent 767b348 commit 97c6a4c
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
16 changes: 16 additions & 0 deletions addon/styles/addon.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/**
* This is the only resetting we will do. Any other resets need to come from
* the addon itself. We recommend implementing normalize.css
*/
body {
margin: 0;
}

.field-guide-wrapper {
min-height: 100vh;
}
Expand Down Expand Up @@ -28,6 +36,13 @@
margin-bottom: .5em;
}

.field-guide-fake-logo {
font-size: 40px;
font-family: 'Fredericka the Great', cursive;
text-align: center;
margin-bottom: .5em;
}

.field-guide-table-of-contents {
overflow: hidden;
overflow-y: auto;
Expand Down Expand Up @@ -65,6 +80,7 @@
font-size: 1.2em;
text-decoration: none;
color: inherit;
width: 100%;

padding-bottom: 1em;
border-bottom-style: solid;
Expand Down
4 changes: 3 additions & 1 deletion addon/templates/application.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
{{#link-to "show" "index" class="home-link"}}
{{#if fieldGuideConfig.logo}}
<img class="field-guide-logo" src={{fieldGuideConfig.logo}} alt="{{fieldGuideConfig.name}} Field Guide Logo">
{{else}}
<span class="field-guide-fake-logo">{{fieldGuideConfig.name}}</span>
{{/if}}
<span>
{{fieldGuideConfig.name}} Field Guide
Expand Down Expand Up @@ -38,4 +40,4 @@
</div>
</footer>
</div>
</div>
</div>
10 changes: 9 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
'use strict';

module.exports = {
name: require('./package').name
name: require('./package').name,

contentFor(type, config) {
if (type === 'head') {
if(!config['field-guide'] || !config['field-guide'].logo) {
return '<link href="https://fonts.googleapis.com/css?family=Fredericka+the+Great&display=swap" rel="stylesheet">';
}
}
}
};

0 comments on commit 97c6a4c

Please sign in to comment.