diff --git a/.travis.yml b/.travis.yml index 5935693..cf474fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,4 +19,4 @@ script: after_success: - mv deploy_key ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa -- '[[ $TRAVIS_BRANCH == "master" ]] && bundle exec nanoc deploy --target public' +- '[[ $TRAVIS_BRANCH == "master" ]] && bundle exec nanoc deploy public' diff --git a/Gemfile b/Gemfile index ee3c8a5..4fb03c8 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ # frozen_string_literal: true source 'https://rubygems.org' -gem 'nanoc', '~>4.3.1' +gem 'nanoc', '~>4.3.3' gem 'kramdown' gem 'coffee-script' # Needed for relativize_urls diff --git a/Gemfile.lock b/Gemfile.lock index 4dabb4d..45c0ef0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,7 +3,7 @@ GEM specs: adsf (1.2.1) rack (>= 1.0.0) - autoprefixer-rails (6.4.0.3) + autoprefixer-rails (6.5.0.1) execjs builder (3.2.2) coderay (1.1.1) @@ -35,7 +35,7 @@ GEM hamster (3.0.0) concurrent-ruby (~> 1.0) highline (1.7.8) - icalendar (2.4.0) + icalendar (2.4.1) json (2.0.2) kramdown (1.12.0) listen (3.1.5) @@ -45,7 +45,7 @@ GEM lumberjack (1.0.10) method_source (0.8.2) mini_portile2 (2.1.0) - nanoc (4.3.2) + nanoc (4.3.4) cri (~> 2.3) hamster (~> 3.0) ref (~> 2.0) @@ -87,10 +87,10 @@ DEPENDENCIES highline icalendar kramdown - nanoc (~> 4.3.1) + nanoc (~> 4.3.3) nokogiri sass w3c_validators BUNDLED WITH - 1.12.5 + 1.13.0 diff --git a/Rules b/Rules index 9353a7b..742a764 100644 --- a/Rules +++ b/Rules @@ -4,6 +4,9 @@ require 'json' require 'icalendar' +# Please @NoctuaNivalis +require 'socket' + # # # PREPROCESS @@ -28,11 +31,20 @@ preprocess do academic_years.each do |year| @items.create( '', - { academic_year: year }, - "/archives/#{year}-#{year + 1}.html", + { academic_year: year, title: "Blog" }, + "/blog/#{year}-#{year + 1}.html", binary: false ) end + + academic_years_items[academic_years.max].update_attributes( + navigable: true, + order: 10 + ) + + all_events.each do |event| + event[:time] = Date.parse(event[:time]) + end end # @@ -45,10 +57,12 @@ compile '/feed.xml' do write '/feed.xml' end +passthrough '/quotes.json' + # # ARCHIVES # -compile '/archives/*' do +compile '/blog/*' do layout '/archive_page.*' layout '/generic.*' layout '/default.*' @@ -139,6 +153,7 @@ ignore '/assets/stylesheets/includes/**/*' compile '/assets/stylesheets/**/*.scss' do filter :sass, syntax: :scss + filter :autoprefixer if Socket.gethostname == 'abysm' end passthrough '/assets/images/*.{png,svg}' diff --git a/content/about.erb b/content/about.erb index 7309f09..cc269a9 100644 --- a/content/about.erb +++ b/content/about.erb @@ -1,6 +1,7 @@ --- navigable: true title: About +order: 0 ---

Over Zeus WPI

diff --git a/content/archives.erb b/content/archives.erb deleted file mode 100644 index de70590..0000000 --- a/content/archives.erb +++ /dev/null @@ -1,11 +0,0 @@ ---- -navigable: true -title: Archieven ---- - diff --git a/content/assets/scripts/cammie.coffee b/content/assets/scripts/cammie.coffee index 912d754..9356a82 100644 --- a/content/assets/scripts/cammie.coffee +++ b/content/assets/scripts/cammie.coffee @@ -25,8 +25,8 @@ $ "#cammie-ctrls" $ '.ctrl' .click -> $context = $ this - $.ajax "//kelder.zeus.ugent.be/webcam/cgi/ptdc.cgi", + $.ajax "https://kelder.zeus.ugent.be/webcam/cgi/ptdc.cgi", data: command: $context.data 'command' posX: $context.data 'x' - posY: $context.data 'y' \ No newline at end of file + posY: $context.data 'y' diff --git a/content/assets/scripts/gamification.coffee b/content/assets/scripts/gamification.coffee new file mode 100644 index 0000000..33d55b8 --- /dev/null +++ b/content/assets/scripts/gamification.coffee @@ -0,0 +1,8 @@ +$ -> + $.getJSON 'https://zeus.ugent.be/game/top4/show.json', (data) -> + str = "
    " + for x in data + str += "
  1. #{x.github_name} (#{x.score} Z$)
  2. " + str += "
