jcockroft64 / sierrahiking

Contains all the raw files for sierrahiking.net
GNU General Public License v3.0
2 stars 0 forks source link

Modified Login Widget #77

Closed russellelliott closed 2 years ago

russellelliott commented 2 years ago

Added 2 columns:

the login widget has 90% width

the "why register" link has 90% width and 10px padding on the left and right

custom code for the column housing the login widget section -> column -> inner section -> column

selector{
    width:100% !important;
    margin-left:auto;
    margin-right:auto;
}

custom code for the login widget and the link underneath

selector{
    width:90%;
}

How to add inner sections inside inner sections https://www.youtube.com/watch?v=i2Tust3p8dw

Here's what I did for the widget

  1. made new section with 2 columns
  2. inside the section's left column i added an inner section with 2 columns
  3. copy-paste inner section inside the inner section within the section for the login widget

Here is the file structure to give you a sense of where the custom code is located in relation to everything else within the login widget.

Login Widget Section Structure
russellelliott commented 2 years ago

Updates:

Login Page

padding of "Sierrahiking.net text" (needs to be centered in table, but it's actually centered in its own column)

Master Map

custom code for that:

<script>
    function coverImage(){
        //get elements by class name
        //https://www.w3schools.com/jsref/met_document_getelementsbyclassname.asp
            var coverImages = document.getElementsByClassName('entry-cover-image');
            var imageHeaders = document.getElementsByClassName('single-featured-image-header');
            if(screen.width <= 767){
                //CSS !important in Javascript
                //https://stackoverflow.com/questions/38454240/using-css-important-with-javascript
                coverImages[0].style.setProperty('display', 'none', 'important'); //hide the color div
                imageHeaders[0].style.setProperty('display', 'none', 'important'); //hide the div
            }
    }

    window.addEventListener('load', coverImage);

</script>

made the hamburger menu open in front of the map by increasing z index custom code in section:

selector{
    z-index: 3000;
}
jcockroft64 commented 2 years ago

Done.