Skip to content
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
81 changes: 0 additions & 81 deletions assets/css/_fare-summary.scss

This file was deleted.

49 changes: 0 additions & 49 deletions assets/css/_project.scss
Original file line number Diff line number Diff line change
@@ -1,52 +1,3 @@
// Featured project elixir template

.featured-project-title {
@apply h3;

@include media-breakpoint-up(sm) {
margin-top: 0;
}
}

.featured-project-updated-on {
color: $gray;
margin-bottom: $base-spacing;
}

.featured-project-image {
height: 200px;
object-fit: cover;
width: 100%;
}

.project-image {
margin: 0 auto;
width: 100%;
}

.project-updated-on {
color: $gray-light;
font-weight: bold;
}

.project-photos {
.photo-item {
margin-bottom: $base-spacing;
}

.img-thumbnail {
border: 0;
}
}

.project-downloads {
@include media-breakpoint-up(md) {
.content-file-grid-row {
width: 50%;
}
}
}

.contact-element-phone,
.contact-element-email {
a {
Expand Down
1 change: 0 additions & 1 deletion assets/css/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
@import 'customer-support';
@import 'multi-column';
@import 'fares';
@import 'fare-summary';
@import 'location-input';
@import 'news';
@import 'events';
Expand Down
2 changes: 0 additions & 2 deletions lib/dotcom_web/templates/cms/empty.html.heex

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions lib/dotcom_web/templates/cms/paragraph/_unknown.html.heex

This file was deleted.

38 changes: 0 additions & 38 deletions lib/dotcom_web/templates/cms/teaser/_generic.html.heex

This file was deleted.

31 changes: 0 additions & 31 deletions lib/dotcom_web/templates/fare/_summary.html.heex

This file was deleted.

6 changes: 0 additions & 6 deletions lib/dotcom_web/templates/fare/show.html.heex

This file was deleted.

17 changes: 0 additions & 17 deletions lib/dotcom_web/templates/partial/_photo_gallery.html.heex

This file was deleted.

17 changes: 0 additions & 17 deletions lib/dotcom_web/templates/project/_featured_project.html.heex

This file was deleted.

5 changes: 0 additions & 5 deletions lib/dotcom_web/templates/project/_photos.html.heex

This file was deleted.

41 changes: 0 additions & 41 deletions lib/dotcom_web/views/fare_view.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ defmodule DotcomWeb.FareView do
DescriptionList
}

alias DotcomWeb.PartialView.SvgIconWithCircle
alias Fares.Summary
alias Phoenix.HTML
alias Plug.Conn
alias Routes.Route
Expand Down Expand Up @@ -40,45 +38,6 @@ defmodule DotcomWeb.FareView do
|> URI.to_string()
end

@doc "Renders a summary of fares into HTML"
@spec summarize([Summary.t()], Keyword.t()) :: HTML.safe()
def summarize(summaries, opts \\ []) do
render("_summary.html",
summaries: summaries,
class: opts[:class],
link_class: Keyword.get(opts, :link_class, "")
)
end

@spec summary_url(Summary.t()) :: String.t()
def summary_url(%Summary{url: url}) when not is_nil(url), do: url

def summary_url(%Summary{modes: [subway_or_bus | _], duration: duration})
when subway_or_bus in [:subway, :bus] do
anchor =
cond do
duration in ~w(day week)a -> "#7-day"
duration in ~w(month)a -> "#monthly"
true -> ""
end

do_summary_url(subway_or_bus, anchor)
end

def summary_url(%Summary{modes: [mode | _]}) do
do_summary_url(mode)
end

@spec do_summary_url(atom, String.t()) :: String.t()
defp do_summary_url(name, anchor \\ "") do
name
|> Atom.to_string()
|> String.replace("_", "-")
|> then(fn name ->
fare_path(DotcomWeb.Endpoint, :show, name <> "-fares") <> anchor
end)
end

@spec fare_passes(Route.gtfs_route_type()) :: DescriptionList.t()
def fare_passes(:subway) do
%DescriptionList{
Expand Down
Loading