Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Dan updates for post mvp dbs#1117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
chillenberger merged 3 commits intomasterfromdan-updates-for-post-mvp-dbs
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,19 +4,8 @@ div[data-controller="inputs-range-group"] {
}

.hourly-rate {
display:flex;
flex-direction:row;
background-color:#{$gray-900};
border-radius:$border-radius;
padding:8px4px;

color:#{$gray-400};
text-align:center;
font-size:18px;
font-style:normal;
font-weight:700;
line-height:24px;
letter-spacing:0.18px;
}

.cost {
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -42,12 +42,14 @@ <h6 class="h6"><%- title %></h6>
<divclass="tick-unit">
<divclass="tick"data-inputs-range-group-target="tick"></div>

<!-- large screen content -->
<divclass="d-none d-lg-flex flex-column text-nowrap mt-2 tick-text"data-inputs-range-group-target="tickText">
<% for info in item { %>
<divclass="legal-text fw-bold"><%- info %></div>
<% } %>
</div>

<!-- small screen content -->
<divclass="d-block d-lg-none">
<divclass="flex-column text-nowrap mt-2 tick-text"data-inputs-range-group-target="smScreenText">
<% for info in item { %>
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,8 +4,16 @@ export default class extends Controller {
statictargets=["input","value"]

choose(e){
this.inputTarget.value=e.target.innerHTML
this.valueTarget.innerHTML=e.target.innerHTML
this.setValue(e.target.innerHTML)
}

resetSelect(){
this.setValue(this.element.dataset.initial)
}

setValue(value){
this.inputTarget.value=value
this.valueTarget.innerHTML=value
this.inputTarget.dispatchEvent(newEvent('change'))
}
}
4 changes: 2 additions & 2 deletionspgml-dashboard/src/components/inputs/select/template.html
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,7 +2,7 @@
use crate::components::dropdown::Dropdown;
use crate::components::stimulus::stimulus_target::StimulusTarget;
%>
<divdata-controller="inputs-select">
<divdata-controller="inputs-select"data-initial="<%- value.clone() %>">

<% let mut dropdown = Dropdown::new()
.items(options)
Expand All@@ -29,5 +29,5 @@

<%+ dropdown %>

<inputtype="hidden"name="<%= name %>"value="<%= value %>"data-inputs-select-target="input"<%- value_target %> data-action="<%- action %>"/>
<inputtype="hidden"name="<%= name %>"value="<%= value %>"data-inputs-select-target="input"<%- value_target %> data-action="<%- action %> reset->inputs-select#resetSelect"/>
</div>
4 changes: 2 additions & 2 deletionspgml-dashboard/src/components/inputs/switch/mod.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -60,8 +60,8 @@ impl Switch {
self
}

pubfnstart_toggled(mutself) ->Switch{
self.initial_state =State::Right;
pubfndefault_position(mutself,state:State) ->Switch{
self.initial_state =state;
self
}

Expand Down
3 changes: 2 additions & 1 deletionpgml-dashboard/src/components/inputs/switch/switch.scss
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,11 +7,12 @@ div[data-controller="inputs-switch"] {
}

.label {
padding:8px20px;
padding:8px40px;
border-radius:5rem;
text-align:center;
display:flex;
justify-content:center;
align-items:center;
@extend.gap-2;
}

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -33,4 +33,10 @@ div[data-controller="inputs-text-editable-header"] {
padding:0px;
margin-bottom:-2px;// compensate for border space
}

#title {
&.error {
border-bottom:1pxsolid#{$error}
}
}
}
Original file line numberDiff line numberDiff line change
Expand Up@@ -31,9 +31,11 @@ export default class extends Controller {
error(e){
this.errorTarget.innerHTML=e.detail
this.errorTarget.style.display="block"
this.headerTarget.classList.add("error")
}

clear(){
this.errorTarget.style.display="none"
this.headerTarget.classList.remove("error")
}
}
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,7 +5,7 @@
<divclass="editable-header-container"style="display: block"
data-action="click->inputs-text-editable-header#toggleEditor">
<<%= header_type.to_string() %> class="align-items-center<%= header_type.to_string() %> d-flex gap-3">
<spandata-inputs-text-editable-header-target="header">
<spandata-inputs-text-editable-header-target="header"id="title">
<%= value %>
</span>

Expand Down
23 changes: 23 additions & 0 deletionspgml-dashboard/src/components/lists/item/mod.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
use pgml_components::component;
use sailfish::TemplateOnce;

#[derive(TemplateOnce,Default)]
#[template(path ="lists/item/template.html")]
pubstructItem{
value:String,
}

implItem{
pubfnnew() ->Item{
Item{
value:String::from("Your list item"),
}
}

pubfnvalue(mutself,value:&str) ->Item{
self.value = value.into();
self
}
}

component!(Item);
4 changes: 4 additions & 0 deletionspgml-dashboard/src/components/lists/item/template.html
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
<divclass="list-group-item d-flex align-items-center gap-2">
<imgloading="lazy"src="/dashboard/static/images/icons/checkmark.svg"width="15"height="11"alt="Checkmark">
<%- value %>
</div>
6 changes: 6 additions & 0 deletionspgml-dashboard/src/components/lists/mod.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
// This file is automatically generated.
// You shouldn't modify it manually.

// src/components/lists/item
pubmod item;
pubuse item::Item;
3 changes: 3 additions & 0 deletionspgml-dashboard/src/components/mod.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -32,6 +32,9 @@ pub mod inputs;
pubmod left_nav_menu;
pubuse left_nav_menu::LeftNavMenu;

// src/components/lists
pubmod lists;

// src/components/modal
pubmod modal;
pubuse modal::Modal;
Expand Down
13 changes: 12 additions & 1 deletionpgml-dashboard/static/css/scss/abstracts/variables.scss
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -97,13 +97,24 @@ $slate-shade-800: #2B274C;
$slate-shade-900:#1D1A33;
$slate-shade-1000:#0E0D19;

$magenta-shade-100:#E6008A;
$magenta-shade-200:#cf007c;
$magenta-shade-300:#b8006e;
$magenta-shade-400:#a10060;
$magenta-shade-500:#8a0052;
$magenta-shade-600:#730045;
$magenta-shade-700:#5c0037;
$magenta-shade-800:#450029;
$magenta-shade-900:#2e001b;
$magenta-shade-1000:#17000d;

// Colors
$primary:#0D0D0E;
$secondary:$gray-100;
$danger:$peach-shade-100;
$error:$peach-shade-100;
$purple:$slate-tint-100;
$pink:#e7477c;
$pink:$magenta-shade-100;
$hp-white:#{$gray-200};

// Background Colors
Expand Down
3 changes: 1 addition & 2 deletionspgml-dashboard/static/css/scss/components/_badges.scss
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,8 +5,7 @@
align-items:center;
}

