Bläddra i källkod

Use modular header instead of duplicating code, also removed bootstrap styles

theflametrooper 8 år sedan
förälder
incheckning
7c9a316725
2 ändrade filer med 2 tillägg och 84 borttagningar
  1. 0 7
      frontend/build/index.html
  2. 2 77
      frontend/components/Station.Vue

+ 0 - 7
frontend/build/index.html

@@ -8,13 +8,6 @@
 	<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css">
 	<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet" type="text/css">
 	<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
-
-	<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
-	<!-- Latest compiled and minified CSS -->
-	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.4/css/bootstrap.min.css" integrity="sha384-2hfp1SzUoho7/TsGGGDaFdsuuDL0LX2hnUp6VkX3CUQ2K4K+xjboZdsXyp4oUHZj" crossorigin="anonymous">
-
-	<!-- Latest compiled and minified JavaScript -->
-	<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.4/js/bootstrap.min.js" integrity="sha384-VjEeINv9OSwtWFLAtmc4JCtEJXXBub00gtSnszmspDLCtC0I4z4nqz7rEFbIZLLU" crossorigin="anonymous"></script>
 </head>
 <body>
 	<Station></Station>

+ 2 - 77
frontend/components/Station.Vue

@@ -1,17 +1,6 @@
 <template>
 	<div class="app">
-		<header>
-			<div class="header-inner">
-				<div class="link left"><i class="material-icons">home</i></div>
-				<div class="link left"><i class="material-icons">playlist_add</i></div>
-				<div class="link left"><i class="material-icons">flag</i></div>
-				<div class="link left"><i class="material-icons">skip_next</i></div>
-				<span class="room-title">Pop</span>
-				<div class="link right"><i class="material-icons">queue_music</i></div>
-				<div class="link right"><i class="material-icons">chat</i></div>
-				<div class="link right"><i class="material-icons">people</i></div>
-			</div>
-		</header>
+		<component-header></component-header>
 		<div class="body">
 			<div class="row">
 				<div class="col-md-8 push-md-2 col-sm-10 push-sm-1 col-xs-12">
@@ -31,7 +20,6 @@
 </template>
 
 <script>
-	// TODO: Implement these files
 	import ComponentHeader from './MusareHeader.vue'
 	import ComponentBody from './MusareBody.vue'
 	import ComponentFooter from './MusareFooter.vue'
@@ -40,7 +28,7 @@
 		data() {
 			return {}
 		},
-		components: { }
+		components: { ComponentHeader }
 	}
 </script>
 
@@ -58,69 +46,6 @@
 	}
 
 
-	header {
-		width: 100%;
-		height: 64px;
-		line-height: 64px;
-		text-align: center;
-		box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
-	}
-
-	.header-inner {
-		width: 100%;
-		height: 100%;
-		background-color: #0091ea;
-		.title {
-			font-weight: 300;
-			font-size: 32px;
-		}
-
-		* {
-			color: white;
-		}
-
-		.link {
-			z-index: 101;
-			position: relative;
-			padding: 0 16px 0 16px;
-			cursor: pointer;
-
-			height: 64px;
-			min-width: 64px;
-			line-height: 64px;
-			font-size: 2rem;
-			transition: background-color .3s;
-		}
-
-		.link:hover {
-			background-color: rgba(0, 0, 0, 0.1);
-		}
-
-		.right {
-			float: right;
-		}
-
-		.left {
-			float: left;
-		}
-
-		i.material-icons {
-			display: block;
-			font-size: 2rem;
-			line-height: 64px;
-			height: 64px;
-		}
-
-		.room-title {
-			left: 50%;
-			-webkit-transform: translateX(-50%);
-			transform: translateX(-50%);
-			font-size: 2.1em;
-		}
-	}
-
-
-
 	.body {
 		/*width: 100%;
 		line-height: 256px;