mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-21 22:46:21 +00:00
creditos para las plantillas e invitación a apoyar el trabajo
This commit is contained in:
parent
17bbee47aa
commit
452fc34b0e
9 changed files with 48 additions and 8 deletions
|
@ -39,6 +39,11 @@ module ApplicationHelper
|
|||
tfoot em strong sup blockquote cite pre section article]
|
||||
end
|
||||
|
||||
# Genera HTML y limpia etiquetas innecesarias
|
||||
#
|
||||
# @param [String]
|
||||
# @param [Hash]
|
||||
# @return [String]
|
||||
def sanitize_markdown(text, options = {})
|
||||
options.merge!(attributes: %w[id href alt class])
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ class Design < ApplicationRecord
|
|||
|
||||
translates :name, type: :string, locale_accessors: true
|
||||
translates :description, type: :text, locale_accessors: true
|
||||
translates :credits, type: :text, locale_accessors: true
|
||||
|
||||
has_many :sites
|
||||
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
%meta{ name: 'color-scheme', content: 'light dark' }/
|
||||
%meta{ name: 'viewport',
|
||||
content: 'width=device-width, initial-scale=1.0' }/
|
||||
%meta{ name: 'referrer', content: 'origin' }/
|
||||
|
||||
%title Sutty
|
||||
|
||||
= csrf_meta_tags
|
||||
|
|
|
@ -7,8 +7,7 @@
|
|||
|
||||
%main.row
|
||||
%aside.menu.col-md-3
|
||||
%h1
|
||||
= link_to @site.title, @site.url
|
||||
%h1= link_to @site.title, @site.url
|
||||
%p.lead= @site.description
|
||||
|
||||
%h3= t('posts.new')
|
||||
|
@ -23,6 +22,13 @@
|
|||
|
||||
= render 'sites/build', site: @site
|
||||
|
||||
- if @site.design.credits
|
||||
.alert.alert-primary{ role: 'alert' }
|
||||
= sanitize_markdown @site.design.credits
|
||||
= link_to t('sites.donations.text'), t('sites.donations.url'), class: 'btn'
|
||||
- if @site.design.designer_url
|
||||
= link_to t('sites.designer_url'), @site.design.designer_url, class: 'btn'
|
||||
|
||||
%section.col
|
||||
= render 'layouts/flash'
|
||||
- if @posts.empty?
|
||||
|
|
|
@ -303,6 +303,10 @@ en:
|
|||
average: 'Average building time'
|
||||
maximum: 'Maximum building time'
|
||||
sites:
|
||||
donations:
|
||||
url: 'https://donaciones.sutty.nl/en/'
|
||||
text: 'Support us'
|
||||
designer_url: 'Support the designer'
|
||||
static_file_migration: 'File migration'
|
||||
find_and_replace: 'Search and replace'
|
||||
index:
|
||||
|
|
|
@ -308,6 +308,10 @@ es:
|
|||
average: 'Tiempo promedio de generación'
|
||||
maximum: 'Tiempo máximo de generación'
|
||||
sites:
|
||||
donations:
|
||||
url: 'https://donaciones.sutty.nl/'
|
||||
text: 'Apoyá nuestro trabajo'
|
||||
designer_url: 'Apoyá a le(s) diseñadore(s)'
|
||||
static_file_migration: 'Migración de archivos'
|
||||
find_and_replace: 'Búsqueda y reemplazo'
|
||||
index:
|
||||
|
|
9
db/migrate/20200811210507_add_credits_to_designs.rb
Normal file
9
db/migrate/20200811210507_add_credits_to_designs.rb
Normal file
|
@ -0,0 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Agregar créditos y diseñadorxs
|
||||
class AddCreditsToDesigns < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
add_column :designs, :credits, :text
|
||||
add_column :designs, :designer_url, :string
|
||||
end
|
||||
end
|
10
db/schema.rb
10
db/schema.rb
|
@ -1,5 +1,3 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# This file is auto-generated from the current state of the database. Instead
|
||||
# of editing this file, please use the migrations feature of Active Record to
|
||||
# incrementally modify your database, and then regenerate this schema definition.
|
||||
|
@ -12,8 +10,8 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20_200_810_230_944) do
|
||||
# Could not dump table 'access_logs' because of following StandardError
|
||||
ActiveRecord::Schema.define(version: 20_200_811_210_507) do
|
||||
# Could not dump table "access_logs" because of following StandardError
|
||||
# Unknown type '' for column 'id'
|
||||
|
||||
create_table 'action_text_rich_texts', force: :cascade do |t|
|
||||
|
@ -58,7 +56,7 @@ ActiveRecord::Schema.define(version: 20_200_810_230_944) do
|
|||
t.index ['deploy_id'], name: 'index_build_stats_on_deploy_id'
|
||||
end
|
||||
|
||||
# Could not dump table 'csp_reports' because of following StandardError
|
||||
# Could not dump table "csp_reports" because of following StandardError
|
||||
# Unknown type 'uuid' for column 'id'
|
||||
|
||||
create_table 'deploys', force: :cascade do |t|
|
||||
|
@ -80,6 +78,8 @@ ActiveRecord::Schema.define(version: 20_200_810_230_944) do
|
|||
t.string 'url'
|
||||
t.string 'license'
|
||||
t.boolean 'disabled', default: false
|
||||
t.text 'credits'
|
||||
t.string 'designer_url'
|
||||
end
|
||||
|
||||
create_table 'licencias', force: :cascade do |t|
|
||||
|
|
|
@ -24,9 +24,11 @@
|
|||
name_es: 'Sutty'
|
||||
gem: 'sutty-jekyll-theme'
|
||||
url: 'https://rubygems.org/gems/sutty-jekyll-theme/'
|
||||
description_en: "A design with Sutty's look & feel"
|
||||
description_en: "Sutty's design"
|
||||
description_es: 'El diseño de Sutty'
|
||||
license: 'https://0xacab.org/sutty/jekyll/sutty-jekyll-theme/-/blob/master/LICENSE.txt'
|
||||
credits_es: 'Sutty es parte de la economía solidaria :)'
|
||||
credits_en: 'Sutty is a solidarity economy project :)'
|
||||
- name_en: 'Self-managed Book Publisher'
|
||||
name_es: 'Editorial Autogestiva'
|
||||
gem: 'editorial-autogestiva-jekyll-theme'
|
||||
|
@ -34,6 +36,8 @@
|
|||
description_en: "A theme for self-managed book publishers."
|
||||
description_es: 'Una plantilla para catálogos de editoriales autogestivas.'
|
||||
license: 'https://0xacab.org/sutty/jekyll/editorial-autogestiva-jekyll-theme/-/blob/master/LICENSE.txt'
|
||||
credits_es: 'Esta plantilla fue inspirada en el trabajo de las [editoriales autogestivas](https://sutty.nl/plantillas-para-crear-cat%C3%A1logos-de-editoriales-autogestivas/)'
|
||||
credits_en: 'This theme is inspired by [independent publishing projects](https://sutty.nl/en/new-template-for-publishing-projects/)'
|
||||
- name_en: 'Donations'
|
||||
name_es: 'Donaciones'
|
||||
gem: 'sutty-donaciones-jekyll-theme'
|
||||
|
@ -41,6 +45,8 @@
|
|||
description_en: "Make your own donations campaign with payment buttons."
|
||||
description_es: 'Realizá campañas de donaciones con botones de pago.'
|
||||
license: 'https://0xacab.org/sutty/jekyll/sutty-donaciones-jekyll-theme/-/blob/master/LICENSE.txt'
|
||||
credits_es: 'Diseñamos esta plantilla para [visibilizar campañas de donaciones](https://sutty.nl/plantilla-para-donaciones/) durante la cuarentena.'
|
||||
credits_en: 'We designed this theme to increase [requests for donations visibility](https://sutty.nl/template-for-donations/) during the quarantine.'
|
||||
- name_en: 'Support campaign'
|
||||
name_es: 'Adhesiones'
|
||||
gem: 'adhesiones-jekyll-theme'
|
||||
|
@ -48,6 +54,9 @@
|
|||
description_en: "Make your own support campaign."
|
||||
description_es: 'Realizá campañas de adhesión.'
|
||||
license: 'https://0xacab.org/sutty/jekyll/adhesiones-jekyll-theme/-/blob/master/LICENSE.txt'
|
||||
credits_es: 'Desarrollamos esta plantilla junto con [Librenauta](https://sutty.nl/plantilla-para-campa%C3%B1as-de-adhesiones/)'
|
||||
credits_en: 'We made this template with Librenauta :)'
|
||||
designer_url: 'https://copiona.com/donaunbit/'
|
||||
- name_en: 'Other themes'
|
||||
name_es: 'Mi propio diseño'
|
||||
gem: 'sutty-theme-own'
|
||||
|
|
Loading…
Reference in a new issue