" + + $('#gamification-coders').html(str) diff --git a/content/assets/scripts/quote.coffee b/content/assets/scripts/quote.coffee new file mode 100644 index 0000000..43121e0 --- /dev/null +++ b/content/assets/scripts/quote.coffee @@ -0,0 +1,4 @@ +$ -> + $.getJSON 'http://localhost:3000/quotes.json', (data) -> + quote = data[Math.floor(Math.random()*data.length)] + $('#quote').append("

#{quote.title}

#{quote.description}

") diff --git a/content/assets/stylesheets/includes/blogpost.scss b/content/assets/stylesheets/includes/blogpost.scss index bd7ee28..a23d397 100644 --- a/content/assets/stylesheets/includes/blogpost.scss +++ b/content/assets/stylesheets/includes/blogpost.scss @@ -3,3 +3,14 @@ font-size: 4em; } } + +.padbox{ + margin-bottom:10px; +} + +.bolder a{ + color:#565C5E; + font-weight: bold; + font-size: 20pt; + font-family: 'Avenir'; +} diff --git a/content/assets/stylesheets/includes/general.scss b/content/assets/stylesheets/includes/general.scss index bc8d330..0aeee4a 100644 --- a/content/assets/stylesheets/includes/general.scss +++ b/content/assets/stylesheets/includes/general.scss @@ -48,3 +48,8 @@ footer.footer { vertical-align: inherit; } } + +::selection { + color: white; + background: rgba(255, 127, 0, 0.99); +} diff --git a/content/assets/stylesheets/includes/projects.css b/content/assets/stylesheets/includes/projects.css deleted file mode 100644 index 7d8a5da..0000000 --- a/content/assets/stylesheets/includes/projects.css +++ /dev/null @@ -1,25 +0,0 @@ -/*# sourceMappingURL=projects.css.map */ -/* line 4, /Users/mehmet/Projects/zeus.ugent.be/content/assets/stylesheets/includes/projects.scss */ -.imgspace { - display: flex; - justify-content: space-around; - width: 100%; - text-align: center; } - -/* line 11, /Users/mehmet/Projects/zeus.ugent.be/content/assets/stylesheets/includes/projects.scss */ -.imgcenter { - display: flex; - justify-content: center; - /* align horizontal */ - align-items: center; - /* align vertical */ } - -/* line 18, /Users/mehmet/Projects/zeus.ugent.be/content/assets/stylesheets/includes/projects.scss */ -.padbot { - padding-bottom: 15px; } - -/* line 24, /Users/mehmet/Projects/zeus.ugent.be/content/assets/stylesheets/includes/projects.scss */ -.padtop { - padding-top: 25px; } - -/*# sourceMappingURL=projects.css.map */ \ No newline at end of file diff --git a/content/assets/stylesheets/includes/tiles.scss b/content/assets/stylesheets/includes/tiles.scss index 4e95000..8f8d27a 100644 --- a/content/assets/stylesheets/includes/tiles.scss +++ b/content/assets/stylesheets/includes/tiles.scss @@ -1,20 +1,16 @@ a.box { - color: #000; + &:hover { + box-shadow: 0 2px 3px rgba($black, 0.1), 0 0 0 1px $blue + } } #homepage { .box { - background-color: $box-colour; - - &.highlighted { - background-color: $highlighted-box-colour; - color: $highlighted-text-colour; - - .content { - h1 { - color: white; - } - } - } + border-radius: 0; } } + +.centering { + display: flex; + justify-content: center; +} diff --git a/content/assets/stylesheets/includes/variables.scss b/content/assets/stylesheets/includes/variables.scss index 320db01..38957eb 100644 --- a/content/assets/stylesheets/includes/variables.scss +++ b/content/assets/stylesheets/includes/variables.scss @@ -1,14 +1,19 @@ // Colours $zeus-orange: #FF7F00; +$zeus-blue: #00C4FF; + $navbar-border-color: #CCC; $event-border-color: #DDD; $orange: $zeus-orange; +$blue: $zeus-blue; $primary: $orange; $family-sans-serif: 'Lato', sans-serif; $link-visited: inherit; +$border_hover: $blue; + $box-colour: #EEE; $highlighted-box-colour: $zeus-orange; $highlighted-text-colour: white; diff --git a/content/events.erb b/content/events.erb index 01c0757..699ea84 100644 --- a/content/events.erb +++ b/content/events.erb @@ -1,6 +1,7 @@ --- navigable: true title: Events +order: 20 ---
@@ -8,7 +9,22 @@ title: Events

