SC CODE: Function InitializePrivate() Uint64
10 IF init() == 0 THEN GOTO 30
20 RETURN 1
30 STORE("nameHdr", "styles-components.css")
31 STORE("descrHdr", "Component-specific styles")
32 STORE("iconURLHdr", "")
33 STORE("dURL", "explorer.tela")
34 STORE("docType", "TELA-CSS-1")
35 STORE("subDir", "")
36 STORE("fileCheckC", "871c601d7cea456bb3083b189042bb745d061423e6a9befdf508bfa381ff8e2")
37 STORE("fileCheckS", "1bdfcaa81a2248e6676cfb8ba58da5753ecdb97eed83356ef32210f3a7bebf56")
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
/*
html {
box-sizing: border-box;
}
.card {
background: rgba(36,40,45,0.96);
backdrop-filter: blur(12px);
padding: 1.5rem;
border-radius: 16px;
margin: 1rem 0 2rem 0;
box-shadow: 0 12px 24px rgba(0,0,0,0.3), 0 0 32px rgba(4,24,61,0.1);
border: 1px solid rgba(255,255,255,0.08);
position: relative;
}
.section-header {
margin-bottom: 1rem;
}
.section-header h2 {
margin: 0;
color: #b959b6;
font-size: 1.3rem;
}
.section-info {
color: #b3b3b3;
font-size: 0.9rem;
margin-top: 0.5rem;
}
.table-responsive {
overflow-x: auto;
}
.info-table {
width: 100%;
border-collapse: collapse;
}
.info-table th,
.info-table td {
padding: 0.8rem 0.75rem;
text-align: left;
border-bottom: 1px solid rgba(255,255,255,0.08);
font-size: 0.9rem;
}
.info-table th {
background-color: #1a1d23;
color: #b3b3b3;
font-weight: 500;
white-space: nowrap;
}
.info-table td {
border-bottom: 1px solid rgba(255,255,255,0.05);
}
.info-table tr {
background-color: #15171c;
}
.info-table tr:nth-child(odd) {
background-color: #1a1d23;
}
.info-table tr:hover {
background-color: rgba(185,89,182,0.15);
cursor: pointer;
transition: background-color 0.2s ease;
}
.info-table a {
display: inline-block;
background: transparent;
padding: 0.3rem 0.5rem;
color: #b959b6;
border: none;
border-radius: 4px;
transition: all 0.15s ease;
}
.info-table a:hover {
background: rgba(69,227,221,0.15);
transform: translateY(0);
box-shadow: none;
text-decoration: underline;
}
.monospace {
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
letter-spacing: -0.03em;
}
.hash-cell {
font-family: monospace;
color: #b959b6;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.hash-responsive {
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
letter-spacing: -0.03em;
}
.hash-full {
display: inline;
}
.hash-truncated {
display: none;
}
.block-prefix {
color: #b3b3b3;
font-size: 0.85rem;
margin-right: 0.2rem;
}
.fees-value {
color: #b959b6;
}
.ring-size {
color: #b3b3b3;
}
.special-block-indicator {
display: inline-block;
width: 8px;
height: 8px;
background-color: #9c6dff;
border-radius: 50%;
margin-right: 5px;
}
.block-row {
transition: background-color 0.2s ease;
}
.block-row:hover {
background-color: rgba(69,227,221,0.1);
}
.tx-row {
background-color: rgba(10,10,10,0.3);
font-size: 0.9em;
}
.pagination {
margin: 1.5rem 0;
display: flex;
justify-content: center;
align-items: center;
gap: 0.75rem;
flex-wrap: wrap;
}
.pagination-button {
padding: 0.6rem 1rem;
background: rgba(255,255,255,0.05);
border: 1px solid #b959b6;
border-radius: 8px;
color: #ffffff;
text-decoration: none;
font-size: 0.9rem;
transition: all .25s cubic-bezier(.4,0,.2,1);
min-width: 100px;
text-align: center;
cursor: pointer;
}
.pagination-button:hover:not(.disabled) {
border-color: #b959b6;
color: #ffffff;
}
.pagination-button.disabled {
opacity: .5;
pointer-events: none;
}
.pagination-current {
padding: 0.6rem 1rem;
border: 1px solid #b959b6;
background: rgba(255,255,255,0.05);
border-radius: 8px;
font-size: .9rem;
color: #b3b3b3;
min-width: 150px;
text-align: center;
}
.page-indicator {
background-color: rgba(69,227,221,0.15);
color: #b959b6;
padding: 0.6rem 1.5rem;
border-radius: 8px;
font-weight: 500;
}
.loading-indicator {
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
color: #b3b3b3;
flex-direction: column;
gap: 1rem;
}
.loading-text {
font-size: 1rem;
color: #b959b6;
text-align: center;
font-weight: 500;
}
.status {
display: inline-block;
padding: 4px 10px;
margin: 0;
border-radius: 6px;
color: white;
font-size: 0.8rem;
text-transform: uppercase;
text-align: center;
}
.status-disconnected {
background-color: #cc3300;
}
.status-connecting {
background-color: #f0ad4e;
}
.status-requested {
background-color: #f0ad4e;
}
.status-connected {
background-color: #28a745;
}
.status-rejected {
background-color: #cc0000;
}
.status-failed {
background-color: #cc0000;
}
.privacy-indicator {
display: flex;
align-items: center;
padding: 4px 10px;
border-radius: 6px;
background-color: rgba(0,0,0,0.3);
cursor: pointer;
transition: background-color 0.2s ease;
gap: 6px;
}
.privacy-indicator:hover {
background-color: rgba(0,0,0,0.5);
}
.privacy-status {
display: flex;
align-items: center;
gap: 6px;
padding: 4px 10px;
border-radius: 6px;
background-color: rgba(0,0,0,0.3);
cursor: pointer;
transition: background-color 0.2s ease;
text-decoration: none;
color: #52c8db;
}
.privacy-status:hover {
background-color: rgba(0,0,0,0.5);
}
.connection-status {
display: flex;
align-items: center;
gap: 6px;
font-size: 0.85rem;
}
.privacy-dot {
width: 8px;
height: 8px;
border-radius: 50%;
display: inline-block;
}
.status-dot {
width: 8px;
height: 8px;
border-radius: 50%;
display: inline-block;
margin-right: 6px;
}
.dot-green {
background-color: #28a745;
box-shadow: 0 0 5px #28a745;
}
.dot-yellow {
background-color: #f0ad4e;
box-shadow: 0 0 5px #f0ad4e;
}
.dot-red {
background-color: #cc3300;
box-shadow: 0 0 5px #cc3300;
}
.privacy-text {
font-size: 0.85rem;
color: #b3b3b3;
}
.privacy-text.connected {
color: #4ade80;
}
#privacy-status-text {
font-size: 0.85rem;
color: #b3b3b3;
transition: color 0.2s ease;
}
.search-container {
position: relative;
display: flex;
align-items: center;
max-width: 500px;
width: 100%;
min-width: 300px;
flex-grow: 1;
margin: 0 1rem;
}
.search-input {
width: 100%;
padding: 12px 50px 12px 16px;
border: 1px solid rgba(82,200,219,0.3);
border-radius: 8px;
background: rgba(0,0,0,0.3);
color: #ffffff;
font-size: 0.9rem;
outline: none;
transition: all 0.2s ease;
backdrop-filter: blur(10px);
}
.search-input:focus {
border-color: #52c8db;
background: rgba(0,0,0,0.5);
box-shadow: 0 0 0 1px rgba(82,200,219,0.3);
}
.search-icon {
position: absolute;
right: 12px;
cursor: pointer;
color: #52c8db;
font-size: 1.2rem;
padding: 4px;
border-radius: 4px;
transition: all 0.2s ease;
}
.search-icon:hover {
background: rgba(82,200,219,0.1);
transform: scale(1.1);
}
.privacy-text {
font-size: 0.8rem;
color: white;
}
.privacy-text.connected {
color: #28a745;
}
.readonly-input {
background-color: rgba(0,0,0,0.3) !important;
color: #888 !important;
cursor: not-allowed !important;
border-color: rgba(255,255,255,0.1) !important;
}
.data-flow {
display: inline-block;
width: 24px;
height: 14px;
position: relative;
margin: 0 8px;
}
.data-packet {
position: absolute;
width: 4px;
height: 4px;
border-radius: 50%;
background-color: #b959b6;
opacity: 0.7;
transition: opacity 0.3s ease;
}
.data-packet:nth-child(1) {
left: 2px;
top: 5px;
}
.data-packet:nth-child(2) {
left: 10px;
top: 5px;
opacity: 0.5;
}
.data-packet:nth-child(3) {
left: 18px;
top: 5px;
opacity: 0.3;
}
.status {
display: inline-block;
padding: 4px 10px;
margin: 0 0 10px 0;
border-radius: 6px;
color: white;
font-size: 0.8rem;
text-transform: uppercase;
text-align: center;
transition: all 0.3s ease;
}
.status-disconnected {
background-color: #cc3300;
}
.status-connecting {
background-color: #f0ad4e;
box-shadow: 0 0 8px rgba(240,173,78,0.5);
}
.status-requested {
background-color: #f0ad4e;
box-shadow: 0 0 8px rgba(240,173,78,0.5);
}
.status-connected {
background-color: #28a745;
box-shadow: 0 0 8px rgba(40,167,69,0.4);
}
.status-rejected {
background-color: #cc0000;
}
.status-failed {
background-color: #cc0000;
}
*/ |
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", "styles-components.css")
31 STORE("descrHdr", "Component-specific styles")
32 STORE("iconURLHdr", "")
33 STORE("dURL", "explorer.tela")
34 STORE("docType", "TELA-CSS-1")
35 STORE("subDir", "")
36 STORE("fileCheckC", "871c601d7cea456bb3083b189042bb745d061423e6a9befdf508bfa381ff8e2")
37 STORE("fileCheckS", "1bdfcaa81a2248e6676cfb8ba58da5753ecdb97eed83356ef32210f3a7bebf56")
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
/*
html {
box-sizing: border-box;
}
.card {
background: rgba(36,40,45,0.96);
backdrop-filter: blur(12px);
padding: 1.5rem;
border-radius: 16px;
margin: 1rem 0 2rem 0;
box-shadow: 0 12px 24px rgba(0,0,0,0.3), 0 0 32px rgba(4,24,61,0.1);
border: 1px solid rgba(255,255,255,0.08);
position: relative;
}
.section-header {
margin-bottom: 1rem;
}
.section-header h2 {
margin: 0;
color: #b959b6;
font-size: 1.3rem;
}
.section-info {
color: #b3b3b3;
font-size: 0.9rem;
margin-top: 0.5rem;
}
.table-responsive {
overflow-x: auto;
}
.info-table {
width: 100%;
border-collapse: collapse;
}
.info-table th,
.info-table td {
padding: 0.8rem 0.75rem;
text-align: left;
border-bottom: 1px solid rgba(255,255,255,0.08);
font-size: 0.9rem;
}
.info-table th {
background-color: #1a1d23;
color: #b3b3b3;
font-weight: 500;
white-space: nowrap;
}
.info-table td {
border-bottom: 1px solid rgba(255,255,255,0.05);
}
.info-table tr {
background-color: #15171c;
}
.info-table tr:nth-child(odd) {
background-color: #1a1d23;
}
.info-table tr:hover {
background-color: rgba(185,89,182,0.15);
cursor: pointer;
transition: background-color 0.2s ease;
}
.info-table a {
display: inline-block;
background: transparent;
padding: 0.3rem 0.5rem;
color: #b959b6;
border: none;
border-radius: 4px;
transition: all 0.15s ease;
}
.info-table a:hover {
background: rgba(69,227,221,0.15);
transform: translateY(0);
box-shadow: none;
text-decoration: underline;
}
.monospace {
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
letter-spacing: -0.03em;
}
.hash-cell {
font-family: monospace;
color: #b959b6;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.hash-responsive {
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
letter-spacing: -0.03em;
}
.hash-full {
display: inline;
}
.hash-truncated {
display: none;
}
.block-prefix {
color: #b3b3b3;
font-size: 0.85rem;
margin-right: 0.2rem;
}
.fees-value {
color: #b959b6;
}
.ring-size {
color: #b3b3b3;
}
.special-block-indicator {
display: inline-block;
width: 8px;
height: 8px;
background-color: #9c6dff;
border-radius: 50%;
margin-right: 5px;
}
.block-row {
transition: background-color 0.2s ease;
}
.block-row:hover {
background-color: rgba(69,227,221,0.1);
}
.tx-row {
background-color: rgba(10,10,10,0.3);
font-size: 0.9em;
}
.pagination {
margin: 1.5rem 0;
display: flex;
justify-content: center;
align-items: center;
gap: 0.75rem;
flex-wrap: wrap;
}
.pagination-button {
padding: 0.6rem 1rem;
background: rgba(255,255,255,0.05);
border: 1px solid #b959b6;
border-radius: 8px;
color: #ffffff;
text-decoration: none;
font-size: 0.9rem;
transition: all .25s cubic-bezier(.4,0,.2,1);
min-width: 100px;
text-align: center;
cursor: pointer;
}
.pagination-button:hover:not(.disabled) {
border-color: #b959b6;
color: #ffffff;
}
.pagination-button.disabled {
opacity: .5;
pointer-events: none;
}
.pagination-current {
padding: 0.6rem 1rem;
border: 1px solid #b959b6;
background: rgba(255,255,255,0.05);
border-radius: 8px;
font-size: .9rem;
color: #b3b3b3;
min-width: 150px;
text-align: center;
}
.page-indicator {
background-color: rgba(69,227,221,0.15);
color: #b959b6;
padding: 0.6rem 1.5rem;
border-radius: 8px;
font-weight: 500;
}
.loading-indicator {
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
color: #b3b3b3;
flex-direction: column;
gap: 1rem;
}
.loading-text {
font-size: 1rem;
color: #b959b6;
text-align: center;
font-weight: 500;
}
.status {
display: inline-block;
padding: 4px 10px;
margin: 0;
border-radius: 6px;
color: white;
font-size: 0.8rem;
text-transform: uppercase;
text-align: center;
}
.status-disconnected {
background-color: #cc3300;
}
.status-connecting {
background-color: #f0ad4e;
}
.status-requested {
background-color: #f0ad4e;
}
.status-connected {
background-color: #28a745;
}
.status-rejected {
background-color: #cc0000;
}
.status-failed {
background-color: #cc0000;
}
.privacy-indicator {
display: flex;
align-items: center;
padding: 4px 10px;
border-radius: 6px;
background-color: rgba(0,0,0,0.3);
cursor: pointer;
transition: background-color 0.2s ease;
gap: 6px;
}
.privacy-indicator:hover {
background-color: rgba(0,0,0,0.5);
}
.privacy-status {
display: flex;
align-items: center;
gap: 6px;
padding: 4px 10px;
border-radius: 6px;
background-color: rgba(0,0,0,0.3);
cursor: pointer;
transition: background-color 0.2s ease;
text-decoration: none;
color: #52c8db;
}
.privacy-status:hover {
background-color: rgba(0,0,0,0.5);
}
.connection-status {
display: flex;
align-items: center;
gap: 6px;
font-size: 0.85rem;
}
.privacy-dot {
width: 8px;
height: 8px;
border-radius: 50%;
display: inline-block;
}
.status-dot {
width: 8px;
height: 8px;
border-radius: 50%;
display: inline-block;
margin-right: 6px;
}
.dot-green {
background-color: #28a745;
box-shadow: 0 0 5px #28a745;
}
.dot-yellow {
background-color: #f0ad4e;
box-shadow: 0 0 5px #f0ad4e;
}
.dot-red {
background-color: #cc3300;
box-shadow: 0 0 5px #cc3300;
}
.privacy-text {
font-size: 0.85rem;
color: #b3b3b3;
}
.privacy-text.connected {
color: #4ade80;
}
#privacy-status-text {
font-size: 0.85rem;
color: #b3b3b3;
transition: color 0.2s ease;
}
.search-container {
position: relative;
display: flex;
align-items: center;
max-width: 500px;
width: 100%;
min-width: 300px;
flex-grow: 1;
margin: 0 1rem;
}
.search-input {
width: 100%;
padding: 12px 50px 12px 16px;
border: 1px solid rgba(82,200,219,0.3);
border-radius: 8px;
background: rgba(0,0,0,0.3);
color: #ffffff;
font-size: 0.9rem;
outline: none;
transition: all 0.2s ease;
backdrop-filter: blur(10px);
}
.search-input:focus {
border-color: #52c8db;
background: rgba(0,0,0,0.5);
box-shadow: 0 0 0 1px rgba(82,200,219,0.3);
}
.search-icon {
position: absolute;
right: 12px;
cursor: pointer;
color: #52c8db;
font-size: 1.2rem;
padding: 4px;
border-radius: 4px;
transition: all 0.2s ease;
}
.search-icon:hover {
background: rgba(82,200,219,0.1);
transform: scale(1.1);
}
.privacy-text {
font-size: 0.8rem;
color: white;
}
.privacy-text.connected {
color: #28a745;
}
.readonly-input {
background-color: rgba(0,0,0,0.3) !important;
color: #888 !important;
cursor: not-allowed !important;
border-color: rgba(255,255,255,0.1) !important;
}
.data-flow {
display: inline-block;
width: 24px;
height: 14px;
position: relative;
margin: 0 8px;
}
.data-packet {
position: absolute;
width: 4px;
height: 4px;
border-radius: 50%;
background-color: #b959b6;
opacity: 0.7;
transition: opacity 0.3s ease;
}
.data-packet:nth-child(1) {
left: 2px;
top: 5px;
}
.data-packet:nth-child(2) {
left: 10px;
top: 5px;
opacity: 0.5;
}
.data-packet:nth-child(3) {
left: 18px;
top: 5px;
opacity: 0.3;
}
.status {
display: inline-block;
padding: 4px 10px;
margin: 0 0 10px 0;
border-radius: 6px;
color: white;
font-size: 0.8rem;
text-transform: uppercase;
text-align: center;
transition: all 0.3s ease;
}
.status-disconnected {
background-color: #cc3300;
}
.status-connecting {
background-color: #f0ad4e;
box-shadow: 0 0 8px rgba(240,173,78,0.5);
}
.status-requested {
background-color: #f0ad4e;
box-shadow: 0 0 8px rgba(240,173,78,0.5);
}
.status-connected {
background-color: #28a745;
box-shadow: 0 0 8px rgba(40,167,69,0.4);
}
.status-rejected {
background-color: #cc0000;
}
.status-failed {
background-color: #cc0000;
}
*/'] |