1
0
mirror of https://github.com/kremalicious/blog.git synced 2025-02-14 21:10:25 +01:00

switch to srcset, kick out picturefill

This commit is contained in:
Matthias Kretschmann 2017-09-09 22:36:04 +02:00
parent 8686244dfa
commit 48ec5417ac
Signed by: m
GPG Key ID: 606EEEF3C479A91F
8 changed files with 16 additions and 38 deletions

View File

@ -15,12 +15,9 @@
padding-bottom: ($spacer*3) padding-bottom: ($spacer*3)
.hentry__teaser .hentry__teaser
picture @media $screen-xs
margin: 0 margin-left: 0
margin-right: 0
@media $screen-xs
margin-left: 0
margin-right: 0
.featured-link .featured-link
@extend .link--nounderline @extend .link--nounderline

View File

@ -11,7 +11,6 @@
margin-top: -($spacer * 1.5) margin-top: -($spacer * 1.5)
figure figure
@extend .aligncenter
position: relative position: relative
display: inline-block display: inline-block
@ -31,15 +30,8 @@
color: #fff color: #fff
text-shadow: 0 1px 0 #000 text-shadow: 0 1px 0 #000
left: -($spacer) left: 0
top: $spacer * 6 top: $spacer * 4
@media $screen-sm
left: -($spacer * 4)
@media $screen-lg
left: -($spacer * 4)
opacity: 0 opacity: 0
transform: translate3d(0, -20px, 0) transform: translate3d(0, -20px, 0)

View File

@ -13,9 +13,8 @@
margin-bottom: $spacer margin-bottom: $spacer
.related-post .related-post
picture img
img @extend .media-frame
@extend .media-frame
.post-title .post-title
@extend .h5, .transition, .text-dimmed @extend .h5, .transition, .text-dimmed
@ -31,9 +30,8 @@
&:focus &:focus
.post-title .post-title
color: $link-color color: $link-color
picture img
img border-color: $link-color-hover
border-color: $link-color-hover
&:active &:active
.post-title .post-title

View File

@ -77,12 +77,11 @@
///////////////////////////////////// /////////////////////////////////////
.hentry__teaser .hentry__teaser
picture @extend .breakoutviewport
@extend .breakoutviewport max-width: none
max-width: none display: block
display: block margin-top: ($spacer*1.5)
margin-top: ($spacer*1.5) margin-bottom: ($spacer*1.5)
margin-bottom: ($spacer*1.5)
img img
@extend .media-frame @extend .media-frame

View File

@ -79,9 +79,6 @@
})(document); })(document);
</script> </script>
<!-- Picturefill -->
<script src="/assets/js/picturefill.min.js" async></script>
<!-- Canonical URL --> <!-- Canonical URL -->
<link rel="canonical" href="{{ site.url}}{{ page.url | replace:'index.html','' }}"> <link rel="canonical" href="{{ site.url}}{{ page.url | replace:'index.html','' }}">

View File

@ -24,7 +24,4 @@
{% endif %} {% endif %}
{% endif %} {% endif %}
<picture> <img src="{{ site.media_url }}/{{ pictureSize }}/media/{{ pictureSrc }}" srcset="{{ site.media_url }}/{{ pictureSize }}/media/{{ pictureSrc }} 1x, {{ site.media_url }}/{{ pictureSizeRetina }}/media/{{ pictureSrc }} 2x" alt="{{ post.title }}">
<source srcset="{{ site.media_url }}/{{ pictureSizeRetina }}/media/{{ pictureSrc }}" media="(-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi)">
<img srcset="{{ site.media_url }}/{{ pictureSize }}/media/{{ pictureSrc }}" alt="">
</picture>

View File

@ -214,8 +214,7 @@ export const criticalCss = done => {
export const js = () => export const js = () =>
src([ src([
SRC + '/_assets/js/*.js', SRC + '/_assets/js/*.js',
'!' + SRC + '/_assets/js/_*.js', '!' + SRC + '/_assets/js/_*.js'
'node_modules/picturefill/dist/picturefill.js'
]) ])
.pipe($.sourcemaps.init()) .pipe($.sourcemaps.init())
.pipe($.include({ .pipe($.include({

View File

@ -40,7 +40,6 @@
"dependencies": { "dependencies": {
"normalize-css": "^2.3.1", "normalize-css": "^2.3.1",
"normalize-opentype.css": "^0.2.4", "normalize-opentype.css": "^0.2.4",
"picturefill": "^3.0.2",
"simple-jekyll-search": "^1.4.1", "simple-jekyll-search": "^1.4.1",
"time-elements": "^0.6.1", "time-elements": "^0.6.1",
"vex-js": "^4.0.0", "vex-js": "^4.0.0",