5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-15 05:31:42 +00:00

agregar un menu para poder filtrar por categoria

This commit is contained in:
f 2018-09-06 16:49:37 -03:00
parent 3d57b94fe3
commit 5e02d061d1
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7
5 changed files with 23 additions and 11 deletions

View file

@ -34,7 +34,7 @@ gem 'commonmarker'
gem 'email_address' gem 'email_address'
gem 'rails_warden' gem 'rails_warden'
gem 'haml-rails' gem 'haml-rails'
gem 'bootstrap', '~> 4.0.0.beta3' gem 'bootstrap', '~> 4.0.0'
gem 'jekyll' gem 'jekyll'
gem 'jquery-rails' gem 'jquery-rails'
gem 'font-awesome-rails' gem 'font-awesome-rails'

View file

@ -43,7 +43,7 @@ GEM
airbrussh (1.3.0) airbrussh (1.3.0)
sshkit (>= 1.6.1, != 1.7.0) sshkit (>= 1.6.1, != 1.7.0)
arel (8.0.0) arel (8.0.0)
autoprefixer-rails (8.3.0) autoprefixer-rails (9.1.4)
execjs execjs
bcrypt_pbkdf (1.0.0) bcrypt_pbkdf (1.0.0)
bindex (0.5.0) bindex (0.5.0)
@ -111,7 +111,7 @@ GEM
activesupport (>= 4.0, < 6) activesupport (>= 4.0, < 6)
execjs (2.7.0) execjs (2.7.0)
fastimage (2.1.3) fastimage (2.1.3)
ffi (1.9.23) ffi (1.9.25)
font-awesome-rails (4.7.0.4) font-awesome-rails (4.7.0.4)
railties (>= 3.2, < 6.0) railties (>= 3.2, < 6.0)
forwardable-extended (2.6.0) forwardable-extended (2.6.0)
@ -188,7 +188,7 @@ GEM
mini_portile2 (~> 2.3.0) mini_portile2 (~> 2.3.0)
pathutil (0.16.1) pathutil (0.16.1)
forwardable-extended (~> 2.6) forwardable-extended (~> 2.6)
popper_js (1.12.9) popper_js (1.14.3)
pry (0.11.3) pry (0.11.3)
coderay (~> 1.1.0) coderay (~> 1.1.0)
method_source (~> 0.9.0) method_source (~> 0.9.0)
@ -236,7 +236,7 @@ GEM
sexp_processor (~> 4.9) sexp_processor (~> 4.9)
rubyzip (1.2.1) rubyzip (1.2.1)
safe_yaml (1.0.4) safe_yaml (1.0.4)
sass (3.5.6) sass (3.5.7)
sass-listen (~> 4.0.0) sass-listen (~> 4.0.0)
sass-listen (4.0.0) sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4) rb-fsevent (~> 0.9, >= 0.9.4)
@ -303,7 +303,7 @@ PLATFORMS
DEPENDENCIES DEPENDENCIES
bcrypt_pbkdf bcrypt_pbkdf
bootstrap (~> 4.0.0.beta3) bootstrap (~> 4.0.0)
capistrano capistrano
capistrano-bundler capistrano-bundler
capistrano-passenger capistrano-passenger
@ -340,4 +340,4 @@ DEPENDENCIES
whenever whenever
BUNDLED WITH BUNDLED WITH
1.16.1 1.16.3

View file

@ -24,6 +24,16 @@
- @site.translations.each do |l| - @site.translations.each do |l|
= link_to t("i18n.#{l}"), site_posts_path(@site, category: @category, lang: l), = link_to t("i18n.#{l}"), site_posts_path(@site, category: @category, lang: l),
class: 'btn btn-info' class: 'btn btn-info'
.btn-group.pull-right
= link_to t('posts.categories'), site_posts_path(@site, lang: @lang), class: 'btn btn-secondary'
%button.btn.btn-secondary.dropdown-toggle.dropdown-toggle-split{data: { toggle: 'split' },
aria: { haspopup: 'true', expanded: 'false' }}
%span.sr-only= t('posts.dropdown')
.dropdown-menu
- @site.categories.each do |c|
= link_to c.split(':').first,
site_posts_path(@site, lang: @lang, category: c),
class: (params[:category] == c) ? 'dropdown-item active' : 'dropdown-item'
.row .row
.col .col

View file

@ -150,6 +150,7 @@ en:
order: 'Order' order: 'Order'
new: 'New post' new: 'New post'
dropdown: 'Toggle dropdown' dropdown: 'Toggle dropdown'
categories: 'Everything'
index: 'Posts' index: 'Posts'
edit: 'Edit' edit: 'Edit'
save: 'Save' save: 'Save'
@ -158,7 +159,6 @@ en:
title: 'Title' title: 'Title'
tags: 'Tags' tags: 'Tags'
tags_help: 'Comma separated!' tags_help: 'Comma separated!'
categories: 'Categories'
tags: 'Tags' tags: 'Tags'
slug: 'Slug' slug: 'Slug'
slug_help: 'This is the name of the article on the URL, ie. /title/. slug_help: 'This is the name of the article on the URL, ie. /title/.

View file

@ -146,6 +146,8 @@ es:
order: 'posición' order: 'posición'
date: 'fecha' date: 'fecha'
order: 'Posición' order: 'Posición'
categories: 'Todos'
dropdown: 'Desplegar el menú'
new: 'Empezar un artículo nuevo' new: 'Empezar un artículo nuevo'
index: 'Artículos' index: 'Artículos'
edit: 'Editar' edit: 'Editar'