Initial commit

remotes/1670549442061406635/tmp_refs/heads/master
Gitea 7 years ago
commit 275da56bb5
  1. 12
      .babelrc
  2. 63
      .flowconfig
  3. 3
      .gitignore
  4. 1
      .watchmanconfig
  5. 29
      App.js
  6. 9
      App.test.js
  7. 9
      AppNavigator.js
  8. 21
      Main.js
  9. 220
      README.md
  10. 21
      app.json
  11. BIN
      assets/img/drawer-cover.png
  12. BIN
      assets/img/logo-kitchen-sink.png
  13. 29
      components/DefaultHeader.js
  14. 28
      drawer/Drawer.js
  15. 95
      drawer/Sidebar.js
  16. 19
      drawer/siebar-theme.js
  17. 61
      drawer/style.js
  18. 30
      package.json
  19. 24
      pages/Home.js
  20. 39
      tabs/Klausurplan.js
  21. 33
      tabs/Stundenliste.js
  22. 32
      tabs/Stundenplan.js
  23. 25
      tabs/Vertretungsplan.js
  24. 5712
      yarn.lock

@ -0,0 +1,12 @@
{
"presets": [
"babel-preset-expo"
],
"env": {
"development": {
"plugins": [
"transform-react-jsx-source"
]
}
}
}

