Getting the project working again

Replace Twitter Bootstrap by Zurb Foundation
Used @import in SCSS instad of require_tree for proper order and use of variables like $debian_color
Moved old files out of the way (renamed them to xx*)
Welcome controller (/) works
Moved templates from ERB to SLIM format
Fixed database settings
Reduced routes to working ones
Tidied up Gemfile
Checked in experimental lab files

Tried to find a good description for this massive commit :)
This commit is contained in:
Christoph Haas 2014-11-16 18:26:03 +01:00
parent a7e05b2b78
commit 87f545414f
38 changed files with 3341 additions and 156 deletions

View file

@ -0,0 +1,13 @@
#footer
p
//| DEBUG RESPONSIVE:
//strong.show-for-small-only Small
//strong.show-for-medium-only Medium
//strong.show-for-large-only Large
//strong.show-for-xlarge-only X-Large
//strong.show-for-xxlarge-up XX-Large
// TODO: show feedback form in a modal and send the context (URL, user) along with email
' This site is operated by Christoph Haas and his debshots web application. Want to leave
a href="mailto:email@christoph-haas.de" feedback?
' | Kindly hosted by
a href="http://vexxhost.com/" VEXXHOST

View file

@ -0,0 +1,40 @@
header
div.contain-to-grid
nav.top-bar data-topbar=true role="navigation"
ul.title-area
// TODO: Make the logo depend on the virtual host
li.name
img src="/images/logos/debian.svg" width="35" alt="Debian logo"
// TODO: Use proper distribution name
'Debian Screenshots >
// Not enough space for the search… where do we put it?
//li.item
// = form_tag( url(:package, :index), :method=>'get')
// = search_field_tag :search, :placeholder=>'Search…', :autofocus=>true
li.toggle-topbar.menu-icon
a href="#"
span Menu
section.top-bar-section
ul.right
li class=('active' if controller_name=='welcome')
a href="/" Home
li class=('active' if controller_name=='package')
a href="/packages" Explore
li class=('active' if controller_name=='upload')
a href="/upload" Contribute
li.has-dropdown
a href="#" Distributions
ul.dropdown
// TODO: Use proper distribution list
li
a href="#" Debian
li
a href="#" Ubuntu
li class=('active' if controller_name=='about')
a href="/about" About
li.divider
// TODO: Show link for admin/moderation view if admin is logged in
li.has-form
// TODO: Show "My" when the user is logged in
a.button href="/profile" Login

View file

@ -1,15 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Debshots</title>
<%= stylesheet_link_tag "application", media: "all" %>
<%= javascript_include_tag "application", "data-turbolinks-track" => false %>
<meta charset='utf-8' />
<%= csrf_meta_tags %>
</head>
<body>
<%= yield %>
</body>
</html>

View file

@ -0,0 +1,56 @@
doctype html
html
head
title screenshots.debian.net
/ TODO: make title reflect the virtual host (e.g. Debian)
meta charset="utf-8"
meta name="keywords" content="debian screenshots packages applications linux"
meta name="viewport" content="width=device-width, initial-scale=1.0"
/ TODO: make the keywords reflect the virtual host (e.g. Debian)
= stylesheet_link_tag "application", media: "all"
= javascript_include_tag "vendor/modernizr"
= stylesheet_link_tag "jquery-fancybox/jquery.fancybox", media: "all"
= stylesheet_link_tag "jquery.raty", media: "all"
= javascript_include_tag 'jquery'
/ = javascript_include_tag 'jquery.raty'
= csrf_meta_tags
body
// TODO: move topbar somewhere else than packages
#wholepage
= render 'layouts/topbar'
#content
= yield
= render 'layouts/footer'
= javascript_include_tag "application"
// Load Javascript libraries
// Initialize Zurb Foundation
javascript:
//$(document).foundation();
$('.fancybox').fancybox({nextEffect: "none", prevEffect: "none"});
// See http://wbotelhos.com/raty
//$('.star-rating').raty({
// score: 3,
// cancelOff: '/images/raty/cancel-off.png',
// cancelOn: '/images/raty/cancel-on.png',
// starHalf: '/images/raty/star-half.png',
// starOff: '/images/raty/star-off.png',
// starOn: '/images/raty/star-on.png',
// half: true
//});
//
//$('.star-rating-readonly').raty({
// score: 3,
// cancelOff: '/images/raty/cancel-off.png',
// cancelOn: '/images/raty/cancel-on.png',
// starHalf: '/images/raty/star-half.png',
// starOff: '/images/raty/star-off.png',
// starOn: '/images/raty/star-on.png',
// readOnly: true,
// halfShow: true,
// score: function() { return $(this).attr('data-score'); }
//});

View file

@ -0,0 +1,61 @@
#teaser.row
div.large-4.medium-4.small-3.columns
#biglogo
// TODO: make the logo depending on the virtual host
img src="/images/logos/debian.svg" width="400" alt="Debian logo"
div.large-8.medium-8.small-9.columns
h1 We have screenshots!
p
' Have you ever wondered how a certain piece of software looks
' and works before spending time installing it?
p
' This website lets you browse screenshots of
=> number_with_delimiter(@package_count)
' software packages coming with
' Debian and other Linux distributions. And of course you are encouraged to upload
' your own screenshots for others to explore.
p
= form_tag(packages_path, method: 'GET')
div.row.collapse.postfix-round
div.small-9.columns
input type="text" name="search" placeholder="Looking for a special software?" autofocus="true"
div.small-3.columns
input.button.postfix type="submit" value="Search"
div.row
hr
div.row
div.large-4.medium-12.small-12.columns.text-center
h2 Newest upload
// TODO: load actual newest upload and cache it
// TODO: link to the package page
a.black href=package_path(@newest_uploaded_package.name)
img src=@newest_uploaded_package.screenshots[0].image_url('large')
p
strong
=@newest_uploaded_package.name
' :
'
=@newest_uploaded_package.description
div.large-4.medium-12.small-12.columns.text-center
h2 Most popular
// TODO: load actual most popular package and highest-rated screenshot and cache it
// TODO: link to the package page
a.black href=package_path(@most_popular_package.name)
img src=@most_popular_package.screenshots[0].image_url('large')
p
strong
=@most_popular_package.name
' :
'
=@most_popular_package.description
div.large-4.medium-12.small-12.columns.text-center
h2 Your help needed
// TODO: load actual most popular package without a screenshot and cache it
a href=upload_package_path('firefox')
img src="/images/dummy/no-screenshots-upload-one.svg" width="80%"
p
' We lack a screenshot for the Firefox package. Can you
a href=upload_package_path('firefox') provide one
' ?