From 025a257a106d01b60af9ac6471203ae8fee1cdde Mon Sep 17 00:00:00 2001 From: Morgan VanDerLeest Date: Tue, 12 Dec 2023 15:33:37 -0600 Subject: [PATCH 1/8] create seeds file with user + 45 bounties --- db/seeds.rb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/db/seeds.rb b/db/seeds.rb index bc25fce..4f963f9 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -5,3 +5,25 @@ # # movies = Movie.create([{ name: "Star Wars" }, { name: "Lord of the Rings" }]) # Character.create(name: "Luke", movie: movies.first) +user = User.new +user.email = "admin@example.com" +user.password = 'password123' +user.password_confirmation = 'password123' +user.save! + +lipsum = [ +"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque venenatis, enim cursus porttitor aliquam, turpis quam sodales nunc, in lobortis lacus sapien et ipsum. Nunc ante nibh, sodales ut nunc in, faucibus molestie ligula. Aenean nec accumsan mi. Vestibulum velit mauris, congue non lobortis ac, ultrices ac lacus. Praesent dignissim nec neque condimentum auctor. Quisque mattis orci elementum, venenatis ex ut, placerat sem. Ut efficitur tincidunt odio, sed tincidunt augue varius id. Maecenas pulvinar elit et eros mattis, in rutrum mi euismod. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec volutpat eleifend congue. Duis fringilla lobortis enim quis ullamcorper. Sed laoreet dui ut metus porttitor viverra. Praesent ac ultricies nulla. Donec laoreet velit a enim lacinia, eget tincidunt diam convallis. Duis rhoncus ultrices odio, sit amet porttitor lorem vestibulum ut. Phasellus gravida est lacus, non semper tellus vestibulum nec.", +"In pellentesque rhoncus dignissim. Nam id rutrum mauris. Nam egestas ligula suscipit neque dapibus, in pulvinar lorem vehicula. Etiam a nibh eu neque consequat semper. Duis sed nunc eget metus ultricies ullamcorper nec vitae mi. Integer varius urna quis mauris fringilla, vitae aliquam dolor pharetra. Proin metus enim, vestibulum quis tempor sed, efficitur eu erat. Curabitur tristique, arcu eu ultricies egestas, justo lorem egestas nisi, vel iaculis velit nibh nec magna. Integer sed mattis lacus. Morbi ullamcorper vel nisi eget maximus. Nunc porta, enim eget facilisis ornare, ipsum tellus ultricies ligula, gravida maximus massa justo vel velit.", +"Nam commodo sollicitudin lacus sit amet facilisis. Phasellus ac tortor id diam faucibus elementum. Donec sed elit turpis. Vestibulum tristique finibus sapien et consectetur. Aenean sed gravida quam, at euismod turpis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Integer elementum nisl metus, et vestibulum purus pulvinar et. Nam dictum finibus tincidunt. Donec vel diam non sem sollicitudin congue blandit porta sapien. Vivamus fermentum sit amet turpis pharetra malesuada. Praesent vestibulum blandit dolor, vel gravida sapien blandit a. Vestibulum fringilla ultricies nulla, in luctus ipsum suscipit id.", +"Mauris tristique hendrerit lacus pharetra ornare. Duis at sollicitudin nibh, id semper eros. Donec nibh leo, suscipit ornare nunc eget, laoreet rhoncus nisi. Pellentesque non interdum urna. Sed consequat velit et ultricies sollicitudin. Quisque semper augue vel metus placerat, quis tincidunt enim pharetra. Proin tempus varius rhoncus.", +"Fusce sollicitudin gravida arcu, et tempus dui congue quis. Nulla egestas lacus libero, non rhoncus massa fringilla at. Nullam pretium diam nec posuere faucibus. Curabitur rhoncus sed leo at efficitur. Maecenas consequat blandit cursus. Sed ornare libero vel luctus hendrerit. Vivamus pretium ultricies erat, at accumsan erat suscipit vehicula. Proin tincidunt nibh non tincidunt blandit." +] + +45.times do |i| + user.bounties.create( + title: "Bounty ##{i}", + description: lipsum[(i/4).floor], + url: "https://github.com/excid3/beginnerbounties.com", + amount: rand(25..200), + ) +end From d374a9d5363ceb90b6842a170fdcd0b18f87d583 Mon Sep 17 00:00:00 2001 From: Morgan VanDerLeest Date: Tue, 12 Dec 2023 15:57:49 -0600 Subject: [PATCH 2/8] updated arm64-darwin-23 --- Gemfile.lock | 1 + 1 file changed, 1 insertion(+) diff --git a/Gemfile.lock b/Gemfile.lock index 3b2a682..9bb95ed 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -317,6 +317,7 @@ GEM PLATFORMS arm64-darwin-21 + arm64-darwin-23 x86_64-darwin-22 x86_64-linux From 2c21f9fba68327a23142022aa6d3889471ade979 Mon Sep 17 00:00:00 2001 From: Morgan VanDerLeest Date: Tue, 12 Dec 2023 15:58:26 -0600 Subject: [PATCH 3/8] tweak lipsum creation and create 95 bounties for pagination testing --- db/seeds.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/seeds.rb b/db/seeds.rb index 4f963f9..5ad691e 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -19,10 +19,10 @@ "Fusce sollicitudin gravida arcu, et tempus dui congue quis. Nulla egestas lacus libero, non rhoncus massa fringilla at. Nullam pretium diam nec posuere faucibus. Curabitur rhoncus sed leo at efficitur. Maecenas consequat blandit cursus. Sed ornare libero vel luctus hendrerit. Vivamus pretium ultricies erat, at accumsan erat suscipit vehicula. Proin tincidunt nibh non tincidunt blandit." ] -45.times do |i| +95.times do |i| user.bounties.create( title: "Bounty ##{i}", - description: lipsum[(i/4).floor], + description: lipsum[rand(0..4)], url: "https://github.com/excid3/beginnerbounties.com", amount: rand(25..200), ) From 11b44c0bef2bad747b6e96dc046420a9d0606bdb Mon Sep 17 00:00:00 2001 From: Morgan VanDerLeest Date: Tue, 12 Dec 2023 15:58:52 -0600 Subject: [PATCH 4/8] styles for pagination --- .../stylesheets/application.tailwind.css | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/application.tailwind.css b/app/assets/stylesheets/application.tailwind.css index ac05469..274553c 100644 --- a/app/assets/stylesheets/application.tailwind.css +++ b/app/assets/stylesheets/application.tailwind.css @@ -11,4 +11,21 @@ } */ -@import 'actiontext.css'; \ No newline at end of file + +@import 'actiontext.css'; + + +.pagy-nav, +.pagy-nav-js { + @apply flex space-x-2 md:space-x-4 justify-center; +} + +.pagy-nav a, +.pagy-nav span.disabled, +.pagy-nav span.active { + @apply no-underline inline-block py-0.5 px-2 bg-gray-200 rounded; +} + +.pagy-nav > span.active { + @apply bg-indigo-600 text-white text-bold; +} From fdf3f0280f93e6c19bbd461519c6a277fac4670f Mon Sep 17 00:00:00 2001 From: Morgan VanDerLeest Date: Tue, 12 Dec 2023 16:00:35 -0600 Subject: [PATCH 5/8] tweak pagy defaults so we have a max of time items per page and limit the viewable page links --- config/initializers/pagy.rb | 250 ++++++++++++++++++++++++++++++++++++ 1 file changed, 250 insertions(+) create mode 100644 config/initializers/pagy.rb diff --git a/config/initializers/pagy.rb b/config/initializers/pagy.rb new file mode 100644 index 0000000..bc4a736 --- /dev/null +++ b/config/initializers/pagy.rb @@ -0,0 +1,250 @@ +# frozen_string_literal: true + +# Pagy initializer file (6.2.0) +# Customize only what you really need and notice that the core Pagy works also without any of the following lines. +# Should you just cherry pick part of this file, please maintain the require-order of the extras + + +# Pagy DEFAULT Variables +# See https://ddnexus.github.io/pagy/docs/api/pagy#variables +# All the Pagy::DEFAULT are set for all the Pagy instances but can be overridden per instance by just passing them to +# Pagy.new|Pagy::Countless.new|Pagy::Calendar::*.new or any of the #pagy* controller methods + + +# Instance variables +# See https://ddnexus.github.io/pagy/docs/api/pagy#instance-variables +# Pagy::DEFAULT[:page] = 1 # default +Pagy::DEFAULT[:items] = 10 # default +# Pagy::DEFAULT[:outset] = 0 # default + + +# Other Variables +# See https://ddnexus.github.io/pagy/docs/api/pagy#other-variables +Pagy::DEFAULT[:size] = [1,1,1,1] # default +# Pagy::DEFAULT[:page_param] = :page # default +# The :params can be also set as a lambda e.g ->(params){ params.exclude('useless').merge!('custom' => 'useful') } +# Pagy::DEFAULT[:params] = {} # default +# Pagy::DEFAULT[:fragment] = '#fragment' # example +# Pagy::DEFAULT[:link_extra] = 'data-remote="true"' # example +# Pagy::DEFAULT[:i18n_key] = 'pagy.item_name' # default +# Pagy::DEFAULT[:cycle] = true # example +# Pagy::DEFAULT[:request_path] = "/foo" # example + + +# Extras +# See https://ddnexus.github.io/pagy/categories/extra + + +# Backend Extras + +# Arel extra: For better performance utilizing grouped ActiveRecord collections: +# See: https://ddnexus.github.io/pagy/docs/extras/arel +# require 'pagy/extras/arel' + +# Array extra: Paginate arrays efficiently, avoiding expensive array-wrapping and without overriding +# See https://ddnexus.github.io/pagy/docs/extras/array +# require 'pagy/extras/array' + +# Calendar extra: Add pagination filtering by calendar time unit (year, quarter, month, week, day) +# See https://ddnexus.github.io/pagy/docs/extras/calendar +# require 'pagy/extras/calendar' +# Default for each unit +# Pagy::Calendar::Year::DEFAULT[:order] = :asc # Time direction of pagination +# Pagy::Calendar::Year::DEFAULT[:format] = '%Y' # strftime format +# +# Pagy::Calendar::Quarter::DEFAULT[:order] = :asc # Time direction of pagination +# Pagy::Calendar::Quarter::DEFAULT[:format] = '%Y-Q%q' # strftime format +# +# Pagy::Calendar::Month::DEFAULT[:order] = :asc # Time direction of pagination +# Pagy::Calendar::Month::DEFAULT[:format] = '%Y-%m' # strftime format +# +# Pagy::Calendar::Week::DEFAULT[:order] = :asc # Time direction of pagination +# Pagy::Calendar::Week::DEFAULT[:format] = '%Y-%W' # strftime format +# +# Pagy::Calendar::Day::DEFAULT[:order] = :asc # Time direction of pagination +# Pagy::Calendar::Day::DEFAULT[:format] = '%Y-%m-%d' # strftime format +# +# Uncomment the following lines, if you need calendar localization without using the I18n extra +# module LocalizePagyCalendar +# def localize(time, opts) +# ::I18n.l(time, **opts) +# end +# end +# Pagy::Calendar.prepend LocalizePagyCalendar + +# Countless extra: Paginate without any count, saving one query per rendering +# See https://ddnexus.github.io/pagy/docs/extras/countless +# require 'pagy/extras/countless' +# Pagy::DEFAULT[:countless_minimal] = false # default (eager loading) + +# Elasticsearch Rails extra: Paginate `ElasticsearchRails::Results` objects +# See https://ddnexus.github.io/pagy/docs/extras/elasticsearch_rails +# Default :pagy_search method: change only if you use also +# the searchkick or meilisearch extra that defines the same +# Pagy::DEFAULT[:elasticsearch_rails_pagy_search] = :pagy_search +# Default original :search method called internally to do the actual search +# Pagy::DEFAULT[:elasticsearch_rails_search] = :search +# require 'pagy/extras/elasticsearch_rails' + +# Headers extra: http response headers (and other helpers) useful for API pagination +# See http://ddnexus.github.io/pagy/extras/headers +# require 'pagy/extras/headers' +# Pagy::DEFAULT[:headers] = { page: 'Current-Page', +# items: 'Page-Items', +# count: 'Total-Count', +# pages: 'Total-Pages' } # default + +# Meilisearch extra: Paginate `Meilisearch` result objects +# See https://ddnexus.github.io/pagy/docs/extras/meilisearch +# Default :pagy_search method: change only if you use also +# the elasticsearch_rails or searchkick extra that define the same method +# Pagy::DEFAULT[:meilisearch_pagy_search] = :pagy_search +# Default original :search method called internally to do the actual search +# Pagy::DEFAULT[:meilisearch_search] = :ms_search +# require 'pagy/extras/meilisearch' + +# Metadata extra: Provides the pagination metadata to Javascript frameworks like Vue.js, react.js, etc. +# See https://ddnexus.github.io/pagy/docs/extras/metadata +# you must require the frontend helpers internal extra (BEFORE the metadata extra) ONLY if you need also the :sequels +# require 'pagy/extras/frontend_helpers' +# require 'pagy/extras/metadata' +# For performance reasons, you should explicitly set ONLY the metadata you use in the frontend +# Pagy::DEFAULT[:metadata] = %i[scaffold_url page prev next last] # example + +# Searchkick extra: Paginate `Searchkick::Results` objects +# See https://ddnexus.github.io/pagy/docs/extras/searchkick +# Default :pagy_search method: change only if you use also +# the elasticsearch_rails or meilisearch extra that defines the same +# DEFAULT[:searchkick_pagy_search] = :pagy_search +# Default original :search method called internally to do the actual search +# Pagy::DEFAULT[:searchkick_search] = :search +# require 'pagy/extras/searchkick' +# uncomment if you are going to use Searchkick.pagy_search +# Searchkick.extend Pagy::Searchkick + + +# Frontend Extras + +# Bootstrap extra: Add nav, nav_js and combo_nav_js helpers and templates for Bootstrap pagination +# See https://ddnexus.github.io/pagy/docs/extras/bootstrap +# require 'pagy/extras/bootstrap' + +# Bulma extra: Add nav, nav_js and combo_nav_js helpers and templates for Bulma pagination +# See https://ddnexus.github.io/pagy/docs/extras/bulma +# require 'pagy/extras/bulma' + +# Foundation extra: Add nav, nav_js and combo_nav_js helpers and templates for Foundation pagination +# See https://ddnexus.github.io/pagy/docs/extras/foundation +# require 'pagy/extras/foundation' + +# Materialize extra: Add nav, nav_js and combo_nav_js helpers for Materialize pagination +# See https://ddnexus.github.io/pagy/docs/extras/materialize +# require 'pagy/extras/materialize' + +# Navs extra: Add nav_js and combo_nav_js javascript helpers +# Notice: the other frontend extras add their own framework-styled versions, +# so require this extra only if you need the unstyled version +# See https://ddnexus.github.io/pagy/docs/extras/navs +# require 'pagy/extras/navs' + +# Semantic extra: Add nav, nav_js and combo_nav_js helpers for Semantic UI pagination +# See https://ddnexus.github.io/pagy/docs/extras/semantic +# require 'pagy/extras/semantic' + +# UIkit extra: Add nav helper and templates for UIkit pagination +# See https://ddnexus.github.io/pagy/docs/extras/uikit +# require 'pagy/extras/uikit' + +# Multi size var used by the *_nav_js helpers +# See https://ddnexus.github.io/pagy/docs/extras/navs#steps +# Pagy::DEFAULT[:steps] = { 0 => [2,3,3,2], 540 => [3,5,5,3], 720 => [5,7,7,5] } # example + + +# Feature Extras + +# Gearbox extra: Automatically change the number of items per page depending on the page number +# See https://ddnexus.github.io/pagy/docs/extras/gearbox +# require 'pagy/extras/gearbox' +# set to false only if you want to make :gearbox_extra an opt-in variable +# Pagy::DEFAULT[:gearbox_extra] = false # default true +# Pagy::DEFAULT[:gearbox_items] = [15, 30, 60, 100] # default + +# Items extra: Allow the client to request a custom number of items per page with an optional selector UI +# See https://ddnexus.github.io/pagy/docs/extras/items +# require 'pagy/extras/items' +# set to false only if you want to make :items_extra an opt-in variable +# Pagy::DEFAULT[:items_extra] = false # default true +# Pagy::DEFAULT[:items_param] = :items # default +# Pagy::DEFAULT[:max_items] = 100 # default + +# Overflow extra: Allow for easy handling of overflowing pages +# See https://ddnexus.github.io/pagy/docs/extras/overflow +# require 'pagy/extras/overflow' +# Pagy::DEFAULT[:overflow] = :empty_page # default (other options: :last_page and :exception) + +# Support extra: Extra support for features like: incremental, infinite, auto-scroll pagination +# See https://ddnexus.github.io/pagy/docs/extras/support +# require 'pagy/extras/support' + +# Trim extra: Remove the page=1 param from links +# See https://ddnexus.github.io/pagy/docs/extras/trim +# require 'pagy/extras/trim' +# set to false only if you want to make :trim_extra an opt-in variable +# Pagy::DEFAULT[:trim_extra] = false # default true + +# Standalone extra: Use pagy in non Rack environment/gem +# See https://ddnexus.github.io/pagy/docs/extras/standalone +# require 'pagy/extras/standalone' +# Pagy::DEFAULT[:url] = 'http://www.example.com/subdir' # optional default + + +# Rails +# Enable the .js file required by the helpers that use javascript +# (pagy*_nav_js, pagy*_combo_nav_js, and pagy_items_selector_js) +# See https://ddnexus.github.io/pagy/docs/api/javascript + +# With the asset pipeline +# Sprockets need to look into the pagy javascripts dir, so add it to the assets paths +# Rails.application.config.assets.paths << Pagy.root.join('javascripts') + +# I18n + +# Pagy internal I18n: ~18x faster using ~10x less memory than the i18n gem +# See https://ddnexus.github.io/pagy/docs/api/i18n +# Notice: No need to configure anything in this section if your app uses only "en" +# or if you use the i18n extra below +# +# Examples: +# load the "de" built-in locale: +# Pagy::I18n.load(locale: 'de') +# +# load the "de" locale defined in the custom file at :filepath: +# Pagy::I18n.load(locale: 'de', filepath: 'path/to/pagy-de.yml') +# +# load the "de", "en" and "es" built-in locales: +# (the first passed :locale will be used also as the default_locale) +# Pagy::I18n.load({ locale: 'de' }, +# { locale: 'en' }, +# { locale: 'es' }) +# +# load the "en" built-in locale, a custom "es" locale, +# and a totally custom locale complete with a custom :pluralize proc: +# (the first passed :locale will be used also as the default_locale) +# Pagy::I18n.load({ locale: 'en' }, +# { locale: 'es', filepath: 'path/to/pagy-es.yml' }, +# { locale: 'xyz', # not built-in +# filepath: 'path/to/pagy-xyz.yml', +# pluralize: lambda{ |count| ... } ) + + +# I18n extra: uses the standard i18n gem which is ~18x slower using ~10x more memory +# than the default pagy internal i18n (see above) +# See https://ddnexus.github.io/pagy/docs/extras/i18n +# require 'pagy/extras/i18n' + +# Default i18n key +# Pagy::DEFAULT[:i18n_key] = 'pagy.item_name' # default + + +# When you are done setting your own default freeze it, so it will not get changed accidentally +Pagy::DEFAULT.freeze From 87b7968d7e6344df64d7c57280ffea94e9413a01 Mon Sep 17 00:00:00 2001 From: Morgan VanDerLeest Date: Tue, 12 Dec 2023 16:07:50 -0600 Subject: [PATCH 6/8] bcuz i no tailwind gud --- app/assets/stylesheets/application.tailwind.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/stylesheets/application.tailwind.css b/app/assets/stylesheets/application.tailwind.css index 274553c..abfe81e 100644 --- a/app/assets/stylesheets/application.tailwind.css +++ b/app/assets/stylesheets/application.tailwind.css @@ -27,5 +27,5 @@ } .pagy-nav > span.active { - @apply bg-indigo-600 text-white text-bold; + @apply bg-indigo-600 text-white font-bold; } From 80b3d5ad03c1df3f1ddb5ce5910b5cf85ca5a132 Mon Sep 17 00:00:00 2001 From: Morgan VanDerLeest Date: Tue, 12 Dec 2023 16:50:06 -0600 Subject: [PATCH 7/8] standardrb --- config/initializers/pagy.rb | 14 ++------------ db/seeds.rb | 16 ++++++++-------- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/config/initializers/pagy.rb b/config/initializers/pagy.rb index bc4a736..db38388 100644 --- a/config/initializers/pagy.rb +++ b/config/initializers/pagy.rb @@ -4,23 +4,20 @@ # Customize only what you really need and notice that the core Pagy works also without any of the following lines. # Should you just cherry pick part of this file, please maintain the require-order of the extras - # Pagy DEFAULT Variables # See https://ddnexus.github.io/pagy/docs/api/pagy#variables # All the Pagy::DEFAULT are set for all the Pagy instances but can be overridden per instance by just passing them to # Pagy.new|Pagy::Countless.new|Pagy::Calendar::*.new or any of the #pagy* controller methods - # Instance variables # See https://ddnexus.github.io/pagy/docs/api/pagy#instance-variables # Pagy::DEFAULT[:page] = 1 # default -Pagy::DEFAULT[:items] = 10 # default +Pagy::DEFAULT[:items] = 10 # default # Pagy::DEFAULT[:outset] = 0 # default - # Other Variables # See https://ddnexus.github.io/pagy/docs/api/pagy#other-variables -Pagy::DEFAULT[:size] = [1,1,1,1] # default +Pagy::DEFAULT[:size] = [1, 1, 1, 1] # default # Pagy::DEFAULT[:page_param] = :page # default # The :params can be also set as a lambda e.g ->(params){ params.exclude('useless').merge!('custom' => 'useful') } # Pagy::DEFAULT[:params] = {} # default @@ -30,11 +27,9 @@ # Pagy::DEFAULT[:cycle] = true # example # Pagy::DEFAULT[:request_path] = "/foo" # example - # Extras # See https://ddnexus.github.io/pagy/categories/extra - # Backend Extras # Arel extra: For better performance utilizing grouped ActiveRecord collections: @@ -122,7 +117,6 @@ # uncomment if you are going to use Searchkick.pagy_search # Searchkick.extend Pagy::Searchkick - # Frontend Extras # Bootstrap extra: Add nav, nav_js and combo_nav_js helpers and templates for Bootstrap pagination @@ -159,7 +153,6 @@ # See https://ddnexus.github.io/pagy/docs/extras/navs#steps # Pagy::DEFAULT[:steps] = { 0 => [2,3,3,2], 540 => [3,5,5,3], 720 => [5,7,7,5] } # example - # Feature Extras # Gearbox extra: Automatically change the number of items per page depending on the page number @@ -197,7 +190,6 @@ # require 'pagy/extras/standalone' # Pagy::DEFAULT[:url] = 'http://www.example.com/subdir' # optional default - # Rails # Enable the .js file required by the helpers that use javascript # (pagy*_nav_js, pagy*_combo_nav_js, and pagy_items_selector_js) @@ -236,7 +228,6 @@ # filepath: 'path/to/pagy-xyz.yml', # pluralize: lambda{ |count| ... } ) - # I18n extra: uses the standard i18n gem which is ~18x slower using ~10x more memory # than the default pagy internal i18n (see above) # See https://ddnexus.github.io/pagy/docs/extras/i18n @@ -245,6 +236,5 @@ # Default i18n key # Pagy::DEFAULT[:i18n_key] = 'pagy.item_name' # default - # When you are done setting your own default freeze it, so it will not get changed accidentally Pagy::DEFAULT.freeze diff --git a/db/seeds.rb b/db/seeds.rb index 5ad691e..17f2248 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -7,16 +7,16 @@ # Character.create(name: "Luke", movie: movies.first) user = User.new user.email = "admin@example.com" -user.password = 'password123' -user.password_confirmation = 'password123' +user.password = "password123" +user.password_confirmation = "password123" user.save! lipsum = [ -"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque venenatis, enim cursus porttitor aliquam, turpis quam sodales nunc, in lobortis lacus sapien et ipsum. Nunc ante nibh, sodales ut nunc in, faucibus molestie ligula. Aenean nec accumsan mi. Vestibulum velit mauris, congue non lobortis ac, ultrices ac lacus. Praesent dignissim nec neque condimentum auctor. Quisque mattis orci elementum, venenatis ex ut, placerat sem. Ut efficitur tincidunt odio, sed tincidunt augue varius id. Maecenas pulvinar elit et eros mattis, in rutrum mi euismod. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec volutpat eleifend congue. Duis fringilla lobortis enim quis ullamcorper. Sed laoreet dui ut metus porttitor viverra. Praesent ac ultricies nulla. Donec laoreet velit a enim lacinia, eget tincidunt diam convallis. Duis rhoncus ultrices odio, sit amet porttitor lorem vestibulum ut. Phasellus gravida est lacus, non semper tellus vestibulum nec.", -"In pellentesque rhoncus dignissim. Nam id rutrum mauris. Nam egestas ligula suscipit neque dapibus, in pulvinar lorem vehicula. Etiam a nibh eu neque consequat semper. Duis sed nunc eget metus ultricies ullamcorper nec vitae mi. Integer varius urna quis mauris fringilla, vitae aliquam dolor pharetra. Proin metus enim, vestibulum quis tempor sed, efficitur eu erat. Curabitur tristique, arcu eu ultricies egestas, justo lorem egestas nisi, vel iaculis velit nibh nec magna. Integer sed mattis lacus. Morbi ullamcorper vel nisi eget maximus. Nunc porta, enim eget facilisis ornare, ipsum tellus ultricies ligula, gravida maximus massa justo vel velit.", -"Nam commodo sollicitudin lacus sit amet facilisis. Phasellus ac tortor id diam faucibus elementum. Donec sed elit turpis. Vestibulum tristique finibus sapien et consectetur. Aenean sed gravida quam, at euismod turpis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Integer elementum nisl metus, et vestibulum purus pulvinar et. Nam dictum finibus tincidunt. Donec vel diam non sem sollicitudin congue blandit porta sapien. Vivamus fermentum sit amet turpis pharetra malesuada. Praesent vestibulum blandit dolor, vel gravida sapien blandit a. Vestibulum fringilla ultricies nulla, in luctus ipsum suscipit id.", -"Mauris tristique hendrerit lacus pharetra ornare. Duis at sollicitudin nibh, id semper eros. Donec nibh leo, suscipit ornare nunc eget, laoreet rhoncus nisi. Pellentesque non interdum urna. Sed consequat velit et ultricies sollicitudin. Quisque semper augue vel metus placerat, quis tincidunt enim pharetra. Proin tempus varius rhoncus.", -"Fusce sollicitudin gravida arcu, et tempus dui congue quis. Nulla egestas lacus libero, non rhoncus massa fringilla at. Nullam pretium diam nec posuere faucibus. Curabitur rhoncus sed leo at efficitur. Maecenas consequat blandit cursus. Sed ornare libero vel luctus hendrerit. Vivamus pretium ultricies erat, at accumsan erat suscipit vehicula. Proin tincidunt nibh non tincidunt blandit." + "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque venenatis, enim cursus porttitor aliquam, turpis quam sodales nunc, in lobortis lacus sapien et ipsum. Nunc ante nibh, sodales ut nunc in, faucibus molestie ligula. Aenean nec accumsan mi. Vestibulum velit mauris, congue non lobortis ac, ultrices ac lacus. Praesent dignissim nec neque condimentum auctor. Quisque mattis orci elementum, venenatis ex ut, placerat sem. Ut efficitur tincidunt odio, sed tincidunt augue varius id. Maecenas pulvinar elit et eros mattis, in rutrum mi euismod. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec volutpat eleifend congue. Duis fringilla lobortis enim quis ullamcorper. Sed laoreet dui ut metus porttitor viverra. Praesent ac ultricies nulla. Donec laoreet velit a enim lacinia, eget tincidunt diam convallis. Duis rhoncus ultrices odio, sit amet porttitor lorem vestibulum ut. Phasellus gravida est lacus, non semper tellus vestibulum nec.", + "In pellentesque rhoncus dignissim. Nam id rutrum mauris. Nam egestas ligula suscipit neque dapibus, in pulvinar lorem vehicula. Etiam a nibh eu neque consequat semper. Duis sed nunc eget metus ultricies ullamcorper nec vitae mi. Integer varius urna quis mauris fringilla, vitae aliquam dolor pharetra. Proin metus enim, vestibulum quis tempor sed, efficitur eu erat. Curabitur tristique, arcu eu ultricies egestas, justo lorem egestas nisi, vel iaculis velit nibh nec magna. Integer sed mattis lacus. Morbi ullamcorper vel nisi eget maximus. Nunc porta, enim eget facilisis ornare, ipsum tellus ultricies ligula, gravida maximus massa justo vel velit.", + "Nam commodo sollicitudin lacus sit amet facilisis. Phasellus ac tortor id diam faucibus elementum. Donec sed elit turpis. Vestibulum tristique finibus sapien et consectetur. Aenean sed gravida quam, at euismod turpis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Integer elementum nisl metus, et vestibulum purus pulvinar et. Nam dictum finibus tincidunt. Donec vel diam non sem sollicitudin congue blandit porta sapien. Vivamus fermentum sit amet turpis pharetra malesuada. Praesent vestibulum blandit dolor, vel gravida sapien blandit a. Vestibulum fringilla ultricies nulla, in luctus ipsum suscipit id.", + "Mauris tristique hendrerit lacus pharetra ornare. Duis at sollicitudin nibh, id semper eros. Donec nibh leo, suscipit ornare nunc eget, laoreet rhoncus nisi. Pellentesque non interdum urna. Sed consequat velit et ultricies sollicitudin. Quisque semper augue vel metus placerat, quis tincidunt enim pharetra. Proin tempus varius rhoncus.", + "Fusce sollicitudin gravida arcu, et tempus dui congue quis. Nulla egestas lacus libero, non rhoncus massa fringilla at. Nullam pretium diam nec posuere faucibus. Curabitur rhoncus sed leo at efficitur. Maecenas consequat blandit cursus. Sed ornare libero vel luctus hendrerit. Vivamus pretium ultricies erat, at accumsan erat suscipit vehicula. Proin tincidunt nibh non tincidunt blandit." ] 95.times do |i| @@ -24,6 +24,6 @@ title: "Bounty ##{i}", description: lipsum[rand(0..4)], url: "https://github.com/excid3/beginnerbounties.com", - amount: rand(25..200), + amount: rand(25..200) ) end From fde0255126f3d3e4a086ad9ffb4c7cd791fdecc9 Mon Sep 17 00:00:00 2001 From: Morgan VanDerLeest Date: Tue, 12 Dec 2023 16:50:22 -0600 Subject: [PATCH 8/8] bold didn't look as good --- app/assets/stylesheets/application.tailwind.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/stylesheets/application.tailwind.css b/app/assets/stylesheets/application.tailwind.css index abfe81e..56026fa 100644 --- a/app/assets/stylesheets/application.tailwind.css +++ b/app/assets/stylesheets/application.tailwind.css @@ -27,5 +27,5 @@ } .pagy-nav > span.active { - @apply bg-indigo-600 text-white font-bold; + @apply bg-indigo-600 text-white; }