.version-badge {
@extend.badge;
.eyebrow-badge {
text-transform:uppercase;
color:#{$pink};
}
Expand Down
17 changes: 17 additions & 0 deletionspgml-dashboard/static/css/scss/components/_forms.scss
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -256,3 +256,20 @@
background:transparent;
caret-color:#{$input-color};
}

.hourly-rate {
display:flex;
flex-direction:row;
gap:.5rem;
background-color:#{$gray-900};
border-radius:$border-radius;
padding:16px20px;

color:#{$gray-400};
text-align:center;
font-size:18px;
font-style:normal;
font-weight:700;
line-height:24px;
letter-spacing:0.18px;
}
4 changes: 2 additions & 2 deletionspgml-dashboard/templates/content/playground.html
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@
use crate::components::stimulus::stimulus_action::StimulusAction;
use crate::components::stimulus::stimulus_action::StimulusEvents;
use crate::components::inputs::select::Select;
use crate::components::inputs::switch::Switch;
use crate::components::inputs::switch::{Switch, State};
%>

<div class="min-height: 100vh;" data-controller="playground">
Expand DownExpand Up@@ -223,7 +223,7 @@ <h3 class="h3">Inputs</h3>
.name("switch"))
.left("CPU", "memory")
.right("GPU", "mode_fan")
.start_toggled() %>
.default_position(State::Right) %>
</div>
<div>
<button data-action="click->playground#resetSwitch">Reset Switch</button>
Expand Down
2 changes: 1 addition & 1 deletionpgml-dashboard/templates/layout/web_app_base.html
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -30,7 +30,7 @@
<%+ WebAppLeftNav::new( upper_left_nav, lower_left_nav, dropdown_nav ) %>

<divclass="clear-from-under-navbar flex-grow-1 min-vw-0">
<divclass="px-5 py-3"style="position: absolute">
<divclass="px-4 px-sm-5 py-3"style="position: absolute">
<%- Breadcrumbs::render( breadcrumbs ) %>
</div>

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp