Changeset 35244
- Timestamp:
- 2021-08-03T18:05:23+12:00 (3 years ago)
- Location:
- main/trunk/model-interfaces-dev/wmtb
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/model-interfaces-dev/wmtb/styles/gs-wmtb-custom.css
r35237 r35244 1 /* DEFINING CSS VARIABLES - redefining them from weebly site (variables.less used in header.less) 2 https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties 3 4 BUT UNFORTUNATELY, we can't use css variables in media query declarations: 5 https://stackoverflow.com/questions/40722882/css-native-variables-not-working-in-media-queries 6 */ 7 :root { 8 --height-header: 120px; 9 --height-header-mobile: 93px; 10 --bp-small: 1025px; 11 --bp-small-max: 1024px; /* 1 less */ 12 } 13 1 14 /* Within the page that loads in iframe, want a spacer (for now 120px high) that 2 15 will take up the space of the whakatohea navbar. Want the scrollbar shifted from … … 10 23 div#spacer-for-nav 11 24 { 12 height: 120px;25 height: var(--height-header); /*120px;*/ 13 26 width: auto; 14 27 } /* margin-top:120px; Why did height not have any effect? Because of self-closing div. Need explicit closing div. But an empty opening + closing div is dangerous in GS3, try using gsf:div element (not sure if class attribute will work on it) if xml equivalent of nbsp entity inside empty op+closing div doesn't work.*/ … … 21 34 .shifted-frame { 22 35 overflow: auto; 23 height: calc(100vh - 120px);36 height: calc(100vh - var(--height-header)); /*calc(100vh - 120px);*/ 24 37 width: auto; 25 38 26 39 } /* Why does height calc(100% -120px) instead of using 100vh not work? */ 27 40 28 /*display: none;*/29 /*height: 100vh; */30 41 31 42 /* hardcoded values copied from weebly site theme's variables.less file called in header.less */ 32 @media screen and (max-width: 1024px) { 43 @media screen and (max-width: 1024px) { /* bp-small-max */ 33 44 body { 34 45 overflow: auto; … … 36 47 37 48 div#spacer-for-nav { 38 height: 93px;49 height: var(--height-header-mobile); /*93px;*/ 39 50 } 40 51 … … 43 54 /*overflow-y: auto;*//* scroll;*/ 44 55 } 45 } 46 47 48 49 .bg-img { 56 57 /* Maybe undo any changes made below for full-screen version so mobile unaffected*/ 58 /* 59 div.crop-bg { 60 height: 100px; 61 background-position: center 20%; 62 } 63 64 .crop-bg div.container { 65 padding: 100px 0; 66 } 67 */ 68 } 69 70 71 /* Want to have the full size bg banner image on the main page listing the Pou-s, 72 but on each Pou landing page and each collection landing page, want a vertically 73 narrower banner img. Achieved by cropping same image. 74 https://www.w3schools.com/cssref/pr_background-image.asp 75 and https://www.w3schools.com/cssref/pr_background-position.asp 76 */ 77 div.wsite-section-bg-image { 50 78 /*Can't set background-image as url contains variable: interfaces/{$interface_name}/images/digital-library.jpg*/ 51 79 background-color: transparent; /* Used if the image is unavailable. OR: grey */ … … 54 82 } 55 83 56 .full-bg {84 div.full-bg { 57 85 height: auto; 58 86 background-position: 50.00% 21.94%; 59 background-size: 100%; 60 } 61 62 /* https://www.w3schools.com/cssref/pr_background-image.asp 63 and https://www.w3schools.com/cssref/pr_background-position.asp*/ 64 65 .crop-bg { 66 height: 230px; /* You must set a specified height */ 67 background-position: center -100px; /* OR: center OR: center 20% */ 68 } 69 87 /*background-size: 100%;*/ 88 } 89 90 @media screen and (min-width: 1025px) { /* bp-small */ 91 div.crop-bg { 92 height: 230px; /* You must set a specified height */ 93 background-position: center -100px; /* OR: center OR: center 20% */ 94 display: block; /* div with bg image needs to change from display: table-cell 95 to display: block when cropping bg image, as table-cell setting 96 overrides height customisation */ 97 } 98 /* Restyle .container *descendant* of .crop-bg: 99 Padding can not be 100px as it is when .full-bg is in effect, 100 and should be no greater than 95px for .crop-bg, else there 101 appears a bottom border of sorts under the cropped image. */ 102 .crop-bg div.container { 103 padding: 50px 0; 104 } 105 106 } 70 107 71 108 a, span#addNewMD, span#clearSaved { -
main/trunk/model-interfaces-dev/wmtb/transform/layouts/main.xsl
r35236 r35244 43 43 <div class="wsite-section-wrap"> 44 44 <!--<div class="wsite-section wsite-header-section wsite-section-bg-image" style="height: auto;background-image: url("interfaces/{$interface_name}/images/digital-library.jpg") ;background-repeat: no-repeat ;background-position: 50.00% 21.94% ;background-size: 100% ;background-color: transparent ;background-size: cover;" >--> 45 <div class="wsite-section wsite-header-section wsite-section-bg-image" style="height: auto;background-image: url("interfaces/{$interface_name}/images/digital-library.jpg") ;background-repeat: no-repeat ;background-position: 50.00% 21.94% ;background-size: 100% ;background-color: transparent ;background-size: cover;" >45 <div style="background-image: url("interfaces/{$interface_name}/images/digital-library.jpg");" > 46 46 <xsl:choose> 47 47 <xsl:when test="/page/pageResponse/collection or /page/pageResponse/pathList/group"> 48 <xsl:attribute name="class">wsite-section wsite-header-section wsite-section-bg-image bg-imgcrop-bg</xsl:attribute>48 <xsl:attribute name="class">wsite-section wsite-header-section wsite-section-bg-image crop-bg</xsl:attribute> 49 49 </xsl:when> 50 50 <xsl:otherwise> 51 <xsl:attribute name="class">wsite-section wsite-header-section wsite-section-bg-image bg-imgfull-bg</xsl:attribute>51 <xsl:attribute name="class">wsite-section wsite-header-section wsite-section-bg-image full-bg</xsl:attribute> 52 52 </xsl:otherwise> 53 53 </xsl:choose>
Note:
See TracChangeset
for help on using the changeset viewer.