Skip to content

Commit

Permalink
Restyling basic components and fixing errors introduced by recent cha…
Browse files Browse the repository at this point in the history
…nges, refactoring out merging of foreign activity, improves #60
  • Loading branch information
pcuci committed Apr 16, 2016
1 parent ffdf5be commit ff2107f
Show file tree
Hide file tree
Showing 27 changed files with 210 additions and 187 deletions.
5 changes: 0 additions & 5 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,6 @@ title:
en: BetterMTL
fr: CapMTL

# What is the name of the events or talks you would like to host? (Example Brownbags, Talks, Lighting Talks)
event_label:
en: Activity
fr: Activité

description:
en: BetterMTL is free and open-source. <br/> Run by <a href='https://github.com/bettermtl/bettermtl.github.io/graphs/contributors'>contributors</a>.
fr: CapMTL est un logiciel libre. <br/> Géré par <a href='https://github.com/bettermtl/bettermtl.github.io/graphs/contributors'>contributeurs</a>.
Expand Down
32 changes: 28 additions & 4 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,35 @@
</header>
<div class="wrapper langs">
{% assign activities=site.activities | where: "ref", page.ref | sort: 'lang' %}
{% for activity in activities %} <a href="{{ activity.url }}" class="lang {{ activity.lang }}">{{ activity.lang }}</a> {% endfor %}
{% for activity in activities %}
{% if activity.lang == page.lang %}
<p>{{ activity.lang }}</p>
{% else %}
<a href="{{ activity.url }}" class="lang {{ activity.lang }}">{{ activity.lang }}</a>
{% endif %}
{% endfor %}
{% assign posts=site.posts | where: "ref", page.ref | sort: 'lang' %}
{% for post in posts %} <a href="{{ post.url }}" class="lang {{ post.lang }}">{{ post.lang }}</a> {% endfor %}
{% for post in posts %}
{% if post.lang == page.lang %}
<p>{{ post.lang }}</p>
{% else %}
<a href="{{ post.url }}" class="lang {{ post.lang }}">{{ post.lang }}</a>
{% endif %}
{% endfor %}
{% assign pages=site.pages | where: "ref", page.ref | sort: 'lang' %}
{% for page in pages %} <a href="{{ page.url }}" class="lang {{ page.lang }}">{{ page.lang }}</a> {% endfor %}
{% for post in pages %}
{% if post.lang == page.lang %}
<p>{{ post.lang }}</p>
{% else %}
<a href="{{ post.url }}" class="lang {{ post.lang }}">{{ post.lang }}</a>
{% endif %}
{% endfor %}
{% assign locations=site.locations | where: "ref", page.ref | sort: 'lang' %}
{% for location in locations %} <a href="{{ location.url }}" class="lang {{ location.lang }}">{{ location.lang }}</a> {% endfor %}
{% for location in locations %}
{% if location.lang == page.lang %}
<p>{{ location.lang }}</p>
{% else %}
<a href="{{ location.url }}" class="lang {{ location.lang }}">{{ location.lang }}</a>
{% endif %}
{% endfor %}
</div>
13 changes: 13 additions & 0 deletions _includes/merge/activity.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{% assign activ = nil %}
{% if page.lang == include.act.lang %}
{% assign activ = include.act %}
{% else %}
{% assign activ=site.activities | where: "ref", include.act.ref | where: "lang", page.lang | first %}
{% unless activ %}
{% assign activ=site.activities | where: "ref", include.act.ref | where: "lang", site.lang.primary | first %}
{% endunless %}
{% unless activ %}
{% assign activ=site.activities | where: "ref", include.act.ref | where: "lang", site.lang.secondary | first %}
{% endunless %}
{% endif %}
{{activ.ref}},{{activ.lang}}
4 changes: 2 additions & 2 deletions _layouts/activity.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div class="improve right">
<a href="http://prose.io/#bettermtl/bettermtl.github.io/edit/master/{{ page.path }}"><i class="fa fa-pencil"></i> &nbsp;Improve this page</a>
</div>
<h1 class="post-title" itemprop="name headline">{{ page.title }}</h1>
<h1 class="title" itemprop="name headline">{{ page.title }}</h1>
<h3 class="post-date"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%B %-d, %Y" }}</time>{% if page.author %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>{% endif %} <span class="post-time">{{ page.start_time }} - {{ page.end_time }}</span></h3>
<h3 class="post-location">
{{ location_title }},
Expand All @@ -18,7 +18,7 @@ <h3 class="post-location">
{% if organizer.photo %}
<div class="author" style="background-image:url({{ organizer.photo }});"></div>
{% endif %}
<div class="post-content" itemprop="articleBody">
<div class="content" itemprop="articleBody">
{{content}}
</div>
<div>
Expand Down
4 changes: 2 additions & 2 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
{% include header.html %}
{% include merge/page-cover.html %}
{% if page_cover %}
<div class="blog-cover" style="background-image:url({{page_cover}});">
<div class="cover" style="background-image:url({{page_cover}});">
{% else %}
<div class="blog-cover" style="background-image:url(http://static1.squarespace.com/static/54db2500e4b06f24f8c5a607/t/54dbbfc5e4b03442c79b422e/1423687627142/Start+up+Party.jpeg?format=2500w);">
<div class="cover" style="background-image:url(http://static1.squarespace.com/static/54db2500e4b06f24f8c5a607/t/54dbbfc5e4b03442c79b422e/1423687627142/Start+up+Party.jpeg?format=2500w);">
{% endif %}
</div>
<div class="page-content">
Expand Down
4 changes: 2 additions & 2 deletions _layouts/location.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
<div class="improve right">
<a href="http://prose.io/#bettermtl/bettermtl.github.io/edit/master/{{ location.path }}"><i class="fa fa-pencil"></i> &nbsp;Improve this page</a>
</div>
<h1 class="post-title" itemprop="name headline">{{ page.title }}</h1>
<h1 class="title" itemprop="name headline">{{ page.title }}</h1>
{% if organizer.photo %}
<h3 class="post-organizers-name">By {{organizer.name}}</h3>
{% endif %}
</header>
{% if organizer.photo %}
<div class="author" style="background-image:url({{organizer.photo}});"></div>
{% endif %}
<div class="post-content" itemprop="articleBody">
<div class="content" itemprop="articleBody">
{{content}}
</div>
<div>
Expand Down
4 changes: 2 additions & 2 deletions _layouts/node.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
<div class="improve right">
<a href="http://prose.io/#bettermtl/bettermtl.github.io/edit/master/{{ location.path }}"><i class="fa fa-pencil"></i> &nbsp;Improve this page</a>
</div>
<h1 class="post-title" itemprop="name headline">{{ page.title }}</h1>
<h1 class="title" itemprop="name headline">{{ page.title }}</h1>
{% if organizer.photo %}
<h3 class="post-organizers-name">By {{organizer.name}}</h3>
{% endif %}
</header>
{% if organizer.photo %}
<div class="author" style="background-image:url({{organizer.photo}});"></div>
{% endif %}
<div class="post-content" itemprop="articleBody">
<div class="content" itemprop="articleBody">
{{content}}
</div>
<div>
Expand Down
4 changes: 2 additions & 2 deletions _layouts/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<div class="improve right">
<a href="http://prose.io/#bettermtl/bettermtl.github.io/edit/master/{{ page.path }}"><i class="fa fa-pencil"></i> &nbsp;Improve this page</a>
</div>
<h1 class="post-title">{{ page.title }}</h1>
<h1 class="title">{{ page.title }}</h1>
</header>
<div class="post-content">
<div class="content">
{{ content }}
</div>
</article>
4 changes: 2 additions & 2 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
<div class="improve right">
<a href="http://prose.io/#bettermtl/bettermtl.github.io/edit/master/{{ page.path }}"><i class="fa fa-pencil"></i> &nbsp;Improve this page</a>
</div>
<h1 class="post-title" itemprop="name headline">{{ page.title }}</h1>
<h1 class="title" itemprop="name headline">{{ page.title }}</h1>
<h3 class="post-date"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%B %-d, %Y" }}</time>{% if page.author %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>{% endif %}</h3>
</header>
<div class="post-content" itemprop="articleBody">
<div class="content" itemprop="articleBody">
{{content}}
</div>
<div id="disqus_thread"></div>
Expand Down
13 changes: 0 additions & 13 deletions _sass/_activity.scss
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
.langs {
text-align: right;
height: 0; // the magic happens here
font-size: 0;
.lang {
background-color: rgba(255, 255, 255, 0.8);
top: 0;
font-size: $base-font-size;
margin: 0px;
padding: 7px;
}
}

