Merge branch 'master' of git.workaround.org:chaas/debshots
This commit is contained in:
commit
a56944038c
25 changed files with 302 additions and 542 deletions
|
|
@ -37,3 +37,21 @@ load_reviews = function() {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Initialize the upload form.
|
||||||
|
upload_form_init = function() {
|
||||||
|
// Disable the submit button until files are selected.
|
||||||
|
$('#file-submit').hide();
|
||||||
|
|
||||||
|
// Install event handler to notice when files were selected.
|
||||||
|
$('#file').on('change', upload_form_files_selected);
|
||||||
|
};
|
||||||
|
|
||||||
|
upload_form_files_selected = function() {
|
||||||
|
no_files = this.files.length;
|
||||||
|
if (no_files > 0) {
|
||||||
|
$('#file-label').html(no_files+" files selected");
|
||||||
|
$('#file-select-button').addClass('success');
|
||||||
|
$('#file-submit').fadeIn('slow');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -25,19 +25,20 @@
|
||||||
// 20. Label
|
// 20. Label
|
||||||
// 21. Media Object
|
// 21. Media Object
|
||||||
// 22. Menu
|
// 22. Menu
|
||||||
// 23. Off-canvas
|
// 23. Meter
|
||||||
// 24. Orbit
|
// 24. Off-canvas
|
||||||
// 25. Pagination
|
// 25. Orbit
|
||||||
// 26. Progress Bar
|
// 26. Pagination
|
||||||
// 27. Reveal
|
// 27. Progress Bar
|
||||||
// 28. Slider
|
// 28. Reveal
|
||||||
// 29. Switch
|
// 29. Slider
|
||||||
// 30. Table
|
// 30. Switch
|
||||||
// 31. Tabs
|
// 31. Table
|
||||||
// 32. Thumbnail
|
// 32. Tabs
|
||||||
// 33. Title Bar
|
// 33. Thumbnail
|
||||||
// 34. Tooltip
|
// 34. Title Bar
|
||||||
// 35. Top Bar
|
// 35. Tooltip
|
||||||
|
// 36. Top Bar
|
||||||
|
|
||||||
@import 'util/util';
|
@import 'util/util';
|
||||||
|
|
||||||
|
|
@ -54,12 +55,14 @@ $debian-color: #c70338;
|
||||||
$global-font-size: 100%;
|
$global-font-size: 100%;
|
||||||
$global-width: rem-calc(1200);
|
$global-width: rem-calc(1200);
|
||||||
$global-lineheight: 1.5;
|
$global-lineheight: 1.5;
|
||||||
$primary-color: #808080;
|
$foundation-palette: (
|
||||||
//$primary-color: $debian-color;
|
primary: $debian-color,
|
||||||
$secondary-color: #777;
|
// primary: #2199e8,
|
||||||
$success-color: #3adb76;
|
secondary: #777,
|
||||||
$warning-color: #ffae00;
|
success: #3adb76,
|
||||||
$alert-color: #ec5840;
|
warning: #ffae00,
|
||||||
|
alert: #ec5840,
|
||||||
|
);
|
||||||
$light-gray: #e6e6e6;
|
$light-gray: #e6e6e6;
|
||||||
$medium-gray: #cacaca;
|
$medium-gray: #cacaca;
|
||||||
$dark-gray: #8a8a8a;
|
$dark-gray: #8a8a8a;
|
||||||
|
|
@ -75,6 +78,10 @@ $global-weight-normal: normal;
|
||||||
$global-weight-bold: bold;
|
$global-weight-bold: bold;
|
||||||
$global-radius: 0;
|
$global-radius: 0;
|
||||||
$global-text-direction: ltr;
|
$global-text-direction: ltr;
|
||||||
|
$global-flexbox: false;
|
||||||
|
$print-transparent-backgrounds: true;
|
||||||
|
|
||||||
|
@include add-foundation-colors;
|
||||||
|
|
||||||
// 2. Breakpoints
|
// 2. Breakpoints
|
||||||
// --------------
|
// --------------
|
||||||
|
|
@ -185,9 +192,9 @@ $stat-font-size: 2.5rem;
|
||||||
|
|
||||||
$abide-inputs: true;
|
$abide-inputs: true;
|
||||||
$abide-labels: true;
|
$abide-labels: true;
|
||||||
$input-background-invalid: $alert-color;
|
$input-background-invalid: map-get($foundation-palette, alert);
|
||||||
$form-label-color-invalid: $alert-color;
|
$form-label-color-invalid: map-get($foundation-palette, alert);
|
||||||
$input-error-color: $alert-color;
|
$input-error-color: map-get($foundation-palette, alert);
|
||||||
$input-error-font-size: rem-calc(12);
|
$input-error-font-size: rem-calc(12);
|
||||||
$input-error-font-weight: $global-weight-bold;
|
$input-error-font-weight: $global-weight-bold;
|
||||||
|
|
||||||
|
|
@ -201,7 +208,7 @@ $accordion-item-background-hover: $light-gray;
|
||||||
$accordion-item-padding: 1.25rem 1rem;
|
$accordion-item-padding: 1.25rem 1rem;
|
||||||
$accordion-content-background: $white;
|
$accordion-content-background: $white;
|
||||||
$accordion-content-border: 1px solid $light-gray;
|
$accordion-content-border: 1px solid $light-gray;
|
||||||
$accordion-content-color: foreground($accordion-background, $primary-color);
|
$accordion-content-color: foreground($accordion-content-background, $body-font-color);
|
||||||
$accordion-content-padding: 1rem;
|
$accordion-content-padding: 1rem;
|
||||||
|
|
||||||
// 8. Accordion Menu
|
// 8. Accordion Menu
|
||||||
|
|
@ -239,8 +246,8 @@ $button-margin: 0 0 $global-margin 0;
|
||||||
$button-fill: solid;
|
$button-fill: solid;
|
||||||
$button-background: $primary-color;
|
$button-background: $primary-color;
|
||||||
$button-background-hover: scale-color($button-background, $lightness: -15%);
|
$button-background-hover: scale-color($button-background, $lightness: -15%);
|
||||||
$button-color: #fff;
|
$button-color: $white;
|
||||||
$button-color-alt: #000;
|
$button-color-alt: $black;
|
||||||
$button-radius: $global-radius;
|
$button-radius: $global-radius;
|
||||||
$button-sizes: (
|
$button-sizes: (
|
||||||
tiny: 0.6rem,
|
tiny: 0.6rem,
|
||||||
|
|
@ -296,8 +303,7 @@ $drilldown-background: $white;
|
||||||
$dropdown-padding: 1rem;
|
$dropdown-padding: 1rem;
|
||||||
$dropdown-border: 1px solid $medium-gray;
|
$dropdown-border: 1px solid $medium-gray;
|
||||||
$dropdown-font-size: 1rem;
|
$dropdown-font-size: 1rem;
|
||||||
// $dropdown-width: 300px;
|
$dropdown-width: 300px;
|
||||||
$dropdown-width: 400px;
|
|
||||||
$dropdown-radius: $global-radius;
|
$dropdown-radius: $global-radius;
|
||||||
$dropdown-sizes: (
|
$dropdown-sizes: (
|
||||||
tiny: 100px,
|
tiny: 100px,
|
||||||
|
|
@ -329,7 +335,7 @@ $fieldset-padding: rem-calc(20);
|
||||||
$fieldset-margin: rem-calc(18 0);
|
$fieldset-margin: rem-calc(18 0);
|
||||||
$legend-padding: rem-calc(0 3);
|
$legend-padding: rem-calc(0 3);
|
||||||
$form-spacing: rem-calc(16);
|
$form-spacing: rem-calc(16);
|
||||||
$helptext-color: #333;
|
$helptext-color: $black;
|
||||||
$helptext-font-size: rem-calc(13);
|
$helptext-font-size: rem-calc(13);
|
||||||
$helptext-font-style: italic;
|
$helptext-font-style: italic;
|
||||||
$input-prefix-color: $black;
|
$input-prefix-color: $black;
|
||||||
|
|
@ -341,9 +347,10 @@ $form-label-font-size: rem-calc(14);
|
||||||
$form-label-font-weight: $global-weight-normal;
|
$form-label-font-weight: $global-weight-normal;
|
||||||
$form-label-line-height: 1.8;
|
$form-label-line-height: 1.8;
|
||||||
$select-background: $white;
|
$select-background: $white;
|
||||||
$select-triangle-color: #333;
|
$select-triangle-color: $dark-gray;
|
||||||
$select-radius: $global-radius;
|
$select-radius: $global-radius;
|
||||||
$input-color: $black;
|
$input-color: $black;
|
||||||
|
$input-placeholder-color: $medium-gray;
|
||||||
$input-font-family: inherit;
|
$input-font-family: inherit;
|
||||||
$input-font-size: rem-calc(16);
|
$input-font-size: rem-calc(16);
|
||||||
$input-background: $white;
|
$input-background: $white;
|
||||||
|
|
@ -353,7 +360,7 @@ $input-border: 1px solid $medium-gray;
|
||||||
$input-border-focus: 1px solid $dark-gray;
|
$input-border-focus: 1px solid $dark-gray;
|
||||||
$input-shadow: inset 0 1px 2px rgba($black, 0.1);
|
$input-shadow: inset 0 1px 2px rgba($black, 0.1);
|
||||||
$input-shadow-focus: 0 0 5px $medium-gray;
|
$input-shadow-focus: 0 0 5px $medium-gray;
|
||||||
$input-cursor-disabled: default;
|
$input-cursor-disabled: not-allowed;
|
||||||
$input-transition: box-shadow 0.5s, border-color 0.25s ease-in-out;
|
$input-transition: box-shadow 0.5s, border-color 0.25s ease-in-out;
|
||||||
$input-number-spinners: true;
|
$input-number-spinners: true;
|
||||||
$input-radius: $global-radius;
|
$input-radius: $global-radius;
|
||||||
|
|
@ -379,12 +386,23 @@ $mediaobject-image-width-stacked: 100%;
|
||||||
|
|
||||||
$menu-margin: 0;
|
$menu-margin: 0;
|
||||||
$menu-margin-nested: 1rem;
|
$menu-margin-nested: 1rem;
|
||||||
//$menu-item-padding: 0.7rem 1rem;
|
// $menu-item-padding: 0.7rem 1rem;
|
||||||
$menu-item-padding: 1.2rem 1rem;
|
$menu-item-padding: 0.5rem 1rem;
|
||||||
|
$menu-item-color-active: $white;
|
||||||
|
$menu-item-background-active: map-get($foundation-palette, primary);
|
||||||
$menu-icon-spacing: 0.25rem;
|
$menu-icon-spacing: 0.25rem;
|
||||||
$menu-expand-max: 6;
|
|
||||||
|
|
||||||
// 23. Off-canvas
|
// 23. Meter
|
||||||
|
// ---------
|
||||||
|
|
||||||
|
$meter-height: 1rem;
|
||||||
|
$meter-radius: $global-radius;
|
||||||
|
$meter-background: $medium-gray;
|
||||||
|
$meter-fill-good: $success-color;
|
||||||
|
$meter-fill-medium: $warning-color;
|
||||||
|
$meter-fill-bad: $alert-color;
|
||||||
|
|
||||||
|
// 24. Off-canvas
|
||||||
// --------------
|
// --------------
|
||||||
|
|
||||||
$offcanvas-size: 250px;
|
$offcanvas-size: 250px;
|
||||||
|
|
@ -397,7 +415,7 @@ $offcanvas-exit-background: rgba($white, 0.25);
|
||||||
$maincontent-class: 'off-canvas-content';
|
$maincontent-class: 'off-canvas-content';
|
||||||
$maincontent-shadow: 0 0 10px rgba($black, 0.5);
|
$maincontent-shadow: 0 0 10px rgba($black, 0.5);
|
||||||
|
|
||||||
// 24. Orbit
|
// 25. Orbit
|
||||||
// ---------
|
// ---------
|
||||||
|
|
||||||
$orbit-bullet-background: $medium-gray;
|
$orbit-bullet-background: $medium-gray;
|
||||||
|
|
@ -412,7 +430,7 @@ $orbit-control-background-hover: rgba($black, 0.5);
|
||||||
$orbit-control-padding: 1rem;
|
$orbit-control-padding: 1rem;
|
||||||
$orbit-control-zindex: 10;
|
$orbit-control-zindex: 10;
|
||||||
|
|
||||||
// 25. Pagination
|
// 26. Pagination
|
||||||
// --------------
|
// --------------
|
||||||
|
|
||||||
$pagination-font-size: rem-calc(14);
|
$pagination-font-size: rem-calc(14);
|
||||||
|
|
@ -429,34 +447,33 @@ $pagination-ellipsis-color: $black;
|
||||||
$pagination-mobile-items: false;
|
$pagination-mobile-items: false;
|
||||||
$pagination-arrows: true;
|
$pagination-arrows: true;
|
||||||
|
|
||||||
// 26. Progress Bar
|
// 27. Progress Bar
|
||||||
// ----------------
|
// ----------------
|
||||||
|
|
||||||
// $progress-height: 1rem;
|
$progress-height: 1rem;
|
||||||
$progress-height: 2rem;
|
|
||||||
$progress-background: $medium-gray;
|
$progress-background: $medium-gray;
|
||||||
$progress-margin-bottom: $global-margin;
|
$progress-margin-bottom: $global-margin;
|
||||||
$progress-meter-background: $primary-color;
|
$progress-meter-background: $primary-color;
|
||||||
$progress-radius: $global-radius;
|
$progress-radius: $global-radius;
|
||||||
|
|
||||||
// 27. Reveal
|
// 28. Reveal
|
||||||
// ----------
|
// ----------
|
||||||
|
|
||||||
$reveal-background: $white;
|
$reveal-background: $white;
|
||||||
$reveal-width: 600px;
|
$reveal-width: 600px;
|
||||||
$reveal-max-width: $global-width;
|
$reveal-max-width: $global-width;
|
||||||
$reveal-offset: rem-calc(100);
|
|
||||||
$reveal-padding: $global-padding;
|
$reveal-padding: $global-padding;
|
||||||
$reveal-border: 1px solid $medium-gray;
|
$reveal-border: 1px solid $medium-gray;
|
||||||
$reveal-radius: $global-radius;
|
$reveal-radius: $global-radius;
|
||||||
$reveal-zindex: 1005;
|
$reveal-zindex: 1005;
|
||||||
$reveal-overlay-background: rgba($black, 0.45);
|
$reveal-overlay-background: rgba($black, 0.45);
|
||||||
|
|
||||||
// 28. Slider
|
// 29. Slider
|
||||||
// ----------
|
// ----------
|
||||||
|
|
||||||
|
$slider-width-vertical: 0.5rem;
|
||||||
|
$slider-transition: all 0.2s ease-in-out;
|
||||||
$slider-height: 0.5rem;
|
$slider-height: 0.5rem;
|
||||||
$slider-width-vertical: $slider-height;
|
|
||||||
$slider-background: $light-gray;
|
$slider-background: $light-gray;
|
||||||
$slider-fill-background: $medium-gray;
|
$slider-fill-background: $medium-gray;
|
||||||
$slider-handle-height: 1.4rem;
|
$slider-handle-height: 1.4rem;
|
||||||
|
|
@ -464,9 +481,8 @@ $slider-handle-width: 1.4rem;
|
||||||
$slider-handle-background: $primary-color;
|
$slider-handle-background: $primary-color;
|
||||||
$slider-opacity-disabled: 0.25;
|
$slider-opacity-disabled: 0.25;
|
||||||
$slider-radius: $global-radius;
|
$slider-radius: $global-radius;
|
||||||
$slider-transition: all 0.2s ease-in-out;
|
|
||||||
|
|
||||||
// 29. Switch
|
// 30. Switch
|
||||||
// ----------
|
// ----------
|
||||||
|
|
||||||
$switch-background: $medium-gray;
|
$switch-background: $medium-gray;
|
||||||
|
|
@ -482,7 +498,7 @@ $switch-paddle-offset: 0.25rem;
|
||||||
$switch-paddle-radius: $global-radius;
|
$switch-paddle-radius: $global-radius;
|
||||||
$switch-paddle-transition: all 0.25s ease-out;
|
$switch-paddle-transition: all 0.25s ease-out;
|
||||||
|
|
||||||
// 30. Table
|
// 31. Table
|
||||||
// ---------
|
// ---------
|
||||||
|
|
||||||
$table-background: $white;
|
$table-background: $white;
|
||||||
|
|
@ -499,14 +515,13 @@ $table-foot-background: smart-scale($table-background, $table-color-scale);
|
||||||
$table-head-font-color: $body-font-color;
|
$table-head-font-color: $body-font-color;
|
||||||
$show-header-for-stacked: false;
|
$show-header-for-stacked: false;
|
||||||
|
|
||||||
// 31. Tabs
|
// 32. Tabs
|
||||||
// --------
|
// --------
|
||||||
|
|
||||||
$tab-margin: 0;
|
$tab-margin: 0;
|
||||||
$tab-background: $white;
|
$tab-background: $white;
|
||||||
$tab-background-active: $light-gray;
|
$tab-background-active: $light-gray;
|
||||||
$tab-border: $light-gray;
|
$tab-item-font-size: rem-calc(12);
|
||||||
$tab-item-color: foreground($tab-background, $primary-color);
|
|
||||||
$tab-item-background-hover: $white;
|
$tab-item-background-hover: $white;
|
||||||
$tab-item-padding: 1.25rem 1.5rem;
|
$tab-item-padding: 1.25rem 1.5rem;
|
||||||
$tab-expand-max: 6;
|
$tab-expand-max: 6;
|
||||||
|
|
@ -515,18 +530,17 @@ $tab-content-border: $light-gray;
|
||||||
$tab-content-color: foreground($tab-background, $primary-color);
|
$tab-content-color: foreground($tab-background, $primary-color);
|
||||||
$tab-content-padding: 1rem;
|
$tab-content-padding: 1rem;
|
||||||
|
|
||||||
// 32. Thumbnail
|
// 33. Thumbnail
|
||||||
// -------------
|
// -------------
|
||||||
|
|
||||||
$thumbnail-border: solid 4px $white;
|
$thumbnail-border: solid 4px $white;
|
||||||
$thumbnail-margin-bottom: $global-margin;
|
$thumbnail-margin-bottom: $global-margin;
|
||||||
$thumbnail-shadow: 0 0 0 1px rgba($black, 0.2);
|
$thumbnail-shadow: 0 0 0 1px rgba($black, 0.2);
|
||||||
// $thumbnail-shadow-hover: 0 0 6px 1px rgba($primary-color, 0.5);
|
$thumbnail-shadow-hover: 0 0 6px 1px rgba($primary-color, 0.5);
|
||||||
$thumbnail-shadow-hover: 0 0 6px 3px rgba($primary-color, 0.5);
|
|
||||||
$thumbnail-transition: box-shadow 200ms ease-out;
|
$thumbnail-transition: box-shadow 200ms ease-out;
|
||||||
$thumbnail-radius: $global-radius;
|
$thumbnail-radius: $global-radius;
|
||||||
|
|
||||||
// 33. Title Bar
|
// 34. Title Bar
|
||||||
// -------------
|
// -------------
|
||||||
|
|
||||||
$titlebar-background: $black;
|
$titlebar-background: $black;
|
||||||
|
|
@ -537,7 +551,7 @@ $titlebar-icon-color: $white;
|
||||||
$titlebar-icon-color-hover: $medium-gray;
|
$titlebar-icon-color-hover: $medium-gray;
|
||||||
$titlebar-icon-spacing: 0.25rem;
|
$titlebar-icon-spacing: 0.25rem;
|
||||||
|
|
||||||
// 34. Tooltip
|
// 35. Tooltip
|
||||||
// -----------
|
// -----------
|
||||||
|
|
||||||
$has-tip-font-weight: $global-weight-bold;
|
$has-tip-font-weight: $global-weight-bold;
|
||||||
|
|
@ -548,43 +562,29 @@ $tooltip-padding: 0.75rem;
|
||||||
$tooltip-font-size: $small-font-size;
|
$tooltip-font-size: $small-font-size;
|
||||||
$tooltip-pip-width: 0.75rem;
|
$tooltip-pip-width: 0.75rem;
|
||||||
$tooltip-pip-height: $tooltip-pip-width * 0.866;
|
$tooltip-pip-height: $tooltip-pip-width * 0.866;
|
||||||
$tooltip-pip-offset: 1.25rem;
|
|
||||||
$tooltip-radius: $global-radius;
|
$tooltip-radius: $global-radius;
|
||||||
|
|
||||||
// 35. Top Bar
|
// 36. Top Bar
|
||||||
// -----------
|
// -----------
|
||||||
|
|
||||||
$topbar-padding: 0.5rem;
|
$topbar-padding: 0.5rem;
|
||||||
// $topbar-background: $light-gray;
|
// $topbar-background: $light-gray;
|
||||||
$topbar-background: #2e3436;
|
$topbar-background: #2e3436;
|
||||||
|
$topbar-submenu-background: $topbar-background;
|
||||||
$topbar-title-spacing: 1rem;
|
$topbar-title-spacing: 1rem;
|
||||||
$topbar-input-width: 200px;
|
$topbar-input-width: 200px;
|
||||||
|
$topbar-unstack-breakpoint: medium;
|
||||||
|
|
||||||
// ---------------------------------------------------
|
// ---------------------------------------------------
|
||||||
// -------------- debshots ---------------------------
|
// -------------- debshots ---------------------------
|
||||||
// ---------------------------------------------------
|
// ---------------------------------------------------
|
||||||
|
|
||||||
// Hover colors of links in top bar
|
|
||||||
$topbar-link-bg-hover: $primary-color;
|
|
||||||
$topbar-dropdown-link-bg-hover: $primary-color;
|
|
||||||
|
|
||||||
// Larger top bar
|
|
||||||
// $topbar-height: rem-calc(60);
|
|
||||||
// Larger font in top bar
|
|
||||||
// $topbar-link-font-size: rem-calc(15);
|
|
||||||
$topbar-padding: 0;
|
$topbar-padding: 0;
|
||||||
// $topbar-button-font-size: rem-calc(3);
|
|
||||||
// $topbar-button-top: rem-calc(5);
|
|
||||||
|
|
||||||
// $topbar-link-padding: rem-calc(8);
|
|
||||||
|
|
||||||
// At which width the top navigation bar should be switched to
|
// At which width the top navigation bar should be switched to
|
||||||
// mobile mode because otherwise it would wrap into two lines.
|
// mobile mode because otherwise it would wrap into two lines.
|
||||||
$topbar-breakpoint: 800px;
|
// $topbar-breakpoint: 800px;
|
||||||
$topbar-media-query: "only screen and (min-width: #{$topbar-breakpoint})";
|
// $topbar-media-query: "only screen and (min-width: #{$topbar-breakpoint})";
|
||||||
|
|
||||||
// Import Google font
|
|
||||||
// @import url(//fonts.googleapis.com/css?family=Droid+Sans:400,700);
|
|
||||||
|
|
||||||
// Use fonts from out own site. Do not load from Google for privacy reasons.
|
// Use fonts from out own site. Do not load from Google for privacy reasons.
|
||||||
@font-face {
|
@font-face {
|
||||||
|
|
@ -610,13 +610,6 @@ $button-font-tny: rem-calc(15);
|
||||||
// Make the background of progress bars use a light version of the primary color
|
// Make the background of progress bars use a light version of the primary color
|
||||||
$progress-bar-color: tint($primary-color, 80);
|
$progress-bar-color: tint($primary-color, 80);
|
||||||
|
|
||||||
// Enable special grid and block-grid sizes for xlarge and xxlarge screens
|
|
||||||
/*$include-xl-html-grid-classes: true;*/
|
|
||||||
/*$include-xl-html-block-grid-classes: true;*/
|
|
||||||
/*$row-width: 100%;*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$page-background: #f2f2f2;
|
$page-background: #f2f2f2;
|
||||||
$footer-background: #333333;
|
$footer-background: #333333;
|
||||||
$footer-text-color: #b3b3b3;
|
$footer-text-color: #b3b3b3;
|
||||||
|
|
@ -646,7 +639,7 @@ body
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.top-bar-title
|
.top-bar-left .sitename
|
||||||
{
|
{
|
||||||
// Display the site name in a larger font
|
// Display the site name in a larger font
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
|
|
@ -660,10 +653,27 @@ body
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
header
|
.top-bar-right .menu li a
|
||||||
|
{
|
||||||
|
padding-top: 1.3rem;
|
||||||
|
padding-bottom: 1.3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-bar
|
||||||
{
|
{
|
||||||
// Draw a colored line below the navigation topbar
|
// Draw a colored line below the navigation topbar
|
||||||
border-bottom: 5px solid $debian_color;
|
border-bottom: 5px solid $debian_color;
|
||||||
|
color: #8a8a8a;
|
||||||
|
|
||||||
|
a
|
||||||
|
{
|
||||||
|
color: #8a8a8a;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.active
|
||||||
|
{
|
||||||
|
color: #fefefe;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------- Footer - format as table cell to allow vertical centering
|
// ------- Footer - format as table cell to allow vertical centering
|
||||||
|
|
@ -680,28 +690,28 @@ html, body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#footer
|
// #footer
|
||||||
{
|
// {
|
||||||
background-color: $footer-background;
|
// background-color: $footer-background;
|
||||||
display: table;
|
// display: table;
|
||||||
width: 100%;
|
// width: 100%;
|
||||||
|
|
||||||
p
|
// p
|
||||||
{
|
// {
|
||||||
display: table-cell;
|
// display: table-cell;
|
||||||
padding: 5px 20px;
|
// padding: 5px 20px;
|
||||||
color: $footer-text-color;
|
// color: $footer-text-color;
|
||||||
vertical-align: middle;
|
// vertical-align: middle;
|
||||||
text-align: center;
|
// text-align: center;
|
||||||
font-size: 100%;
|
// font-size: 100%;
|
||||||
}
|
// }
|
||||||
|
|
||||||
a
|
// a
|
||||||
{
|
// {
|
||||||
color: $footer-text-color;
|
// color: $footer-text-color;
|
||||||
font-weight: bolder;
|
// font-weight: bolder;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
// Leave some room after the topbar
|
// Leave some room after the topbar
|
||||||
|
|
@ -710,37 +720,9 @@ html, body {
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Screenshot thumbnail image with name and description
|
|
||||||
// .thumbnail
|
|
||||||
// {
|
|
||||||
// padding-top: 5px !important;
|
|
||||||
// padding-bottom: 5px !important;
|
|
||||||
// border-radius: 10px;
|
|
||||||
// margin-bottom: 10px;
|
|
||||||
// text-align: center;
|
|
||||||
// line-height: 120%;
|
|
||||||
|
|
||||||
// &:hover
|
|
||||||
// {
|
|
||||||
// background-color: #d0d0d0;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// .pkgname
|
|
||||||
// {
|
|
||||||
// font-weight: 700;
|
|
||||||
// }
|
|
||||||
// .pkgdescription
|
|
||||||
// {
|
|
||||||
// font-size: 80%;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
.grid-thumbnails .column
|
.grid-thumbnails .column
|
||||||
{
|
{
|
||||||
// border: 5px solid green;
|
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
// border: 2px solid $light-gray;
|
|
||||||
// height: 300px;
|
|
||||||
padding: 5px 5px 50px 5px;
|
padding: 5px 5px 50px 5px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
@ -797,14 +779,6 @@ html, body {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// .row .gridview
|
|
||||||
// {
|
|
||||||
// img.screenshot
|
|
||||||
// {
|
|
||||||
// width: 100%;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
.pkgname
|
.pkgname
|
||||||
{
|
{
|
||||||
font-size: 130%;
|
font-size: 130%;
|
||||||
|
|
@ -813,35 +787,6 @@ html, body {
|
||||||
line-height: 120%;
|
line-height: 120%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*.pkgdetails
|
|
||||||
{
|
|
||||||
.description
|
|
||||||
{
|
|
||||||
font-size: 150%;
|
|
||||||
color: #808080;
|
|
||||||
padding-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.longdescription
|
|
||||||
{
|
|
||||||
font-size: 90%;
|
|
||||||
line-height: 120%;
|
|
||||||
padding-bottom: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rating
|
|
||||||
{
|
|
||||||
padding-top: 5px;
|
|
||||||
vertical-align: bottom;
|
|
||||||
}
|
|
||||||
|
|
||||||
.commentcount
|
|
||||||
{
|
|
||||||
padding-left: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
.grid-thumbnail
|
.grid-thumbnail
|
||||||
{
|
{
|
||||||
// Pretend that all thumbnails are 120 pixels high to align the captions properly
|
// Pretend that all thumbnails are 120 pixels high to align the captions properly
|
||||||
|
|
@ -859,6 +804,20 @@ a.black
|
||||||
color: #808080;
|
color: #808080;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bigpanel
|
||||||
|
{
|
||||||
|
background-color: $light-gray;
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 1em 1em 0.1em 1em;
|
||||||
|
margin-bottom: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subtitle
|
||||||
|
{
|
||||||
|
font-size: 120%;
|
||||||
|
color: #808080;
|
||||||
|
}
|
||||||
|
|
||||||
.packagepage
|
.packagepage
|
||||||
{
|
{
|
||||||
h1
|
h1
|
||||||
|
|
@ -866,11 +825,6 @@ a.black
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.subtitle
|
|
||||||
{
|
|
||||||
font-size: 120%;
|
|
||||||
color: #808080;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Description of a screenshot (e.g. the situation when the screenshot was taken) */
|
/* Description of a screenshot (e.g. the situation when the screenshot was taken) */
|
||||||
.imgcaption
|
.imgcaption
|
||||||
|
|
@ -887,13 +841,6 @@ a.black
|
||||||
color: #808080;
|
color: #808080;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bigpanel
|
|
||||||
{
|
|
||||||
background-color: $light-gray;
|
|
||||||
border-radius: 10px;
|
|
||||||
padding: 1em 1em 0.1em 1em;
|
|
||||||
margin-bottom: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.comment
|
.comment
|
||||||
{
|
{
|
||||||
|
|
@ -934,28 +881,6 @@ a.black
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// .ratingbar
|
|
||||||
// {
|
|
||||||
// background-color: $progress-bar-color;
|
|
||||||
// width: 10em;
|
|
||||||
// display: inline-block;
|
|
||||||
// padding: 2px;
|
|
||||||
// text-align: left;
|
|
||||||
// color: white;
|
|
||||||
// text-transform: uppercase;
|
|
||||||
// font-size: 0.8em;
|
|
||||||
// font-weight: bolder;
|
|
||||||
|
|
||||||
// .meter
|
|
||||||
// {
|
|
||||||
// background-color: $primary-color;
|
|
||||||
// padding: 2px;
|
|
||||||
// padding-left: 0.4em;
|
|
||||||
// text-shadow: 0 0 2px black;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
/* Properties of a screenshot - shown in details view */
|
/* Properties of a screenshot - shown in details view */
|
||||||
.property-title
|
.property-title
|
||||||
{
|
{
|
||||||
|
|
@ -973,5 +898,18 @@ a.black
|
||||||
.description-verbatim-lines
|
.description-verbatim-lines
|
||||||
{
|
{
|
||||||
line-height: 120%;
|
line-height: 120%;
|
||||||
// white-space: pre-line;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Hide the file upload button to just show the styleable label */
|
||||||
|
/* display: none will not work - this is the workaround */
|
||||||
|
.hidden-inputfile {
|
||||||
|
width: 0.1px;
|
||||||
|
height: 0.1px;
|
||||||
|
opacity: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
position: absolute;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
.inputfile + label {
|
||||||
|
cursor: pointer; /* "hand" cursor */
|
||||||
|
}
|
||||||
|
|
@ -16,33 +16,34 @@
|
||||||
@include foundation-forms;
|
@include foundation-forms;
|
||||||
@include foundation-visibility-classes;
|
@include foundation-visibility-classes;
|
||||||
@include foundation-float-classes;
|
@include foundation-float-classes;
|
||||||
// @include foundation-accordion;
|
@include foundation-accordion;
|
||||||
// @include foundation-accordion-menu;
|
@include foundation-accordion-menu;
|
||||||
@include foundation-badge;
|
@include foundation-badge;
|
||||||
@include foundation-breadcrumbs;
|
@include foundation-breadcrumbs;
|
||||||
@include foundation-button-group;
|
@include foundation-button-group;
|
||||||
@include foundation-callout;
|
@include foundation-callout;
|
||||||
// @include foundation-close-button;
|
@include foundation-close-button;
|
||||||
// @include foundation-drilldown-menu;
|
@include foundation-drilldown-menu;
|
||||||
@include foundation-dropdown;
|
@include foundation-dropdown;
|
||||||
// @include foundation-dropdown-menu;
|
@include foundation-dropdown-menu;
|
||||||
// @include foundation-flex-video;
|
@include foundation-flex-video;
|
||||||
@include foundation-label;
|
@include foundation-label;
|
||||||
// @include foundation-media-object;
|
@include foundation-media-object;
|
||||||
@include foundation-menu;
|
@include foundation-menu;
|
||||||
// @include foundation-off-canvas;
|
@include foundation-menu-icon;
|
||||||
// @include foundation-orbit;
|
@include foundation-off-canvas;
|
||||||
|
@include foundation-orbit;
|
||||||
@include foundation-pagination;
|
@include foundation-pagination;
|
||||||
@include foundation-progress-bar;
|
@include foundation-progress-bar;
|
||||||
// @include foundation-slider;
|
@include foundation-slider;
|
||||||
// @include foundation-sticky;
|
@include foundation-sticky;
|
||||||
@include foundation-reveal;
|
@include foundation-reveal;
|
||||||
// @include foundation-switch;
|
@include foundation-switch;
|
||||||
// @include foundation-table;
|
@include foundation-table;
|
||||||
// @include foundation-tabs;
|
@include foundation-tabs;
|
||||||
@include foundation-thumbnail;
|
@include foundation-thumbnail;
|
||||||
@include foundation-title-bar;
|
@include foundation-title-bar;
|
||||||
// @include foundation-tooltip;
|
@include foundation-tooltip;
|
||||||
@include foundation-top-bar;
|
@include foundation-top-bar;
|
||||||
|
|
||||||
// If you'd like to include motion-ui the foundation-rails gem comes prepackaged with it, uncomment the 3 @imports, if you are not using the gem you need to install the motion-ui sass package.
|
// If you'd like to include motion-ui the foundation-rails gem comes prepackaged with it, uncomment the 3 @imports, if you are not using the gem you need to install the motion-ui sass package.
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,13 @@ class LogsController < ApplicationController
|
||||||
before_action :authenticate_user!
|
before_action :authenticate_user!
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@logs = Log.paginate(page: params[:page], per_page: 20)
|
logs = Log
|
||||||
|
|
||||||
|
if params[:search].present?
|
||||||
|
logger.debug "Searching for #{params[:search]}"
|
||||||
|
logs = logs.where("message ilike ?", "%#{params[:search]}%")
|
||||||
|
end
|
||||||
|
|
||||||
|
@logs = logs.paginate(page: params[:page], per_page: 20)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@ class WelcomeController < ApplicationController
|
||||||
@newest_upload = Screenshot.newest_upload
|
@newest_upload = Screenshot.newest_upload
|
||||||
|
|
||||||
# TODO: Use the actually most popular package and not just a random one
|
# TODO: Use the actually most popular package and not just a random one
|
||||||
@most_popular_package = Package.with_screenshots.first
|
@most_popular_package = Package.order(:visits).last
|
||||||
|
|
||||||
@package_count = Package.count
|
@package_count = Package.count
|
||||||
|
|
||||||
@most_wanted = Package.without_screenshots_most_visits.first
|
@most_wanted_package = Package.without_screenshots_most_visits.first
|
||||||
end
|
end
|
||||||
|
|
||||||
def about
|
def about
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
require 'pry'
|
# require 'pry'
|
||||||
|
|
||||||
class Log < ApplicationRecord
|
class Log < ApplicationRecord
|
||||||
validates :message, presence: true
|
validates :message, presence: true
|
||||||
|
|
@ -26,6 +26,6 @@ class Log < ApplicationRecord
|
||||||
log.token = token
|
log.token = token
|
||||||
logger.error "Could not log to database - validation errors: #{log.errors.to_a}" unless log.valid?
|
logger.error "Could not log to database - validation errors: #{log.errors.to_a}" unless log.valid?
|
||||||
log.save
|
log.save
|
||||||
log
|
# log
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
<h2>Resend confirmation instructions</h2>
|
|
||||||
|
|
||||||
<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
|
|
||||||
<%= devise_error_messages! %>
|
|
||||||
|
|
||||||
<div class="field">
|
|
||||||
<%= f.label :email %><br />
|
|
||||||
<%= f.email_field :email, autofocus: true, value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="actions">
|
|
||||||
<%= f.submit "Resend confirmation instructions" %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<%= render "devise/shared/links" %>
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
<p>Welcome <%= @email %>!</p>
|
|
||||||
|
|
||||||
<p>You can confirm your account email through the link below:</p>
|
|
||||||
|
|
||||||
<p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %></p>
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
<p>Hello <%= @resource.email %>!</p>
|
|
||||||
|
|
||||||
<p>We're contacting you to notify you that your password has been changed.</p>
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
<p>Hello <%= @resource.email %>!</p>
|
|
||||||
|
|
||||||
<p>Someone has requested a link to change your password. You can do this through the link below.</p>
|
|
||||||
|
|
||||||
<p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p>
|
|
||||||
|
|
||||||
<p>If you didn't request this, please ignore this email.</p>
|
|
||||||
<p>Your password won't change until you access the link above and create a new one.</p>
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
<p>Hello <%= @resource.email %>!</p>
|
|
||||||
|
|
||||||
<p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>
|
|
||||||
|
|
||||||
<p>Click the link below to unlock your account:</p>
|
|
||||||
|
|
||||||
<p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %></p>
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
<h2>Change your password</h2>
|
|
||||||
|
|
||||||
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
|
|
||||||
<%= devise_error_messages! %>
|
|
||||||
<%= f.hidden_field :reset_password_token %>
|
|
||||||
|
|
||||||
<div class="field">
|
|
||||||
<%= f.label :password, "New password" %><br />
|
|
||||||
<% if @minimum_password_length %>
|
|
||||||
<em>(<%= @minimum_password_length %> characters minimum)</em><br />
|
|
||||||
<% end %>
|
|
||||||
<%= f.password_field :password, autofocus: true, autocomplete: "off" %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="field">
|
|
||||||
<%= f.label :password_confirmation, "Confirm new password" %><br />
|
|
||||||
<%= f.password_field :password_confirmation, autocomplete: "off" %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="actions">
|
|
||||||
<%= f.submit "Change my password" %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<%= render "devise/shared/links" %>
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
<h2>Forgot your password?</h2>
|
|
||||||
|
|
||||||
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
|
|
||||||
<%= devise_error_messages! %>
|
|
||||||
|
|
||||||
<div class="field">
|
|
||||||
<%= f.label :email %><br />
|
|
||||||
<%= f.email_field :email, autofocus: true %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="actions">
|
|
||||||
<%= f.submit "Send me reset password instructions" %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<%= render "devise/shared/links" %>
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
||||||
<h2>Edit <%= resource_name.to_s.humanize %></h2>
|
|
||||||
|
|
||||||
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
|
|
||||||
<%= devise_error_messages! %>
|
|
||||||
|
|
||||||
<div class="field">
|
|
||||||
<%= f.label :email %><br />
|
|
||||||
<%= f.email_field :email, autofocus: true %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
|
|
||||||
<div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<div class="field">
|
|
||||||
<%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
|
|
||||||
<%= f.password_field :password, autocomplete: "off" %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="field">
|
|
||||||
<%= f.label :password_confirmation %><br />
|
|
||||||
<%= f.password_field :password_confirmation, autocomplete: "off" %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="field">
|
|
||||||
<%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
|
|
||||||
<%= f.password_field :current_password, autocomplete: "off" %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="actions">
|
|
||||||
<%= f.submit "Update" %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<h3>Cancel my account</h3>
|
|
||||||
|
|
||||||
<p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %></p>
|
|
||||||
|
|
||||||
<%= link_to "Back", :back %>
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
<h2>Sign up</h2>
|
|
||||||
|
|
||||||
<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
|
|
||||||
<%= devise_error_messages! %>
|
|
||||||
|
|
||||||
<div class="field">
|
|
||||||
<%= f.label :email %><br />
|
|
||||||
<%= f.email_field :email, autofocus: true %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="field">
|
|
||||||
<%= f.label :password %>
|
|
||||||
<% if @minimum_password_length %>
|
|
||||||
<em>(<%= @minimum_password_length %> characters minimum)</em>
|
|
||||||
<% end %><br />
|
|
||||||
<%= f.password_field :password, autocomplete: "off" %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="field">
|
|
||||||
<%= f.label :password_confirmation %><br />
|
|
||||||
<%= f.password_field :password_confirmation, autocomplete: "off" %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="actions">
|
|
||||||
<%= f.submit "Sign up" %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<%= render "devise/shared/links" %>
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
<%- if controller_name != 'sessions' %>
|
|
||||||
<%= link_to "Log in", new_session_path(resource_name) %><br />
|
|
||||||
<% end -%>
|
|
||||||
|
|
||||||
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
|
|
||||||
<%= link_to "Sign up", new_registration_path(resource_name) %><br />
|
|
||||||
<% end -%>
|
|
||||||
|
|
||||||
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
|
|
||||||
<%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
|
|
||||||
<% end -%>
|
|
||||||
|
|
||||||
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
|
|
||||||
<%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
|
|
||||||
<% end -%>
|
|
||||||
|
|
||||||
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
|
|
||||||
<%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
|
|
||||||
<% end -%>
|
|
||||||
|
|
||||||
<%- if devise_mapping.omniauthable? %>
|
|
||||||
<%- resource_class.omniauth_providers.each do |provider| %>
|
|
||||||
<%= link_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider) %><br />
|
|
||||||
<% end -%>
|
|
||||||
<% end -%>
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
<h2>Resend unlock instructions</h2>
|
|
||||||
|
|
||||||
<%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
|
|
||||||
<%= devise_error_messages! %>
|
|
||||||
|
|
||||||
<div class="field">
|
|
||||||
<%= f.label :email %><br />
|
|
||||||
<%= f.email_field :email, autofocus: true %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="actions">
|
|
||||||
<%= f.submit "Resend unlock instructions" %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<%= render "devise/shared/links" %>
|
|
||||||
|
|
@ -1,38 +1,39 @@
|
||||||
header
|
nav.top-bar
|
||||||
.row
|
.row
|
||||||
.top-bar
|
.top-bar-left
|
||||||
.top-bar-title
|
ul.menu
|
||||||
// TODO: Make the logo depend on the virtual host
|
li.menu.sitename
|
||||||
img src="/images/logos/debian.svg" width="35" alt="Debian logo"
|
a href='/'
|
||||||
// TODO: Use proper distribution name
|
// TODO: Make the logo depend on the virtual host
|
||||||
'Debian Screenshots >
|
img src="/images/logos/debian.svg" width="35" alt="Debian logo"
|
||||||
|
// TODO: Use proper distribution name
|
||||||
|
' Debian Screenshots >
|
||||||
|
|
||||||
.top-bar-right
|
.top-bar-right
|
||||||
ul.menu
|
ul.dropdown.menu data-dropdown-menu=true
|
||||||
li class=('active' if controller_name=='welcome' and action_name=='home')
|
li class=('active' if controller_name=='welcome' and action_name=='home')
|
||||||
a href="/" Home
|
a href="/" Home
|
||||||
li class=('active' if controller_name=='packages')
|
li class=('active' if controller_name=='packages')
|
||||||
a href="/packages" Explore
|
a href="/packages" Explore
|
||||||
//li.has-dropdown
|
//li.has-dropdown
|
||||||
//a href="#" Distributions
|
//a href="#" Distributions
|
||||||
//ul.dropdown
|
//ul.dropdown
|
||||||
//// TODO: Use proper distribution list
|
//// TODO: Use proper distribution list
|
||||||
//li
|
//li
|
||||||
//a href="#" Debian
|
//a href="#" Debian
|
||||||
//li
|
//li
|
||||||
//a href="#" Ubuntu
|
//a href="#" Ubuntu
|
||||||
li class=('active' if controller_name=='welcome' and action_name=='about')
|
li class=('active' if controller_name=='welcome' and action_name=='about')
|
||||||
a href="/about" About
|
a href="/about" About
|
||||||
li.divider
|
// TODO: Check correct classes in Zurb/Foundation for top bar!
|
||||||
// TODO: Check correct classes in Zurb/Foundation for top bar!
|
- if user_signed_in?
|
||||||
|
li
|
||||||
|
a href='#' Admin
|
||||||
|
ul.menu.vertical
|
||||||
|
li = link_to 'Moderate', moderate_path
|
||||||
|
li = link_to 'Logs', logs_path
|
||||||
|
li
|
||||||
- if user_signed_in?
|
- if user_signed_in?
|
||||||
li.has-dropdown
|
= link_to "#{current_user.email} (Logout)", destroy_user_session_path, :method => :delete
|
||||||
a href='#' Admin
|
- else
|
||||||
ul.dropdown
|
= link_to 'Login', new_user_session_path
|
||||||
li = link_to 'Moderate', moderate_path
|
|
||||||
li = link_to 'Logs', logs_path
|
|
||||||
li.has-form
|
|
||||||
- if user_signed_in?
|
|
||||||
= link_to "#{current_user.email} (Logout)", destroy_user_session_path, :method => :delete
|
|
||||||
- else
|
|
||||||
= link_to 'Login', new_user_session_path
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,8 @@
|
||||||
|
|
||||||
.small-6.medium-4.large-3.columns
|
.small-6.medium-4.large-3.columns
|
||||||
// Search form
|
// Search form
|
||||||
= render 'packages/searchfield'
|
= form_tag url_for, :method=>'GET'
|
||||||
|
= text_field_tag(:search, params[:search], placeholder: "Search...", maxlength: 50, size: 20, autofocus: true)
|
||||||
|
|
||||||
// List of log messages
|
// List of log messages
|
||||||
.row
|
.row
|
||||||
|
|
@ -20,7 +21,7 @@
|
||||||
th =log.created_at
|
th =log.created_at
|
||||||
th =log.message
|
th =log.message
|
||||||
- else
|
- else
|
||||||
p No logs. Crazy.
|
p No logs found. Crazy.
|
||||||
|
|
||||||
// Second paginator at the bottom so the user does not have to scroll up again
|
// Second paginator at the bottom so the user does not have to scroll up again
|
||||||
= render 'logs/paginator'
|
= render 'logs/paginator'
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,10 @@
|
||||||
- if @package
|
- if @package
|
||||||
|
|
||||||
// Progress bar
|
// Progress bar
|
||||||
.progress.warning role="progressbar" tabindex="0"
|
// TODO: Calculation for the progress bar is currently wrong
|
||||||
span.progress-meter style="width: #{@percent_moderated}%"
|
/ .progress.warning role="progressbar" tabindex="0"
|
||||||
p.progress-meter-text #{@percent_moderated}%
|
/ span.progress-meter style="width: #{@percent_moderated}%"
|
||||||
|
/ p.progress-meter-text #{@percent_moderated}%
|
||||||
|
|
||||||
h2 Package: #{@package.name}
|
h2 Package: #{@package.name}
|
||||||
p =@package.description
|
p =@package.description
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
' Please help extend the collection of screenshots.
|
' Please help extend the collection of screenshots.
|
||||||
' Just make a screenshot and upload it here. You don't
|
' Just make a screenshot and upload it here. You don't
|
||||||
' need to register or anything.
|
' need to register or anything.
|
||||||
a.button.small.expand data-open="upload-modal" Upload now
|
a.button.small.expand href=upload_path(pkg.name) Upload now
|
||||||
|
|
||||||
// homepage
|
// homepage
|
||||||
- if pkg.homepage.present?
|
- if pkg.homepage.present?
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@
|
||||||
.small-5.medium-5.columns
|
.small-5.medium-5.columns
|
||||||
= render(partial: 'details_rightbox', locals: {pkg: @package})
|
= render(partial: 'details_rightbox', locals: {pkg: @package})
|
||||||
|
|
||||||
= render(partial: 'details_uploadmodal')
|
/ = render(partial: 'details_uploadmodal')
|
||||||
|
|
||||||
javascript:
|
javascript:
|
||||||
$( function() {
|
$( function() {
|
||||||
|
|
|
||||||
|
|
@ -1,85 +1,74 @@
|
||||||
.row.packagepage
|
.row
|
||||||
.small-12.columns
|
h1 = "Upload a screenshot for #{@package.name}"
|
||||||
h1 = "Upload a new screenshot for #{@package.name}>"
|
|
||||||
|
.row
|
||||||
|
.small-7.columns
|
||||||
p.subtitle = @package.description
|
p.subtitle = @package.description
|
||||||
|
p
|
||||||
|
' You are about to upload a screenshot for the #{@package.name}
|
||||||
|
' package. Thanks for your contribution.
|
||||||
|
- if @package.screenshots.any?
|
||||||
|
p
|
||||||
|
' Just for your information - these screenshots have already been uploaded.
|
||||||
|
|
||||||
.row.packagepage
|
.small-up-1.medium-up-3.large-up-4.grid-thumbnails
|
||||||
.small-12.medium-7.large-8.columns
|
- @package.screenshots.all.each do |ss|
|
||||||
// First row contains the upload form
|
a.black.fancybox href=ss.image.url(:large, timestamp: false) rel='fancybox-thumb' title=ss.caption
|
||||||
.row
|
= image_tag(ss.image.url(:thumb, timestamp: false), alt: ss.caption, class: 'thumbnail')
|
||||||
.small-6.columns
|
|
||||||
//input id="fileupload" type="file" name="files[]" data-url=upload_image_path(name: @package.name) multiple=true
|
|
||||||
|
|
||||||
//= form_for @new_screenshot, :url => upload_image_path, :html => { :multipart => true } do |form|
|
// = render partial: 'packages/grid_thumbnail', locals: { pkg: pkg }
|
||||||
// = form.file_field :image
|
|
||||||
// = form.submit 'Save'
|
- else
|
||||||
= form_tag(upload_image_path, multipart: true)
|
' There are no screenshots yet for #{@package.name}.
|
||||||
= file_field_tag('image')
|
|
||||||
= submit_tag
|
= form_tag(upload_image_path, multipart: true)
|
||||||
|
|
||||||
//a.button.radius.expand href=upload_package_by_name_path(name: @package.name)
|
|
||||||
//' Click or drag a PNG screenshot file here
|
|
||||||
.small-6.columns
|
|
||||||
' Form
|
|
||||||
- @package.screenshots.each do |screenshot|
|
|
||||||
.row
|
.row
|
||||||
img src=screenshot.image.url(:large, timestamp: false, alt: screenshot.caption)
|
.small-6.columns
|
||||||
= link_to "Delete screenshot", delete_screenshot_path(@package.name, screenshot.id), onclick: "return confirm('Really delete the screenshot?');"
|
input.hidden-inputfile type="file" name="file" id="file" multiple=true
|
||||||
|
label for="file"
|
||||||
|
a.button id="file-select-button"
|
||||||
|
= fa_stacked_icon "image", base: "circle-thin"
|
||||||
|
span id="file-label"
|
||||||
|
' Select screenshot files
|
||||||
|
|
||||||
// - @package.screenshots.each do |screenshot|
|
.small-6.columns
|
||||||
// .listview
|
button.button type="submit" id="file-submit"
|
||||||
// a.black.fancybox href=screenshot.image.url(:large, timestamp: false) rel='fancybox-thumb' title=screenshot.caption
|
= fa_stacked_icon "upload", base: "circle-thin"
|
||||||
// = image_tag(screenshot.image.url(:large, timestamp: false), alt: screenshot.caption)
|
' Start upload
|
||||||
// .imgcaption
|
|
||||||
// => screenshot.caption
|
|
||||||
// - if screenshot.uploader
|
|
||||||
// | (Uploaded by
|
|
||||||
// =< screenshot.uploader
|
|
||||||
// | )
|
|
||||||
|
|
||||||
.small-12.medium-5.large-4.columns
|
|
||||||
.bigpanel
|
|
||||||
p Thanks for uploading more screenshots. Please note:
|
|
||||||
ul
|
|
||||||
li
|
|
||||||
' Screenshots are made public and can freely be used by anyone.
|
|
||||||
li
|
|
||||||
' Your screenshots must be in PNG format.
|
|
||||||
li
|
|
||||||
' Images larger than 800x600 pixels will automatically be reduced.
|
|
||||||
' So don't try to put too much detail on a screenshot.
|
|
||||||
li
|
|
||||||
' Your screenshot should contain a typical scene when working with it.
|
|
||||||
li
|
|
||||||
' Nice tools for taking screenshots are shutter, ksnapshot (KDE),
|
|
||||||
' gimp, xwd or scrot. See the
|
|
||||||
a href='http://wiki.debian.org/ScreenShots' Debian wiki
|
|
||||||
' for more information on how to make screenshots under Debian.
|
|
||||||
li
|
|
||||||
' Please set your language to english so that everybody understands it.
|
|
||||||
' If you don't use english by default please start your application
|
|
||||||
' from a shell using after setting "export LANG=C".
|
|
||||||
li
|
|
||||||
' Please only take a screenshot of the respective application and not of
|
|
||||||
' your whole desktop (unless the screenshot is meant for a window manager).
|
|
||||||
li
|
|
||||||
' If you are not logged in or lack the reputation then your screenshot
|
|
||||||
' may need to be approved by the moderators first.
|
|
||||||
|
|
||||||
//ul.small-block-grid-1.medium-block-grid-2.large-block-grid-2
|
.small-5.columns.bigpanel
|
||||||
// - for screenshot in @package.screenshots
|
p.subtitle Your upload…
|
||||||
// li
|
ul
|
||||||
// a.black.fancybox href=screenshot.url('large') rel='fancybox-thumb' title=screenshot.caption
|
li
|
||||||
// img src=screenshot.url('large')
|
' should contain a typical scene when working with it.
|
||||||
// .imgcaption =screenshot.caption
|
li
|
||||||
//
|
' should show the actual application and not just
|
||||||
|
' your whole desktop (unless the screenshot is meant for a window manager).
|
||||||
|
li
|
||||||
|
' must be in PNG format.
|
||||||
|
li
|
||||||
|
' can be multiple images at once.
|
||||||
|
li
|
||||||
|
' needs to be approved by the moderators first before it is publicly visible.
|
||||||
|
li
|
||||||
|
' will be reduced if it is lager than 800x600 pixels.
|
||||||
|
' So don't try to capture too much detail in a screenshot. It may become
|
||||||
|
' unreadable. Shrink the applications window if possible.
|
||||||
|
li
|
||||||
|
' will be made public and can freely be used by anyone.
|
||||||
|
li
|
||||||
|
' can be taken by screenshot tools like shutter, ksnapshot (KDE),
|
||||||
|
' gimp, xwd or scrot. See the
|
||||||
|
a href='http://wiki.debian.org/ScreenShots' Debian wiki
|
||||||
|
' for more information on how to make screenshots under Debian.
|
||||||
|
li
|
||||||
|
' should preferably show the application in english.
|
||||||
|
' If you don't use english by default please start your application
|
||||||
|
' from a shell using after setting "export LANG=C".
|
||||||
|
|
||||||
//javascript:
|
javascript:
|
||||||
// $('#fileupload').fileupload({
|
// Hide the submit button unless images are selected for upload
|
||||||
// dataType: 'json',
|
$(document).ready(upload_form_init);
|
||||||
// done: function (e, data) {
|
// TODO: Move into javascripts/packages/upload...
|
||||||
// $.each(data.result.files, function (index, file) {
|
|
||||||
// $('<p/>').text(file.name).appendTo(document.body);
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
|
||||||
|
|
@ -24,12 +24,8 @@
|
||||||
|
|
||||||
div.row
|
div.row
|
||||||
hr
|
hr
|
||||||
|
|
||||||
div.row
|
|
||||||
div.large-4.medium-12.small-12.columns.text-center
|
div.large-4.medium-12.small-12.columns.text-center
|
||||||
h2 Newest upload
|
h2 Newest upload
|
||||||
// TODO: load actual newest upload and cache it
|
|
||||||
// TODO: link to the package page
|
|
||||||
a.black href=package_path(@newest_upload.package.name)
|
a.black href=package_path(@newest_upload.package.name)
|
||||||
= image_tag(@newest_upload.image.url(:large, timestamp: false), alt: @newest_upload.caption)
|
= image_tag(@newest_upload.image.url(:large, timestamp: false), alt: @newest_upload.caption)
|
||||||
p
|
p
|
||||||
|
|
@ -40,8 +36,6 @@ div.row
|
||||||
=@newest_upload.package.description
|
=@newest_upload.package.description
|
||||||
div.large-4.medium-12.small-12.columns.text-center
|
div.large-4.medium-12.small-12.columns.text-center
|
||||||
h2 Most popular
|
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)
|
a.black href=package_path(@most_popular_package.name)
|
||||||
img src=@most_popular_package.screenshots.first.image.url(:large, timestamp: false)
|
img src=@most_popular_package.screenshots.first.image.url(:large, timestamp: false)
|
||||||
p
|
p
|
||||||
|
|
@ -52,10 +46,9 @@ div.row
|
||||||
=@most_popular_package.description
|
=@most_popular_package.description
|
||||||
div.large-4.medium-12.small-12.columns.text-center
|
div.large-4.medium-12.small-12.columns.text-center
|
||||||
h2 Your help needed
|
h2 Your help needed
|
||||||
// TODO: load actual most popular package without a screenshot and cache it
|
a href=upload_package_by_name_path(@most_wanted_package.name)
|
||||||
a href=upload_package_by_name_path('firefox')
|
|
||||||
img src="/images/dummy/no-screenshots-upload-one.svg" width="80%"
|
img src="/images/dummy/no-screenshots-upload-one.svg" width="80%"
|
||||||
p
|
p
|
||||||
' We lack a screenshot for the Firefox package. Can you
|
' We lack a screenshot for the #{@most_wanted_package.name} package. Can you
|
||||||
a href=upload_package_by_name_path('firefox') provide one
|
a href=package_path(@most_wanted_package.name) provide one
|
||||||
' ?
|
' ?
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,9 @@ Debshots::Application.routes.draw do
|
||||||
get 'logs' => 'logs#index'
|
get 'logs' => 'logs#index'
|
||||||
get 'package/:name' => 'packages#details', as: :package, name: /[^\/]+/
|
get 'package/:name' => 'packages#details', as: :package, name: /[^\/]+/
|
||||||
get 'package_reviews/:name' => 'packages#reviews', as: :package_reviews, name: /[^\/]+/
|
get 'package_reviews/:name' => 'packages#reviews', as: :package_reviews, name: /[^\/]+/
|
||||||
get 'upload', to: redirect('/packages') # legacy upload form
|
get 'upload', to: redirect('/packages'), as: :upload_legacy # legacy upload form
|
||||||
post 'uploadfile' => 'packages#legacy_uploadfile'
|
post 'uploadfile' => 'packages#legacy_uploadfile'
|
||||||
get 'upload/:name' => 'packages#upload', as: :upload_package_by_name
|
get 'upload/:name' => 'packages#upload', as: :upload
|
||||||
post 'upload_image/:name' => 'packages#upload_image', as: :upload_image, name: /[^\/]+/
|
post 'upload_image/:name' => 'packages#upload_image', as: :upload_image, name: /[^\/]+/
|
||||||
# TODO: "get" is probably the wrong method to delete a screenshot
|
# TODO: "get" is probably the wrong method to delete a screenshot
|
||||||
get 'delete_screenshot/:id' => 'packages#delete_screenshot', as: :delete_screenshot
|
get 'delete_screenshot/:id' => 'packages#delete_screenshot', as: :delete_screenshot
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue