Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sass migrations todos #4013

Merged
merged 19 commits into from
Nov 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/javascript/gobierto_budgets/modules/application.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import "devbridge-autocomplete";
import { AUTOCOMPLETE_DEFAULTS, isDesktop } from "lib/shared";
import { AUTOCOMPLETE_DEFAULTS } from "lib/shared";
import {
VisBubbleLegend,
VisBubbles,
Expand Down Expand Up @@ -45,7 +45,7 @@ $(document).on("turbolinks:load ajax:complete ajaxSuccess", function() {
});

$(document).on("turbolinks:load", function() {
if (!isDesktop()) {
if (!($(window).width() > 740)) {
$(".open_line_browser").hide();
}

Expand Down
5 changes: 0 additions & 5 deletions app/javascript/gobierto_charters/.eslintrc

This file was deleted.

2 changes: 0 additions & 2 deletions app/javascript/gobierto_charters/index.js

This file was deleted.

53 changes: 0 additions & 53 deletions app/javascript/gobierto_charters/modules/charters_controller.js

This file was deleted.

7 changes: 0 additions & 7 deletions app/javascript/gobierto_charters/modules/init.js

This file was deleted.

5 changes: 0 additions & 5 deletions app/javascript/gobierto_exports/.eslintrc

This file was deleted.

1 change: 0 additions & 1 deletion app/javascript/gobierto_exports/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
import "../stylesheets/gobierto-exports.scss"
import './modules/application.js'
3 changes: 0 additions & 3 deletions app/javascript/gobierto_exports/modules/application.js

This file was deleted.

3 changes: 0 additions & 3 deletions app/javascript/lib/shared/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import { AUTOCOMPLETE_DEFAULTS } from "./modules/autocomplete_settings.js";
import { URLParams } from "./modules/URLParams.js";
import d3locale from "./modules/d3-locale.js";
import { isDesktop, isMobile } from "./modules/globals.js";
import { createScaleColors } from "./modules/createScaleColors.js";
import { slugString } from "./modules/slugString.js";
import accounting from "accounting";
Expand All @@ -24,8 +23,6 @@ export {
accounting,
createScaleColors,
d3locale,
isDesktop,
isMobile,
URLParams,
RangeSlider,
Datepicker,
Expand Down
9 changes: 0 additions & 9 deletions app/javascript/lib/shared/modules/globals.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
import "tipsy-1a";

// Global util functions
export function isDesktop() {
return $(window).width() > 740;
}

export function isMobile() {
return !isDesktop();
}

/* Toggle text method */
$.fn.extend({
toggleText: function(a, b) {
Expand Down
12 changes: 0 additions & 12 deletions app/javascript/packs/charters.js

This file was deleted.

10 changes: 10 additions & 0 deletions app/javascript/stylesheets/_comp-breadcrumbs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@
a:first-child {
margin-left: 0;
}

@include screen(740) {
padding: 0.75em 0;
margin: 0 0 0.5em 0;

.bread_links {
line-height: 1.3em;
font-size: 0.75em;
}
}
}

.breadcrumb.is_stuck {
Expand Down
44 changes: 43 additions & 1 deletion app/javascript/stylesheets/_comp-budget_vis.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,34 @@
small {
line-height: 0.5em;
}

@include screen(740) {
.cont {
padding: 2em 1em;
text-align: center;
}

.title {
padding: 0;
border: 0;
text-align: center;
margin: 0 0 1em 0;
font-size: 1.1em;
}

.ic {
margin: 0 0 0.5em 0;

label {
height: initial;
display: block;
}
}

.highlight {
margin: 0.25em 0;
}
}
}

.explore_detail {
Expand Down Expand Up @@ -98,6 +126,12 @@
}
}
}

@include screen(740) {
[data-budget-lines] {
padding: 0;
}
}
}

/*
Expand Down Expand Up @@ -125,6 +159,15 @@
}
}

@include screen(740) {
.line_description {
p {
font-size: 0.85em;
line-height: 1.3em;
}
}
}

.metric_boxes {
margin-bottom: 2em;
}
Expand Down Expand Up @@ -517,4 +560,3 @@
margin-top: 20px;
}
}

10 changes: 10 additions & 0 deletions app/javascript/stylesheets/_comp-forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,16 @@ select {
height: 40px;
width: 300px;
}

@include screen(740) {
text-align: center;
margin: 0 0 1em 0;

input[type=text] {
width: calc(100%);
margin: 0;
}
}
}

.attach_file input[type=file] {
Expand Down
2 changes: 2 additions & 0 deletions app/javascript/stylesheets/_comp-graph-dc.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import "dc/dist/style/dc.css";

.graph-title {
text-transform: uppercase;
border-bottom: 2px solid $color_main_soft;
Expand Down
11 changes: 11 additions & 0 deletions app/javascript/stylesheets/_comp-headings_blocks.scss
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,17 @@ h4 {
top: -0.5em;
}
}

@include screen(740) {
h2 {
margin: 0.5em 0;
}

.description {
width: 100%;
margin: 0 0 1em 0;
}
}
}

.with_separator {
Expand Down
9 changes: 9 additions & 0 deletions app/javascript/stylesheets/_comp-layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
width: calc(100% - 6rem);
max-width: 1400px;
margin: auto;

@include screen(740) {
width: initial;
margin: auto 1em;
}
}

.main_content {
Expand Down Expand Up @@ -35,6 +40,10 @@ footer {

.logo {
max-width: 275px;

@include screen(740) {
max-width: 100%;
}
}

ul {
Expand Down
59 changes: 59 additions & 0 deletions app/javascript/stylesheets/_comp-metric_boxes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,62 @@
}
}
}

@include screen(740) {
.metric_boxes {
margin: 0 0 2em 0;

.metric_box {
.inner {
margin: 0;
min-height: initial;
padding: 0.5em;
}

h3 {
font-size: 0.85em;
min-height: initial;
line-height: 1em;
}

.metric {
font-size: 1.6em;
}

.explanation {
bottom: 0.2em;
}

span.not_av {
font-size: 0.6em;
}
}

.metric_box:nth-child(1n) {
.inner {
margin: 0 0.5em 1em 0;
}
}

.metric_box:nth-child(2n) {
.inner {
margin: 0 0 1em 0.5em;
}
}

.metric_box:last-child {
width: 100%;

.inner {
margin: 0;
min-height: initial;
}
}

.metric_box.cta {
a {
padding: 0.5em;
}
}
}
}
37 changes: 0 additions & 37 deletions app/javascript/stylesheets/_comp-search.scss

This file was deleted.

Loading