Responsive Gallery Responsive Gallery is a MyCode that has a simple design and makes use of the modal windows used throughout the site. This code serves as a base that can be used on its own to create a sleak, multi-column look or combined with other coding to create something to match an existing skin.

First create a gallery container and then insert a galleryimg.

Code:
[gallery][galleryimg][/galleryimg][/gallery]

The galleryimg MyCode requires a few things to work properly.
  1. Identifier - This is used in the CSS to make the modal pop up. It should be a unique single word with no spaces or special characters; hyphens allowed. Examples: 001, 002, 003; One, Two, Three; John-01, John-02, John-03
  2. Image Url - This is used to generate the thumbnail and larger image. For the person that posted the character, this will show in the modal window.
  3. Alt Description - This is used to generate a description of the picture that could be used by readers or accessibility devices to describe the image. This should be a short, literal description of the image when able.
      Good: Mid twenties brunette sitting on a grassy hill looking at the night sky behind her.
      Bad: She is contemplating her dreams.
  4. Caption - This is used for the more character relevant description of the image and what it means to your character.

[galleryimg=Identifier,img url here,Short literal descriptions for readers]Image caption goes here.[/galleryimg]



Tip: If your gallery looks like it is spaced incorrectly, it may be because the coding has line breaks. You can condense the code manually or you can use the dohtml MyCode to collapse it for you.

[gallery][galleryimg=Identifier,img url here,Short literal descriptions for readers]Image caption goes here.[/galleryimg][galleryimg=Identifier,img url here,Short literal descriptions for readers]Image caption goes here.[/galleryimg][galleryimg=Identifier,img url here,Short literal descriptions for readers]Image caption goes here.[/galleryimg][/gallery]


VS

[dohtml]
[gallery]
[galleryimg=Identifier,img url here,Short literal descriptions for readers]Image caption goes here.[/galleryimg]
[galleryimg=Identifier,img url here,Short literal descriptions for readers]Image caption goes here.[/galleryimg]
[galleryimg=Identifier,img url here,Short literal descriptions for readers]Image caption goes here.[/galleryimg]
[/gallery]
[/dohtml]



You can use html around each galleryimg if you would like to add things like image titles or if you want to add a caption under the thumbnail.

Code:
[gallery]
<div class="someclass">
   <span class="someheaderclass">John's Prom</span>
   [galleryimg=John-01,http://placehold.it/100x100,Young dark haired male with acne making a face like something stinks and holding his hand out to try and block the camera shot]John wasn't super jazzed about prom, but his mom made him take pictures anyway.[/galleryimg]
   <span class="somecaptionclass">John wasn't super jazzed about prom, but his mom made him take pictures anyway.</span>
</div>
<div class="someclass">
   <span class="someheaderclass">John on the Beach</span>
   [galleryimg=John-02,http://placehold.it/100x100,Dark haired young adult male jumping in the air toward the volley ball flying over the net]John loves to build sandcastles and play beach volley ball.[/galleryimg]
   <span class="somecaptionclass">John loves to build sandcastles and play beach volley ball.</span>
</div>
<div class="someclass">
   <span class="someheaderclass">John's Sunburn</span>
   [galleryimg=John-03,http://placehold.it/100x100,An animated gif of a dancing red lobster that has the face of a mid twenties male with red, sunburned skin digitally added on top]John looked like a lobster because he forgot his sunscreen.[/galleryimg]
   <span class="somecaptionclass">John looked like a lobster because he forgot his sunscreen.</span>
</div>
[/gallery]




The modal can not be edited in the same way. You may make used of pseudo css elements to create additional text or styling in the windows if you would like.

(I will add the preview and such later.)

In the codes section, you will find the HTML and CSS that are generated when using the MyCode. You are welcome to use the HTML instead of the MyCode.

<section class="gallery-wrap">
<div class="galleryimg">
<a href="Identifier" class="open-modal" data-selector="#pic-Identifier" rel="modal:open">
<img src="Image Url" alt="Alt Description" class="thumb"></a></div>
<div id="pic-Identifier" style="display: none;" class="galimg">
<img src="Image Url" alt="Alt Description" class="inner">
<span class="caption">Caption</span>
<span class="glnk">
<a href="Image Url" target="_blank" rel="noopener" class="mycode_url">Image Url</a>
</span></div>
</section>
The Codes
CSS.gallery-wrap{
column-count: 3;
column-gap: 5px;
margin:0 auto;
}
.galleryimg {
text-align: center;
}

@media screen and (max-width: 880px){
.gallery-wrap{
column-count: 2;
}
}
@media screen and (max-width: 540px){
.gallery-wrap{
column-count: 1;
}
}


img.thumb {
max-width: 100%;
}
img.inner {
max-width: 100%;
max-height: 100%;
display: block;
border-bottom:10px;
margin: 0 auto;
}

span.caption {
display: block;
}

span.glnk {
display: none;
}
HTML<section class="gallery-wrap">
<div class="galleryimg">
<a href="Identifier" class="open-modal" data-selector="#pic-Identifier" rel="modal:open">
<img src="Image Url" alt="Alt Description" class="thumb"></a></div>
<div id="pic-Identifier" style="display: none;" class="galimg">
<img src="Image Url" alt="Alt Description" class="inner">
<span class="caption">Caption</span>
<span class="glnk">
<a href="Image Url" target="_blank" rel="noopener" class="mycode_url">Image Url</a>
</span></div>
<div class="galleryimg">
<a href="Identifier" class="open-modal" data-selector="#pic-Identifier" rel="modal:open">
<img src="Image Url" alt="Alt Description" class="thumb"></a></div>
<div id="pic-Identifier" style="display: none;" class="galimg">
<img src="Image Url" alt="Alt Description" class="inner">
<span class="caption">Caption</span>
<span class="glnk">
<a href="Image Url" target="_blank" rel="noopener" class="mycode_url">Image Url</a>
</span></div>
<div class="galleryimg">
<a href="Identifier" class="open-modal" data-selector="#pic-Identifier" rel="modal:open">
<img src="Image Url" alt="Alt Description" class="thumb"></a></div>
<div id="pic-Identifier" style="display: none;" class="galimg">
<img src="Image Url" alt="Alt Description" class="inner">
<span class="caption">Caption</span>
<span class="glnk">
<a href="Image Url" target="_blank" rel="noopener" class="mycode_url">Image Url</a>
</span></div>
<div class="galleryimg">
<a href="Identifier" class="open-modal" data-selector="#pic-Identifier" rel="modal:open">
<img src="Image Url" alt="Alt Description" class="thumb"></a></div>
<div id="pic-Identifier" style="display: none;" class="galimg">
<img src="Image Url" alt="Alt Description" class="inner">
<span class="caption">Caption</span>
<span class="glnk">
<a href="Image Url" target="_blank" rel="noopener" class="mycode_url">Image Url</a>
</span></div>
</section>
Panel One CSS.help-css.ponecss{display:none;}
Panel One HTML
Panel Two CSS.help-css.ptwocss{display:none;}
Panel Two HTML
Panel Three CSS.help-css.pthreecss{display:none;}
Panel Three HTML
Credits
Cherry
Quote

Comments
No comments to show at this time. You could be the first!