summaryrefslogtreecommitdiffstats
path: root/sass/parts/_header.scss
blob: cd9de82910f3e35816b639ead80dde8f843f74c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
header{
	height: 30px;
	padding: 30px 0;
	border-bottom: 1px solid $gray04;
	line-height: 30px;
	a{
		color: $gray01;
		@include transition(0.3s);
		&:hover{
			color: $main;
		}
	}
	h1{
		font-weight: 300;
		font-size: 30px;
	}
	nav{
		margin-left: 30px;
		>ul{
			>li{
				display: inline-block;
				margin-left: 50px;
				&:hover{
					>a{
						color: $main;
					}
				}
				>a{
					padding: 38px 30px 38px 0;
					margin-top: -38px;
					background: image-url('detail.png') right center no-repeat;
					&:only-child{
						padding-right: 0;
						background: none;
					}
				}
			}
			ul{
				position: absolute;
				top: 60px;
				left: -15px;
				z-index: 10;
				white-space: nowrap;
				background: $gray04;
				border: 1px solid $gray03;
				list-style: none;
				display: none;
				@include box-shadow(0 4px 8px rgba(0,0,0,0.1));
				@include border-radius(0 0 5px 5px);
				ul{
					@include border-radius(0 5px 5px 5px);
				}
				li{
					@include border-shadow($background, $gray03);
					&:hover{
						background: #d5d5d5;
					}
					&:first-of-type{
						border-top: none;
						ul{
							@include border-radius(0 0 5px 5px);
						}
					}
					&:last-of-type{
						border-bottom: none;
					}
					>a{
						background: image-url('detail-sub.png') right center no-repeat;
						display: block;
						padding: 5px 30px 5px 15px;
						&:hover{
							color: $gray01;
						}
						&:only-child{
							background: none;
							padding-right: 15px;
						}
					}
				}
				ul{
					top: 0;
					left: 100%;
				}
			}
			li{
				position: relative;
				&:hover{
					>ul{
						display: block;
					}
				}
			}
		}
		select{
			display: none;
			margin-bottom: 10px;
		}
	}
	.search{
		input[type="text"]{
			background: image-url('search.png') 10px center no-repeat #f2f2f2;
			color: $gray02;
			border: 1px solid $gray04;
			font: 13px $default;
			padding: 6px 15px 6px 35px;
			width: 100px;
			@include transition(0.3s);
			@include border-radius(15px);
			&:focus, &:active{
				background: image-url('search.png') 10px center no-repeat #fff;
				width: 150px;
				border-top: 1px solid $gray03;
				color: $gray01;
				outline: none;
			}
		}
	}
	.social{
		margin-right: 15px;
		a{
			@include border-radius(50%);
			display: inline-block;
			text-indent: -9999px;
			margin-right: 15px;
			opacity: 0.5;
			@include square(28px);
			@include transition(0.3s);
			&:hover{
				opacity: 1;
			}
			&.facebook{
				background: image-url('facebook.png') center no-repeat #3B5998;
				border: 1px solid #3B5998;
				&:hover{
					border: 1px solid darken(#3B5998, 10%);
				}
			}
			&.google{
				background: image-url('google.png') center no-repeat #C83D20;
				border: 1px solid #C83D20;
				&:hover{
					border: 1px solid darken(#C83D20, 10%);
				}
			}
			&.twitter{
				background: image-url('twitter.png') center no-repeat #55CFF8;
				border: 1px solid #55CFF8;
				&:hover{
					border: 1px solid darken(#55CFF8, 10%);
				}
			}
			&.rss{
				background: image-url('rss.png') center no-repeat #EF7522;
				border: 1px solid #EF7522;
				&:hover{
					border: 1px solid darken(#EF7522, 10%);
				}
			}
		}
	}
}

@media screen and (max-width: 1030px){
	header{
		height: auto;
		position: relative;
		padding-bottom: 10px;
		h1{
			float: none !important;
		}
		nav{
			margin-left: 0;
			margin-top: 15px;
			float: none !important;
			>ul{
				>li{
					margin-left: 0;
					margin-right: 50px;
					&:last-of-type{
						margin-right: 0;
					}
					>a{
						padding: 18px 30px 18px 0;
						&:only-child{
							padding-right: 0;
						}
					}
				}
				ul{
					top: 40px;
				}
			}
		}
		>.right{
			position: absolute;
			top: 30px;
			right: 0;
		}
	}
}

@media screen and (max-width: 600px){
	header{
		nav{
			>ul{
				display: none;
			}
			select{
				display: block;
			}
		}
		.social{
			display: none;
		}
		.search{
			input[type="text"]{
				width: 60px;
				&:focus, &:active{
					width: 100px;
				}
			}
		}
	}
}