Upcoming events

- <% all_events.each do |event| %> + <% upcoming_events.each do |event| %> + + <% if (sub_events(event)).empty? %> + <%= render '/partials/_event_preview.*', event: event %> + <% else %> + <% sub_events(event).each do |sub_event| %> + <%= render '/partials/_event_preview.*', event: sub_event, main_event: event %> + <% end %> + <% end %> + <% end %> + +
+

Past events

+
+ + <% past_events.each do |event| %> <% if (sub_events(event)).empty? %> <%= render '/partials/_event_preview.*', event: event %> diff --git a/content/events/15-16/awk.md b/content/events/15-16/awk.md deleted file mode 100644 index 5207aba..0000000 --- a/content/events/15-16/awk.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: AWK-les -banner: https://zeus.ugent.be/wp-content/uploads/2016/02/awkles-768x1007.jpg -description: Een AWK-les voor AWK gerelateerde dingen -created_at: 01-02-2016 -time: 23-02-2016 -location: Auditorium A1, Campus Sterre, Gebouw S9 -locationlink: Zeus WPI,Ghent Belgium -description: Dit is een description van het awk event! ---- - -Op **dinsdag 23 februari 18:00** (na de les Scriptingtalen) in **Auditorium A1** organiseren we een **AWK-les** gegeven door **professor Peter Dawyndt**. - -**AWK** is een scriptingtaal, bedoeld om lijn per lijn tekstbestanden te verwerken. Zo wordt AWK vaak gebruikt voor de ingebouwde werking met delimiters om CSV bestanden en dergelijke te verwerken. AWK staat tevens bekend om de talloze [one-liners](http://www.pement.org/awk/awk1line.txt) die in de command line gebruikt kunnen worden. - -Sinds vorig jaar wordt AWK (samen met sed) niet meer gegeven in het vak Scriptingtalen, om meer te kunnen concentreren op Python en JavaScript. Hoewel deze zeer goede general purpose talen zijn, blijft AWK ongeƫvenaard voor razendsnelle tekstverwerking en transformaties. diff --git a/content/events/15-16/bottlebats/intro.md b/content/events/15-16/bottlebats/intro.md deleted file mode 100644 index c410563..0000000 --- a/content/events/15-16/bottlebats/intro.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Bottle Bats Introductie -time: 12-3-16 -location: Grace Hopper -description: Dit is een description! ---- diff --git a/content/events/15-16/bottlebats/main.md b/content/events/15-16/bottlebats/main.md deleted file mode 100644 index c321015..0000000 --- a/content/events/15-16/bottlebats/main.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: Bottle Bats ---- diff --git a/content/events/15-16/bottlebats/test.md b/content/events/15-16/bottlebats/test.md deleted file mode 100644 index 9c05546..0000000 --- a/content/events/15-16/bottlebats/test.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: test -time: 12-3-16 -location: Grace Hopper -description: Dit is een description! ---- diff --git a/content/events/16-17/LAN.md b/content/events/16-17/LAN.md index 6cb52d9..8b63afe 100644 --- a/content/events/16-17/LAN.md +++ b/content/events/16-17/LAN.md @@ -3,7 +3,7 @@ title: Geeks, Attack! V banner: https://scontent.xx.fbcdn.net/v/t1.0-9/13903431_1277596932251344_3927837466166230371_n.jpg?oh=bdda0d18a635c49893a097fba6aa99b9&oe=587C7886 description: Zeus' vijfde LAN-Party created_at: 13-09-2016 -time: 4-11-2016 +time: 04-11-2016 location: Therminal, Hoveniersberg 24 9000 Gent locationlink: Therminal,Ghent Belgium description: Zeus' vijfde LAN-Party diff --git a/content/events/16-17/datacenter.md b/content/events/16-17/datacenter.md new file mode 100644 index 0000000..61dfcf9 --- /dev/null +++ b/content/events/16-17/datacenter.md @@ -0,0 +1,14 @@ +--- +title: Bezoek datacenter +banner: https://emergingtechblog.emc.com/wp-content/uploads/2015/10/AdobeStock_86289688.jpeg +description: Zeus bezoekt het datacenter en de supercomputer in S10! +created_at: 3-10-2016 +time: 10-10-2016 +location: hpc gent +locationlink: 51.023650, 3.712018 +--- + +Zeus WPI organiseert in samenwerking met de medewerkers van de HPC een rondleiding in de S10. +Hier bevindt zich het datacenter en sinds enkele jaren de supercomputer. +Een echte must-see voor elke informaticus. +Inschrijven is verplicht en kunt u [hier](https://event.fkgent.be/events/111) doen . diff --git a/content/index.erb b/content/index.erb index 512a76c..e615d44 100644 --- a/content/index.erb +++ b/content/index.erb @@ -7,77 +7,67 @@
- <%= render '/partials/_tile.*', article: all_events[0] %> + <%= render '/partials/_tile.*', article: all_events[0], htmlclass: "highlighted", small_text: "Upcoming event" %>
- <%= render '/partials/_tile.*', article: all_events[1], htmlclass: "highlighted" %> + <%= render '/partials/_tile.*', article: all_events[1], small_text: "Upcoming event" %>
- IDK LOL -
-
-
-
-
- <%= fa 'wikipedia-w' %> -
-
-
-
- <%= fa 'video-camera' %> + +
+
+ +
-
-
-
-

