Skip to content

Commit

Permalink
font field
Browse files Browse the repository at this point in the history
  • Loading branch information
kawshar committed Jun 24, 2020
1 parent 4a538ad commit 11eeda2
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 17 deletions.
2 changes: 1 addition & 1 deletion language/en-GB/en-GB.tpl_shaper_helixultimate.ini
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ HELIX_ULTIMATE_GROUP_CUSTOM_FONT="Custom"
HELIX_ULTIMATE_GROUP_NAV_FONT="Navigation"
HELIX_ULTIMATE_GROUP_UPDATE_FONT="Update Font List"
HELIX_ULTIMATE_FONT_WEIGHT="Weight"
HELIX_ULTIMATE_FONT_FAMILY="Family"
HELIX_ULTIMATE_FONT_FAMILY="Font"
HELIX_ULTIMATE_FONT_COLOR="Color"
HELIX_ULTIMATE_FONT_STYLE="Style"
HELIX_ULTIMATE_FONT_DECORATION="Decoration"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3545,3 +3545,8 @@ input[type='color'] {
padding: 15px;
background: rgba(51, 102, 255, 0.15);
}

.hu-typography-wrapper .minicolors-theme-bootstrap .minicolors-panel {
left: auto !important;
right: 0;
}
4 changes: 3 additions & 1 deletion plugins/system/helixultimate/assets/css/admin/helper.css
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,13 @@
border-bottom-left-radius: 0;
}

.hu-subgroup .hu-input-group > .form-control {
.hu-subgroup .hu-input-group > .form-control,
.hu-narrow-input .form-control {
padding-left: 8px;
padding-right: 8px;
}


/*Display*/
.hu-sr-only {
visibility: hidden;
Expand Down
30 changes: 15 additions & 15 deletions plugins/system/helixultimate/src/fields/helixfont.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ protected function getInput()
/**
* Start Fonts List row
*/
$html .= '<div class="hu-webfont-family hu-mb-2">';
$html .= '<div class="hu-webfont-family hu-mb-3">';
$html .= $this->renderFontsList($systemFonts, $value, $items);
$html .= '</div>';

Expand All @@ -119,21 +119,21 @@ protected function getInput()
/**
* Start Font Weight
*/
$html .= '<div class="col-6 hu-mb-2">';
$html .= '<div class="col-5 hu-mb-3">';
$html .= $this->renderFontWeight($fontWeights, $value);
$html .= '</div>';

/**
* Start Font Size
*/
$html .= '<div class="col-3 hu-mb-2">';
$html .= '<div class="col-3 hu-mb-3 hu-narrow-input">';
$html .= $this->renderFontSize($value);
$html .= '</div>';

/**
* Start Font Color
*/
$html .= '<div class="col-3 hu-mb-2">';
$html .= '<div class="col-4 hu-mb-3 hu-narrow-input">';
$html .= $this->renderFontColor($value);
$html .= '</div>';

Expand All @@ -147,21 +147,21 @@ protected function getInput()
/**
* Font subset section
*/
$html .= '<div class="col-6 hu-mb-2">';
$html .= '<div class="col-5 hu-mb-3">';
$html .= $this->renderFontSubset($systemFonts, $font, $value);
$html .= '</div>';

/**
* Set line height
*/
$html .= '<div class="col-3 hu-mb-2">';
$html .= '<div class="col-3 hu-mb-3 hu-narrow-input">';
$html .= $this->renderLineHeight($value);
$html .= '</div>';

/**
* Set Letter Spacing
*/
$html .= '<div class="col-3 hu-mb-2">';
$html .= '<div class="col-4 hu-mb-3 hu-narrow-input">';
$html .= $this->renderLetterSpacing($value);
$html .= '</div>';

Expand All @@ -175,14 +175,14 @@ protected function getInput()
/**
* Text Decoration
*/
$html .= '<div class="col-6 hu-mb-2">';
$html .= '<div class="col-6 hu-mb-3">';
$html .= $this->renderTextDecoration($value);
$html .= '</div>';

/**
* Font Alignment
*/
$html .= '<div class="col-6 hu-mb-2">';
$html .= '<div class="col-6 hu-mb-3">';
$html .= $this->renderFontAlignment($value);
$html .= '</div>';

Expand Down Expand Up @@ -300,9 +300,9 @@ private function renderFontSize($value)
$fontSize_xs = (isset($value->fontSize_xs)) ? $value->fontSize_xs : '';
$html .= '<div class="hu-webfont-size">';
$html .= '<label class="hu-mb-2">' . Text::_('HELIX_ULTIMATE_FONT_SIZE') . '</label>';
$html .= '<input type="number" value="' . $fontSize . '" class="hu-webfont-size-input active" min="6" max="200">';
$html .= '<input type="number" value="' . $fontSize_sm . '" class="hu-webfont-size-input-sm" min="6" max="200">';
$html .= '<input type="number" value="' . $fontSize_xs . '" class="hu-webfont-size-input-xs" min="6" max="200">';
$html .= '<input type="number" value="' . $fontSize . '" class="form-control hu-webfont-size-input active" min="6" max="200">';
$html .= '<input type="number" value="' . $fontSize_sm . '" class="form-control hu-webfont-size-input-sm" min="6" max="200">';
$html .= '<input type="number" value="' . $fontSize_xs . '" class="form-control hu-webfont-size-input-xs" min="6" max="200">';
$html .= '</div>';

return $html;
Expand All @@ -314,7 +314,7 @@ private function renderFontColor($value)
$html = '';
$html .= '<div class="hu-font-color">';
$html .= '<label class="hu-mb-2">' . Text::_('HELIX_ULTIMATE_FONT_COLOR') . '</label>';
$html .= '<input type="text" class="hu-font-color-input minicolors" id="hu-menu-badge-body-font" placeholder="Font Color" value="' . $color . '" />';
$html .= '<input type="text" class="form-control hu-font-color-input minicolors" id="hu-menu-badge-body-font" placeholder="Font Color" value="' . $color . '" />';
$html .= '</div>';

return $html;
Expand Down Expand Up @@ -346,7 +346,7 @@ private function renderLineHeight($value)
$html = '';
$html .= '<div class="hu-font-line-height">';
$html .= '<label class="hu-mb-2">' . Text::_('HELIX_ULTIMATE_FONT_LINE_HEIGHT') . '</label>';
$html .= '<input type="number" class="hu-font-line-height-input" min="1" max="200" value="' . $height . '" />';
$html .= '<input type="number" class="form-control hu-font-line-height-input" min="1" max="200" value="' . $height . '" />';
$html .= '</div>';

return $html;
Expand All @@ -358,7 +358,7 @@ private function renderLetterSpacing($value)
$html = '';
$html .= '<div class="hu-font-letter-spacing">';
$html .= '<label class="hu-mb-2">' . Text::_('HELIX_ULTIMATE_FONT_LETTER_SPACING') . '</label>';
$html .= '<input type="text" class="hu-font-letter-spacing-input" value="' . $spacing . '" />';
$html .= '<input type="number" class="form-control hu-font-letter-spacing-input" value="' . $spacing . '" step=".1" />';
$html .= '</div>';

return $html;
Expand Down

0 comments on commit 11eeda2

Please sign in to comment.