Browse Source

small bug fix for public themes

current_wdka_release
crunk 3 years ago
parent
commit
825013b3c2
  1. 1
      verse/distribusisinfo.py
  2. 6
      verse/editor.py
  3. 2
      verse/static/css/selector.css
  4. 19
      verse/static/css/style.css
  5. 9
      verse/templates/distribusiworkflow/launch.html

1
verse/distribusisinfo.py

@ -23,6 +23,7 @@ class DistribusisInfo:
f"{distribusi.publictheme} used in {distribusi.distribusiname}", # noqa: E501
)
publicthemes.append(publictheme)
print(publicthemes)
return publicthemes
def visibledistribusis():

6
verse/editor.py

@ -41,9 +41,11 @@ def Editor():
def ValidateEditCssForm(editorform, current_distribusi):
newcssfolder = os.path.join("themes/userthemes", current_distribusi)
shutil.rmtree(newcssfolder)
if os.path.exists(newcssfolder):
shutil.rmtree(newcssfolder)
publicfolder = os.path.join("themes/publicthemes", current_distribusi)
shutil.rmtree(publicfolder)
if os.path.exists(publicfolder):
shutil.rmtree(publicfolder)
if editorform.public.data:
MakePublicTheme(editorform, current_distribusi)
if editorform.cssfile.data:

2
verse/static/css/selector.css

@ -1,7 +1,5 @@
.selector-style {
padding: 0;
margin: 0;
border: 1px solid #ccc;
width: 20em;
max-width: 20em;
position: relative;

19
verse/static/css/style.css

@ -17,7 +17,7 @@ div#login{
}
div#login form {
width: 200px;
width: 24em;
margin: 0 auto;
padding-left: 15%;
padding-right: 15%;
@ -216,22 +216,33 @@ div.maincontent{
color: black !important;
}
.tooltip {
position: relative;
display: inline-block;
border-bottom: 1px dotted black;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 120px;
background-color: black;
color: #fff;
text-align: center;
border-radius: 1px;
padding: 5px 0;
/* Position the tooltip */
position: absolute;
z-index: 1;
bottom: 100%;
left: 50%;
margin-left: -60px;
/* Fade in tooltip - takes 1 second to go from 0% to 100% opac: */
opacity: 0;
transition: opacity 2s;
}
.tooltip:hover .tooltiptext {
visibility: visible;
opacity: 1;
}
/*
Project colors so far.

9
verse/templates/distribusiworkflow/launch.html

@ -1,7 +1,8 @@
<div id="launch" class="workflow">
<h2>Step 4: Distribusi</h2>
<p>Run distribusi on your files. This will generate your website and make
your content public.</p>
<p class="tooltip">Run distribusi on your files. This will generate your website and make
your content public. <span class="tooltiptext">Distribusi will unpack your zip file and turn it into a website!
</span></p>
<form method="POST" enctype="multipart/form-data" action="{{ url_for('distribusi') }}">
{{ distribusiform.csrf_token }}
{% if files_uploaded or distribusi_live %}
@ -9,9 +10,11 @@
{{ distribusiform.submit }}
</fieldset>
{% else %}
<p>
<p class="tooltip">
You need to upload your files first before you can run distribusi
on your files.
<span class="tooltiptext">Go back to step 1 and upload a zipfile with
your files</span>
</p>
<a href="#upload">Go to Step 1</a>
{% endif %}

Loading…
Cancel
Save