History

Improve settings UI

Thibaut Courouble committed 9 years ago

Commit f010b601 parent 4298c603 files · +13 −17Browse files

Unified · Split

3 files
  1. assets/javascripts/templates/pages/settings_tmpl.coffee +6 −10
  2. assets/stylesheets/components/_mobile.scss +4 −0
  3. assets/stylesheets/components/_settings.scss +3 −7
assets/javascripts/templates/pages/settings_tmpl.coffee+6−10
@@ -8,16 +8,17 @@ app.templates.settingsPage = (settings) -> """ · 7 unmodified lines
88 <label class="_settings-label">
99 <input type="checkbox" name="dark" value="1"#{if settings.dark then ' checked' else ''}>Enable dark theme
1010 </label>
11− <label class="_settings-label _settings-max-width">
11+ <label class="_settings-label _setting-max-width">
1212 <input type="checkbox" name="layout" value="_max-width"#{if settings['_max-width'] then ' checked' else ''}>Enable fixed-width layout
1313 </label>
14− <label class="_settings-label">
14+ <label class="_settings-label _hide-on-mobile">
1515 <input type="checkbox" name="layout" value="_sidebar-hidden"#{if settings['_sidebar-hidden'] then ' checked' else ''}>Automatically hide and show the sidebar
16+ <small>Tip: drag the edge of the sidebar to resize it.</small>
1617 </label>
1718 </div>
1819 </div>
1920
20− <div class="_settings-fieldset">
21+ <div class="_settings-fieldset _hide-on-mobile">
2122 <h2 class="_settings-legend">Scrolling:</h2>
2223
2324 <div class="_settings-inputs">
@@ -31,11 +32,6 @@ app.templates.settingsPage = (settings) -> """ · 7 unmodified lines
3132 </div>
3233 </div>
3334
34− <div class="_settings-fieldset">
35− <h2 class="_settings-legend">Advanced:</h2>
36−
37− <div class="_settings-inputs">
38− <a href="#" class="_settings-link" data-behavior="reset">Reset all settings and data</a>
39− </div>
40− </div>
35+ <p>
36+ <a href="#" class="_reset-link" data-behavior="reset">Reset all settings and data</a>
4137 """
assets/stylesheets/components/_mobile.scss+4−0
@@ -6,6 +6,8 @@ · 5 unmodified lines
66 font-size: 100%;
77 background: $contentBackground;
88
9+ ._hide-on-mobile { display: none; }
10+
911 // Layout
1012
1113 body { -ms-overflow-style: -ms-autohiding-scrollbar; }
@@ -36,6 +38,8 @@ · 24 unmodified lines
3638 box-shadow: none;
3739 }
3840
41+ // Settings
42+
3943 ._settings { position: relative; }
4044 ._settings-tabs { display: block; }
4145 ._header ._settings-btn { width: auto; }
assets/stylesheets/components/_settings.scss+3−7
@@ -66,15 +66,11 @@ · 65 unmodified lines
6666 }
6767
6868 @media (max-width: $maxWidth) {
69− ._settings-max-width { display: none; }
69+ ._setting-max-width { display: none; }
7070 }
7171
72−._settings-link {
73− display: inline-block;
74− vertical-align: top;
75− margin-left: .375rem;
76−
77− &[data-behavior="reset"] { color: $textColorRed; }
72+._reset-link {
73+ color: $textColorRed;
7874 }
7975
8076 //