Skip to content

Commit 345540c

Browse files
author
Leah Wasser
committed
turned off search for now, added better dynamic home
1 parent 64aebb2 commit 345540c

File tree

7 files changed

+48
-8
lines changed

7 files changed

+48
-8
lines changed

_includes/masthead.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
{% include base_path %}
22

3-
<!-- search bar begin -->
3+
<!-- search bar begin - turning off for now-->
4+
<!--
45
<div id="search">
56
<form role="search" method="get" action="{{ site.url }}/search/">
67
<input id="searchString" name="searchString"
78
placeholder="Search for lessons here." type="text">
89
<input id="searchButton" name="googleSearchName" type="submit" value="Search">
910
</form>
10-
</div>
11+
</div> -->
1112
<!-- search bar begin -->
1213

1314
<div class="masthead">

_pages/home.md

+42-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,48 @@ intro:
3535
- excerpt: 'Follow us &nbsp; [<i class="fa fa-twitter"></i> @EarthLabCU](https://twitter.com/EarthLabCU){: .btn .btn--twitter}'
3636
---
3737

38+
<div class="archive" markdown="1">
39+
40+
## Recent course modules
41+
42+
{% assign modules = site.posts | where:"order", 1 %}
43+
{% for module in modules limit:3 %}
44+
45+
<div class="list__item">
46+
<article class="archive__item" >
47+
<h2 class="archive__item-title">
48+
<a href="{{ site.url }}{{ module.permalink }}">{{ module.module-title }}</a></h2>
49+
<p class='archive__item-excerpt'>{{ module.module-description | truncatewords:35 }} <a href="{{ site.url }}{{ module.permalink }}">read more.</a> </p>
50+
51+
{% assign counter = 0 %}
52+
<!-- this may not work -->
53+
{% assign module_posts = site.posts | where:"module-title", {{ module.module-title }} %}
54+
{% for post in module_posts %}
55+
{% if post.class-lesson == module.class-lesson %}
56+
{% assign counter = counter | plus: 1 %}
57+
{% endif %}
58+
{% endfor %}
59+
<p class="archive__item-excerpt"><i>lessons: {{ counter }}, last updated: {{ module.modified | date_to_string }}</i></p>
60+
</article>
61+
</div>
62+
63+
{% endfor %}
64+
65+
66+
67+
## Recent tutorials
68+
69+
{% for post in site.categories.['tutorials'] limit:3 %}
70+
<!-- List the most recent 3 tutorials -->
71+
<div class="list__item">
72+
<article class="archive__item">
73+
<h2 class="archive__item-title"><a href="{{ site.baseurl }}{{ post.url}}">{{ post.title }}</a></h2>
74+
<p class="archive__item-excerpt">{{ post.excerpt }}</p>
75+
</article>
76+
</div>
77+
{% endfor %}
78+
79+
</div>
3880
{% include feature_row id="intro" type="center" %}
3981

4082
{% include feature_row %}
41-

_pages/search.html

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
Search results. This doesn't work just yet but will soon!
1010

11-
12-
1311
<div id="home-search" class="home">
1412
<script>
1513
(function() {

assets/_scss/_archive.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
.archive__item-excerpt {
5353
margin-top: 0;
54-
font-size: $type-size-6;
54+
font-size: $type-size-6!important;
5555

5656
& + p {
5757
text-indent: 0;

assets/css/main.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/main.css.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gem

Whitespace-only changes.

0 commit comments

Comments
 (0)