RP Resources

Codes + Layouts + Tutorials + More

×

Community Rules

This comm is open to anyone to post codes, layouts, resources, tutorials, and requests for help and content. Of course, we do have some rules, so please read through them before jumping in; thank you!

Treat others the way you'd like to be treated. This is not a drama comm, and we expect you guys to be awesome and stay civil. If a situation gets out of hand, please contact a mod, and leave comments intact so we can accurately handle the situation.

Please tag your posts and check out the tagging guide if you have any questions!

■ Very long posts or posts formatted with your own div styling for organization should be behind a cut to save people's f-lists.

Work safe above the cut, please!

■ If posting codes, guides, etc. absolutely do not post content that you did not make. That's stealing, and it's super uncool, bro! If you are posting expanded/edited codes made by yourself using another user's coding as well, please be sure you have their permission (You do not need direct permission if they allow edits to be re-posted in their blanket rules.)
■ Do not post tutorials/links to tutorials that show people how to steal codes from other users. Again: Stealing. Not cool.
When asking for help with something, please check the help tags (help: coding, help: graphics, help: icons, help: layouts, help: other) first to see if your question has already been posted and answered to avoid duplicates.

We do not allow game ads to be posted on this comm since there are so many communities specifically for that already; if you're pimping a game as an addition to a regular post, that's fine. (OK: You post an RP code and mention in the post, oh hey, also I'm running this game! NOT OK: Posts dedicated to game promo.)

We do allow other types of community promos if they are related to RP (icon comms, other types of resource comms, etc.) Just shoot us a comment in our dropbox beforehand and we'll let you know if it's cool to post!
×

Tagging Guide

zzz
×

Banners & Buttons





Previous | Next

[info]laceandflora
[info]rpresources

[info]laceandflora
[info]rpresources

No Subject


[info]laceandflora
[info]rpresources
So I've beenworking on this idea for awhile - basically a char bio that is a flipping book. I've got the base code down to work for off IJ / as a HTML page but I can't seem to figure out how to convert it to IJ based. Can someone confirm that it isn't possible for this to be converted?

@import url('https://fonts.googleapis.com/css2?family=Indie+Flower&display=swap');

* {
padding: 0;
margin: 0 auto;
box-sizing: border-box;
}

body {
font-family: 'Indie Flower', cursive;
background-color: #eee;
color: #555;
text-align: center;
padding: 4em 0;
}

$bookAngle: 60deg;
$speed: 5s;
$borderColor: #555;

$images:
url('https://picsum.photos/420/300?random=1'),
url('https://picsum.photos/420/300?random=2'),
url('https://picsum.photos/420/300?random=3'),
url('https://picsum.photos/420/300?random=4'),
url('https://picsum.photos/420/300?random=5'),
url('https://picsum.photos/420/300?random=1');

// Preload to images
.imgLoader {
position: fixed;
animation: preLoad 1s steps(1);
width: 1px;
height: 1px;

@keyframes preLoad {
@for $i from 0 through 4 {
#{$i * 10}% { background-image: nth($images, ($i + 1)); }
}
100% { display: none; }
}
}

.container {
position: relative;
width: 420px;
border: #fff solid 2px;
border-radius: 4px;
height: 420px;
}

.title {
position: absolute;
top: 45px; left: 0;
width: 100%;
font-size: 2em;
font-weight: normal;
line-height: 1;
}

.credit {
position: absolute;
top: 100%; left: 0;
font-size: 0.9em;
text-align: left;

}

.book {
position: relative;
perspective: 630px;
perspective-origin: center 50px;
transform: scale(1.2);
filter: drop-shadow(0px 10px 5px rgba(0,0,0,0.25));
}

.page {
width: 210px;
height: 300px;
background-color: #bbb;
position: absolute;
top: 0px; right: 50%;
transform-origin: 100% 100%;
border: solid $borderColor 2px;
background-size: 420px 300px;
background-position: center;
transform-style: preserve-3d;

&:nth-child(1) {transform: rotateX($bookAngle) rotateY(3deg); }
&:nth-child(2) { transform: rotateX($bookAngle) rotateY(4.5deg); }
&:nth-child(3) {
transform: rotateX($bookAngle) rotateY(6deg);
animation: nextPage $speed*5 infinite $speed*-4.8 steps(1);
background-size: 420px 300px;
background-position: -2px -2px;
}

&:nth-child(4) { transform: rotateX($bookAngle) rotateY(177deg); }
&:nth-child(5) { transform: rotateX($bookAngle) rotateY(175.5deg); }
&:nth-child(6) {
transform: rotateX($bookAngle) rotateY(174deg);
overflow: hidden;

&::after {
content: '';
width: 210px;
height: 300px;
position: absolute;
top: 0px; right: 0%;
transform-origin: center;
transform: rotateY(180deg);
animation: nextPage $speed*5 $speed*-4 infinite steps(1);
background-size: 420px 300px;
background-position: 100% -2px;
}
}

@keyframes nextPage {
@for $i from 0 through 4 {
#{$i * 20}% { background-image: nth($images, ($i + 1)); }
}
}
}

.gap {
width: 10px;
height: 300px;
background: none;
transform: rotateX($bookAngle);
transform-origin: bottom;
position: absolute;
top: 0px; left: calc(50% - 5px);

&::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translate(-50%, 50%);
background-color: $borderColor;
width: 10px;
height: 5px;
border-radius: 50%;
}
}

