Add vikunja design

Add drawer menu
This commit is contained in:
Jonas Franz 2018-09-15 14:18:24 +02:00
parent f3fda094f3
commit 879a24ad22
No known key found for this signature in database
GPG Key ID: 506AEEBE80BEDECD
37 changed files with 113 additions and 28 deletions

View File

@ -14,7 +14,7 @@
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="fluttering_vikunja"
android:label="Vikunja"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
@ -36,4 +36,4 @@
</intent-filter>
</activity>
</application>
</manifest>
</manifest>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 544 B

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 442 B

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 721 B

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#FF455486</color>
</resources>

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

BIN
assets/vikunja_ios.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
assets/vikunja_logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

View File

@ -439,4 +439,4 @@
/* End XCConfigurationList section */
};
rootObject = 97C146E61CF9000F007C117D /* Project object */;
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 564 B

After

Width:  |  Height:  |  Size: 622 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 914 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:fluttering_vikunja/style.dart';
void main() => runApp(new MyApp());
@ -7,19 +8,9 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Flutter Demo',
theme: new ThemeData(
// This is the theme of your application.
//
// Try running your application with "flutter run". You'll see the
// application has a blue toolbar. Then, without quitting the app, try
// changing the primarySwatch below to Colors.green and then invoke
// "hot reload" (press "r" in the console where you ran "flutter run",
// or press Run > Flutter Hot Reload in IntelliJ). Notice that the
// counter didn't reset back to zero; the application is not restarted.
primarySwatch: Colors.blue,
),
home: new MyHomePage(title: 'Flutter Demo Home Page'),
title: 'Vikunja',
theme: buildVikunjaTheme(),
home: new MyHomePage(title: 'Vikunja'),
);
}
}
@ -70,10 +61,47 @@ class _MyHomePageState extends State<MyHomePage> {
// the App.build method, and use it to set our appbar title.
title: new Text(widget.title),
),
drawer: Drawer(
child: ListView(
children: <Widget>[
new UserAccountsDrawerHeader(
decoration: BoxDecoration(
image: new DecorationImage(
image: AssetImage('assets/graphics/background.jpg'),
repeat: ImageRepeat.repeat
),
),
accountName: new Text(
'Max Mustermann',
style: TextStyle(color: Colors.black),
),
accountEmail: new Text(
'max@try.vikunja.io',
style: TextStyle(color: Colors.black),
),
otherAccountsPictures: <Widget>[
GestureDetector(
child: Semantics(
label: 'Switch to Fritz',
child: const CircleAvatar(
)
),
)
],
),
ListTile(
title: new Text('Namespace A'),
)
],
)
),
body: new Center(
// Center is a layout widget. It takes a single child and positions it
// in the middle of the parent.
child: new Column(
child: new Container(
padding: EdgeInsets.only(left: 16.0),
child: new Column(
// Column is also layout widget. It takes a list of children and
// arranges them vertically. By default, it sizes itself to fit its
// children horizontally, and tries to be as tall as its parent.
@ -87,22 +115,22 @@ class _MyHomePageState extends State<MyHomePage> {
// center the children vertically; the main axis here is the vertical
// axis because Columns are vertical (the cross axis would be
// horizontal).
mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
new Text(
'You have pushed the button this many times:',
new Container(
padding: EdgeInsets.only(top: 32.0),
child: new Text(
'Welcome to Vikunja',
style: Theme.of(context).textTheme.headline,
),
),
new Text(
'$_counter',
style: Theme.of(context).textTheme.display1,
'Please select a namespace by clicking the ☰ icon.',
style: Theme.of(context).textTheme.subhead
),
],
),
),
floatingActionButton: new FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: new Icon(Icons.add),
)
)
), // This trailing comma makes auto-formatting nicer for build methods.
);
}

31
lib/style.dart Normal file
View File

@ -0,0 +1,31 @@
import 'package:flutter/material.dart';
const vBlue = Color(0xFF455486);
const vBlueLight = Color(0xFF7480b7);
const vBlueDark = Color(0xFF152c5a);
const vBlack = Color(0xFFFFFFFF);
ThemeData buildVikunjaTheme() {
var base = ThemeData.light();
return base.copyWith(
primaryColor: vBlue,
primaryColorLight: vBlueLight,
primaryColorDark: vBlueDark,
textTheme: base.textTheme.copyWith(
headline: base.textTheme.headline.copyWith(
fontFamily: 'Quicksand',
fontSize: 72.0,
),
subhead: base.textTheme.subhead.copyWith(
fontFamily: 'Quicksand',
fontSize: 24.0,
),
title: base.textTheme.title.copyWith(
fontFamily: 'Quicksand',
),
body1: base.textTheme.body1.copyWith(
fontFamily: 'Quicksand',
)
)
);
}

View File

@ -23,6 +23,16 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
flutter_launcher_icons: "^0.6.1"
flutter_icons:
image_path: "assets/vikunja_logo.png"
image_path_ios: "assets/vikunja_ios.png"
android: true
ios: true
adaptive_icon_background: "#FF455486"
adaptive_icon_foreground: "assets/vikunja_logo_adaptive.png"
# For information on the generic Dart part of this file, see the
@ -66,3 +76,10 @@ flutter:
#
# For details regarding fonts from package dependencies,
# see https://flutter.io/custom-fonts/#from-packages
assets:
- assets/graphics/background.jpg
fonts:
- family: Quicksand
fonts:
- asset: assets/fonts/quicksand-v7-latin-regular.ttf