Skip to content

Commit

Permalink
Merge branch 'main' of github.com:jahseng-lee/nomad-station
Browse files Browse the repository at this point in the history
  • Loading branch information
jahseng-lee committed Dec 12, 2023
2 parents dafdb5b + c9775d7 commit b7a9b9a
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 12 deletions.
4 changes: 2 additions & 2 deletions app/assets/stylesheets/chats.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
body {
height: 100vh;
max-height: 100vh;
height: 100svh;
max-height: 100svh;

display: flex;
flex-direction: column;
Expand Down
20 changes: 16 additions & 4 deletions app/assets/stylesheets/location.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
}
}

.emergency-number {
display: flex;

span:first-child {
flex-grow: 1;
}
}

.hero {
text-align: center;

Expand All @@ -23,10 +31,14 @@
}
}

.emergency-number {
display: flex;
.location-tabs {
ul {
overflow-x: auto;
flex-wrap: nowrap;

span:first-child {
flex-grow: 1;
li {
display: inline-block;
float: none;
}
}
}
3 changes: 3 additions & 0 deletions app/javascript/controllers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ application.register("modal", ModalController)
import NavbarLinkController from "./navbar_link_controller"
application.register("navbar-link", NavbarLinkController)

import PagyController from "./pagy_controller"
application.register("pagy", PagyController)

import SearchCountriesController from "./search_countries_controller"
application.register("search-countries", SearchCountriesController)

Expand Down
8 changes: 8 additions & 0 deletions app/javascript/controllers/pagy_controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Controller } from "@hotwired/stimulus"
import Pagy from "pagy-module";

export default class extends Controller {
connect() {
Pagy.init(this.element)
}
}
2 changes: 1 addition & 1 deletion app/views/channels/_chat_message.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</div>
<% else %>
<div class="profile-picture chat-profile-picture placeholder">
<span><%= helper_user_initials(user: current_user) %></span>
<span><%= helper_user_initials(user: user) %></span>
</div>
<% end %>
<% end %>
Expand Down
4 changes: 2 additions & 2 deletions app/views/locations/_tabs.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="mb-3" data-controller="location-tabs">
<ul class="nav nav-pills">
<div class="location-tabs mb-3" data-controller="location-tabs">
<ul class="nav nav-pills justify-content-center">
<li class="nav-item">
<%= link_to(
"Overview",
Expand Down
4 changes: 2 additions & 2 deletions app/views/search_locations/_location_search_section.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
<% end %>
</div>

<div class="pagination-nav-container">
<%== pagy_bootstrap_nav(@pagy) %>
<div data-controller="pagy" class="pagination-nav-container">
<%== pagy_bootstrap_nav_js(@pagy) %>
</div>
</div>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"sass": "^1.68.0"
},
"scripts": {
"build": "esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds --public-path=/assets --loader:.js=jsx",
"build": "NODE_PATH=\"$(bundle show 'pagy')/lib/javascripts\" esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds --public-path=/assets --loader:.js=jsx",
"build:css:compile": "sass ./app/assets/stylesheets/application.bootstrap.scss:./app/assets/builds/application.css --no-source-map --load-path=node_modules",
"build:css:prefix": "postcss ./app/assets/builds/application.css --use=autoprefixer --output=./app/assets/builds/application.css",
"build:css": "yarn build:css:compile && yarn build:css:prefix",
Expand Down

0 comments on commit b7a9b9a

Please sign in to comment.