<%= sorted_articles.first[:title] %>

- <%= sorted_articles.first[:description] %> -
-
+ <%= render '/partials/_tile.*', article: sorted_articles.first, small_text: "Latest blogpost" %>
-

- Numero uno: @werthen -

-

- Numero dos: @myncke -

-

- Numero tres: @iepoev -

-

- Numero quatro: @becousae -

-
-
-
-
-
- GITHUB -
-
-
-
- GITHUB +
@@ -85,3 +75,5 @@
+<%= asset :js, :gamification %> +<%= asset :js, :quote %> diff --git a/content/posts/16-17/review-c.md b/content/posts/16-17/review-c.md deleted file mode 100644 index 7bdbd4d..0000000 --- a/content/posts/16-17/review-c.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -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/projects.erb b/content/projects.erb index 2a5a232..b471584 100644 --- a/content/projects.erb +++ b/content/projects.erb @@ -1,6 +1,7 @@ --- navigable: true title: Projecten +order: 30 ---
diff --git a/content/quotes.json b/content/quotes.json new file mode 100644 index 0000000..14e75b7 --- /dev/null +++ b/content/quotes.json @@ -0,0 +1 @@ +[{"title":"Care About Your Craft","description":"Why spend your life developing software unless you care about doing it well"},{"title":"Think! About Your Work","description":"Turn off the autopilot and take control. Constantly critique and appraise your work"},{"title":"Provide Options, Don't Make Lame Excuses","description":"Instead of excuses, provide options. Don't say it can't be done; explain what can be done"},{"title":"Don't Live with Broken Windows","description":"Fix bad designs, wrong decisions, and poor code when you see them"},{"title":"Be a Catalyst for Change","description":"You can't force change on people. Instead, show them how the future might be and help them participate in creating it"},{"title":"Remember the Big Picture","description":"Don't get so engrossed in the details that you forget to check what's happening around you"},{"title":"Make Quality a Requirements Issue","description":"Involve your users in determining the project's real quality requirements"},{"title":"Invest Regularly in Your Knowledge Portfolio","description":"Make learning a habit"},{"title":"Critically Analyze What You Read and Hear","description":"Don't be swayed by vendors, media hype, or dogma. Analyze information in terms of you and your project"},{"title":"It's Both What You Say and the Way You Say It","description":"There's no point in having great ideas if you don't communicate them effectively"},{"title":"DRY - Don't Repeat Yourself","description":"Every piece of knowledge must have a single, unambiguous, authoritative representation within a system"},{"title":"Make It Easy to Reuse","description":"If it's easy to reuse, people will. Create an environment that supports reuse"},{"title":"Eliminate Effects Between Unrelated Things","description":"Design components that are self-contained. independent, and have a single, well-defined purpose"},{"title":"There Are No Final Decisions","description":"No decision is cast in stone. Instead, consider each as being written in the sand at the beach, and plan for change"},{"title":"Use Tracer Bullets to Find the Target","description":"Tracer bullets let you home in on your target by trying things and seeing how close they land"},{"title":"Prototype to Learn","description":"Prototyping is a learning experience. Its value lies not in the code you produce, but in the lessons you learn"},{"title":"Program Close to the Problem Domain","description":"Design and code in your user's language"},{"title":"Estimate to Avoid Surprises","description":"Estimate before you start. You'll spot potential problems up front"},{"title":"Iterate the Schedule with the Code","description":"Use experience you gain as you implement to refine the project time scales"},{"title":"Keep Knowledge in Plain Text","description":"Plain text won't become obsolete. It helps leverage your work and simplifies debugging and testing"},{"title":"Use the Power of Command Shells","description":"Use the shell when graphical user interfaces don't cut it"},{"title":"Use a Single Editor Well","description":"The editor should be an extension of your hand; make sure your editor is configurable, extensible, and programmable"},{"title":"Always Use Source Code Control","description":"Source code control is a time machine for your work - you can go back"},{"title":"Fix the Problem, Not the Blame","description":"It doesn't really matter whether the bug is your fault or someone else's - it is still your problem, and it still needs to be fixed"},{"title":"Don't Panic When Debugging","description":"Take a deep breath and THINK! about what could be causing the bug"},{"title":"\"select\" Isn't Broken.","description":"It is rare to find a bug in the OS or the compiler, or even a third-party product or library. The bug is most likely in the application"},{"title":"Don't Assume It - Prove It","description":"Prove your assumptions in the actual environment-- with real data and boundary conditions"},{"title":"Learn a Text Manipulation Language","description":"You spend a large part of each day working with text. Why not have the computer do some of it for you?"},{"title":"Write Code That Writes Code","description":"Code generators increase your productivity and help avoid duplication"},{"title":"You Can't Write Perfect Software","description":"Software can't be perfect. Protect your code and users from the inevitable errors"},{"title":"Design with Contracts","description":"Use contracts to document and verify that code does no more and no less than it claims to do"},{"title":"Crash Early","description":"A dead program normally does a lot less damage than a crippled one"},{"title":"Use Assertions to Prevent the Impossible","description":"Assertions validate your assumptions. Use them to protect your code from an uncertain world"},{"title":"Use Exceptions for Exceptional Problems","description":"Exceptions can suffer from all the readability and maintainability problems of classic spaghetti code. Reserve exceptions for exceptional things"},{"title":"Finish What You Start","description":"Where possible, the routine or object that allocates a resource should be responsible for deallocating it"},{"title":"Minimize Coupling Between Modules","description":"Avoid coupling by writing \"shy\" code and applying the Law of Demeter"},{"title":"Configure, Don't Integrate","description":"Implement technology choices for an application as configuration options, not through integration or engineering"},{"title":"Put Abstractions in Code, Details in Metadata","description":"Program for the general case, and put the specifics outside the compiled code base"},{"title":"Analyze Workflow to Improve Concurrency","description":"Exploit concurrency in your user's workflow"},{"title":"Design Using Services","description":"Design in terms of services - independent, concurrent objects behind well-defined, consistent interfaces"},{"title":"Always Design for Concurrency","description":"Allow for concurrency, and you'll design cleaner interfaces with fewer assumptions"},{"title":"Separate Views from Models","description":"Gain flexibility at low cost by designing your application in terms of models and views"},{"title":"Use Blackboards to Coordinate Workflow","description":"Use blackboards to coordinate disparate facts and agents, while maintaining independence and isolation among participants"},{"title":"Don't Program by Coincidence","description":"Rely only on reliable things. Beware of accidental complexity, and don't confuse a happy coincidence with a purposeful plan"},{"title":"Estimate the Order of Your Algorithms","description":"Get a feel for how long things are likely to take before you write code"},{"title":"Test Your Estimates","description":"Mathematical analysis of algorithms doesn't tell you everything. Try timing your code in its target environment"},{"title":"Refactor Early, Refactor Often","description":"Just as you might weed and rearrange a garden, rewrite, rework, and re-architect code when it needs it. Fix the root of the problem"},{"title":"Design to Test","description":"Start thinking about testing before you write a line of code"},{"title":"Test Your Software, or Your Users Will","description":"Test ruthlessly. Don't make your users find bugs for you"},{"title":"Don't Use Wizard Code You Don't Understand","description":"Wizards can generate reams of code. Make sure you understand all of it before you incorporate it into your project"},{"title":"Don't Gather Requirements - Dig for Them","description":"Requirements rarely lie on the surface. They're buried deep beneath layers of assumptions, misconceptions, and politics"},{"title":"Work with a User to Think Like a User","description":"It's the best way to gain insight into how the system will really be used"},{"title":"Abstractions Live Longer than Details","description":"Invest in the abstraction, not the implementation. Abstractions can survive the barrage of changes from different implementations and new technologies"},{"title":"Use a Project Glossary","description":"Create and maintain a single source of all the specific terms and vocabulary for a project"},{"title":"Don't Think Outside the Box - Find the Box","description":"When faced with an impossible problem, identify the real constraints. Ask yourself: \"Does it have to be done this way? Does it have to be done at all?\""},{"title":"Start When You're Ready","description":"You've been building experience all your life. Don't ignore niggling doubts"},{"title":"Some Things Are Better Done than Described","description":"Don't fall into the specification spiral - at some point you need to start coding"},{"title":"Don't Be a Slave to Formal Methods","description":"Don't blindly adopt any technique without putting it into the context of your development practices and capabilities"},{"title":"Costly Tools Don't Produce Better Designs","description":"Beware of vendor hype, industry dogma, and the aura of the price tag. Judge tools on their merits"},{"title":"Organize Teams Around Functionality","description":"Don't separate designers from coders, testers from data modelers. Build teams the way you build code"},{"title":"Don't Use Manual Procedures","description":"A shell script or batch file will execute the same instructions, in the same order, time after time"},{"title":"Test Early. Test Often. Test Automatically","description":"Tests that run with every build are much more effective than test plans that sit on a shelf"},{"title":"Coding Ain't Done 'Til All the Tests Run","description":"'Nuff said"},{"title":"Use Saboteurs to Test Your Testing","description":"Introduce bugs on purpose in a separate copy of the source to verify that testing will catch them"},{"title":"Test State Coverage, Not Code Coverage","description":"Identify and test significant program states. Just testing lines of code isn't enough"},{"title":"Find Bugs Once","description":"Once a human tester finds a bug, it should be the last time a human tester finds that bug. Automatic tests should check for it from then on"},{"title":"English is Just a Programming Language","description":"Write documents as you would write code: honor the DRY principle, use metadata, MVC, automatic generation, and so on"},{"title":"Build Documentation In, Don't Bolt It On","description":"Documentation created separately from code is less likely to be correct and up to date"},{"title":"Gently Exceed Your Users' Expectations","description":"Come to understand your users' expectations, then deliver just that little bit more"},{"title":"Sign Your Work","description":"Craftsmen of an earlier age were proud to sign their work. You should be, too"}] diff --git a/content/search.erb b/content/search.erb index 499adea..ce4c1fa 100644 --- a/content/search.erb +++ b/content/search.erb @@ -1,5 +1,5 @@ --- -navigable: true +navigable: false title: Search ---
diff --git a/layouts/archive_page.erb b/layouts/archive_page.erb index 7b8cfc2..f8d0e93 100644 --- a/layouts/archive_page.erb +++ b/layouts/archive_page.erb @@ -1,19 +1,27 @@ -<% posts_in_year(item[:academic_year]).each do |post| %> - - - -<% end %> +
+
    + <% academic_years_items.each do |year, item| %> +
  • + <%= link_to pretty_year(year), item %> +
  • + <% end %> +
