Skip to content
This repository was archived by the owner on Dec 29, 2021. It is now read-only.

Commit 55f64e1

Browse files
committed
Move the quick-add to a floating action button (FAB) per Material Design guidelines
1 parent 2c9e886 commit 55f64e1

2 files changed

Lines changed: 32 additions & 2 deletions

File tree

src/browser_action.css

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,33 @@ header {
2525
height: 48px;
2626
background: #0086f4;
2727
padding: 12px;
28+
position: fixed;
29+
width: 100%;
30+
top: 0;
31+
left: 0;
32+
right: 0;
33+
z-index: 10;
34+
}
35+
36+
.header-placeholder {
37+
height: 48px;
38+
}
39+
40+
.fab {
41+
height: 42px;
42+
width: 42px;
43+
cursor: pointer;
44+
border-radius: 50%;
45+
box-shadow: 0 0 4px rgba(0,0,0,.14), 0 4px 8px rgba(0,0,0,.28);
46+
transform: scale(1) rotate(360deg);
47+
transition: transform 150ms cubic-bezier(.4,0,1,1);
48+
background: #db4437;
49+
color: #fff;
50+
position: fixed;
51+
right: 16px;
52+
top: 64px;
53+
padding: 9px;
54+
z-index: 10;
2855
}
2956

3057
.popup-title a {
@@ -81,7 +108,7 @@ section {
81108

82109
#quick-add {
83110
background: #fff;
84-
margin: 16px 0;
111+
margin: 8px 0;
85112
padding: 16px;
86113
box-shadow: 0 2px 4px rgba(0,0,0,0.4);
87114
}

src/browser_action.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
<body>
1616
<header>
1717
<div id="action-bar">
18-
<img src="icons/ic_add_white_24dp.png" id="show_quick_add" class="i18n">
1918
<img src="icons/ic_refresh_white_24dp.png" id="sync_now" class="i18n">
2019
<img src="icons/ic_settings_white_24dp.png" id="show_options" class="i18n">
2120
</div>
@@ -24,7 +23,11 @@
2423
<span class="i18n" id="logo_text">Google Calendar</span>
2524
</a>
2625
</div>
26+
<div class="fab">
27+
<img width="24" height="24" src="icons/ic_add_white_24dp.png" id="show_quick_add" class="i18n">
28+
</div>
2729
</header>
30+
<div class="header-placeholder"></div>
2831
<section>
2932
<a id="announcement_new_features" class="i18n" href="https://github.com/manastungare/google-calendar-crx/wiki/Changes" target="_blank"></a>
3033
<div id="error">

0 commit comments

Comments
 (0)