Commit 334db1ad authored by Michael Herold's avatar Michael Herold
Browse files

Design optimizations, adds cantarell

parent 17d88848
v0.6.0
v0.7.0-unpublished:
- Adds cantarell as web font
- Updated dark theme
- Style fixes for radio lists
v0.6.0:
- Fixes missing unicode support for requests.
- Adds config fields 'site_information_url' and 'footer'
- [dns] Adds support for NS, SSHFP and TXT resource records
- [dns] Adds support for entering IDNs as UTF-8
- [dns] IDNs are displayed as UTF-8 if bijection exists
- [login_http] Adds support for login via email address as user account
v0.5.0
v0.5.0:
- Fixes missing generation of global gettext .mo-files.
This fixes missing l10n in top bar also.
- Removes static css files and adds generation to Makefile
- Updates to new version of hemio\html and hemio\form
v0.4.3
v0.4.3:
- Fixes crash on missing 'Accept-Language' HTTP header.
v0.4.2
v0.4.2:
- First release used in production
- Adds GPL LICENSE
- Fixes dependencies to versions
all: composer l10n css version
dev: composer-dev l10n css version
dev: composer-dev l10n css version fonts
l10n:
# generate l10n
./gettextfmtall . ./locale edentata
css:
scss --sourcemap=none --force --update src/scss:src/htdocs/static/design
scss --style compressed --sourcemap=none --force --update src/scss:src/htdocs/static/design
composer:
composer install --no-dev
......@@ -21,8 +20,10 @@ version:
fonts:
cd src/htdocs/static/design && \
cp /usr/share/doc/fonts-cantarell/copyright ./LICENSE-CANTARELL
cp /usr/share/doc/fonts-cantarell/copyright ./LICENSE-CANTARELL && \
cp /usr/share/fonts/opentype/cantarell/*.otf ./ && \
for f in *.otf; do sfnt2woff $$f; done && \
rm *.otf
test:
phpunit
<?php
/*
* Copyright (C) 2015 Michael Herold <quabla@hemio.de>
*
......@@ -26,15 +27,14 @@ use hemio\form;
*
* @author Michael Herold <quabla@hemio.de>
*/
class FieldRadioList extends form\Container
{
class FieldRadioList extends form\Container {
protected $name;
protected $template;
protected $title;
public function __construct($name, $title = null)
{
$this->name = $name;
public function __construct($name, $title = null) {
$this->name = $name;
$this->title = $title;
$this['controls'] = new form\Container();
......@@ -48,19 +48,18 @@ class FieldRadioList extends form\Container
$this->template = new form\template\FormPlainControl;
$this->template->setPostInitHook(function ($template) {
$id = $template->field->getHtmlId();
$id = $template->field->getHtmlId();
$template->getControl()->addCssClass('list');
$template->field->getInheritableAppendage('label')
->setAttribute('for', $id);
->setAttribute('for', $id);
$this['style'][] = new html\Str(
'input:not(:checked)[id='.$id.'] ~ * *[for='.$id.'] { '.
'color: inherit; background-color: inherit; }'
'input:not(:checked)[id=' . $id . '] ~ * *[for=' . $id . '] { ' .
'color: inherit; background-color: inherit; }'
);
});
}
public function addOption($value, $content = null)
{
public function addOption($value, $content = null) {
if ($content === null)
$content = $value;
......@@ -70,17 +69,18 @@ class FieldRadioList extends form\Container
$radio = new form\FieldRadio($this->name, $title, $value);
$radio->addInheritableAppendage(
FormPost::FORM_FIELD_TEMPLATE.'_RADIO', $this->template
FormPost::FORM_FIELD_TEMPLATE . '_RADIO', $this->template
);
$this['controls'][] = $radio;
$li = new html\Li;
$li->addCssClass('listbox_link');
$li->addCssClass('listbox_link_color');
$label = new html\Label;
$label[] = new html\Str($content);
$label->addCssClass('listbox_content');
$label = new html\Label;
$label->addChild(new html\Span())
->addChild(new html\Str($content));
$label->addCssClass('listbox_link');
$radio->addInheritableAppendage('label', $label);
$li[] = $label;
......@@ -90,8 +90,8 @@ class FieldRadioList extends form\Container
return $radio;
}
public function getValueUser()
{
public function getValueUser() {
return $this['controls'][0]->getValueUser();
}
}
......@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
body {
font-family: Cantarell, sans-serif;
font-family: Cantarell, 'Cantarell-Woff', sans-serif;
font-size: 0.9em;
hyphens: auto;
-moz-hyphens: auto;
......
@font-face {
font-family: 'Cantarell';
font-style: normal;
font-weight: 400;
src: url('Cantarell-Bold.woff') format('woff');
font-family: 'Cantarell-Woff';
font-style: normal;
font-weight: 400;
src: url('Cantarell-Regular.woff') format('woff');
}
@font-face {
font-family: 'Cantarell';
font-style: normal;
font-weight: 700;
src: url('Cantarell-Bold.woff') format('woff');
font-family: 'Cantarell-Woff';
font-style: normal;
font-weight: 700;
src: url('Cantarell-Bold.woff') format('woff');
}
......@@ -27,6 +27,11 @@ nav {
@extend .window;
}
a {
color: inherit;
text-decoration: none;
}
/*** label and input basics ***/
form p {
......
......@@ -17,6 +17,7 @@ $control-background-color-lighten-1: 1%;
$control-background-color-lighten-2: 2.5%;
$control-border-color: rgb(42, 44, 46);
$control-shadow-color: rgb(83, 86, 87);
$switch-color-notchecked: #EEEEEE;
$select-button-image: "select_dark.svg";
......
......@@ -76,16 +76,20 @@ ul.listbox li:last-child {
flex-basis: 100%;
}
.listbox_link_color {
color: inherit;
}
.listbox_link {
@extend .listbox_content;
text-decoration: none;
color: inherit;
@extend .listbox_link_color;
transition-property: background-color;
transition-duration: 400ms;
}
.listbox_link:hover, .listbox_link:focus {
.listbox_link_color:hover, .listbox_link_color:focus {
color: $text-color;
background-color: darken($list-background-color, 9%);
}
......
......@@ -27,7 +27,9 @@ input[type=radio].list {
opacity: 0;
}
ul.radio li label {
background-color: $sidebar-selected-color;
color: white;
ul.radio li {
label, label:hover {
background-color: lighten($button-suggested-color, 15%);
color: $button-suggested-text-color;
}
}
......@@ -62,12 +62,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// selected (clickable part)
.selectbox input:checked + p label {
background: lighten($button-suggested-color, 20%);
background: lighten($button-suggested-color, 15%);
}
// selected and hover
.selectbox input:checked + p label:hover {
background: lighten($button-suggested-color, 30%);
background: lighten($button-suggested-color, 25%);
}
// options (buttons below the scroll area)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment