editor markdown

This commit is contained in:
f 2018-02-03 11:02:21 -03:00
parent 69386f3fbb
commit fd7ae874f0
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7
8 changed files with 51 additions and 2 deletions

View file

@ -35,6 +35,8 @@ gem 'rails_warden'
gem 'haml-rails'
gem 'bootstrap', '~> 4.0.0.beta3'
gem 'jekyll'
gem 'jquery-rails'
gem 'font-awesome-rails'
group :development, :test do
gem 'pry'

View file

@ -96,6 +96,8 @@ GEM
eventmachine (1.2.5)
execjs (2.7.0)
ffi (1.9.18)
font-awesome-rails (4.7.0.2)
railties (>= 3.2, < 5.2)
forwardable-extended (2.6.0)
globalid (0.4.1)
activesupport (>= 4.2.0)
@ -136,6 +138,10 @@ GEM
sass (~> 3.4)
jekyll-watch (2.0.0)
listen (~> 3.0)
jquery-rails (4.3.1)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
kramdown (1.16.2)
liquid (4.0.0)
listen (3.1.5)
@ -278,9 +284,11 @@ DEPENDENCIES
capybara (~> 2.13)
dotenv-rails
email_address
font-awesome-rails
haml-rails
jbuilder (~> 2.5)
jekyll
jquery-rails
listen (>= 3.0.5, < 3.2)
pry
puma (~> 3.7)

View file

@ -12,4 +12,7 @@
//
//= require rails-ujs
//= require turbolinks
//= require jquery
//= require bootstrap-markdown/js/bootstrap-markdown
//= require markdown/lib/markdown
//= require_tree .

View file

@ -1,7 +1,16 @@
@import "bootstrap";
@import "bootstrap-markdown/css/bootstrap-markdown.min";
@import "font-awesome";
$footer-height: 60px;
/* Colores */
$purpura: #67103d;
.turbolinks-progress-bar {
background-color: $purpura;
}
.background-cover {
background: image-url("background.jpg") no-repeat center center fixed;
-webkit-background-size: cover;

View file

@ -5,6 +5,7 @@
%title Sutty
= csrf_meta_tags
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
= javascript_include_tag 'application', 'data-turbolinks-track': 'reload'
%body{class: @has_cover ? 'background-cover' : ''}
.container-fluid
= yield

View file

@ -12,7 +12,7 @@
placeholder: t('posts.title')
.form-group
= text_area_tag 'post[content]', @post.content, autofocus: true,
class: 'form-control post-content'
class: 'form-control post-content', data: { provide: 'markdown' }
.form-group
= label_tag 'post_date', t('posts.date')
= date_field 'post', 'date', value: @post.date.strftime('%F'),

View file

@ -1,5 +1,8 @@
{
"name": "sutty",
"private": true,
"dependencies": {}
"dependencies": {
"bootstrap-markdown": "https://0xacab.org/itacate-kefir/bootstrap-markdown.git",
"markdown": "^0.5.0"
}
}

23
yarn.lock Normal file
View file

@ -0,0 +1,23 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
abbrev@1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
"bootstrap-markdown@https://0xacab.org/itacate-kefir/bootstrap-markdown.git":
version "2.10.0"
resolved "https://0xacab.org/itacate-kefir/bootstrap-markdown.git#449141351caa8d96e99fe09f02772ab91e578ab4"
markdown@^0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/markdown/-/markdown-0.5.0.tgz#28205b565a8ae7592de207463d6637dc182722b2"
dependencies:
nopt "~2.1.1"
nopt@~2.1.1:
version "2.1.2"
resolved "https://registry.yarnpkg.com/nopt/-/nopt-2.1.2.tgz#6cccd977b80132a07731d6e8ce58c2c8303cf9af"
dependencies:
abbrev "1"