Skip to content

Commit

Permalink
Issue KlimaDAO#32: Added tooltips for important terms (forked)
Browse files Browse the repository at this point in the history
  • Loading branch information
vanislekahuna committed Aug 18, 2022
1 parent 7752b8d commit af9a9ff
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 8 deletions.
33 changes: 31 additions & 2 deletions src/apps/tco2_dashboard/c3t.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,22 @@ def create_content_c3t(df, df_retired, fig_pool_pie_chart):
dbc.Col(
dbc.Card([
dbc.CardHeader(
html.H1("State of C3 Tokenized Carbon", className='page-title'))
html.H1(["State of",
html.Span(
html.A(
"C3 Tokenized Carbon",
href='https://docs.klimadao.finance/references/glossary#c3-token',
),
id="tooltip-target",
style={"textDecoration": "underline", "cursor": "pointer"}
)], className='page-title'),

dbc.Tooltip("A utility token for the C3 carbon bridge. \
It is distributed as a reward to users of the protocol that stake, bridge or provide liquidity.",
target="tooltip-target",
style={"text-align": "right"},),

)
]), width=12, style={'textAlign': 'center'})
),

Expand Down Expand Up @@ -62,7 +77,21 @@ def create_content_c3t(df, df_retired, fig_pool_pie_chart):
dbc.Col(),
dbc.Col([
dbc.Card([
dbc.CardHeader(html.H2("Deep Dive into C3T")),
dbc.CardHeader(
html.H2(["Deep Dive into",
html.Span(
html.A(
"C3T",
href='https://docs.klimadao.finance/references/glossary#c3t',
),
id="tooltip-target",
style={"textDecoration": "underline", "cursor": "pointer"}
)
]),
dbc.Tooltip("C3 Tonne (C3T) is the general term for fungible tokenized carbon offsets bridged via C3.",
target="tooltip-target",
style={"text-align": "right"},),
),
dbc.CardBody([
dbc.Row([
dbc.Col([
Expand Down
21 changes: 19 additions & 2 deletions src/apps/tco2_dashboard/mco2.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,25 @@ def table_type(df_column):
dbc.Row([
dbc.Col(),
dbc.Col(dbc.Card([
dbc.CardBody(html.H2('Deep Dive into Bridged MCO2'),
style={'textAlign': 'center'})
dbc.CardBody(html.H2(['Deep Dive into Bridged',
html.Span(
html.A(
"MCO2",
href='https://docs.klimadao.finance/references/glossary#mco2',
),
id="tooltip-target",
style={"textDecoration": "underline", "cursor": "pointer"}
),]),

dbc.Tooltip(
"\
Moss Carbon Credit (MCO2) is a relatively homogenenous, centrally managed pool of tokenized Verra VCUs. \
Moss created it in August 2020, by curating REDD+ projects in the Amazon Rainforest (one in Peru, five in Brazil).\
",
target="tooltip-target",
style={"text-align": "right"},),

style={'textAlign': 'center'},)
]), lg=6, md=12),
dbc.Col(),
], style={'paddingTop': '60px'}),
Expand Down
39 changes: 36 additions & 3 deletions src/apps/tco2_dashboard/offchain_vs_onchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,21 @@ def create_offchain_vs_onchain_content(bridges_info_dict, retires_info_dict, df_
dbc.Col(
dbc.Card([
dbc.CardHeader(
html.H1("State of Tokenized Carbon")),
html.H1(["State of",
html.Span(
html.A(
"Tokenized Carbon",
href='https://docs.klimadao.finance/references/glossary#tokenized-carbon-asset',
),
id="tooltip-target",
style={"textDecoration": "underline", "cursor": "pointer"})
]),

dbc.Tooltip("\
A Tokenized Carbon Asset (TCA) refers to a carbon asset (e.g. voluntary carbon offset) brought onto the blockchain. \
",
target="tooltip-target",
style={"text-align": "right"})),
dbc.CardFooter(
verra_fallback_note,
id="fallback_indicator")
Expand All @@ -22,8 +36,27 @@ def create_offchain_vs_onchain_content(bridges_info_dict, retires_info_dict, df_
dbc.Col(
dbc.Card([
dbc.CardHeader(
html.H1("State of Tokenized Carbon")),
]), width=12, style={'textAlign': 'center'}),
html.H1([
"State of",
html.Span(
html.A(
"Tokenized Carbon",
href='https://docs.klimadao.finance/references/glossary#tokenized-carbon-asset',
),
id="tooltip-target",
style={"textDecoration": "underline", "cursor": "pointer"})
]),

dbc.Tooltip("A Tokenized Carbon Asset (TCA) refers to a carbon asset (e.g. voluntary carbon offset) brought onto the blockchain.",
target="tooltip-target",
style={"text-align": "right"}
),

width=12, style={'textAlign': 'center'}
),
]),

),
)

sum_total_tokenized = sum(d['Dataframe']['Quantity'].sum()
Expand Down
16 changes: 15 additions & 1 deletion src/apps/tco2_dashboard/tco2.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,21 @@ def create_content_toucan(df, df_retired, fig_pool_pie_chart):
dbc.Col(),
dbc.Col([
dbc.Card([
dbc.CardHeader(html.H2("Deep Dive into TCO2")),
dbc.CardHeader(html.H2([
"Deep Dive into",
html.Span(
html.A("TCO2",
href='https://docs.klimadao.finance/references/glossary#tco2'),
id="tooltip-target",
style={"textDecoration": "underline", "cursor": "pointer"}
)
]),

dbc.Tooltip("Toucan Carbon Tokens (TCO2) is the general term for fungible tokenized carbon offsets bridged via Toucan",
target="tooltip-target",
style={"text-align": "right"},)

),
dbc.CardBody([
dbc.Row([
dbc.Col([
Expand Down

0 comments on commit af9a9ff

Please sign in to comment.