article.post {
.improve {
margin-top: 2px;
Expand Down
24 changes: 21 additions & 3 deletions _sass/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ p, blockquote, pre, hr,
dl, dd, ol, ul, figure {
margin: 0;
padding: 0;
font-size: $base-font-size;
}

/**
Expand Down Expand Up @@ -72,6 +73,24 @@ li {
*/
h1, h2, h3, h4, h5, h6 {
font-weight: $base-font-weight;
font-size: $base-font-size;
}

h1 {
font-weight: 900;
color: lighten(black, 10%);
}
h2 {
font-weight: 900;
color: lighten(black, 20%);
}
h3 {
font-weight: 700;
color: lighten(black, 30%);
}
h4 {
font-weight: 300;
color: lighten(black, 40%);
}

/**
Expand All @@ -96,8 +115,7 @@ blockquote {
color: $grey-color;
border-left: 4px solid $grey-color-light;
padding-left: $spacing-unit / 2;
font-size: 18px;
letter-spacing: -1px;
font-size: $base-font-size;
font-style: italic;
> :last-child {
margin-bottom: 0;
Expand All @@ -109,7 +127,7 @@ blockquote {
*/
pre,
code {
font-size: 15px;
font-size: $base-font-size;
border: 1px solid $grey-color-light;
border-radius: 3px;
background-color: #eef;
Expand Down
Loading

0 comments on commit ff2107f

Please sign in to comment.