Skip to content

Commit a5bb503

Browse files
authored
fix styles (#125)
* fix styles * linting
1 parent 824ce98 commit a5bb503

File tree

3 files changed

+62
-8
lines changed

3 files changed

+62
-8
lines changed
Lines changed: 56 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,68 @@
11
#toolbarViewerMiddle {
2-
@apply pl-0 pr-0 absolute left-[50%];
2+
@apply pl-0 pr-0 absolute left-[45%];
33

44
@media (min-width: 940px) {
5-
transform: translateX(-75%);
5+
@apply -translate-x-[50%];
66
}
77

88
@media (max-width: 680px) {
9-
padding-left: 1em;
9+
@apply pr-4 left-auto right-0;
10+
}
11+
12+
@media (max-width: 380px) {
13+
@apply left-[45%] right-0 ml-[-25%];
14+
}
15+
}
16+
17+
#toolbarViewerLeft {
18+
@media (max-width: 680px) {
19+
@apply hidden;
20+
}
21+
}
22+
23+
#toolbarViewerRight {
24+
@media (max-width: 380px) {
25+
@apply hidden;
26+
}
27+
}
28+
29+
#scaleSelectContainer {
30+
@apply my-[7px] mx-[5px];
31+
32+
#scaleSelect {
33+
@apply bg-white border border-black;
34+
}
35+
36+
@media (max-width: 940px) {
37+
@apply hidden;
38+
}
39+
40+
@media (min-width: 941px) {
41+
@apply hidden;
42+
}
43+
}
44+
45+
.hiddenSmallView {
46+
@media (max-width: 800px) {
47+
@apply hidden;
48+
}
49+
}
50+
51+
.toolbarButtonSpacer {
52+
@media (max-width: 980px) {
53+
@apply w-0;
1054
}
1155
}
1256

1357
.button.decidim-button {
1458
@apply outline-none focus:outline-none font-normal text-xs;
1559
}
60+
61+
#exportSuggestionsTrigger,
62+
#fullscreenButton {
63+
@media (max-width: 900px) {
64+
span {
65+
@apply hidden;
66+
}
67+
}
68+
}

app/views/decidim/participatory_documents/documents/_pdfjs_base.html.erb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,17 +145,17 @@ See https://github.com/adobe-type-tools/cmap-resources
145145
<% if defined?(display_save) && display_save == true %>
146146
<button id="DecidimPDSaveButton" class="button button__primary button__xs mr-2 decidim-button" title="<%= t "save_changes", scope: "decidim.participatory_documents.document" %>">
147147
<%= icon "save-line" %>
148-
<%= t "save_changes", scope: "decidim.participatory_documents.document" %>
148+
<span><%= t "save_changes", scope: "decidim.participatory_documents.document" %></span>
149149
</button>
150150
<% end %>
151151
<% if defined?(display_suggestions) && display_suggestions == true %>
152152
<button id="globalSuggestionTrigger" class="button button__secondary button__xs mr-2 decidim-button" title="<%= t "global_suggestions", scope: "decidim.participatory_documents.document" %>">
153153
<%= icon("chat-1-line") %>
154-
<%= t "global_suggestions", scope: "decidim.participatory_documents.document" %>
154+
<span><%= t "global_suggestions", scope: "decidim.participatory_documents.document" %></span>
155155
</button>
156156
<button id="exportSuggestionsTrigger" class="button button__xs button__transparent-secondary decidim-button" title="<%= t "export_my_suggestions", scope: "decidim.participatory_documents.document" %>">
157157
<%= icon("download-line") %>
158-
<%= t "export_my_suggestions", scope: "decidim.participatory_documents.document" %>
158+
<span><%= t "export_my_suggestions", scope: "decidim.participatory_documents.document" %></>
159159
</button>
160160
<% end %>
161161
</div>
@@ -299,8 +299,8 @@ See https://github.com/adobe-type-tools/cmap-resources
299299
<button id="fullscreenButton" class="button button__xs button__text decidim-button" onclick="toggleFullscreen()"
300300
data-fullscreen="<%= t("decidim.participatory_documents.suggestions.modal.full_screen") %>"
301301
data-exit="<%= t("decidim.participatory_documents.suggestions.modal.exit_full_screen") %>">
302-
<%= icon "fullscreen-line" %>
303-
<%= t("decidim.participatory_documents.suggestions.modal.full_screen") %>
302+
<%= icon "fullscreen-line" %>
303+
<span><%= t("decidim.participatory_documents.suggestions.modal.full_screen") %></span>
304304
</button>
305305

306306
<div id="secondaryToolbarToggle" class="toolbarButtonWithContainer">

lib/tasks/decidim_participatory_documents.rake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ namespace :decidim_participatory_documents do
2626
public_dir = rails_app_path.join(destination_path, "pdfjs")
2727
temp_dir = Rails.root.join("tmp/pdfjs")
2828
FileUtils.mkdir_p(temp_dir)
29+
FileUtils.rm_rf(public_dir) if File.exist?(public_dir)
2930
FileUtils.mkdir_p(public_dir)
3031
filename = File.basename(URI.parse(pdfjs_url).path)
3132
tmp_file = temp_dir.join(filename)

0 commit comments

Comments
 (0)