5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-24 09:26:22 +00:00

feat: add characteristics column to designs table and entries in designs seeds #13587

This commit is contained in:
jazzari 2023-07-10 14:10:34 -03:00
parent b04229c4d6
commit 00bfa4f798
5 changed files with 35 additions and 3 deletions

View file

@ -313,6 +313,11 @@ svg {
overflow-y: auto;
}
.designpreview {
border-left: 1px solid cyan;
border-right: 1px solid cyan;
}
.designs {
.design {
margin-top: 1rem;

View file

@ -13,6 +13,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
translates :characteristics, type: :text, locale_accessors: true
has_many :sites

View file

@ -23,7 +23,7 @@
.flex-fill.f-3
= sanitize_markdown design.description,
tags: %w[p a strong em]
.col-md-6.designlist
.col-md-6.designpreview
%h2.text-center.pb-3= t('.preview')
.embed-responsive.embed-responsive-1by1
%iframe.embed-responsive-item{allowfullscreen: "", src: "/placeholder.png"}
@ -53,8 +53,9 @@
%iframe.embed-responsive-item{allowfullscreen: "", src: "/placeholder.png"}
.col
%h1.text-center.font-weight-bolder.pb-3= t('.characteristics')
%h5.design 1. Es gratis
%h5.design 2. Sofware libre - Licencia GPL
- characteris = design.characteristics.split(".")
- characteris.each_with_index do |charact, index|
%h5.design #{index + 1}. #{charact}
%a.btn.btn-primary.btn-lg.btn-block.mt-4{role: "button", href: design.url}= t('.source_code')

View file

@ -0,0 +1,5 @@
class AddCharacteristicsToDesigns < ActiveRecord::Migration[6.1]
def change
add_column :designs, :characteristics, :text
end
end

View file

@ -7,6 +7,8 @@
description_en: "Upload your own theme. [This feature is in development, help us!](https://sutty.nl/en/#contact)"
description_es: "Subir tu propio diseño. [Esta posibilidad está en desarrollo, ¡ayudanos!](https://sutty.nl/#contacto)"
priority: '0'
characteristics_en: "It's free. Free software - GPL licence"
characteristics_es: "Es gratis. Software Libre - Licencia GPL"
- name_en: 'I want you to develop a site for me'
name_es: 'Quiero que desarrollen mi sitio'
gem: 'sutty-theme-custom'
@ -15,6 +17,8 @@
description_en: "If you want us to develop your site, you're welcome to [contact us!](https://sutty.nl/en/#contact) :)"
description_es: "Si querés que desarrollemos tu sitio, [escribinos](https://sutty.nl/#contacto) :)"
priority: '2'
characteristics_en: "It's free. Free software - GPL licence"
characteristics_es: "Es gratis. Software Libre - Licencia GPL"
- name_en: 'Minima'
name_es: 'Mínima'
gem: 'sutty-minima'
@ -23,6 +27,8 @@
description_es: 'Sutty Mínima es una plantilla para blogs basada en [Mínima](https://jekyll.github.io/minima/).'
license: 'https://0xacab.org/sutty/jekyll/minima/-/blob/master/LICENSE.txt'
priority: '100'
characteristics_en: "It's free. Free software - GPL licence. Distributed web compatible"
characteristics_es: "Es gratis. Software Libre - Licencia GPL. Compatible con la web distribuida"
- name_en: 'Sutty'
name_es: 'Sutty'
gem: 'sutty-jekyll-theme'
@ -33,6 +39,8 @@
credits_es: 'Sutty es parte de la economía solidaria :)'
credits_en: 'Sutty is a solidarity economy project!'
priority: '90'
characteristics_en: "It's free. Free software - GPL licence. Distributed web compatible"
characteristics_es: "Es gratis. Software Libre - Licencia GPL. Compatible con la web distribuida"
- name_en: 'Self-managed Book Publisher'
name_es: 'Editorial Autogestiva'
gem: 'editorial-autogestiva-jekyll-theme'
@ -43,6 +51,8 @@
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/)'
priority: '50'
characteristics_en: "It's free. Free software - GPL licence. Distributed web compatible"
characteristics_es: "Es gratis. Software Libre - Licencia GPL. Compatible con la web distribuida"
- name_en: 'Donations'
name_es: 'Donaciones'
gem: 'sutty-donaciones-jekyll-theme'
@ -53,6 +63,8 @@
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 [visibility for donation requests](https://sutty.nl/template-for-donations/) during the quarantine.'
priority: '80'
characteristics_en: "It's free. Free software - GPL licence"
characteristics_es: "Es gratis. Software Libre - Licencia GPL"
- name_en: 'Support campaign'
name_es: 'Adhesiones'
gem: 'adhesiones-jekyll-theme'
@ -64,6 +76,8 @@
credits_en: 'This template was made in collaboration with Librenauta'
designer_url: 'https://copiona.com/donaunbit/'
priority: '60'
characteristics_en: "It's free. Free software - GPL licence"
characteristics_es: "Es gratis. Software Libre - Licencia GPL"
- name_en: 'Community Radio'
name_es: 'Radio comunitaria'
gem: 'radios-comunitarias-jekyll-theme'
@ -75,6 +89,8 @@
credits_en: 'This template was made in collaboration with Librenauta in 15 hours!'
designer_url: 'https://copiona.com/donaunbit/'
priority: '70'
characteristics_en: "It's free. Free software - GPL licence"
characteristics_es: "Es gratis. Software Libre - Licencia GPL"
- name_en: 'Resource toolkit'
name_es: 'Recursero'
gem: 'recursero-jekyll-theme'
@ -83,6 +99,8 @@
description_en: "We're working towards adding more themes for you to use. [Contact us!](https://sutty.nl/en/#contact)"
description_es: "Estamos trabajando para que puedas tener más diseños. [¡Escribinos!](https://sutty.nl/#contacto)"
priority: '3'
characteristics_en: "It's free. Free software - GPL licence"
characteristics_es: "Es gratis. Software Libre - Licencia GPL"
- name_en: 'More themes'
name_es: 'Más plantillas'
gem: 'sutty-theme-own'
@ -91,3 +109,5 @@
description_en: "We're working towards adding more themes for you to use. [Contact us!](https://sutty.nl/en/#contact)"
description_es: "Estamos trabajando para que puedas tener más diseños. [¡Escribinos!](https://sutty.nl/#contacto)"
priority: '1'
characteristics_en: "It's free. Free software - GPL licence"
characteristics_es: "Es gratis. Software Libre - Licencia GPL"