-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inject CSS and script #69
Comments
+1 on this one. I don't have experience with coffeescript or eco but looking through the code, it looks like we could add a css property with an array to the .documentup.json file. Then we can loop over these in the default.eco file. |
This would require online css files btw. |
Adding the following to the default.eco file: <% if @project.config.css_files.length: %>
<% for css_file in @project.config.css_files: %>
<link rel="stylesheet" type="text/css" href="css_file">
<% end %>
<% end %> And defining the css_files as follows in the .documentup.json might work. {
"name": "My docs",
"css_files" : ["http://mywebsite/doc/style.css"]
} |
If you are curious, these where my css tweaks. They are kind of specific for a bigger and deeper readme. /* Create more destinction between h3 and h4 */
h2 {
border-bottom: 2px solid #BBB;
}
h3 {
color: #CC333F;
}
/* Make nav float and separately scrollable */
#nav {
position: fixed;
top: 0px;
height: 90%;
overflow-y: auto;
}
#content {
margin-left: 260px
}
@media only screen and (max-width : 480px) {
#container {
margin: 0;
}
#nav {
position: static;
}
}
/* Make nav more compact */
#nav #sections ul {
margin-bottom: 5px;
}
#nav #sections > li > a {
padding: 3px 0px;
}
#nav #sections ul li a {
padding: 0px 15px;
} |
In the configuration file, it would be nice to be able to set css and scripts to inject in the page. This way we could easily customize the style to fit our needs.
You can simply add them at the end of the head tag.
The text was updated successfully, but these errors were encountered: