diff --git a/app/assets/images/copyleft-icon.svg b/app/assets/images/copyleft-icon.svg new file mode 100644 index 0000000..0d33e9f --- /dev/null +++ b/app/assets/images/copyleft-icon.svg @@ -0,0 +1,81 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/app/assets/images/gears.svg b/app/assets/images/gears.svg new file mode 100644 index 0000000..7add4cd --- /dev/null +++ b/app/assets/images/gears.svg @@ -0,0 +1,95 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/app/assets/images/tux-mono.svg b/app/assets/images/tux-mono.svg new file mode 100644 index 0000000..ce02134 --- /dev/null +++ b/app/assets/images/tux-mono.svg @@ -0,0 +1,66 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/app/assets/javascripts/parallax.coffee b/app/assets/javascripts/parallax.coffee index aa63965..7ed9ef3 100644 --- a/app/assets/javascripts/parallax.coffee +++ b/app/assets/javascripts/parallax.coffee @@ -7,6 +7,26 @@ window.App ||= {} content_top = content_left = width_delta = height_delta = 0 App.init = -> + $('a[href*=\\#]').each -> + if location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') and location.hostname == this.hostname and this.hash.replace(/#/,'') + $targetId = $(this.hash) + $targetAnchor = $('[name=' + this.hash.slice(1) + ']') + $target = if $targetId.length + $targetId + else + if $targetAnchor.length + $targetAnchor + else + false + + if $target + targetOffset = $target.offset().top + + $(this).click -> + $("#nav li a").removeClass("active") + $(this).addClass('active') + $('html, body').animate({scrollTop: targetOffset}, 1000) + return false App.scroll = -> v_scroll = $(document).scrollTop() diff --git a/app/assets/stylesheets/welcome.scss b/app/assets/stylesheets/welcome.scss index 01b3b1c..4fdeb0d 100644 --- a/app/assets/stylesheets/welcome.scss +++ b/app/assets/stylesheets/welcome.scss @@ -26,6 +26,9 @@ a { a:visited { color: rgb(60, 130, 12); } +hr { + margin: 5px 0 5px 0; +} #header { background: rgba(0, 0, 0, 0.7); @@ -55,7 +58,6 @@ a:visited { text-decoration: none; font-size: 30px; - font-family:"Meath"; font-weight: bold; } #nav ul{ @@ -128,23 +130,35 @@ a:visited { height: 0; content: ''; } -#about .box { +#about .textbox { display: inline-block; + padding: 10px; width: 30%; height: 100%; overflow: hidden; - border-style: solid; border-color: rgba(100,190,12,0.7); - border-radius: 10px; - border-width: 3px; background-color: rgba(255,255,255,0.7); box-shadow: 10px 10px 10px rgba(0,0,0,0.7); } +#projects { + position: relative; + width: 100%; + display: block; + list-style: none; + text-align: justify; +} +#projects .textbox { + display: inline-block; + padding: 3px; + margin-top: 10px; + border-color: rgb(100,190,12); + background-color: rgb(255,255,255); +} + .section { position: relative; height: 100%; - overflow: hidden; } @@ -157,7 +171,11 @@ a:visited { transform: translate(-50%, -50%); z-index: 1; } -.text { +.textbox { + text-align: center; + border-style: solid; + border-radius: 10px; + border-width: 3px; } /* diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index d99acfb..0556446 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -1,6 +1,9 @@ class WelcomeController < ApplicationController def index @projects = Gitlab::Project.all + @namespaces = @projects.map { |project| + project.namespace if project.namespace + }.uniq.sort { |a,b| a['name'] <=> b['name'] } end end # vim: set ts=2 sw=2: diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 053b1c0..b9a5c6e 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -12,11 +12,10 @@ diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index 100520a..a6ab987 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -1,29 +1,48 @@
-
+
-
-

Free as in "Free speach"

+
+ <%= image_tag("copyleft-icon.svg", size: "60") %> +

Free as in FREE SPEACH

+ Freedom
-
+
+ <%= image_tag("gears.svg", size: "60") %>

Custom Code

+ Programs
-
+
+ <%= image_tag("tux-mono.svg", size: "60") %>

Linux Consulting

+ Support
-
-

Other

-

Welcome to the famous Weird Web Workers.

- <% @projects.each do |project| -%> -

<%= project.name %>

+
+

This is mostly about programming.

+

+ Here you find links to the projects hosted on Weird Web Workers. +

+ <% @namespaces.each do |namespace| -%> +
+

<%= namespace['name'] %>

+

<%= namespace['description'] %>

+
+ <% @projects.find_all { |project| + project.namespace == namespace + }.each do |project| -%> +
+ <%= link_to project.name, project.web_url, :target => "_blank" %> +
+ <% end -%> +
<% end -%>
-
+

Other

Some other stuff here... @@ -31,7 +50,7 @@

-
+

Other

Some other stuff here...