@ -0,0 +1,63 @@
[ignore]
; We fork some components by platform
.*/*[.]android.js
; Ignore "BUCK" generated dirs
<PROJECT_ROOT>/\.buckd/
; Ignore unexpected extra "@providesModule"
.*/node_modules/.*/node_modules/fbjs/.*
; Ignore duplicate module providers
; For RN Apps installed via npm, "Libraries" folder is inside
; "node_modules/react-native" but in the source repo it is in the root
.*/Libraries/react-native/React.js
.*/Libraries/react-native/ReactNative.js
; Additional create-react-native-app ignores
; Ignore duplicate module providers
.*/node_modules/fbemitter/lib/*
; Ignore misbehaving dev-dependencies
.*/node_modules/xdl/build/*
.*/node_modules/reqwest/tests/*
; Ignore missing expo-sdk dependencies (temporarily)
; https://github.com/expo/expo/issues/162
.*/node_modules/expo/src/*
; Ignore react-native-fbads dependency of the expo sdk
.*/node_modules/react-native-fbads/*
[include]
[libs]
node_modules/react-native/Libraries/react-native/react-native-interface.js
node_modules/react-native/flow
flow/
[options]
module.system=haste
emoji=true
experimental.strict_type_args=true
munge_underscores=true
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FixMe
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-7]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-7]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
unsafe.enable_getters_and_setters=true
[version]
^0.47.0

3
.gitignore vendored

@ -0,0 +1,3 @@
node_modules/
.expo/
npm-debug.*

@ -0,0 +1,29 @@
import {AppLoading, Font,} from 'expo';
import React, {Text} from "react";
import App from "./Main";
export default class App1 extends React.Component {
constructor() {
super();
this.state = {
isReady: false
};
}
async componentWillMount() {
this.setState({isReady: false});
await Font.loadAsync({
Roboto: require("native-base/Fonts/Roboto.ttf"),
Roboto_medium: require("native-base/Fonts/Roboto_medium.ttf")
});
this.setState({isReady: true});
}
render() {
if (!this.state.isReady) {
return <AppLoading/>
}
return <App/>;
}
}

@ -0,0 +1,9 @@
import React from 'react';
import App from './App';
import renderer from 'react-test-renderer';
it('renders without crashing', () => {
const rendered = renderer.create(<App/>).toJSON();
expect(rendered).toBeTruthy();
});

@ -0,0 +1,9 @@
import React, {Component} from "react";
import {BackAndroid, Platform, StatusBar} from "react-native";
import {Drawer, variables} from "native-base";
class AppNavigator extends Component {
render() {
return;
}
}

@ -0,0 +1,21 @@
import React from 'react';
import {AppRegistry, Platform, Text,} from 'react-native';
import {Root} from "native-base";
import {StackNavigator} from "react-navigation";
import Drawer from './drawer/Drawer';
export const AppNavigator = StackNavigator({
Drawer: {screen: Drawer}
},
{
initialRouteName: "Drawer",
headerMode: "none",
});
AppRegistry.registerComponent('Organizer', () => AppNavigator);
export default () =>
<Root>
<AppNavigator/>
</Root>;

@ -0,0 +1,220 @@
This project was bootstrapped with [Create React Native App](https://github.com/react-community/create-react-native-app).
Below you'll find information about performing common tasks. The most recent version of this guide is available [here](https://github.com/react-community/create-react-native-app/blob/master/react-native-scripts/template/README.md).
## Table of Contents
* [Updating to New Releases](#updating-to-new-releases)
* [Available Scripts](#available-scripts)
* [npm start](#npm-start)
* [npm test](#npm-test)
* [npm run ios](#npm-run-ios)
* [npm run android](#npm-run-android)
* [npm run eject](#npm-run-eject)
* [Writing and Running Tests](#writing-and-running-tests)
* [Environment Variables](#environment-variables)
* [Configuring Packager IP Address](#configuring-packager-ip-address)
* [Adding Flow](#adding-flow)
* [Customizing App Display Name and Icon](#customizing-app-display-name-and-icon)
* [Sharing and Deployment](#sharing-and-deployment)
* [Publishing to Expo's React Native Community](#publishing-to-expos-react-native-community)
* [Building an Expo "standalone" app](#building-an-expo-standalone-app)
* [Ejecting from Create React Native App](#ejecting-from-create-react-native-app)
* [Build Dependencies (Xcode & Android Studio)](#build-dependencies-xcode-android-studio)
* [Should I Use ExpoKit?](#should-i-use-expokit)
* [Troubleshooting](#troubleshooting)
* [Networking](#networking)
* [iOS Simulator won't open](#ios-simulator-wont-open)
* [QR Code does not scan](#qr-code-does-not-scan)
## Updating to New Releases
You should only need to update the global installation of `create-react-native-app` very rarely, ideally never.
Updating the `react-native-scripts` dependency of your app should be as simple as bumping the version number in `package.json` and reinstalling your project's dependencies.
Upgrading to a new version of React Native requires updating the `react-native`, `react`, and `expo` package versions, and setting the correct `sdkVersion` in `app.json`. See the [versioning guide](https://github.com/react-community/create-react-native-app/blob/master/VERSIONS.md) for up-to-date information about package version compatibility.
## Available Scripts
If Yarn was installed when the project was initialized, then dependencies will have been installed via Yarn, and you should probably use it to run these commands as well. Unlike dependency installation, command running syntax is identical for Yarn and NPM at the time of this writing.
### `npm start`
Runs your app in development mode.
Open it in the [Expo app](https://expo.io) on your phone to view it. It will reload if you save edits to your files, and you will see build errors and logs in the terminal.
Sometimes you may need to reset or clear the React Native packager's cache. To do so, you can pass the `--reset-cache` flag to the start script:
```
npm start -- --reset-cache
# or
yarn start -- --reset-cache
```
#### `npm test`
Runs the [jest](https://github.com/facebook/jest) test runner on your tests.
#### `npm run ios`
Like `npm start`, but also attempts to open your app in the iOS Simulator if you're on a Mac and have it installed.
#### `npm run android`
Like `npm start`, but also attempts to open your app on a connected Android device or emulator. Requires an installation of Android build tools (see [React Native docs](https://facebook.github.io/react-native/docs/getting-started.html) for detailed setup). We also recommend installing Genymotion as your Android emulator. Once you've finished setting up the native build environment, there are two options for making the right copy of `adb` available to Create React Native App:
##### Using Android Studio's `adb`
1. Make sure that you can run adb from your terminal.
2. Open Genymotion and navigate to `Settings -> ADB`. Select “Use custom Android SDK tools” and update with your [Android SDK directory](https://stackoverflow.com/questions/25176594/android-sdk-location).
##### Using Genymotion's `adb`
1. Find Genymotion’s copy of adb. On macOS for example, this is normally `/Applications/Genymotion.app/Contents/MacOS/tools/`.
2. Add the Genymotion tools directory to your path (instructions for [Mac](http://osxdaily.com/2014/08/14/add-new-path-to-path-command-line/), [Linux](http://www.computerhope.com/issues/ch001647.htm), and [Windows](https://www.howtogeek.com/118594/how-to-edit-your-system-path-for-easy-command-line-access/)).
3. Make sure that you can run adb from your terminal.
#### `npm run eject`
This will start the process of "ejecting" from Create React Native App's build scripts. You'll be asked a couple of questions about how you'd like to build your project.
**Warning:** Running eject is a permanent action (aside from whatever version control system you use). An ejected app will require you to have an [Xcode and/or Android Studio environment](https://facebook.github.io/react-native/docs/getting-started.html) set up.
## Customizing App Display Name and Icon
You can edit `app.json` to include [configuration keys](https://docs.expo.io/versions/latest/guides/configuration.html) under the `expo` key.
To change your app's display name, set the `expo.name` key in `app.json` to an appropriate string.
To set an app icon, set the `expo.icon` key in `app.json` to be either a local path or a URL. It's recommended that you use a 512x512 png file with transparency.
## Writing and Running Tests
This project is set up to use [jest](https://facebook.github.io/jest/) for tests. You can configure whatever testing strategy you like, but jest works out of the box. Create test files in directories called `__tests__` or with the `.test` extension to have the files loaded by jest. See the [the template project](https://github.com/react-community/create-react-native-app/blob/master/react-native-scripts/template/App.test.js) for an example test. The [jest documentation](https://facebook.github.io/jest/docs/getting-started.html) is also a wonderful resource, as is the [React Native testing tutorial](https://facebook.github.io/jest/docs/tutorial-react-native.html).
## Environment Variables
You can configure some of Create React Native App's behavior using environment variables.
### Configuring Packager IP Address
When starting your project, you'll see something like this for your project URL:
```
exp://192.168.0.2:19000
```
The "manifest" at that URL tells the Expo app how to retrieve and load your app's JavaScript bundle, so even if you load it in the app via a URL like `exp://localhost:19000`, the Expo client app will still try to retrieve your app at the IP address that the start script provides.
In some cases, this is less than ideal. This might be the case if you need to run your project inside of a virtual machine and you have to access the packager via a different IP address than the one which prints by default. In order to override the IP address or hostname that is detected by Create React Native App, you can specify your own hostname via the `REACT_NATIVE_PACKAGER_HOSTNAME` environment variable:
Mac and Linux:
```
REACT_NATIVE_PACKAGER_HOSTNAME='my-custom-ip-address-or-hostname' npm start
```
Windows:
```
set REACT_NATIVE_PACKAGER_HOSTNAME='my-custom-ip-address-or-hostname'
npm start
```
The above example would cause the development server to listen on `exp://my-custom-ip-address-or-hostname:19000`.
## Adding Flow
Flow is a static type checker that helps you write code with fewer bugs. Check out this [introduction to using static types in JavaScript](https://medium.com/@preethikasireddy/why-use-static-types-in-javascript-part-1-8382da1e0adb) if you are new to this concept.
React Native works with [Flow](http://flowtype.org/) out of the box, as long as your Flow version matches the one used in the version of React Native.
To add a local dependency to the correct Flow version to a Create React Native App project, follow these steps:
1. Find the Flow `[version]` at the bottom of the included [.flowconfig](.flowconfig)
2. Run `npm install --save-dev flow-bin@x.y.z` (or `yarn add --dev flow-bin@x.y.z`), where `x.y.z` is the .flowconfig version number.
3. Add `"flow": "flow"` to the `scripts` section of your `package.json`.
4. Add `// @flow` to any files you want to type check (for example, to `Main.js`).
Now you can run `npm run flow` (or `yarn flow`) to check the files for type errors.
You can optionally use a [plugin for your IDE or editor](https://flow.org/en/docs/editors/) for a better integrated experience.
To learn more about Flow, check out [its documentation](https://flow.org/).
## Sharing and Deployment
Create React Native App does a lot of work to make app setup and development simple and straightforward, but it's very difficult to do the same for deploying to Apple's App Store or Google's Play Store without relying on a hosted service.
### Publishing to Expo's React Native Community
Expo provides free hosting for the JS-only apps created by CRNA, allowing you to share your app through the Expo client app. This requires registration for an Expo account.
Install the `exp` command-line tool, and run the publish command:
```
$ npm i -g exp
$ exp publish
```
### Building an Expo "standalone" app
You can also use a service like [Expo's standalone builds](https://docs.expo.io/versions/latest/guides/building-standalone-apps.html) if you want to get an IPA/APK for distribution without having to build the native code yourself.
### Ejecting from Create React Native App
If you want to build and deploy your app yourself, you'll need to eject from CRNA and use Xcode and Android Studio.
This is usually as simple as running `npm run eject` in your project, which will walk you through the process. Make sure to install `react-native-cli` and follow the [native code getting started guide for React Native](https://facebook.github.io/react-native/docs/getting-started.html).
#### Should I Use ExpoKit?
If you have made use of Expo APIs while working on your project, then those API calls will stop working if you eject to a regular React Native project. If you want to continue using those APIs, you can eject to "React Native + ExpoKit" which will still allow you to build your own native code and continue using the Expo APIs. See the [ejecting guide](https://github.com/react-community/create-react-native-app/blob/master/EJECTING.md) for more details about this option.
## Troubleshooting
### Networking
If you're unable to load your app on your phone due to a network timeout or a refused connection, a good first step is to verify that your phone and computer are on the same network and that they can reach each other. Create React Native App needs access to ports 19000 and 19001 so ensure that your network and firewall settings allow access from your device to your computer on both of these ports.
Try opening a web browser on your phone and opening the URL that the packager script prints, replacing `exp://` with `http://`. So, for example, if underneath the QR code in your terminal you see:
```
exp://192.168.0.1:19000
```
Try opening Safari or Chrome on your phone and loading
```
http://192.168.0.1:19000
```
and
```
http://192.168.0.1:19001
```
If this works, but you're still unable to load your app by scanning the QR code, please open an issue on the [Create React Native App repository](https://github.com/react-community/create-react-native-app) with details about these steps and any other error messages you may have received.
If you're not able to load the `http` URL in your phone's web browser, try using the tethering/mobile hotspot feature on your phone (beware of data usage, though), connecting your computer to that WiFi network, and restarting the packager.
### iOS Simulator won't open
If you're on a Mac, there are a few errors that users sometimes see when attempting to `npm run ios`:
* "non-zero exit code: 107"
* "You may need to install Xcode" but it is already installed
* and others
There are a few steps you may want to take to troubleshoot these kinds of errors:
1. Make sure Xcode is installed and open it to accept the license agreement if it prompts you. You can install it from the Mac App Store.
2. Open Xcode's Preferences, the Locations tab, and make sure that the `Command Line Tools` menu option is set to something. Sometimes when the CLI tools are first installed by Homebrew this option is left blank, which can prevent Apple utilities from finding the simulator. Make sure to re-run `npm/yarn run ios` after doing so.
3. If that doesn't work, open the Simulator, and under the app menu select `Reset Contents and Settings...`. After that has finished, quit the Simulator, and re-run `npm/yarn run ios`.
### QR Code does not scan
If you're not able to scan the QR code, make sure your phone's camera is focusing correctly, and also make sure that the contrast on the two colors in your terminal is high enough. For example, WebStorm's default themes may [not have enough contrast](https://github.com/react-community/create-react-native-app/issues/49) for terminal QR codes to be scannable with the system barcode scanners that the Expo app uses.
If this causes problems for you, you may want to try changing your terminal's color theme to have more contrast, or running Create React Native App from a different terminal. You can also manually enter the URL printed by the packager script in the Expo app's search bar to load it manually.

@ -0,0 +1,21 @@
{
"expo": {
"sdkVersion": "19.0.0",
"icon": "http://nativebase.io/assets/img/front-page-icon.png",
"loading": {
"hideExponentText": false
},
"orientation": "portrait",
"primaryColor": "#cccccc",
"packagerOpts": {
"assetExts": [
"ttf"
]
},
"androidStatusBarColor": "#334393",
"androidStatusBar": {
"barStyle": "light-content",
"backgroundColor": "#334393"
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

@ -0,0 +1,29 @@
import React, {Component} from "react";
import {Body, Button, Container, Content, H3, Header, Icon, Left, Right, Title} from "native-base";
export default class DefaultHeader extends Component {
constructor(props) {
super(props);
}
render() {
return (
<Header {...this.props}>
<Left>
<Button
transparent
onPress={() => this.props.navigation.navigate("DrawerOpen")}
>
<Icon name="menu"/>
</Button>
</Left>
<Body>
<Title>{this.props.title}</Title>
</Body>
<Right/>
</Header>
)
}
}

@ -0,0 +1,28 @@
import React from "react";
import {DrawerNavigator} from "react-navigation";
import Home from "../pages/Home";
import SideBar from "./Sidebar";
import Stundenplan from '../tabs/Stundenplan';
import Vertretungsplan from "../tabs/Vertretungsplan";
import Klausurplan from "../tabs/Klausurplan";
const DrawerNav = DrawerNavigator(
{
Home: {screen: Home},
splan: {screen: Stundenplan},
vplan: {screen: Vertretungsplan},
kplan: {screen: Klausurplan}
},
{
initialRouteName: "Home",
contentOptions: {
activeTintColor: "#e91e63"
},
contentComponent: props => <SideBar {...props} />
}
);
export default DrawerNav;

@ -0,0 +1,95 @@
import React, {Component} from "react";
import {Image} from "react-native";
import {
Badge,
Button,
Container,
Content,
getTheme,
Icon,
Left,
List,
ListItem,
Right,
StyleProvider,
Text,
variables,
View,
} from "native-base";
import styles from "./style";
const datas = [
{
name: "Vertretungsplan",
route: "vplan",
icon: "megaphone",
bg: "#C5F442",
},
{
name: "Stundenplan",
route: "splan",
icon: "clock",
bg: "#C5F442",
},
{
name: "Klausurplan",
route: "kplan",
icon: "school",
bg: "#477EEA",
},
];
const drawerCover = require("../assets/img/drawer-cover.png");
const drawerImage = require("../assets/img/logo-kitchen-sink.png");
class SideBar extends Component {
constructor(props) {
super(props);
this.state = {
shadowOffsetWidth: 1,
shadowRadius: 4,
};
}
render() {
return (
<Container>
<Content bounces={false} style={{flex: 1, backgroundColor: "#fff", top: -1}}>
<Image style={styles.drawerCover} source={drawerCover}>
<Image square style={styles.drawerImage} source={drawerImage}/>
</Image>
<List
dataArray={datas}
renderRow={data =>
<ListItem button noBorder onPress={() => this.props.navigation.navigate(data.route)}>
<Left>
<Icon active name={data.icon} style={{color: "#777", fontSize: 26, width: 30}}/>
<Text style={styles.text}>
{data.name}
</Text>
</Left>
{data.types &&
<Right style={{flex: 1}}>
<Badge
style={{
borderRadius: 3,
height: 25,
width: 72,
backgroundColor: data.bg,
}}
>
<Text style={styles.badgeText}>{`${data.types} Types`}</Text>
</Badge>
</Right>}
</ListItem>}
/>
</Content>
</Container>
);
}
}
export default SideBar;

@ -0,0 +1,19 @@
import {Platform} from "react-native";
export default {
// Line Height
btnLineHeight: 19,
lineHeightH1: 32,
lineHeightH2: 27,
lineHeightH3: 22,
iconLineHeight: Platform.OS === "ios" ? 37 : 30,
lineHeight: Platform.OS === "ios" ? 20 : 24,
// List
listBorderColor: "#fff",
listDividerBg: "#ddd",
listItemHeight: 45,
listItemPadding: 10,
listNoteColor: "#808080",
listNoteSize: 13
};

@ -0,0 +1,61 @@
const React = require("react-native");
const {StyleSheet, Platform, Dimensions} = React;
const deviceHeight = Dimensions.get("window").height;
const deviceWidth = Dimensions.get("window").width;
export default {
sidebar: {
flex: 1,
backgroundColor: "#fff"
},
drawerCover: {
alignSelf: "stretch",
// resizeMode: 'cover',
height: deviceHeight / 3.5,
width: null,
position: "relative",
marginBottom: 10
},
drawerImage: {
position: "absolute",
// left: (Platform.OS === 'android') ? 30 : 40,
left: Platform.OS === "android" ? deviceWidth / 10 : deviceWidth / 9,
// top: (Platform.OS === 'android') ? 45 : 55,
top: Platform.OS === "android" ? deviceHeight / 13 : deviceHeight / 12,
width: 210,
height: 75,
resizeMode: "cover"
},
listItemContainer: {
flexDirection: "row",
justifyContent: "flex-start",
alignItems: "center"
},
iconContainer: {
width: 37,
height: 37,
borderRadius: 18,
marginRight: 12,
paddingTop: Platform.OS === "android" ? 7 : 5
},
sidebarIcon: {
fontSize: 21,
color: "#fff",
lineHeight: Platform.OS === "android" ? 21 : 25,
backgroundColor: "transparent",
alignSelf: "center"
},
text: {
fontWeight: Platform.OS === "ios" ? "500" : "400",
fontSize: 16,
marginLeft: 20
},
badgeText: {
fontSize: Platform.OS === "ios" ? 13 : 11,
fontWeight: "400",
textAlign: "center",
marginTop: Platform.OS === "android" ? -3 : undefined
}
};

@ -0,0 +1,30 @@
{
"name": "Organizer",
"version": "0.1.0",
"private": true,
"devDependencies": {
"jest-expo": "~19.0.0",
"react-native-scripts": "1.1.0",
"react-test-renderer": "16.0.0-alpha.12"
},
"main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
"scripts": {
"start": "react-native-scripts start",
"eject": "react-native-scripts eject",
"android": "react-native-scripts android",
"ios": "react-native-scripts ios",
"test": "node node_modules/jest/bin/jest.js --watch"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"@expo/vector-icons": "^5.0.0",
"@exponent/vector-icons": "^4.0.0",
"expo": "^19.0.0",
"native-base": "^2.3.1",
"react": "16.0.0-alpha.12",
"react-native": "^0.46.1",
"react-navigation": "^1.0.0-beta.11"
}
}

@ -0,0 +1,24 @@
import React, {Component} from "react";
import {Button, Container, Content, H3, Header, Icon, Left, Right, Text, Title} from "native-base";
import {StatusBar, StyleSheet} from 'react-native';
import DefaultHeader from '../components/DefaultHeader';
class Home extends Component {
render() {
return (
<Container>
<DefaultHeader title="Home" navigation={this.props.navigation}/>
<Content padder>
<Text>
Content goes here
</Text>
</Content>
</Container>
);
}
}
export default Home;

@ -0,0 +1,39 @@
import React, {Component} from 'react';
import {StyleSheet} from 'react-native';
import {Body, Container, Left, List, ListItem, Separator, Text} from 'native-base';
import DefaultHeader from "../components/DefaultHeader";
export default class Klausurplan extends Component {
render() {
return (
<Container>
<DefaultHeader title="Klausurplan" navigation={this.props.navigation}/>
<List>
<Separator bordered>
<Text>20.03.2017</Text>
</Separator>
<ListItem icon>
<Left><Text>1.</Text></Left>
<Body>
<Text>Englisch</Text>
<Text note>Englisch</Text>
</Body>
</ListItem>
</List>
</Container>
);
}
}
var styles = StyleSheet.create({
roundText: {
height: 30,
borderRadius: 15,
width: 30,
backgroundColor: 'green'
}
});

@ -0,0 +1,33 @@
import React, {Component} from 'react';
import {StyleSheet} from 'react-native';
import {Body, Left, List, ListItem, Separator, Text} from 'native-base';
export default class Stundenliste extends Component {
render() {
return (
<List>
<Separator bordered>
<Text>20.03.2017</Text>
</Separator>
<ListItem icon>
<Left><Text>1.</Text></Left>
<Body>
<Text>Englisch</Text>
<Text note>Englisch</Text>
</Body>
</ListItem>
</List>
);
}
}
var styles = StyleSheet.create({
roundText: {
height: 30,
borderRadius: 15,
width: 30,
backgroundColor: 'green'
}
});

@ -0,0 +1,32 @@
import React, {Component} from 'react';
import {Container, Content, Header, Tab, Tabs} from 'native-base';
import Stundenliste from './Stundenliste';
import DefaultHeader from "../components/DefaultHeader";
export default class Stundenplan extends Component {
render() {
return (
<Container>
<DefaultHeader hasTabs title="Stundenplan" navigation={this.props.navigation}/>
<Tabs
initialPage={(new Date().getDay() == 6) || (new Date().getDay() == 0) ? 0 : (new Date().getDay() - 1)}>
<Tab heading="Mo">
<Stundenliste/>
</Tab>
<Tab heading="Di">
<Stundenliste/>
</Tab>
<Tab heading="Mi">
<Stundenliste/>
</Tab>
<Tab heading="Do">
<Stundenliste/>
</Tab>
<Tab heading="Fr">
<Stundenliste/>
</Tab>
</Tabs>
</Container>
);
}
}

@ -0,0 +1,25 @@
import React, {Component} from 'react';
import {Container, Content, Header, Tab, Tabs} from 'native-base';
import Stundenliste from './Stundenliste';
import DefaultHeader from "../components/DefaultHeader";
export default class Vertretungsplan extends Component {
render() {
return (
<Container>
<DefaultHeader hasTabs title="Vertretungsplan" navigation={this.props.navigation}/>
<Tabs initialPage={0}>
<Tab heading="Mo, 28. Aug">
<Stundenliste/>
</Tab>
<Tab heading="Di, 29. Aug">
<Stundenliste/>
</Tab>
<Tab heading="Mi, 30. Aug">
<Stundenliste/>
</Tab>
</Tabs>
</Container>
);
}
}

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save