SC CODE: Function InitializePrivate() Uint64
10 IF init() == 0 THEN GOTO 30
20 RETURN 1
30 STORE("nameHdr", "style.css")
31 STORE("descrHdr", "AS's Playground Live")
32 STORE("iconURLHdr", "")
33 STORE("dURL", "AS's Playground Live")
34 STORE("docType", "TELA-CSS-1")
35 STORE("subDir", "")
36 STORE("fileCheckC", "2f26d68393e1fe7a0c3d3ad7f0d44e173c415e60819fbef221612fe5e990e182")
37 STORE("fileCheckS", "2d8ebbe0dc07c19af6491488aba76a0b5014c170e336ebfa8da2dbfff1a8bbb7")
100 RETURN 0
End Function
Function init() Uint64
10 IF EXISTS("owner") == 0 THEN GOTO 30
20 RETURN 1
30 STORE("owner", address())
50 STORE("docVersion", "1.0.0")
60 STORE("hash", HEX(TXID()))
70 STORE("likes", 0)
80 STORE("dislikes", 0)
100 RETURN 0
End Function
Function address() String
10 DIM s as String
20 LET s = SIGNER()
30 IF IS_ADDRESS_VALID(s) THEN GOTO 50
40 RETURN "anon"
50 RETURN ADDRESS_STRING(s)
End Function
Function Rate(r Uint64) Uint64
10 DIM addr as String
15 LET addr = address()
16 IF r < 100 && EXISTS(addr) == 0 && addr != "anon" THEN GOTO 30
20 RETURN 1
30 STORE(addr, ""+r+"_"+BLOCK_HEIGHT())
40 IF r < 50 THEN GOTO 70
50 STORE("likes", LOAD("likes")+1)
60 RETURN 0
70 STORE("dislikes", LOAD("dislikes")+1)
100 RETURN 0
End Function
/*
* {
box-sizing: border-box;
}
body {
font-family: Arial, Helvetica, sans-serif;
font-size: large;
background-color: #f8f9f9;
margin-top: 0;
margin-left: 0;
margin-right: 0;
margin-bottom: 0;
}
@media screen and (max-width: 600px) {
body {
font-family: Arial, Helvetica, sans-serif;
background-color: #f8f9f9;
margin-top: 0;
margin-left: 0;
margin-right: 0;
margin-bottom: 0;
}
}
h1 {
font-size: 2.5em;
}
h2 {
font-size: 1.875em;
}
h3 {
font-size: 1.4em;
}
h4 {
font-size: 1em;
}
P {
font-size: 0.875em;
}
hr {
border: 1px solid whitesmoke;
margin-bottom: 30px;
margin-top: -15px;
}
header {
background-color: beige;
padding: 5px;
text-align: center;
font-size: 22px;
}
nav {
background-color: rgb(33,33,33,0.9);
}
div.marginside {
margin-left: 10%;
margin-right: 10%;
}
@media screen and (max-width: 600px) {
div.marginside {
margin-left: 0;
margin-right: 0;
}
}
.navbar {
display: flex;
justify-content: space-between;
align-items: center;
background-color: #333;
padding: 10px 20px;
}
.navbar-left,
.navbar-right {
display: flex;
gap: 10px;
}
@media screen and (max-width: 600px) {
.navbar {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
background-color: #333;
padding: 10px 20px;
}
}
a.nav:link, a.nav:visited {
background-color: none;
color: white;
padding: 10px 10px;
text-align: center;
text-decoration: none;
display: inline-block;
}
a.nav:hover, a.nav:active {
background-color: black;
color: white;
}
div.sticky {
position: sticky;
top: 0;
}
.anchored {
scroll-margin-top: 60px;
}
a.side:link, a.side:visited {
background-color: none;
color: black;
padding: 5px 10px;
text-align: left;
text-decoration: none;
display: inline-block;
}
a.side:hover, a.nav:active {
background-color: white;
color: black;
}
section {
display: -webkit-flex;
display: flex;
background-color: #f8f9f9;
margin-left: 10%;
margin-right: 10%;
}
@media screen and (max-width: 600px) {
section {
display: -webkit-flex;
display: flex;
margin-left: 0;
margin-right: 0;
}
}
.overflow {
overflow: scroll;
}
aside {
-webkit-flex: 1;
-ms-flex: 1;
flex: 0.75;
background-color: whitesmoke;
padding: 20px;
}
aside ul {
list-style-type: none;
padding: 0;
}
aside li {
list-style-type: none;
padding-bottom: 10px;
}
article {
-webkit-flex: 3;
-ms-flex: 3;
flex: 3;
background-color: #ffffff;
padding: 10px;
}
footer {
background-color: beige;
padding: 10px;
text-align: center;
}
@media (max-width: 600px) {
section {
-webkit-flex-direction: column;
flex-direction: column;
}
}
code {
font-size: 0,875em;
font-weight: normal;
display: inline-block;
background-color: whitesmoke;
padding: 10px;
}
.telegram-float {
position: fixed;
bottom: 20px;
right: 20px;
z-index: 1000;
}
.telegram-icon {
width: 60px;
height: 60px;
border-radius: 50%;
background-color: #0088cc;
display: flex;
justify-content: center;
align-items: center;
animation-name: pulse;
animation-duration: 5.0s;
animation-timing-function: ease-out;
animation-iteration-count: infinite;
}
@keyframes pulse {
0% {
box-shadow: 0 0 0 0 rgba(0, 136, 204, 0.5);
}
80% {
box-shadow: 0 0 0 14px rgba(0, 136, 204, 0);
}
}
.telegram-icon svg {
fill: #fff;
width: 30px;
height: 30px;
}
:root {
--green: #46b868;
--yellow: #fffb00;
--red: #ed2024;
}
#svgCursor {
position: fixed;
pointer-events: none;
width: 25px;
height: 25px;
opacity: 0;
transition: opacity 1s;
z-index: 9999;
}
.cls-1 {
fill: var(--red);
}
.cls-1,
.cls-2,
.cls-3 {
stroke-width: 0px;
}
.cls-2 {
fill: var(--green);
}
.cls-3 {
fill: var(--text);
}
.cls-r1 {
fill: var(--rings);
}
.cls-r3 {
fill: var(--background);
}
.svg-container {
position: fixed;
width: 100%;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
z-index: -100;
}
#connectButton {
padding: 2px 17px 2px 17px;
font-size: 0.87em;
text-align: center;
}
#wsStatus {
font-size: 0.77em;
background-color: #555555;
padding: 5px;
}
*/ |
SC Arguments: [Name:SC_ACTION Type:uint64 Value:'1' Name:SC_CODE Type:string Value:'Function InitializePrivate() Uint64
10 IF init() == 0 THEN GOTO 30
20 RETURN 1
30 STORE("nameHdr", "style.css")
31 STORE("descrHdr", "AS's Playground Live")
32 STORE("iconURLHdr", "")
33 STORE("dURL", "AS's Playground Live")
34 STORE("docType", "TELA-CSS-1")
35 STORE("subDir", "")
36 STORE("fileCheckC", "2f26d68393e1fe7a0c3d3ad7f0d44e173c415e60819fbef221612fe5e990e182")
37 STORE("fileCheckS", "2d8ebbe0dc07c19af6491488aba76a0b5014c170e336ebfa8da2dbfff1a8bbb7")
100 RETURN 0
End Function
Function init() Uint64
10 IF EXISTS("owner") == 0 THEN GOTO 30
20 RETURN 1
30 STORE("owner", address())
50 STORE("docVersion", "1.0.0")
60 STORE("hash", HEX(TXID()))
70 STORE("likes", 0)
80 STORE("dislikes", 0)
100 RETURN 0
End Function
Function address() String
10 DIM s as String
20 LET s = SIGNER()
30 IF IS_ADDRESS_VALID(s) THEN GOTO 50
40 RETURN "anon"
50 RETURN ADDRESS_STRING(s)
End Function
Function Rate(r Uint64) Uint64
10 DIM addr as String
15 LET addr = address()
16 IF r < 100 && EXISTS(addr) == 0 && addr != "anon" THEN GOTO 30
20 RETURN 1
30 STORE(addr, ""+r+"_"+BLOCK_HEIGHT())
40 IF r < 50 THEN GOTO 70
50 STORE("likes", LOAD("likes")+1)
60 RETURN 0
70 STORE("dislikes", LOAD("dislikes")+1)
100 RETURN 0
End Function
/*
* {
box-sizing: border-box;
}
body {
font-family: Arial, Helvetica, sans-serif;
font-size: large;
background-color: #f8f9f9;
margin-top: 0;
margin-left: 0;
margin-right: 0;
margin-bottom: 0;
}
@media screen and (max-width: 600px) {
body {
font-family: Arial, Helvetica, sans-serif;
background-color: #f8f9f9;
margin-top: 0;
margin-left: 0;
margin-right: 0;
margin-bottom: 0;
}
}
h1 {
font-size: 2.5em;
}
h2 {
font-size: 1.875em;
}
h3 {
font-size: 1.4em;
}
h4 {
font-size: 1em;
}
P {
font-size: 0.875em;
}
hr {
border: 1px solid whitesmoke;
margin-bottom: 30px;
margin-top: -15px;
}
header {
background-color: beige;
padding: 5px;
text-align: center;
font-size: 22px;
}
nav {
background-color: rgb(33,33,33,0.9);
}
div.marginside {
margin-left: 10%;
margin-right: 10%;
}
@media screen and (max-width: 600px) {
div.marginside {
margin-left: 0;
margin-right: 0;
}
}
.navbar {
display: flex;
justify-content: space-between;
align-items: center;
background-color: #333;
padding: 10px 20px;
}
.navbar-left,
.navbar-right {
display: flex;
gap: 10px;
}
@media screen and (max-width: 600px) {
.navbar {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
background-color: #333;
padding: 10px 20px;
}
}
a.nav:link, a.nav:visited {
background-color: none;
color: white;
padding: 10px 10px;
text-align: center;
text-decoration: none;
display: inline-block;
}
a.nav:hover, a.nav:active {
background-color: black;
color: white;
}
div.sticky {
position: sticky;
top: 0;
}
.anchored {
scroll-margin-top: 60px;
}
a.side:link, a.side:visited {
background-color: none;
color: black;
padding: 5px 10px;
text-align: left;
text-decoration: none;
display: inline-block;
}
a.side:hover, a.nav:active {
background-color: white;
color: black;
}
section {
display: -webkit-flex;
display: flex;
background-color: #f8f9f9;
margin-left: 10%;
margin-right: 10%;
}
@media screen and (max-width: 600px) {
section {
display: -webkit-flex;
display: flex;
margin-left: 0;
margin-right: 0;
}
}
.overflow {
overflow: scroll;
}
aside {
-webkit-flex: 1;
-ms-flex: 1;
flex: 0.75;
background-color: whitesmoke;
padding: 20px;
}
aside ul {
list-style-type: none;
padding: 0;
}
aside li {
list-style-type: none;
padding-bottom: 10px;
}
article {
-webkit-flex: 3;
-ms-flex: 3;
flex: 3;
background-color: #ffffff;
padding: 10px;
}
footer {
background-color: beige;
padding: 10px;
text-align: center;
}
@media (max-width: 600px) {
section {
-webkit-flex-direction: column;
flex-direction: column;
}
}
code {
font-size: 0,875em;
font-weight: normal;
display: inline-block;
background-color: whitesmoke;
padding: 10px;
}
.telegram-float {
position: fixed;
bottom: 20px;
right: 20px;
z-index: 1000;
}
.telegram-icon {
width: 60px;
height: 60px;
border-radius: 50%;
background-color: #0088cc;
display: flex;
justify-content: center;
align-items: center;
animation-name: pulse;
animation-duration: 5.0s;
animation-timing-function: ease-out;
animation-iteration-count: infinite;
}
@keyframes pulse {
0% {
box-shadow: 0 0 0 0 rgba(0, 136, 204, 0.5);
}
80% {
box-shadow: 0 0 0 14px rgba(0, 136, 204, 0);
}
}
.telegram-icon svg {
fill: #fff;
width: 30px;
height: 30px;
}
:root {
--green: #46b868;
--yellow: #fffb00;
--red: #ed2024;
}
#svgCursor {
position: fixed;
pointer-events: none;
width: 25px;
height: 25px;
opacity: 0;
transition: opacity 1s;
z-index: 9999;
}
.cls-1 {
fill: var(--red);
}
.cls-1,
.cls-2,
.cls-3 {
stroke-width: 0px;
}
.cls-2 {
fill: var(--green);
}
.cls-3 {
fill: var(--text);
}
.cls-r1 {
fill: var(--rings);
}
.cls-r3 {
fill: var(--background);
}
.svg-container {
position: fixed;
width: 100%;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
z-index: -100;
}
#connectButton {
padding: 2px 17px 2px 17px;
font-size: 0.87em;
text-align: center;
}
#wsStatus {
font-size: 0.77em;
background-color: #555555;
padding: 5px;
}
*/'] |