Adds Industry Links
Torey Heinz
committed Jun 15, 2018
commit 5cb7519356ba43e19ec6e9ef3d3f075ace05ca59
Showing 9
changed files with
147 additions
and 10 deletions
app/Procfile
+3
-0
| @@ | @@ -0,0 +1,3 @@ |
| + | guard: bundle exec guard |
| + | web: bundle exec wagon serve -p 3000 |
| + | ngrok: ngrok http -subdomain=teagles 3000 |
app/content_types/industry_links.yml
+60
-0
| @@ | @@ -0,0 +1,60 @@ |
| + | # Human readable name of this type |
| + | name: Industry links |
| + | |
| + | # Lowercase, underscored handle used to access this type |
| + | slug: industry_links |
| + | |
| + | # Explanatory text displayed in the back-office |
| + | description: A description of the content type for the editors |
| + | |
| + | # Slug of field used to identify entries by default, such as the title |
| + | label_field_name: title |
| + | |
| + | # Valid values: manually, created_at, updated_at, or the slug of any field |
| + | order_by: manually |
| + | |
| + | # Valid values: asc (ascending) and desc (descending). Set to asc by default. |
| + | # order_direction: asc |
| + | |
| + | # Specify a field slug to group entries by that field in the back-office. |
| + | # group_by: <your field> |
| + | |
| + | # Activate public 'create' API (e.g for a contact form) |
| + | # public_submission_enabled: false |
| + | |
| + | # Array of emails to be notified of new entries made with the public API |
| + | # public_submission_accounts: ['john@example.com'] |
| + | |
| + | # Control the display of the content type in the back-office. |
| + | # display_settings: |
| + | # seo: false # display the SEO tab for the content entries |
| + | # advanced: false # display the Advanced tab for the content entries |
| + | # position: 1 # position in the sidebar menu |
| + | # hidden: false # hidden for authors? |
| + | |
| + | # By default, the back-office displays the _label property (see label_field_name) of the content entry. This can be modified by writing your own Liquid template below: |
| + | # entry_template: '<a href="{{ link }}">{{ entry._label }}</a>' # The default template |
| + | |
| + | # A list describing each field |
| + | fields: |
| + | - title: # The lowercase, underscored name of the field |
| + | label: Title # Human readable name of the field |
| + | type: string |
| + | required: true |
| + | hint: Explanatory text displayed in the back office |
| + | localized: false |
| + | |
| + | - url: # The lowercase, underscored name of the field |
| + | label: Url # Human readable name of the field |
| + | type: text |
| + | required: false |
| + | hint: Explanatory text displayed in the back office |
| + | localized: false |
| + | # text_formatting: html # html (uses rich text editor), markdown or text (uses plain text editor) |
| + | |
| + | - logo: # The lowercase, underscored name of the field |
| + | label: Logo # Human readable name of the field |
| + | type: file |
| + | required: false |
| + | hint: Explanatory text displayed in the back office |
| + | localized: false |
app/views/pages/industry-links.liquid
+22
-1
| @@ | @@ -19,4 +19,25 @@ editable_elements: |
| - Manufacturer of Foundry Equipment<br><a target="_blank" href="http://fataaluminum.com">fataaluminum.com</a> - | |
| FATA / Peterle - Manufacturer of Foundry Equipment<div><br></div>' | |
| --- | |
| - | {% extends "layouts/default" %} |
| \ No newline at end of file | |
| + | {% extends "layouts/default" %} |
| + | {% block 'main' %} |
| + | {% if featured_image != blank %} |
| + | <div class="featured_image"> |
| + | <img class="thumbnail" title="{{ page.title }}" alt="{{ page.title }}" src="{{ featured_image | resize: '400x', optimize: 80 }}"> |
| + | </div> |
| + | {% endif %} |
| + | {% editable_text "content" %}Hola!{% endeditable_text %} |
| + | <p>foo</p> |
| + | <div class="row small-up-2 medium-up-3"> |
| + | {% for link in contents.industry_links %} |
| + | <div class="column column-block clickable" data-url="{{ link.url }}"> |
| + | <div class="card text-center"> |
| + | <img src="{{ link.logo.url | resize: '400x300#', optimize: 80 }}"> |
| + | <p> |
| + | <a href="{{ link.url }}">{{ link.title }}</a> |
| + | </p> |
| + | </div> |
| + | </div> |
| + | {% endfor %} |
| + | </div> |
| + | {% endblock %} |
data/industry_links.yml
+24
-0
| @@ | @@ -0,0 +1,24 @@ |
| + | - "ASTM International": |
| + | url: "http://www.astm.com" |
| + | logo: /samples/assets/17-vslogo.jpg |
| + | - "American Foundry Society": |
| + | url: "http://www.afsinc.com" |
| + | logo: /samples/assets/17-vslogo.jpg |
| + | - "German Foundry Association": |
| + | url: "http://www.dgv.de" |
| + | logo: /samples/assets/17-vslogo.jpg |
| + | - "German Institute for Standardization": |
| + | url: "http://www.din.de" |
| + | logo: /samples/assets/17-vslogo.jpg |
| + | - "Society of Manufacturing Engineers": |
| + | url: "http://www.sme.org" |
| + | logo: /samples/assets/17-vslogo.jpg |
| + | - "Interantional Organization for Standardization": |
| + | url: "http://www.iso.org" |
| + | logo: /samples/assets/17-vslogo.jpg |
| + | - "SAE International": |
| + | url: "http://www.sae.org" |
| + | logo: /samples/assets/17-vslogo.jpg |
| + | - "American Metal Market": |
| + | url: "http://www.amm.com" |
| + | logo: /samples/assets/17-vslogo.jpg |
log/server.log
+4
-0
| @@ | @@ -34,3 +34,7 @@ I, [2018-06-12T16:50:29.542974 #6273] INFO -- : Listening on 0.0.0.0:3000, CTRL |
| I, [2018-06-14T22:22:48.056918 #31981] INFO -- : Thin web server (v1.7.2 codename Bachmanity) | |
| I, [2018-06-14T22:22:48.057070 #31981] INFO -- : Maximum connections set to 1024 | |
| I, [2018-06-14T22:22:48.057100 #31981] INFO -- : Listening on 0.0.0.0:3000, CTRL+C to stop | |
| + | I, [2018-06-15T09:32:56.986190 #31981] INFO -- : Waiting for 1 connection(s) to finish, can take up to 30 sec, CTRL+C to stop now |
| + | I, [2018-06-15T09:33:00.496016 #34681] INFO -- : Thin web server (v1.7.2 codename Bachmanity) |
| + | I, [2018-06-15T09:33:00.496165 #34681] INFO -- : Maximum connections set to 1024 |
| + | I, [2018-06-15T09:33:00.496205 #34681] INFO -- : Listening on 0.0.0.0:3000, CTRL+C to stop |
public/javascripts/app.js
+2
-0
| @@ | @@ -1,3 +1,5 @@ |
| + | //= require clickable |
| + | |
| $(document).foundation(); | |
| $('nav#sidebar-nav > ul').addClass('vertical menu') | |
public/javascripts/clickable.coffee
+13
-0
| @@ | @@ -0,0 +1,13 @@ |
| + | ready = -> |
| + | $(document).on 'click', '.clickable', -> |
| + | clickable = document.createElement('a') |
| + | clickable.href = $(this).data('url') |
| + | |
| + | if location.hostname != clickable.hostname |
| + | window.open $(this).data('url') |
| + | else |
| + | window.location.href = $(this).data('url') |
| + | |
| + | return false |
| + | |
| + | $(document).on('ready', ready); |
public/stylesheets/_settings.scss
+1
-1
| @@ | @@ -43,7 +43,7 @@ |
| // 1. Global | |
| // --------- | |
| - | $global-width: rem-calc(1000); |
| + | $global-width: rem-calc(1080); |
| $global-font-size: 16px; | |
| $global-lineheight: 1.5; | |
| $primary-color: #1A245B; | |
public/stylesheets/app.scss
+18
-8
| @@ | @@ -151,7 +151,7 @@ header { |
| } | |
| .page-wrapper { | |
| - | max-width: 62.5rem; |
| + | max-width: $global-width; |
| margin: auto; | |
| margin-bottom: rem-calc(15); | |
| box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); | |
| @@ | @@ -172,19 +172,29 @@ header { |
| } | |
| } | |
| - | .sidebar { |
| - | width: 28%; |
| - | padding: 0; |
| - | box-shadow: 3px 1px 3px -2px rgba(0,0,0,0.12); |
| + | @include breakpoint(large) { |
| + | .sidebar { |
| + | width: 28%; |
| + | padding: 0; |
| + | box-shadow: 3px 1px 3px -2px rgba(0,0,0,0.12); |
| - | } |
| + | } |
| - | .content { |
| - | width: 70%; |
| + | .content { |
| + | width: 70%; |
| + | } |
| } | |
| } | |
| + | .card { |
| + | // border: 1px solid $dark-gray; |
| + | margin: rem-calc(10); |
| + | } |
| + | |
| + | .clickable, .pointer { |
| + | cursor: pointer; |
| + | } |
| footer { | |
| text-align: center; | |