+
+
diff --git a/layouts/eventpost.erb b/layouts/eventpost.erb index d895d83..99635ed 100644 --- a/layouts/eventpost.erb +++ b/layouts/eventpost.erb @@ -5,36 +5,33 @@ <% end %> -
+
<%= render '/partials/_navbar.*', zeus_logo_color: :white %>
-
- +
-

- - <%= item[:title] %> - + + <%= item[:title] %> +

- <%= item[:description] %> + <%= item[:description] %>

-

    -
  • <%= fa 'clock-o', li: true %><%= item[:time] %>
  • -
  • <%= fa 'globe', li: true %><%= item[:location] %>
  • -
+
    +
  • <%= fa 'clock-o', li: true %><%= item[:time].strftime '%A %d %B %Y' %>
  • +
  • <%= fa 'map-marker', li: true %><%= item[:location] %>
  • +

-
@@ -43,7 +40,7 @@
-
+
<%= yield %>
diff --git a/layouts/partials/_tile.erb b/layouts/partials/_tile.erb index 49cb075..9808a7b 100644 --- a/layouts/partials/_tile.erb +++ b/layouts/partials/_tile.erb @@ -1,19 +1,17 @@ -
-
-
-
-

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

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

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

+
+
+ + <%= @small_text %> +
- <%= @article[:description] %>
+ <%= @article[:description] %>
diff --git a/lib/helpers/archives.rb b/lib/helpers/archives.rb index f11d29f..fc4ed24 100644 --- a/lib/helpers/archives.rb +++ b/lib/helpers/archives.rb @@ -11,7 +11,7 @@ module ArchiveHelper end def academic_years_items - academic_years.map { |y| [y, items["/archives/#{y}-#{y + 1}.html"]] }.to_h + academic_years.to_a.reverse.map { |y| [y, items["/blog/#{y}-#{y + 1}.html"]] }.to_h end def pretty_year(year) diff --git a/lib/helpers/events.rb b/lib/helpers/events.rb index e278544..a627daa 100644 --- a/lib/helpers/events.rb +++ b/lib/helpers/events.rb @@ -1,7 +1,15 @@ require 'uri' module EventsHelper def all_events - @items.find_all('/events/*/*') + grouped_events + @items.find_all('/events/*/*').sort_by { |x| x[:time] } + end + + def upcoming_events + all_events.reject { |x| x[:time] < Date.today } + end + + def past_events + all_events.reject { |x| x[:time] >= Date.today } end def grouped_events diff --git a/lib/helpers/ical.rb b/lib/helpers/ical.rb index 69004ef..6520084 100644 --- a/lib/helpers/ical.rb +++ b/lib/helpers/ical.rb @@ -11,7 +11,7 @@ module IcalHelper def event_for(item) event = Icalendar::Event.new - event.dtstart = Date.parse(item[:time]) + event.dtstart = item[:time] event.summary = 'A great event!' event diff --git a/lib/helpers/nav.rb b/lib/helpers/nav.rb index ec6a8fb..d8dae5c 100644 --- a/lib/helpers/nav.rb +++ b/lib/helpers/nav.rb @@ -1,6 +1,6 @@ module NavigationHelper def nav_items - navigables = items.select { |i| i[:navigable] } + navigables = items.select { |i| i[:navigable] }.sort_by { |x| x[:order] || 10000 } navigables.each do |item| is_active = @item_rep && @item_rep.path == item.path diff --git a/package.json b/package.json index d102a9e..86c54e5 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,6 @@ "license": "MIT", "repository": "https://github.com/ZeusWPI/zeus.ugent.be", "dependencies": { - "bulma": "^0.1.2" + "bulma": "^0.2.1" } }