From 61ea230e8311bb08ab9fb7117b4d0ed4df32ee44 Mon Sep 17 00:00:00 2001 From: Lorin Werthen Date: Sat, 27 Aug 2016 02:16:35 +0200 Subject: [PATCH] improvements to tiles --- .../assets/stylesheets/includes/blogpost.scss | 5 +++ .../assets/stylesheets/includes/tiles.scss | 8 +++++ content/assets/stylesheets/main.scss | 2 ++ content/posts/15-16/xtext.md | 1 + content/posts/16-17/review-awk.md | 7 ---- content/posts/16-17/review-c.md | 36 +++++++++++++++++++ content/tipuesearch_content.js | 4 +-- layouts/blogpost.erb | 4 +-- layouts/partials/_tile.erb | 17 ++++++--- 9 files changed, 69 insertions(+), 15 deletions(-) create mode 100644 content/assets/stylesheets/includes/blogpost.scss create mode 100644 content/assets/stylesheets/includes/tiles.scss delete mode 100644 content/posts/16-17/review-awk.md create mode 100644 content/posts/16-17/review-c.md diff --git a/content/assets/stylesheets/includes/blogpost.scss b/content/assets/stylesheets/includes/blogpost.scss new file mode 100644 index 0000000..bd7ee28 --- /dev/null +++ b/content/assets/stylesheets/includes/blogpost.scss @@ -0,0 +1,5 @@ +.blogpost { + .blogtitle { + font-size: 4em; + } +} diff --git a/content/assets/stylesheets/includes/tiles.scss b/content/assets/stylesheets/includes/tiles.scss new file mode 100644 index 0000000..722699b --- /dev/null +++ b/content/assets/stylesheets/includes/tiles.scss @@ -0,0 +1,8 @@ +.notification.is-info { + .content { + h1 { + color: white; + font-weight: bold; + } + } +} diff --git a/content/assets/stylesheets/main.scss b/content/assets/stylesheets/main.scss index 1913dbb..238099f 100644 --- a/content/assets/stylesheets/main.scss +++ b/content/assets/stylesheets/main.scss @@ -17,4 +17,6 @@ $family-sans-serif: 'Open Sans', sans-serif; @import "includes/variables"; @import "includes/cammie"; @import "includes/events"; +@import "includes/tiles"; +@import "includes/blogpost"; @import "includes/general"; diff --git a/content/posts/15-16/xtext.md b/content/posts/15-16/xtext.md index 85da46a..fef63f1 100644 --- a/content/posts/15-16/xtext.md +++ b/content/posts/15-16/xtext.md @@ -1,6 +1,7 @@ --- title: Xtext Workshop created_at: 01-04-2016 +description: Xtext is een ding, en heeft een workshop --- Op **26 april om 18:00 in Auditorium A2, Campus Sterre, Gebouw S9** organiseren we een workshop over [Xtext](https://eclipse.org/Xtext/). **Xtext** is een framework om nieuwe domein-specifieke computertalen (**DSLs**) mee te ontwerpen. Een **DSL** kan een nieuwe programmeertaal zijn, maar is meestal erg specifiek: bijvoorbeeld voor het besturen van robots, voor controle van wasmachines of voor sturing van de on-board computer in auto’s. Mensen die deze machines maken zijn vaak geen programmeurs, en zij kunnen veel vlotter werken met een DSL dan met een algemene programmeertaal. diff --git a/content/posts/16-17/review-awk.md b/content/posts/16-17/review-awk.md deleted file mode 100644 index 8e1e5bf..0000000 --- a/content/posts/16-17/review-awk.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: AWK review -description: We hebben even wat dingen in Awk geschreven, en dit zijn onze meningen -created_at: 23-10-2016 ---- - -Awk is een toffe taal enal diff --git a/content/posts/16-17/review-c.md b/content/posts/16-17/review-c.md new file mode 100644 index 0000000..7bdbd4d --- /dev/null +++ b/content/posts/16-17/review-c.md @@ -0,0 +1,36 @@ +--- +title: C review +description: We hebben even wat dingen in C geschreven, en dit zijn onze meningen +created_at: 23-10-2016 +--- + +> *Ben ik nu echt de enige die C echt niet leuk vindt?* +> +> — Ilion Iasoon Beyst + +C is een toffe taal enal + +~~~ +Individual *genetic_algo(Area *area, StationCol *stations, double lo, double hi) { + // Initialize global variables + init_coverage_polygon(area); + MAX_POWER = power_to_energy_usage(43); + + Population* p = generate_initial_population(POPULATION_SIZE, stations); + recalculate_fitness(area, stations, p, lo, hi); + + Individual* best = genetic_algo_exec(p, area, stations, POPULATION_SIZE, lo, hi, clock()); + for (size_t i = 0; i < best->size; i++) { + printf("%d\n", best->distribution[i]); + } + printf("%f\n", calculate_energy_usage(stations, best)); + printf("%f\n", calculate_station_coverage(area, stations, best, NULL)); + + for (size_t i = 0; i < p->size; i++) { + individual__free(p->elems[i]); + } + population__free(p); + + return best; +} +~~~ diff --git a/content/tipuesearch_content.js b/content/tipuesearch_content.js index d5d0527..603a248 100644 --- a/content/tipuesearch_content.js +++ b/content/tipuesearch_content.js @@ -3,8 +3,8 @@ var tipuesearch = { "pages": [ { "title": "<%= e[:title] %>", "url": "<%= url_for(e) %>", - "text": "<%= excerptize(e.reps[:text].compiled_content, length: 200).gsub(/\n/, ' ') %>", + "text": '<%= excerptize(e.reps[:text].compiled_content, length: 200).gsub(/\n/, ' ') %>', "tags": "" }, <% end %> -]}; +]} diff --git a/layouts/blogpost.erb b/layouts/blogpost.erb index 9496929..39d027b 100644 --- a/layouts/blogpost.erb +++ b/layouts/blogpost.erb @@ -1,5 +1,5 @@ -
-

+
+

<%= item[:title] %>

diff --git a/layouts/partials/_tile.erb b/layouts/partials/_tile.erb index 0451e9f..246ea0b 100644 --- a/layouts/partials/_tile.erb +++ b/layouts/partials/_tile.erb @@ -1,10 +1,19 @@
-
+
-

- <%= @article[:title] %> -

+
+
+

+ <%= @article[:title] %> +

+
+
+ + <%= @article[:created_at] %> + +
+
<%= @article[:description] %>