From bc54923f64397d0389bad1a040434e8c6b8c0d57 Mon Sep 17 00:00:00 2001 From: Dominic Masters Date: Sat, 12 May 2018 15:55:04 +1000 Subject: [PATCH] Refactored more image based code --- public/image/Image.jsx | 8 ++- public/images/test/1280x1280.png | Bin 0 -> 11336 bytes public/images/test/320x320.png | Bin 0 -> 4101 bytes public/images/test/320x320x2.png | Bin 0 -> 6934 bytes public/images/test/640x640.png | Bin 0 -> 5439 bytes public/images/test/img_red.png | Bin 0 -> 779 bytes public/page/home/Homepage.jsx | 21 ++++++-- public/section/Section.jsx | 4 +- public/section/image/ImageSection.jsx | 50 +++++++++++++++++++ public/styles/components/_image-section.scss | 22 ++++++++ public/styles/components/_section.scss | 2 +- public/styles/components/_video-section.scss | 7 +-- public/styles/elements/button.scss | 1 + public/styles/index.scss | 1 + public/styles/pages/_home-page.scss | 4 +- public/styles/tools/_absolute-centering.scss | 8 +++ 16 files changed, 114 insertions(+), 14 deletions(-) create mode 100644 public/images/test/1280x1280.png create mode 100644 public/images/test/320x320.png create mode 100644 public/images/test/320x320x2.png create mode 100644 public/images/test/640x640.png create mode 100644 public/images/test/img_red.png create mode 100644 public/section/image/ImageSection.jsx create mode 100644 public/styles/components/_image-section.scss diff --git a/public/image/Image.jsx b/public/image/Image.jsx index f192464..f74ac72 100644 --- a/public/image/Image.jsx +++ b/public/image/Image.jsx @@ -32,6 +32,9 @@ export default class Image extends React.Component { let sourceElements = []; let sources = {}; + let defaultSrc = this.props.src; + let defaultAlt = this.props.alt; + if(this.props.sources) { //Iterate over supplied sources for(let i = 0; i < this.props.sources.length; i++) { @@ -39,6 +42,9 @@ export default class Image extends React.Component { let w = x.size; sources[w] = sources[w] || []; sources[w].push(x); + + defaultSrc = defaultSrc || x.src; + defaultAlt = defaultAlt || x.alt; } //Now map to components I guess @@ -55,7 +61,7 @@ export default class Image extends React.Component { } sourceElements.push( - + ); } } diff --git a/public/images/test/1280x1280.png b/public/images/test/1280x1280.png new file mode 100644 index 0000000000000000000000000000000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7LT@z}IIWA=UDg zsm|E|#-Nh3x4tz6=4^fq<;iWRA?A~gHh$Wf@_>|PB5Uj;#x5cz&j>#Heai zfnyJo<{HYXsgC3GpG-p9v9#pG*)s3kY_NKQ-M%DUaZ^c2K zbnuy!3N^2hwDbM#F?_HOOg%XfcaEN{L#Xk2Rg2^kFY%do5>GtTq E0lUX@FaQ7m literal 0 HcmV?d00001 diff --git a/public/images/test/320x320.png b/public/images/test/320x320.png new file mode 100644 index 0000000000000000000000000000000000000000..cc69ba75f2f7bf0b60e8ebe08509306b2ca6ab6f GIT binary patch literal 4101 zcmeHK`8yO`8-BmOq} zL`BGERvFZR#_y`W4wUr?ey1+zZfl!r1H8quQXJ_44#5=@OFb%1oihWl18@QG0`LI{ z0f+%e0GtAl1yBGu51;~|4nW<2>SG9C3Sa?X1%L#w1#kp#0dNEG0=NtCFMuF`5P*jO z5dbj&@c@YcsQ}LaUI63*&<^kk01rR_7y%dq_zEx!umG?G zKm;HG`~uho_)U%ePy3_5|DeD-uH)iVcV-_0q#yMWwEbf=o#-NGD#+)rXXAej?dl)s z=<5PLj&9!ma^5cfqUYq~<<2UQMBS*>eAvxUSKIQQ9r3xxjp1(Y2u9r>OyNwl(sgDkWsv#9PeF!$Otz2hTsibg0;^&GUL}V+!Vi zCi*R%f68ZdVt*sfH&7Ym<~;AKKup16a!&CmY2Inbd}iUbz4BaTj$#1C;o}E;O~&7g z$|}b^$;H>}vbVqJi!%i7JA9;wXfkHckI*PlhU+$YcK8r4Y$sGk??)YQFce}cX1X~f zg4dE;3)hx^1X2pW#pSFl%Glks3vOt>SH*y)T=`I+L#GijP5k}nAmvFTTqQGC(U%hm zd!KQ${E-s3103de3JiSv(?^~}<0hMhkehqWs9MMM*xb(Y4K9RJ3`UaF3c6asSx?hp6=ang!QP zfl|`o%*Q^C?BJdC_4W=z=EW1@k(vB`+tt&*H6ON6e&FUx3%(?GFWReV-rICMzc;U} z-6vd|a+b{8t1T6iXK;nSd|jFnR0h^=3~z{!F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-e`@#HX%x{Ef13xDa)q!y?&f_{<>u; z`dV1PrHeSU#ig2>3#ZS!xQ%LDd2@1w8k>W73K`Jxz$23JUYX4|tN^5lBCqL&`Y}3Qf_!P$_c`XB6 z42*Lvc!RNWD+#xCqXP|_oM!{-JI(3}TVE^$>p3bTyw`;@hgSn1(5zx{ypi}|CZ`&o zrjpC2OHpzUjCb4LX0k?X9>NqWROvk>UmU-Ae6pb5LO(yf^?2-Q5j~G(;oq*yZ`OW# z#0Pwv$RT@rR8XE`n^dMSNE+9Rve?`MSn)^OC2vBT2szS9xz$|ZRO zEIOBc(>w#$-iy?#kz?}c;&x$*jwWU24b(|JL$V{V?#FrykLsA(?1$gK-`u=2aA$+1 ziSDykQpSa--CRjAl2WLI;Bl#~2n%F5Z~WOq6DvG;Oi9;gp9&Z>cG!~H zO{#WAf7^?awAk2JFv(B)p1{9$Oscq>^K*H(TyiAl6KdU{o`kp5P3^fxvCNmst+XW^ z+vKrH@v^sWQ+%LGo5 zX33H&0i+%|%<#cne@k3ksQSgAQsig06IYHHh{n(*{ptR%8npNHgnqvJJbZ{>A^o4< Oj-j5JZkdil_`d;6qZ!}; literal 0 HcmV?d00001 diff --git a/public/images/test/320x320x2.png b/public/images/test/320x320x2.png new file mode 100644 index 0000000000000000000000000000000000000000..b15d2e752aa0083806ac1072164faece8a3e4779 GIT binary patch literal 6934 zcmeHL_fr!}v|fr}gMbJqRmEOFilDTJ2*{;*5$O<$fPp}yB|t)ei-JlMY0_=nh!8pi z2oMwz=_*n}=uLX436PLH?w|1Hy&v6~GrRlko^!rEvpci%J-cgaAaGFPAOJwX@Xl>> z0Jy{dv;91Kh=#}w;k}N_-`wC9DC&}$+nexu=$PmLP?~Uv<-8979&p##LT?Y>8z0z< z0l=PzC;-O+kOtr+0A~QW2*4Ep6alyfzzqPj0N4w#=VJ(f2>^csa326002~2u2EYvf zH~`)N_yQ0JKrjHI07L-r1b}A%!~>8BKneiq0AvI327o*O@&O?1F#@0xfEoZA0Qdwz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QDd-_~J`Uf^9PmOY<(Nwfs{BLQS`|wyzs*QIpi(THeTEKLUcu*RoL-tXXoBp}L<_JfV zoBqZ1RnR)W{d!k_c?R#W=DMt9ZEG{i9IQXxl+}m)^yJM#-Dkbsee3rQ?utL;DU=Qi zArtEv%TBX#L0ac!5caY-Ym~<*<`Rv4k8fV;3LM zZu2p)uKRZ%iN9s^DSrMbKj+IfBZ7m@7@|Bwv6!&^E1V44V>5S{z~e_+Y~cuv$ADua z+q1esAz@V?1y_^Ss9qH`UT#)&D6;=(xlzGFX0fABA@td_KejddtHO9LDoJ~}KZz4* zg%;ytugjyO(3J+=zN2S&w~*D_74_!Jh*7)HPKo#W;d_~2kdY;y`hk(q@~~f2+1m0y p!rvd&^N-~Fztp>hYU_6)#yc;CeC1Vn|C9d>^-OOU-E#Wpe*mGi;HUrq literal 0 HcmV?d00001 diff --git a/public/images/test/640x640.png b/public/images/test/640x640.png new file mode 100644 index 0000000000000000000000000000000000000000..345f3805ffdfe4d068ec6f70b65b9d9455bb828b GIT binary patch literal 5439 zcmeHL=T{Th5+95UDn-^sngP~zS5%NDLg+R?Run~PiWHF|2!YU1+T)=pP3cI}1(y=4 z5JLzdK?n)~vWWB&S_nmIqz8EMyg%T5cwfEe%(-)azcX{@{?5$(aGzbjW+-?-@&Et` z8eP6*3a}^ayX`}85v^Y|e&%jG-lm2ZptK!1%{}aOK7aK*Kt()1$Nnb(1Y9@1rO(B= z{(f!_0B*!#00{sofTI9^0GtFk4WJBg7C-|)2jBt#H^vCyD!>f@GXN`qy8!k8jsOn; z+yO8Ez5sy$!2n?ZkpRyCVgX(PBm<-aWC6SZcneSjPy+A{00%$-AOX|^Pyw0&+5kQS zbOH1M3;~P+Faf3k<^YxeRsc2tcDU95SU(i_KNK)A)HmRU@AtfH8KSPjPaGt!EXdGqF4ZnB3y zL8QvLHv-pBAVgYzxIc9G(FFf%7$}UzN{&o;-Nvr%7EeeJrkY41yeIh14cju`RG{PI z;^I8?g6;^p$t+0OXp-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;uKh_09r)C4_4Qs)Ye;HAiNM1rW!WJx0RFQ05hG3V-K;%U6? zrQI?b+5)Ta4$%oTy;R(hA*qyce@Ar-Uri6gN}lY;C)`fYYCRIetZ`iE=iH6L^d@Cw z`+C!Ng{EgD#m}!HK4c#Ire&?$-gCQ1-8PWt?jgGkcgsq3a(Mu|I(jJ64cp7!JM z>D1QA6|-aIo`bRC^sBm>oXsZACgJ^7`KvvRC1WM^hIB^L#=Bwp#Z!|XvSJ%tU!rFW z@rOtn8?2>C7q14Vweye2qF5I#ij~zu4uiNdvY~h_gvufp5eX!jvK+nI;N50g$D!q= z{P@I^(>?Jy2JuqlP~}H#XEJ;8O6bxIU7dUTwF&08Gb?j0I_I`&60fiGo=D<3;23t{ nhx*=1`vGUV`_!OFjGhKar9CwM(TJ?Edv1f&nHb literal 0 HcmV?d00001 diff --git a/public/images/test/img_red.png b/public/images/test/img_red.png new file mode 100644 index 0000000000000000000000000000000000000000..bd50e546297c5e896901876b84778dbf14d2cb68 GIT binary patch literal 779 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K58911L)MWvCLlCbx$lZxy-8q?;Kn_c~qpu?a z!^VE@KZ&eBK4*bPWHAE+-(e7DJf6QI1t=(4;u=vBoS#-wo>-L1P>`6JSE84fTB2a0 zXP{?f_)#HqDgy&kwWo_?NJZS+- - - - + + + My Cool Page Lorem ipsum dolor - +
Lorem diff --git a/public/section/Section.jsx b/public/section/Section.jsx index 5ebf9de..3df6efe 100644 --- a/public/section/Section.jsx +++ b/public/section/Section.jsx @@ -32,7 +32,7 @@ export default class Section extends React.Component { return (
{ this.props.children } @@ -41,8 +41,10 @@ export default class Section extends React.Component { } } +import ImageSection from './image/ImageSection'; import VideoSection from './video/VideoSection'; export { + ImageSection, VideoSection } diff --git a/public/section/image/ImageSection.jsx b/public/section/image/ImageSection.jsx new file mode 100644 index 0000000..77d8186 --- /dev/null +++ b/public/section/image/ImageSection.jsx @@ -0,0 +1,50 @@ +// Copyright (c) 2018 Dominic Masters +// +// MIT License +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +import React from 'react'; +import Section from './../Section'; +import Image from './../../image/Image'; + +export default function(props) { + let image; + if(props.image) { + image = props.image; + } else { + image = {; + } + + return ( +
+ { image } + {props.children} +
+ ); +} diff --git a/public/styles/components/_image-section.scss b/public/styles/components/_image-section.scss new file mode 100644 index 0000000..519b825 --- /dev/null +++ b/public/styles/components/_image-section.scss @@ -0,0 +1,22 @@ +/* + * Image Section + * Styles for Image Sections, usually contains videos (hmmmm). + * + * Dependencies: + * + * Version: + * 1.0.0 - 2018/05/11 + */ +.c-image-section { + position: relative; + + &__image { + width: 100%; + } + + &.is-full { + .c-image-section__image { + @include t-absolute-fill(); + } + } +} diff --git a/public/styles/components/_section.scss b/public/styles/components/_section.scss index 6bcead5..a3499f6 100644 --- a/public/styles/components/_section.scss +++ b/public/styles/components/_section.scss @@ -11,7 +11,7 @@ //border: 1px solid red; width: 100%; - &--full { + &.is-full { height: 100vh; } } diff --git a/public/styles/components/_video-section.scss b/public/styles/components/_video-section.scss index 47a7fdb..01f2671 100644 --- a/public/styles/components/_video-section.scss +++ b/public/styles/components/_video-section.scss @@ -3,6 +3,7 @@ * Styles for Video Sections, usually contains videos. * * Dependencies: + * styles/tools/_absolute-centering.scss * * Version: * 1.0.0 - 2018/05/03 @@ -11,11 +12,7 @@ position: relative; &__video { - position: absolute; - left: 0; - top: 0; - height: 100%; - width: 100%; + @include t-absolute-fill(); object-fit: cover; object-position: center; } diff --git a/public/styles/elements/button.scss b/public/styles/elements/button.scss index 19a1c96..8390e2b 100644 --- a/public/styles/elements/button.scss +++ b/public/styles/elements/button.scss @@ -10,4 +10,5 @@ button { font-size: inherit; font-weight: inherit; font-family: inherit; + color: inherit; } diff --git a/public/styles/index.scss b/public/styles/index.scss index 081b05b..987a931 100644 --- a/public/styles/index.scss +++ b/public/styles/index.scss @@ -64,6 +64,7 @@ @import './objects/_video.scss'; //Components +@import './components/_image-section.scss'; @import './components/_page.scss'; @import './components/_section.scss'; @import './components/_video-section.scss'; diff --git a/public/styles/pages/_home-page.scss b/public/styles/pages/_home-page.scss index 99748fc..47459aa 100644 --- a/public/styles/pages/_home-page.scss +++ b/public/styles/pages/_home-page.scss @@ -12,6 +12,8 @@ .p-home-page { &__video-content { - background: white; + padding: 1em 4em; + background: rgba(0, 0, 0, 0.75); + color: white; } } diff --git a/public/styles/tools/_absolute-centering.scss b/public/styles/tools/_absolute-centering.scss index f92f684..bfddbfd 100644 --- a/public/styles/tools/_absolute-centering.scss +++ b/public/styles/tools/_absolute-centering.scss @@ -28,6 +28,14 @@ @include t-translate-y(-50%); } +@mixin t-absolute-fill() { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; +} + @mixin t-absolute-position-options($inset: 0) { position: absolute;