This repository was archived by the owner on Aug 27, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +65
-75
lines changed
.themes/classic/sass/partials Expand file tree Collapse file tree 4 files changed +65
-75
lines changed Original file line number Diff line number Diff line change @@ -42,14 +42,32 @@ article {
42
42
font-size : 2.0em ; font-style : italic ;
43
43
line-height : 1.3em ;
44
44
}
45
- .entry-content {
46
- img , video { max-width : 100% ; height : auto ; }
47
- video {
48
- width : 100% ; display : block ; margin-bottom : 1.5em ;
49
- padding : .8em ; background : #fff ; border : 1px solid #eee ;
50
- @include box-sizing (border-box );
45
+ img {
46
+ max-width : 100% ;
47
+ border : .5em solid #fff ;
48
+ @include border-radius (.3em );
49
+ @include box-shadow (rgba (#000 , .15 ) 0 1px 4px );
50
+ @include box-sizing (border-box );
51
+ display : block ;
52
+ margin : 0 auto 1.5em ;
53
+ & .left {
54
+ float : left ;
55
+ margin-right : 1.5em ;
56
+ }
57
+ & .right {
58
+ float : right ;
59
+ margin-left : 1.5em ;
60
+ }
61
+ & .left , & .right {
62
+ margin-bottom : .8em ;
51
63
}
52
64
}
65
+ img , video { max-width : 100% ; height : auto ; }
66
+ video {
67
+ width : 100% ; display : block ; margin-bottom : 1.5em ;
68
+ padding : .8em ; background : #fff ; border : 1px solid #eee ;
69
+ @include box-sizing (border-box );
70
+ }
53
71
.flash-video {
54
72
max-width : 100% ;
55
73
margin-bottom : 1.5em ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ # Title: Simple Image tag for Jekyll
2
+ # Author: Brandon Mathis http://brandonmathis.com
3
+ # Description: Easily output images with optional class names and title/alt attributes
4
+ #
5
+ # Syntax {% image [class name(s)] url [title text] %}
6
+ #
7
+ # Example:
8
+ # {% imaeg left half http://site.com/images/ninja.png Ninja Attack! %}
9
+ #
10
+ # Output:
11
+ # <image class='left' src="http://site.com/images/ninja.png" title="Ninja Attack!" alt="Ninja Attack!">
12
+ #
13
+
14
+ module Jekyll
15
+
16
+ class ImageTag < Liquid ::Tag
17
+ @img = nil
18
+ @title = nil
19
+ @class = ''
20
+
21
+ def initialize ( tag_name , markup , tokens )
22
+ if markup =~ /(\S .*\s +)?(https?:\/ \/ |\/ )(\S +)(\s +.+)?/i
23
+ @class = $1
24
+ @img = $2 + $3
25
+ @title = $4
26
+ end
27
+ super
28
+ end
29
+
30
+ def render ( context )
31
+ output = super
32
+ if @img
33
+ figure = "<img class='#{ @class } ' src='#{ @img } ' alt='#{ @title } ' title='#{ @title } '>"
34
+ else
35
+ "Error processing input, expected syntax: {% img [class name(s)] /url/to/image [title text] %}"
36
+ end
37
+ end
38
+ end
39
+ end
40
+
41
+ Liquid ::Template . register_tag ( 'img' , Jekyll ::ImageTag )
File renamed without changes.
You can’t perform that action at this time.
0 commit comments