diff --git a/apps/block_scout_web/assets/css/app.scss b/apps/block_scout_web/assets/css/app.scss index f658c087ef..4fb20a64f0 100644 --- a/apps/block_scout_web/assets/css/app.scss +++ b/apps/block_scout_web/assets/css/app.scss @@ -122,6 +122,7 @@ $fa-font-path: "~@fortawesome/fontawesome-free/webfonts"; @import "components/alerts"; @import "components/verify_other_explorers"; @import "components/errors"; +@import "components/new_smart_contract"; :export { dashboardBannerChartAxisFontColor: $dashboard-banner-chart-axis-font-color; diff --git a/apps/block_scout_web/assets/css/components/_new_smart_contract.scss b/apps/block_scout_web/assets/css/components/_new_smart_contract.scss new file mode 100644 index 0000000000..fd13c14022 --- /dev/null +++ b/apps/block_scout_web/assets/css/components/_new_smart_contract.scss @@ -0,0 +1,65 @@ +$new-smart-contract-container-tooltips-background-color: #fbfafc !default; +$new-smart-contract-tooltips-width: 300px; +$smart-contract-form-group-tooltip-color: #adb5bd !default; + +.new-smart-contract-container { + background-color: #fff; + background-image: linear-gradient( + to bottom right, + #{$new-smart-contract-container-tooltips-background-color} 100%, + #{$new-smart-contract-container-tooltips-background-color} 100% + ); + background-position: 100% 0; + background-repeat: repeat-y; + background-size: #{$new-smart-contract-tooltips-width} 1px; + box-shadow: 0 0 25px 0 rgba(0, 0, 0, 0.15); + margin-bottom: 3rem; + padding: 50px 0 50px 22px; +} + +.smart-contract-title { + color: #333; + font-size: 18px; + font-weight: normal; + line-height: 1.2; + margin: 0 0 70px 0; + padding: 0; + text-align: left; +} + +.smart-contract-form-group { + margin-bottom: 30px; +} + +.smart-contract-form-group-inner-wrapper { + display: flex; + justify-content: space-between; + + label { + color: #333; + font-size: 14px; + font-weight: normal; + line-height: 1.7; + margin: 0; + min-width: 170px; + padding-right: 60px; + text-align: left; + } + + .form-control { + flex-grow: 1; + margin-right: 30px; + } + + .smart-contract-form-group-tooltip { + color: $smart-contract-form-group-tooltip-color; + flex-grow: 0; + flex-shrink: 0; + font-size: 12px; + font-weight: normal; + line-height: 1.5; + padding: 0 30px; + text-align: left; + width: #{$new-smart-contract-tooltips-width}; + } +} diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification/new.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification/new.html.eex index e2969905cc..81fbd868eb 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification/new.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification/new.html.eex @@ -1,120 +1,187 @@ -
-
-
- -

<%= gettext "New Smart Contract" %>

+
+
+

<%= gettext "New Smart Contract" %>

<%= form_for @changeset, address_verify_contract_path(@conn, :create, @conn.params["address_id"]), [], fn f -> %> -
- <%= label f, :address_hash, gettext("Contract Address") %> - <%= text_input f, :address_hash, class: "form-control", "aria-describedby": "contract-address-help-block", readonly: true %> +
+
+ <%= label f, :address_hash, gettext("Contract Address") %> + <%= text_input f, :address_hash, class: "form-control", "aria-describedby": "contract-address-help-block", readonly: true %> +
Lorem ipsum dolor sit amet, consectetur adip +elit, sed do eiusmod tempor incididunt
+
<%= error_tag f, :address_hash, id: "contract-address-help-block", class: "text-danger" %>
-
- <%= label f, :name, gettext("Contract Name") %> - <%= text_input f, :name, class: "form-control", "aria-describedby": "contract-name-help-block", "data-test": "contract_name" %> +
+
+ <%= label f, :name, gettext("Contract Name") %> + <%= text_input f, :name, class: "form-control", "aria-describedby": "contract-name-help-block", "data-test": "contract_name" %> +
Lorem ipsum dolor sit amet, consectetur adip +elit, sed do eiusmod tempor incididunt
+
<%= error_tag f, :name, id: "contract-name-help-block", class: "text-danger" %>
-
- <%= label f, :compiler_version, gettext("Compiler") %> - <%= select f, :compiler_version, @compiler_versions, class: "form-control", selected: "latest", "aria-describedby": "compiler-help-block" %> +
+
+ <%= label f, :compiler_version, gettext("Compiler") %> + <%= select f, :compiler_version, @compiler_versions, class: "form-control", selected: "latest", "aria-describedby": "compiler-help-block" %> +
Lorem ipsum dolor sit amet, consectetur adip +elit, sed do eiusmod tempor incididunt
+
<%= error_tag f, :compiler_version, id: "compiler-help-block", class: "text-danger" %>
-
- <%= label :evm_version, :evm_version, gettext("EVM Version") %> - <%= select :evm_version, :evm_version, @evm_versions, class: "form-control", selected: "petersburg", "aria-describedby": "evm-version-help-block" %> -
- -
- <%= label f, "Optimization" %> - -
- <%= radio_button f, :optimization, false, checked: true, class: "form-check-input", "aria-describedby": "optimization-help-block" %> - <%= label :smart_contract_optimization, :false, gettext("No"), class: "form-check-label" %> +
+
+ <%= label :evm_version, :evm_version, gettext("EVM Version") %> + <%= select :evm_version, :evm_version, @evm_versions, class: "form-control", selected: "petersburg", "aria-describedby": "evm-version-help-block" %> +
Lorem ipsum dolor sit amet, consectetur adip +elit, sed do eiusmod tempor incididunt
+
-
- <%= radio_button f, :optimization, true, class: "form-check-input", "aria-describedby": "optimization-help-block" %> - <%= label :smart_contract_optimization, :true, gettext("Yes"), class: "form-check-label" %> +
+
+ <%= label f, "Optimization" %> +
+ <%= radio_button f, :optimization, false, checked: true, class: "form-check-input", "aria-describedby": "optimization-help-block" %> + <%= label :smart_contract_optimization, :false, gettext("No"), class: "form-check-label" %> +
+
+ <%= radio_button f, :optimization, true, class: "form-check-input", "aria-describedby": "optimization-help-block" %> + <%= label :smart_contract_optimization, :true, gettext("Yes"), class: "form-check-label" %> +
+
Lorem ipsum dolor sit amet, consectetur adip +elit, sed do eiusmod tempor incididunt
- <%= error_tag f, :optimization, id: "optimization-help-block", class: "text-danger" %>
-
- <%= label f, :name, gettext("Optimization runs") %> - <%= text_input :optimization, :runs, value: 200, class: "form-control", "aria-describedby": "optimization-runs-help-block", "data-test": "optimization-runs" %> +
+
+ <%= label f, :name, gettext("Optimization runs") %> + <%= text_input :optimization, :runs, value: 200, class: "form-control", "aria-describedby": "optimization-runs-help-block", "data-test": "optimization-runs" %> +
Lorem ipsum dolor sit amet, consectetur adip +elit, sed do eiusmod tempor incididunt
+
-
- <%= label f, :contract_source_code, gettext("Enter the Solidity Contract Code below") %> - <%= textarea f, :contract_source_code, class: "form-control monospace", rows: 3, "aria-describedby": "contract-source-code-help-block" %> +
+
+ <%= label f, :contract_source_code, gettext("Enter the Solidity Contract Code below") %> + <%= textarea f, :contract_source_code, class: "form-control monospace", rows: 3, "aria-describedby": "contract-source-code-help-block" %> +
Lorem ipsum dolor sit amet, consectetur adip +elit, sed do eiusmod tempor incididunt
+
<%= error_tag f, :contract_source_code, id: "contract-source-code-help-block", class: "text-danger", "data-test": "contract-source-code-error" %>
-
- <%= label f, :contructor_arguments, gettext("Enter constructor arguments if the contract had any") %> - <%= textarea f, :constructor_arguments, class: "form-control monospace", rows: 3, "aria-describedby": "contract-constructor-arguments-help-block" %> +
+
+ <%= label f, :contructor_arguments, gettext("Enter constructor arguments if the contract had any") %> + <%= textarea f, :constructor_arguments, class: "form-control monospace", rows: 3, "aria-describedby": "contract-constructor-arguments-help-block" %> +
Lorem ipsum dolor sit amet, consectetur adip +elit, sed do eiusmod tempor incididunt
+
<%= error_tag f, :constructor_arguments, id: "contract-constructor-arguments-help-block", class: "text-danger", "data-test": "contract-constructor-arguments-error" %>

<%= gettext "Contract Libraries" %>

-
- <%= label :external_libraries, :library1, gettext("1 Library Name") %> - <%= text_input :external_libraries, :library1_name, class: "form-control", "aria-describedby": "contract-name-help-block" %> +
+
+ <%= label :external_libraries, :library1, gettext("1 Library Name") %> + <%= text_input :external_libraries, :library1_name, class: "form-control", "aria-describedby": "contract-name-help-block" %> +
Lorem ipsum dolor sit amet, consectetur adip +elit, sed do eiusmod tempor incididunt
+
-
- <%= label :external_libraries, :library1, gettext("1 Library Address") %> - <%= text_input :external_libraries, :library1_address, class: "form-control", "aria-describedby": "contract-name-help-block" %> +
+
+ <%= label :external_libraries, :library1, gettext("1 Library Address") %> + <%= text_input :external_libraries, :library1_address, class: "form-control", "aria-describedby": "contract-name-help-block" %> +
Lorem ipsum dolor sit amet, consectetur adip +elit, sed do eiusmod tempor incididunt
+
-
- <%= label :external_libraries, :library2, gettext("2 Library Name") %> - <%= text_input :external_libraries, :library2_name, class: "form-control", "aria-describedby": "contract-name-help-block" %> +
+
+ <%= label :external_libraries, :library2, gettext("2 Library Name") %> + <%= text_input :external_libraries, :library2_name, class: "form-control", "aria-describedby": "contract-name-help-block" %> +
Lorem ipsum dolor sit amet, consectetur adip +elit, sed do eiusmod tempor incididunt
+
-
- <%= label :external_libraries, :library2, gettext("2 Library Address") %> - <%= text_input :external_libraries, :library2_address, class: "form-control", "aria-describedby": "contract-name-help-block" %> +
+
+ <%= label :external_libraries, :library2, gettext("2 Library Address") %> + <%= text_input :external_libraries, :library2_address, class: "form-control", "aria-describedby": "contract-name-help-block" %> +
Lorem ipsum dolor sit amet, consectetur adip +elit, sed do eiusmod tempor incididunt
+
-
- <%= label :external_libraries, :library3, gettext("3 Library Name") %> - <%= text_input :external_libraries, :library3_name, class: "form-control", "aria-describedby": "contract-name-help-block" %> +
+
+ <%= label :external_libraries, :library3, gettext("3 Library Name") %> + <%= text_input :external_libraries, :library3_name, class: "form-control", "aria-describedby": "contract-name-help-block" %> +
Lorem ipsum dolor sit amet, consectetur adip +elit, sed do eiusmod tempor incididunt
+
-
- <%= label :external_libraries, :library3, gettext("3 Library Address") %> - <%= text_input :external_libraries, :library3_address, class: "form-control", "aria-describedby": "contract-name-help-block" %> +
+
+ <%= label :external_libraries, :library3, gettext("3 Library Address") %> + <%= text_input :external_libraries, :library3_address, class: "form-control", "aria-describedby": "contract-name-help-block" %> +
Lorem ipsum dolor sit amet, consectetur adip +elit, sed do eiusmod tempor incididunt
+
-
- <%= label :external_libraries, :library4, gettext("4 Library Name") %> - <%= text_input :external_libraries, :library4_name, class: "form-control", "aria-describedby": "contract-name-help-block" %> +
+
+ <%= label :external_libraries, :library4, gettext("4 Library Name") %> + <%= text_input :external_libraries, :library4_name, class: "form-control", "aria-describedby": "contract-name-help-block" %> +
Lorem ipsum dolor sit amet, consectetur adip +elit, sed do eiusmod tempor incididunt
+
-
- <%= label :external_libraries, :library4, gettext("4 Library Address") %> - <%= text_input :external_libraries, :library4_address, class: "form-control", "aria-describedby": "contract-name-help-block" %> +
+
+ <%= label :external_libraries, :library4, gettext("4 Library Address") %> + <%= text_input :external_libraries, :library4_address, class: "form-control", "aria-describedby": "contract-name-help-block" %> +
Lorem ipsum dolor sit amet, consectetur adip +elit, sed do eiusmod tempor incididunt
+
-
- <%= label :external_libraries, :library5, gettext("5 Library Name") %> - <%= text_input :external_libraries, :library5_name, class: "form-control", "aria-describedby": "contract-name-help-block" %> +
+
+ <%= label :external_libraries, :library5, gettext("5 Library Name") %> + <%= text_input :external_libraries, :library5_name, class: "form-control", "aria-describedby": "contract-name-help-block" %> +
Lorem ipsum dolor sit amet, consectetur adip +elit, sed do eiusmod tempor incididunt
+
-
- <%= label f, :library5, gettext("5 Library Address") %> - <%= text_input f, :library5_address, class: "form-control", "aria-describedby": "contract-name-help-block" %> +
+
+ <%= label f, :library5, gettext("5 Library Address") %> + <%= text_input f, :library5_address, class: "form-control", "aria-describedby": "contract-name-help-block" %> +
Lorem ipsum dolor sit amet, consectetur adip +elit, sed do eiusmod tempor incididunt
+
-
+