.pages, .flips {
transform-style: preserve-3d;
}

.flip {
width: 32px;
height: 300px;
position: absolute;
top: 0px;
transform-origin: 100% 100%;
right: 100%;
border: solid $borderColor;
border-width: 2px 0px;
perspective: 4200px;
perspective-origin: center;
transform-style: preserve-3d;
background-size: 420px 300px;

&::after {
content: '';
position: absolute;
top: 0px; right: 0%;
width: 100%; height: 100%;
transform-origin: center;
background-size: 420px 300px;
}

&.flip1 {
right: 50%;
animation: flip1 $speed infinite ease-in-out;
border-width: 2px 2px 2px 0;

&::after {
animation: nextFlip1 $speed*5 $speed*-4 infinite steps(1);
}
}

&:not(.flip1) {
right: calc(100% - 2px);
top: -2px;
transform-origin: right;
animation: flip2 $speed ease-in-out infinite;
}

@for $i from 2 through 7 {
&.flip#{$i}::after { animation: nextFlip#{$i} $speed*5 $speed*-4 infinite steps(1); }
}

&.flip7 {
width: 30px;
border-width: 2px 0px 2px 2px;
&::after { animation: nextFlip7 $speed*5 $speed*-4 infinite steps(1); }
}

@keyframes flip1 {
0%, 20% { transform: rotateX($bookAngle) rotateY(6deg); }
80%, 100% { transform: rotateX($bookAngle) rotateY(174deg); }
}

@keyframes flip2 {
0%, 20% { transform: rotateY(0deg) translateY(0px); }
50% { transform: rotateY(-15deg) translateY(0px); }
}
}

@keyframes nextFlip1 {
@for $i from 0 through 4 {
#{$i * 20}% { background-image: nth($images, ($i + 1)); background-position: -178px -2px; transform: rotateY(0deg); }
#{10 + ($i * 20)}% { background-image: nth($images, ($i + 2)); background-position: -210px -2px; transform: rotateY(180deg); }
}
}

@for $i from 2 through 6 {
@keyframes nextFlip#{$i} {
@for $j from 0 through 4 {
#{$j * 20}% { background-image: nth($images, ($j + 1)); background-position: #{-148 + (($i - 2) * 30)}px -2px; transform: rotateY(0deg); }
#{((10 + ($j * 20)) + (($i - 1) * 0.5))}% { background-image: nth($images, ($j + 2)); background-position: #{-238 - (($i - 2) * 30)}px -2px; transform: rotateY(180deg); }
}
}
}

@keyframes nextFlip7 {
@for $i from 0 through 4 {
#{$i * 20}% { background-image: nth($images, ($i + 1)); background-position: -2px -2px; transform: rotateY(0deg); }
#{13 + ($i * 20)}% { background-image: nth($images, ($i + 2)); background-position: -388px -2px; transform: rotateY(180deg); }
}
}

.twitterLink {
position: fixed;
bottom: 0.5em; right: 0.5em;
& img {
width: 2em;
filter: grayscale(100%);
transition: filter 0.25s;
&:hover {
filter: grayscale(0%);
}
}
}

Comments

Feb. 27th, 2024 05:51 am (UTC)
Hey! I can't speak to whether or not you could accomplish this by making a flipbook that is an entire custom layout, but if you're aiming to make an in-entry code, this would not be possible, no. Sorry. :C

In-entry codes, afaik, cannot import external fonts, utilize (most) css transitions, animations, or pseudoelements/pseudoclasses. Also, I think all CSS needs to be in-line. I may be wrong on that, though.
Feb. 27th, 2024 09:46 am (UTC)
Thanks I thought so! I knew they had to be inline but wanted to fo firm re the @import etc before I started the project